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

condition

can be evaluated to an integer >= 0

outcomes

maps possible outcomes of the condition to the corresponding instructions

duration

Time duration of the instruction.

Methods

get_child_instructions

Returns all the child Instructions the Instruction contains.

validate

Validate the instruction attributes.

Parameters:
condition: str#

can be evaluated to an integer >= 0

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, …]