quchip.viz.control

Pulse-sequence timeline plot.

Functions

plot_sequence(sequence, *[, ax, lane_order, ...])

Plot a QuantumSequence as a lane chart.

quchip.viz.control.plot_sequence(sequence, *, ax=None, lane_order=None, color_by='device')[source]

Plot a QuantumSequence as a lane chart.

Each row (“lane”) is a (target_label, drive_label) channel. Each bar is one scheduled envelope, spanning its start_time to start_time + envelope.duration on the x-axis (ns) and annotated with the envelope class name and the carrier frequency in GHz. Idle channels that were created (channel_cursors advanced) 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.figure when ax was given).

Return type:

Figure

Raises:

ValueError – color_by is not "device" or "line".