3.1.1. qupulse._program._loop¶
- class qupulse._program._loop.Loop(parent=None, children=(), waveform=None, measurements=None, repetition_count=1)[source]¶
Bases:
qupulse.utils.tree.Node
Initialize a new loop
- Parameters
- MAX_REPR_SIZE = 2000¶
- __init__(parent=None, children=(), waveform=None, measurements=None, repetition_count=1)[source]¶
Initialize a new loop
- add_measurements(measurements)[source]¶
Add measurements offset by the current body duration i.e. to the END of the current loop
- append_child(loop=None, **kwargs)[source]¶
Append a child to this loop. Either an existing Loop object or a newly created from kwargs
- Parameters
- Raises
ValueError – if called with loop and kwargs
- Return type
- cleanup(actions=('remove_empty_loops', 'merge_single_child'))[source]¶
Apply the specified actions to cleanup the Loop.
remove_empty_loops: Remove loops with no children and no waveform (a DroppedMeasurementWarning is issued) merge_single_child: see _try_merge_single_child documentation
Warning
DroppedMeasurementWarning: Likely a bug in qupulse. TODO: investigate whether there are usecases
- get_measurement_windows()[source]¶
Iterates over all children and collect the begin and length arrays of each measurement window.
- property repetition_definition: Union[int, qupulse._program.volatile.VolatileRepetitionCount]¶
- Return type
- split_one_child(child_index=None)[source]¶
Take the last child that has a repetition count larger one, decrease it’s repetition count and insert a copy with repetition cout one after it
- Return type
- property volatile_repetition: Optional[qupulse._program.volatile.VolatileProperty]¶
- Return type
- exception qupulse._program._loop.MakeCompatibleWarning[source]¶
Bases:
ResourceWarning