acquisitions#

Classes for handling acquisitions.

Module Contents#

Classes#

AcquisitionStrategyPartial

Contains the logic shared between all the acquisitions.

SquareAcquisitionStrategy

Performs a square acquisition (i.e. without acquisition weights).

WeightedAcquisitionStrategy

Performs a weighted acquisition.

TriggerCountAcquisitionStrategy

Performs a trigger count acquisition.

TimetagAcquisitionStrategy

Performs a timetag acquisition.

ScopedTimetagAcquisitionStrategy

An acquisition strategy that wraps the emitted Q1ASM of

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

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

Contains the logic shared between all the acquisitions.

Parameters:

operation_info – The operation info that corresponds to this operation.

_acq_info: quantify_scheduler.backends.types.qblox.OpInfo[source]#
bin_mode: quantify_scheduler.enums.BinMode[source]#
acq_channel[source]#
bin_idx_register: str | None = None[source]#

The register used to keep track of the bin index, only not None for append mode acquisitions.

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 acquisition. This function calls the appropriate method to generate assembly, depending on the bin mode.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

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

Adds the assembly to the program for an acquisition with an immediate value for the bin index.

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

Adds the assembly to the program for an acquisition with a register value for the bin index, and assembly for incrementing the bin index by 1.

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

Property for retrieving the operation info.

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

Bases: AcquisitionStrategyPartial

Performs a square acquisition (i.e. without acquisition weights).

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

Returns None as no waveform is needed.

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

Adds the assembly to the program for an acquisition with an immediate value for the bin index.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

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

Adds the assembly to the program for an acquisition with a register value for the bin index, and assembly for incrementing the bin index by 1.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

_acquire_square(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram, bin_idx: int | str) None[source]#

Adds the instruction for performing acquisitions without weights playback.

Parameters:
  • qasm_program – The qasm program to add the acquisition to.

  • bin_idx – The bin_idx to store the result in, can be either an int (for immediates) or a str (for registers).

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

Bases: AcquisitionStrategyPartial

Performs a weighted acquisition.

Parameters:

operation_info – The operation info that corresponds to this acquisition.

waveform_index0: int | None = None[source]#
waveform_index1: int | None = None[source]#
generate_data(wf_dict: dict[str, Any]) None[source]#

Generates the waveform data for both acquisition weights.

Parameters:

wf_dict – The dictionary to add the waveform to. N.B. the dictionary is modified in function.

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

Adds the assembly to the program for an acquisition with an immediate value for the bin index.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

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

Adds the assembly to the program for an acquisition with a register value for the bin index, and assembly for incrementing the bin index by 1. Registers will be used for the weight indexes and the bin index.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

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

Bases: AcquisitionStrategyPartial

Performs a trigger count acquisition.

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

Returns None as no waveform is needed.

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

Adds the assembly to the program for an acquisition with an immediate value for the bin index.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

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

Adds the assembly to the program for an acquisition with a register value for the bin index, and assembly for incrementing the bin index by 1.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

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

Bases: AcquisitionStrategyPartial

Performs a timetag acquisition.

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

Returns None as no waveform is needed.

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

Adds the assembly to the program for an acquisition with an immediate value for the bin index.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

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

Adds the assembly to the program for an acquisition with a register value for the bin index, and assembly for incrementing the bin index by 1.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

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

Bases: TimetagAcquisitionStrategy

An acquisition strategy that wraps the emitted Q1ASM of TimetagAcquisitionStrategy in set_scope_en instructions.

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

Adds the assembly to the program for an acquisition with an immediate value for the bin index.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

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

Adds the assembly to the program for an acquisition with a register value for the bin index, and assembly for incrementing the bin index by 1.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.