Playlist#

class iqm.models.playlist.playlist.Playlist(channel_descriptions=<factory>, segments=<factory>)#

Bases: object

Information required to build a batch of programs for AWGs and readout instruments.

Consists of a number of Segment s, executed in a sequence, and information about the properties of the control and readout channels used in the Segments, as well as Instruction and Waveform tables.

This class implements the new data structure that contains all the data necessary for an experiment to execute. Playlist contains information of all the channels used as well as the instruction execution schedule.

Parameters:
  • channel_descriptions (dict[str, ChannelDescription]) – Controller name mapped to channel and channel specific instruction and waveform data.

  • segments (list[Segment]) – Contains all the segments in the order of execution.

Module: iqm.models.playlist.playlist

Attributes

channel_descriptions

segments

Methods

add_channel

Adds a new channel to the Playlist.

view

Return operations of the playlist grouped by segments and channel names for easy inspection.

add_channel(new_channel)#

Adds a new channel to the Playlist.

Parameters:

new_channel (ChannelDescription) – channel to add

Raises:

ValueError – channel with that name already exists, and has different properties

Return type:

None

view(*, filter_segments=None, filter_channels=None, kind='operations')#

Return operations of the playlist grouped by segments and channel names for easy inspection. This method is not meant to be used for integration purposes, but rather for hands-on inspection and debugging.

Parameters:
  • filter_segments (list[int] | None) – List of segment indexes to filter by. If None, all segments are included.

  • filter_channels (list[str] | None) – List of channel names to filter by. If None, all channels are included.

  • kind (str) – Type of data to return in the inner dict, either “operations” or “instructions”.

Returns:

keys are channels, values are lists of operations or instructions.

Return type:

Dict of segments, where values are dicts

Raises:

ValueError – If kind is not “operations” or “instructions”.