General
QuantumCircuitDraw.new_circuit_plot
— Methodnew_circuit_plot(N::Int, steps::Int; qubit_names=[], grid=false, dpi=300)
Initializes a plot for a quantum circuit with N
qubits and steps
steps. If qubit_names
is empty, the qubits are named q₁
, q₂
, etc. Set grid=true
to show a grid.
QuantumCircuitDraw.circuit_plot
— Methodcircuit_plot(N::Int, circuit::Vector{Tuple{String, Vector{Real}}}; qubit_names=[], grid=false, dpi=300)
Plots a circuit of the form circuit = [(gate, sites), ...]
.
QuantumCircuitDraw.paulistrings_plot
— Methodpaulistrings_plot(circuit; qubit_names=[], grid=false, dpi=300)
Plots a circuit constructed with PauliStrings.jl
Gates
QuantumCircuitDraw.Single
— MethodSingle(i::Int, j::Int, name::String; color=default_color)
Draws a single-qubit gate at step i
and qubit j
with name name
.
QuantumCircuitDraw.Controlled
— MethodControlled(i::Int, control::Int, target::Int, name::String; color=default_color)
Draws a controlled gate with control
qubit and target
qubit at step i
.
QuantumCircuitDraw.MCZ
— MethodMCZ(i::Int, sites::Vector{Int}; color=default_color)
Draws a multi-controlled Z gate acting on sites
qubits at step i
.
QuantumCircuitDraw.MCX
— MethodMCX(i::Int, controls::Vector{Int}, target::Int; color=default_color)
Draws a multi-controlled X gate acting on sites
qubits at step i
.
QuantumCircuitDraw.CNOT
— MethodCNOT(i::Int, control::Int, target::Int; color=default_color)
Draws a CNOT gate at step i
with control
and target
qubits.
QuantumCircuitDraw.CCNOT
— MethodCCNOT(i::Int, control1::Int, control2::Int, target::Int; color=default_color)
Draws a CCNOT gate at step i
with control1
, control2
, and target
qubits.
QuantumCircuitDraw.CCX
— MethodCCX(i::Int, control1::Int, control2::Int, target::Int; color=default_color)
Same as CCNOT
.
QuantumCircuitDraw.Swap
— MethodSwap(i::Int, j1::Int, j2::Int; color=default_color)
Draws a SWAP gate at step i
between qubits j1
and j2
.
QuantumCircuitDraw.Measurement
— MethodMeasurement(i::Int, j::Int; color=default_color)
Draws a measurement gate at step i
on qubit j
.
QuantumCircuitDraw.CX
— MethodCX(i::Int, control::Int, target::Int; color=default_color)
Draws a controlled X gate at step i
with control
and target
qubits.
QuantumCircuitDraw.CY
— MethodCY(i::Int, control::Int, target::Int; color=default_color)
Draws a controlled Y gate at step i
with control
and target
qubits.
QuantumCircuitDraw.CZ
— MethodCZ(i::Int, control::Int, target::Int; color=default_color)
Draws a controlled Z gate at step i
with control
and target
qubits.