qml.circuit_drawer

Warning

Unless you are a PennyLane or plugin developer, you likely do not need to use these classes directly.

The MPLDrawer can be used manually but does not yet integrate with the rest of PennyLane.

This subpackage provides the circuit drawing functionality used to render QNodes as circuit diagrams.

Functions

convert_wire_order(ops[, wire_order, …])

Creates the mapping between wire labels and place in order.

drawable_grid(ops[, wire_map])

Determine non-overlapping yet dense placement of operations for drawing.

drawable_layers(ops[, wire_map])

Determine non-overlapping yet dense placement of operations into layers for drawing.

Classes

CircuitDrawer(raw_operation_grid, …[, …])

Creates a circuit diagram from the operators of a CircuitGraph in grid form.

MPLDrawer(n_layers, n_wires[, wire_options, …])

Allows easy creation of graphics representing circuits with matplotlib