ConditionalInstruction#
- class iqm.pulse.playlist.instructions.ConditionalInstruction(duration, condition, outcomes)#
Bases:
Instruction
Choice between multiple Instructions, depending on a condition.
Module:
iqm.pulse.playlist.instructions
Attributes
can be evaluated to an integer >= 0
maps possible outcomes of the condition to the corresponding instructions
duration
Time duration of the instruction.
Methods
Returns all the child Instructions the Instruction contains.
Validate the instruction attributes.
- Parameters:
duration (int) –
condition (str) –
outcomes (tuple[Instruction, ...]) –
- outcomes: tuple[Instruction, ...]#
maps possible outcomes of the condition to the corresponding instructions
- validate()#
Validate the instruction attributes.
- Raises:
ValueError – something about the instruction is not ok
- get_child_instructions()#
Returns all the child Instructions the Instruction contains.
- Return type:
tuple[Instruction, …]