quchip.viz.control¶
Pulse-sequence timeline plot.
Functions
|
Plot a |
- quchip.viz.control.plot_sequence(sequence, *, ax=None, lane_order=None, color_by='device')[source]¶
Plot a
QuantumSequenceas a lane chart.Each row (“lane”) is a
(target_label, drive_label)channel; each bar is one scheduled envelope, drawn from itsstart_timetostart_time + envelope.durationon the x-axis (ns), annotated with the envelope class name and carrier frequency in GHz. Idle channels that were created (channel_cursorsadvanced) but never scheduled show up as empty lanes.- Parameters:
sequence (QuantumSequence) – The schedule to visualise.
ax (matplotlib.axes.Axes, optional) – Existing axes to draw onto. When
Nonea new figure is created.lane_order (list of (target_label, drive_label), optional) – Explicit ordering (top-to-bottom). Defaults to sorted lane keys.
color_by ({"device", "line"}) – Group bars by target device or by drive line for colour mapping.
- Returns:
The figure holding the lane-chart axes (
ax.figurewhen ax was given).- Return type:
Figure
- Raises:
ValueError – color_by is not
"device"or"line".