qilisdk.utils.visualization.circuit_renderers

Classes

MatplotlibCircuitRenderer

Render a Circuit using matplotlib.

Module Contents

class MatplotlibCircuitRenderer(circuit: qilisdk.digital.Circuit, ax: matplotlib.axes.Axes | None = None, *, style: qilisdk.utils.visualization.style.CircuitStyle = CircuitStyle())[source]

Render a Circuit using matplotlib.

circuit[source]
style[source]
property axes: matplotlib.axes.Axes[source]
plot() None[source]

Render the circuit on the current axes and show the figure.

Traverses the circuit gates once, placing and drawing each element, deferring final-column measurements as needed, draws wires and finalizes the figure.

save(filename: str) None[source]

Save current figure to disk.

Parameters:

filename – Path to save the figure (e.g., ‘circuit.png’).