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