iqm.pulse.gates.measure.multiplex#
- iqm.pulse.gates.measure.multiplex(sequence_of_boxes)#
Multiplex several :class:
MeasureBoxesinstances together.Iterates through
sequence_of_boxesand reduces them into a singleMeasureBoxesinstance viaMeasureBoxes.multiplex(). Implements an as soon as possible (ASAP) algorithm for creating the minimal lengthMeasureBoxesinstance while adhering to multiplexing rules.Starting from the
sequence_of_boxes, denoted with[S0, S1, ..., Sm], we try to multiplexS0andS1together, then addS2and so on. Continuing like this, the multiplexed result is denoted asM0. If some memberSkofsequence_of_boxescannot be multiplexed intoM0, we keep it as is and denote it withM1. We then try to multiplex the next member ofsequence_of_boxes,Sk+1, withM0and if that is not possible, withM1, and if that also fails, we store it asM2. Iterating oversequence_of_boxes, we thus obtain a new sequence ofMeasureBoxes,[M0, M1, ... Mn], where each member of the original sequence is executed ASAP. In the optimal case, this is just a singleMeasureBoxesinstanceM0and in the worst case, the exact same sequence as insequence_of_boxesis retained. The new sequence is then squeezed into a singleMeasureBoxesinstance by combining the last auxiliary box ofMkinto the first auxiliary box ofMk+1.- Parameters:
sequence_of_boxes (Sequence[MeasureBoxes]) – Sequence of :class:
MeasureBoxesinstances to be multiplexed together.- Returns:
A single :class:
MeasureBoxesinstance where each member ofsequence_of_boxesis executed ASAP.- Return type: