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, spanning itsstart_timetostart_time + envelope.durationon the x-axis (ns) and annotated with the envelope class name and the carrier frequency in GHz. Idle channels that were created (channel_cursorsadvanced) but never scheduled show as empty lanes.- Parameters:
sequence (QuantumSequence) – The schedule to visualise.
ax (matplotlib.axes.Axes, optional) – Existing axes to draw on. When
None, the function makes a new figure.lane_order (list of (target_label, drive_label), optional) – Explicit order (top to bottom). The default is the sorted lane keys.
color_by ({"device", "line"}) – Group bars by target device or by drive line for the colour mapping.
- Returns:
The figure that holds the lane-chart axes (
ax.figurewhen ax was given).- Return type:
Figure
- Raises:
ValueError – color_by is not
"device"or"line".