ReadoutMetrics#

Module: iqm.pulse.playlist.instructions

class iqm.pulse.playlist.instructions.ReadoutMetrics(num_segments, integration_occurrences=<factory>, timetrace_occurrences=<factory>, timetrace_lengths=<factory>, implementations=<factory>)#

Bases: object

Necessary readout metrics needed for return data processing for a single Playlist.

Individual readout operations (and their results) are labeled using a readout label of the format f"{component}__{readout_key}", where component is the name of the measured QPU component (typically a qubit), and readout_key is a string which identifies the individual measurement operation.

Attributes

num_segments

Number of segments in the Playlist this ReadoutMetrics object represents.

integration_occurrences

Map each integration readout label to its number of occurrences in each Playlist segment.

timetrace_occurrences

Map each time trace readout label to its number of occurrences in each Playlist segment.

timetrace_lengths

Map each time trace readout label to its number of time trace samples.

implementations

Map each integration or time trace readout label to its implementations (of the format f"{measure_gate_name}.{implementation_name}").

Methods

extend

Extend the metrics with a ReadoutTrigger in a given Playlist Segment.

filter_out

Filter out readout labels from the contents of self.

get_components

Get all QPU components in the readout labels in self.

get_keys

Get all readout keys in the readout labels in self.

get_labels

Get all the readout labels in self.

Parameters:
num_segments: int#

Number of segments in the Playlist this ReadoutMetrics object represents.

integration_occurrences: dict[str, list[int]]#

Map each integration readout label to its number of occurrences in each Playlist segment.

timetrace_occurrences: dict[str, list[int]]#

Map each time trace readout label to its number of occurrences in each Playlist segment.

timetrace_lengths: dict[str, int]#

Map each time trace readout label to its number of time trace samples.

implementations: dict[str, set[str]]#

Map each integration or time trace readout label to its implementations (of the format f"{measure_gate_name}.{implementation_name}").

extend(trigger, seg_idx)#

Extend the metrics with a ReadoutTrigger in a given Playlist Segment.

Parameters:
  • trigger (ReadoutTrigger) – The readout trigger.

  • seg_idx (int) – The index of the Playlist segment trigger belongs to.

Return type:

None

filter_out(labels=None, components=None, keys=None)#

Filter out readout labels from the contents of self.

Parameters:
  • labels (list[str] | None) – Readout labels to filter out.

  • components (list[str] | None) – QPU components to filter out (all readout labels with these components will be removed).

  • keys (list[str] | None) – Readout keys to filter out (all readout labels with these keys will be removed).

Return type:

None

get_labels(integration=True, timetrace=True)#

Get all the readout labels in self.

Parameters:
  • integration (bool) – Whether to get integration labels.

  • timetrace (bool) – Whether to get time trace labels.

Returns:

The applicable readout labels in self.

Return type:

set[str]

get_components(integration=True, timetrace=True)#

Get all QPU components in the readout labels in self.

Parameters:
  • integration (bool) – Whether to get components from the integration labels.

  • timetrace (bool) – Whether to get components from the time trace labels.

Returns:

The applicable QPU components in self.

Return type:

set[str]

get_keys(integration=True, timetrace=True)#

Get all readout keys in the readout labels in self.

Parameters:
  • integration (bool) – Whether to get readout keys from the integration labels.

  • timetrace (bool) – Whether to get readout keys from the time trace labels.

Returns:

The applicable readout keys in self.

Return type:

set[str]

Inheritance

Inheritance diagram of iqm.pulse.playlist.instructions.ReadoutMetrics