qlasskit.qcircuit.qcircuit.QCircuit
- class qlasskit.qcircuit.qcircuit.QCircuit(num_qubits=0, name='qc', native=None)
 - __init__(num_qubits=0, name='qc', native=None)
 Initialize a quantum circuit.
- Parameters:
 num_qubits (int, optional) – The number of qubits in the circuit. Defaults to 0.
Methods
__init__([num_qubits, name, native])Initialize a quantum circuit.
add_qubit([name])Add a qubit to the circuit.
append(gate, qubits[, param])Append a gate operation to the circuit.
append_circuit(other[, qubits])Add a qcircuit, remapping to qubits
barrier([label])Add a barrier to the circuit
ccx(w1, w2, w3)CCX gate
copy([vanilla])Create a copy of the quantum circuit; if vanilla is True, reset all mapping info
cp(phase, w1, w2)CP gate
cx(w1, w2)CX gate
cz(w1, w2)CZ gate
draw()Draw the circuit
export([mode, framework])Exports the circuit to another framework.
get_key_by_index(i)Return the qubit name given its index
h(w)H gate
iqft(wl)Apply the inverse quantum fourier transform
mctrl(g, wl, target[, param])Multi controlled gate
mcx(wl, target)Multi CX gate
qft(wl)Apply the quantum fourier transform
random(qubits_n, depth[, gate_list])repeat(n)Return a copy of the QCircuit repeated n times
s(w)S gate
swap(w1, w2)t(w)T gate
x(w)X gate
y(w)Y gate
z(w)Z gate
Attributes
gate_statsnum_gatesused_qubits