MeasureBox#

Module: iqm.pulse.timebox

class iqm.pulse.timebox.MeasureBox(label, locus_components, atom, children=<factory>, scheduling=SchedulingStrategy.ASAP, scheduling_algorithm=SchedulingAlgorithm.HARD_BOUNDARY, neighborhood_components=<factory>, boxes_length=0, measure_components=<factory>, additional_components=<factory>)#

Bases: TimeBox

TimeBox associated with a measure implementation.

Supports multiplex() between two class instances. Contains boxes_length and measure_components for identifying all class instances associated with a specific measure call.

The purpose of this class is to 1) denote that a TimeBox is associated with a measure implementation 2) identify all the MeasureBox instances associated with a given measure call via the boxes_length. Both of these features are needed in the circuit-level multiplexing pass (some client-side libraries like Qiskit do not support multiplexed measurements out-of-the-box, requiring a dedicated compiler pass on the IQM-side).

Attributes

boxes_length

How many MeasureBox instances the MeasureBoxes instance this MeasureBox belongs to has (used in circuit-level multiplexing).

measure_components

The MeasureBoxes.measure_components of the MeasureBoxes self belongs to.

additional_components

The MeasureBoxes.additional_components of the MeasureBoxes self belongs to.

label

Description the contents of the box for users' convenience.

locus_components

Names of the QPU components on which this timebox operates.

atom

Resolved contents of the TimeBox, or None if not resolved.

children

Further Timeboxes inside this TimeBox.

neighborhood_components

Dict of neighborhood range integers mapped to sets of components neighboring the locus of this TimeBox.

Methods

multiplex

Multiplex two MeasureBox instances together.

Parameters:
boxes_length: int = 0#

How many MeasureBox instances the MeasureBoxes instance this MeasureBox belongs to has (used in circuit-level multiplexing).

measure_components: frozenset[str]#

The MeasureBoxes.measure_components of the MeasureBoxes self belongs to.

additional_components: frozenset[str]#

The MeasureBoxes.additional_components of the MeasureBoxes self belongs to.

multiplex(other)#

Multiplex two MeasureBox instances together.

The same as self + other with the neighborhood components combined.

Parameters:

other (MeasureBox)

Return type:

MeasureBox

Inheritance

Inheritance diagram of iqm.pulse.timebox.MeasureBox