To use the circuit drawer tool, install the visualization
extra:
Draw a quantum circuit directly from any OpenQASM string:
mpl
(matplotlib) output format is supported.All draw methods accepts either a str
(QASM source) or a pyqasm.QasmModule object. The following are equivalent:
Use the idle_wires=False
option to exclude idle qubits (i.e. wires with no circuit elements) in the output circuit diagram:
Save the circuit diagram to a file by specifying output='mpl'
and a filename
:
To use the circuit drawer tool, install the visualization
extra:
Draw a quantum circuit directly from any OpenQASM string:
mpl
(matplotlib) output format is supported.All draw methods accepts either a str
(QASM source) or a pyqasm.QasmModule object. The following are equivalent:
Use the idle_wires=False
option to exclude idle qubits (i.e. wires with no circuit elements) in the output circuit diagram:
Save the circuit diagram to a file by specifying output='mpl'
and a filename
: