SegmentPointer#
- class iqm.pulse.scheduler.SegmentPointer(source, idx, TOL, frac=0.0)#
Bases:
object
Tool for working with Segments.
Serves as a time pointer inside the Segment.
Module:
iqm.pulse.scheduler
Attributes
time, in seconds, after the start of the current instruction
Remaining duration of the current instruction (in seconds).
contents of the Segment
index of the current instruction
time durations equal or smaller than this tolerance are considered zero (in seconds)
Methods
Cut the source of the pointer at the current index.
Move the pointer forward by
duration
seconds.Current instruction.
Move to the beginning of the next instruction.
Move the pointer back by
duration
seconds.Instructions from the current index onwards.
- Parameters:
source (list[Instruction]) –
idx (int) –
TOL (float) –
frac (float) –
- source: list[Instruction]#
contents of the Segment
- get()#
Current instruction.
- Return type:
- cut_tail()#
Cut the source of the pointer at the current index.
Truncate
source
atidx
, makeself
point to the cut tail part only.frac
is not changed.Note: modifies
source
.- Return type:
None
- tail()#
Instructions from the current index onwards.
- Return type: