virtual#

Classes for handling operations that are neither pulses nor acquisitions.

Module Contents#

Classes#

IdleStrategy

Defines the behavior for an operation that does not produce any output.

NcoPhaseShiftStrategy

Strategy for operation that does not produce any output, but rather applies a

NcoResetClockPhaseStrategy

Strategy for operation that does not produce any output, but rather resets

NcoSetClockFrequencyStrategy

Strategy for operation that does not produce any output, but rather sets

AwgOffsetStrategy

Strategy for compiling a DC voltage offset instruction. The generated Q1ASM contains

ResetFeedbackTriggersStrategy

Strategy for resetting the count of feedback trigger addresses.

UpdateParameterStrategy

Strategy for compiling an "update parameters" real-time instruction.

LoopStrategy

Strategy for compiling a "Loop" control flow instruction.

ConditionalStrategy

Strategy for compiling a "Conditional" control flow instruction.

ControlFlowReturnStrategy

Strategy for compiling "ControlFlowReturn" control flow instruction.

TimestampStrategy

Strategy for compiling

class IdleStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: quantify_scheduler.backends.qblox.operation_handling.base.IOperationStrategy

Defines the behavior for an operation that does not produce any output.

Parameters:

operation_info (quantify_scheduler.backends.types.qblox.OpInfo) – The operation info that corresponds to this operation.

_op_info[source]#
property operation_info: quantify_scheduler.backends.types.qblox.OpInfo[source]#

Property for retrieving the operation info.

generate_data(wf_dict: dict[str, Any]) None[source]#

Returns None as no waveforms are generated in this strategy.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) None[source]#

Add the assembly instructions for the Q1 sequence processor that corresponds to this operation.

Not an abstractmethod, since it is allowed to use the IdleStrategy directly (e.g. for IdlePulses), but can be overridden in subclass to add some assembly instructions despite not outputting any data.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

class NcoPhaseShiftStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: IdleStrategy

Strategy for operation that does not produce any output, but rather applies a phase shift to the NCO. Implemented as set_ph_delta and an upd_param of 8 ns, leading to a total duration of 8 ns before the next command can be issued.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) None[source]#

Inserts the instructions needed to shift the NCO phase by a specific amount.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

class NcoResetClockPhaseStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: IdleStrategy

Strategy for operation that does not produce any output, but rather resets the phase of the NCO.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) None[source]#

Inserts the instructions needed to reset the NCO phase.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

class NcoSetClockFrequencyStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: IdleStrategy

Strategy for operation that does not produce any output, but rather sets the frequency of the NCO. Implemented as set_freq and an upd_param of 8 ns, leading to a total duration of 8 ns before the next command can be issued.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) None[source]#

Inserts the instructions needed to set the NCO frequency.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

class AwgOffsetStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: IdleStrategy

Strategy for compiling a DC voltage offset instruction. The generated Q1ASM contains only the set_awg_offs instruction and no upd_param instruction.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) None[source]#

Add the Q1ASM instruction for a DC voltage offset.

Parameters:

qasm_program (QASMProgram) – The QASMProgram to add the assembly instructions to.

class ResetFeedbackTriggersStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: IdleStrategy

Strategy for resetting the count of feedback trigger addresses.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) None[source]#

Add the assembly instructions for the Q1 sequence processor that corresponds to this pulse.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

class UpdateParameterStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: IdleStrategy

Strategy for compiling an “update parameters” real-time instruction.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) None[source]#

Add the upd_param assembly instruction for the Q1 sequence processor.

Parameters:

qasm_program (QASMProgram) – The QASMProgram to add the assembly instructions to.

class LoopStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: IdleStrategy

Strategy for compiling a “Loop” control flow instruction.

Empty as it is used for isinstance.

class ConditionalStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, trigger_condition: quantify_scheduler.backends.qblox.conditional.FeedbackTriggerCondition)[source]#

Bases: IdleStrategy

Strategy for compiling a “Conditional” control flow instruction.

trigger_condition[source]#
class ControlFlowReturnStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: IdleStrategy

Strategy for compiling “ControlFlowReturn” control flow instruction.

Empty as it is used for isinstance.

class TimestampStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo)[source]#

Bases: IdleStrategy

Strategy for compiling Timestamp.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) None[source]#

Inserts the instructions needed insert a time reference.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.