ConditionalInstruction#
- class iqm.pulse.playlist.instructions.ConditionalInstruction(duration, condition, outcomes)#
Bases:
InstructionChoice between multiple Instructions, depending on a condition.
Module:
iqm.pulse.playlist.instructionsAttributes
Can be evaluated to an integer >= 0 representing an outcome.
Maps possible outcomes of the condition to the corresponding instructions.
durationTime 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, …]