MeasureBoxes#
Module: iqm.pulse.timebox
- class iqm.pulse.timebox.MeasureBoxes(measure_boxes, measure_components, additional_components=None)#
Bases:
listMultiplexable list of TimeBoxes associated with a measure implementation.
All
measureimplementations’__call__method should return aMeasureBoxesinstance. The measurements can be multiplexed together viamultiplex(), allowing parallel measurements within a single probe line.A
MeasureBoxesinstance has the following structure:[A] + [P, B, A] * n, wherePis aMultiplexedProbeTimeBoxinstance (the actual readout triggers),Bis a MeasureBox containing extra blocking (if any) on the probe channel after the measurement, andAis an auxiliary MeasureBox associated with a measure implementation (e.g. theprx_12shelving operation in shelved measurements). So, there is an initial auxiliary box and then any number of tripletsP, B, A. The auxiliary boxesAand the extra probe block boxesBcan be empty.``.- Parameters:
measure_boxes (list[MeasureBox]) – The measure boxes.
measure_components (Iterable[str]) – Primary component names this measure
MeasureBoxesinstance is associated with. Note that this may be different from theTimeBox.locus_componentsattributes if its member boxes. Typically, this is the same as the measured qubits, but in some measure implementations, additional components may also be pinned in the operation (seeMeasureBoxes.multiplex()).additional_components (Iterable[str] | None) – Additional component names this measure
MeasureBoxesinstance is associated with (seeMeasureBoxes.multiplex()). By default, initiated as an empty set. The attribute can be used e.g. If the multiplexing should be blocked in some neighborhood of themeasure_components(next neighbor qubits).
Methods
Append object to the end of the list.
Extend list by appending elements from the iterable.
Shortcut method for creating a
MeasureBoxesinstance fromReadoutTrigger instance.Whether
selfcan be multiplexed withother.Multiplex two
MeasureBoxesinstances together.- is_multiplexable_with(other)#
Whether
selfcan be multiplexed withother.- Parameters:
other (MeasureBoxes)
- Return type:
- multiplex(other)#
Multiplex two
MeasureBoxesinstances together.The multiplexing works such that the lists are aligned ASAP (as soon as possible) to the left. The auxiliary boxes
Ain the overlapping parts of the lists are summed together (MeasureBox.multiplex()resolves to just the normalTimeBox.__add__()method), the probe boxesPare multiplexed withMultiplexedProbeTimeBox.multiplex. The durations of thePboxes and their subsequentBboxes are adjusted so that 1) the duration of thePis the maximum of multiplexed boxes durations 2) the duration of the newBbox is<multiplexed block duration> = max((P1 + B1).duration, P2 + B2).duration) - max(P1.duration, P2.duration).If the multiplexed
MeasureBoxeslists are of a different length, the tail of the longer one is copied as it is into the multiplexed result.If the
MeasureBoxes.measure_componentsofselfandotherhave an overlap, an error is raised. The error is raised also ifMeasureBoxes.additional_componentsofselfhave an overlap with themeasure_componentsofother(or vice versa). NOTE: theadditional_componentsofselfandothermay still overlap.- Parameters:
other (MeasureBoxes) – MeasureBoxes instance to multiplex with
self.- Returns:
The multiplexed
MeasureBoxesinstance.- Raises:
MeasureMultiplexingError – If
MeasureBoxes.measure_componentsofselfandotherare overlapping or ifMeasureBoxes.additional_componentsofselfoverlaps with theMeasureBoxes.measure_componentsofother(or vice versa). Note thatMeasureBoxes.additional_componentsmay still overlap with that ofother.- Return type:
- static from_readout_trigger(readout_trigger, probe_channel, measure_components, *, additional_components=None, extra_probe_block_duration=0, probe_box_segments=None)#
Shortcut method for creating a
MeasureBoxesinstance fromReadoutTrigger instance.The created
MeasureBoxesinstance will have a single probe boxPwith an optional extra probe block boxBsuperseding it. The auxiliary box slots are occupied with empty boxes.- Parameters:
readout_trigger (ReadoutTrigger) –
ReadoutTriggerinstance.probe_channel (str) – channel name of the probe.
measure_components (Iterable[str]) – The measure_components for the created
MeasureBoxesinstance.additional_components (Iterable[str] | None) – The additional_components for the created
MeasureBoxesinstance (by default initialized as an empty set).extra_probe_block_duration (int) – The duration of the extra probe block, in seconds. If not given, the extra probe block box will be empty.
probe_box_segments (dict[str, Segment] | None) – Optional contents for the drive/flux channels of the probe box.
- Returns:
MeasureBoxesinstance with a single probe box.- Return type:
Inheritance
