conditional#

Module containing logic to handle conditional playback.

Module Contents#

Classes#

ConditionalManager

Class to manage a conditional control flow.

FeedbackTriggerOperator

Enum for feedback trigger operations.

FeedbackTriggerCondition

Contains all information needed to enable conditional playback.

class ConditionalManager[source]#

Class to manage a conditional control flow.

enable_conditional: list[source]#

Reference to initial FEEDBACK_SET_COND instruction.

num_real_time_instructions: int = 0[source]#

Number of real time instructions.

start_time: int = 0[source]#

Start time of conditional playback.

end_time: int = 0[source]#

End time of conditional playback.

update(operation: quantify_scheduler.backends.qblox.operation_handling.base.IOperationStrategy) None[source]#

Update the conditional manager.

Parameters:
  • operation (IOperationStrategy) – Operation whose information is used to update the conditional manager.

  • time – Timing

reset() None[source]#

Reset the conditional manager.

property duration: int[source]#

Duration of the conditional playback.

class FeedbackTriggerOperator[source]#

Bases: enum.Enum

Enum for feedback trigger operations.

OR = 0[source]#

Any selected counters exceed their thresholds.

NOR = 1[source]#

No selected counters exceed their thresholds.

AND = 2[source]#

All selected counters exceed their thresholds.

NAND = 3[source]#

Any selected counters do not exceed their thresholds.

XOR = 4[source]#

An odd number of selected counters exceed their thresholds.

XNOR = 5[source]#

An even number of selected counters exceed their thresholds.

class FeedbackTriggerCondition[source]#

Contains all information needed to enable conditional playback.

enable: bool[source]#

Enable/disable conditional playback.

operator: FeedbackTriggerOperator[source]#

Specifies the logic to apply on the triggers that are selected by the mask. See FeedbackTriggerOperator for more information.

addresses: dataclasses.InitVar[Sequence[int]][source]#

Sequence of trigger addresses to condition on. Addresses may range from 1 to 15.

mask: int[source]#

Represents a bitwise mask in base-10. It dictates which trigger addresses will be monitored. For example, to track addresses 0 and 3, the mask would be 1001 in binary, which is 17 in base-10. This mask together with the operator will determine the conditional operation.