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, drawn from its start_time to start_time + envelope.duration on the x-axis (ns), annotated with the envelope class name and carrier frequency in GHz. Idle channels that were created (channel_cursors advanced) 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 None a 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.figure when ax was given).

Return type:

Figure

Raises:

ValueErrorcolor_by is not "device" or "line".