qblox_scheduler.backends.qblox.operation_handling.pulses#

Classes for handling pulses.

Attributes#

Classes#

PulseStrategyPartial

Contains the logic shared between all the pulses.

GenericPulseStrategy

Default class for handling pulses.

DigitalOutputStrategy

Interface class for MarkerPulseStrategy and DigitalPulseStrategy.

MarkerPulseStrategy

If this strategy is used a digital pulse is played on the corresponding marker.

DigitalPulseStrategy

If this strategy is used a digital pulse is played

Functions#

Module Contents#

logger[source]#
class PulseStrategyPartial(operation_info: qblox_scheduler.backends.types.qblox.OpInfo, channel_name: str)[source]#

Bases: qblox_scheduler.backends.qblox.operation_handling.base.IOperationStrategy, abc.ABC

Contains the logic shared between all the pulses.

Parameters:
  • operation_info – The operation info that corresponds to this pulse.

  • channel_name – Specifies the channel identifier of the hardware config (e.g. complex_output_0).

_amplitude_path_I: float | qblox_scheduler.operations.variables.Variable | None[source]#
_amplitude_path_Q: float | qblox_scheduler.operations.variables.Variable | None[source]#
_pulse_info: qblox_scheduler.backends.types.qblox.OpInfo[source]#
channel_name[source]#
property operation_info: qblox_scheduler.backends.types.qblox.OpInfo[source]#

Property for retrieving the operation info.

_get_i_and_q_gain_from_pulse_info(pulse_info: dict[str, Any]) tuple[float | qblox_scheduler.operations.variables.Variable | None, float | qblox_scheduler.operations.variables.Variable | None][source]#
_get_var_from_supported_expression(expression: qblox_scheduler.operations.expressions.Expression) qblox_scheduler.operations.variables.Variable[source]#
class GenericPulseStrategy(operation_info: qblox_scheduler.backends.types.qblox.OpInfo, channel_name: str)[source]#

Bases: PulseStrategyPartial

Default class for handling pulses.

No assumptions are made with regards to the pulse shape and no optimizations are done.

Parameters:
  • operation_info – The operation info that corresponds to this pulse.

  • channel_name – Specifies the channel identifier of the hardware config (e.g. complex_output_0).

_amplitude_path_I: float | qblox_scheduler.operations.variables.Variable | None = None[source]#
_amplitude_path_Q: float | qblox_scheduler.operations.variables.Variable | None = None[source]#
_waveform_index0: int | None = None[source]#
_waveform_index1: int | None = None[source]#
_waveform_len: int | None = None[source]#
generate_data(wf_dict: dict[str, Any]) None[source]#

Generates the data and adds them to the wf_dict (if not already present).

In complex mode (e.g. complex_output_0), the NCO produces real-valued data (\(I_\\text{IF}\)) on sequencer path_I and imaginary data (\(Q_\\text{IF}\)) on sequencer path_Q.

\[\begin{split}\\underbrace{\\begin{bmatrix} \\cos\\omega t & -\\sin\\omega t \\\\ \\sin\\omega t & \\phantom{-}\\cos\\omega t \\end{bmatrix}}_\\text{NCO} \\begin{bmatrix} I \\\\ Q \\end{bmatrix} = \\begin{bmatrix} I \\cdot \\cos\\omega t - Q \\cdot\\sin\\omega t \\\\ I \\cdot \\sin\\omega t + Q \\cdot\\cos\\omega t \\end{bmatrix} \\begin{matrix} \\ \\text{(path_I)} \\\\ \\ \\text{(path_Q)} \\end{matrix} = \\begin{bmatrix} I_\\text{IF} \\\\ Q_\\text{IF} \\end{bmatrix}\end{split}\]

In real mode (e.g. real_output_0), the NCO produces \(I_\\text{IF}\) on path_I

\[\begin{split}\\underbrace{\\begin{bmatrix} \\cos\\omega t & -\\sin\\omega t \\\\ \\sin\\omega t & \\phantom{-}\\cos\\omega t \\end{bmatrix}}_\\text{NCO} \\begin{bmatrix} I \\\\ Q \\end{bmatrix} = \\begin{bmatrix} I \\cdot \\cos\\omega t - Q \\cdot\\sin\\omega t\\\\ - \\end{bmatrix} \\begin{matrix} \\ \\text{(path_I)} \\\\ \\ \\text{(path_Q)} \\end{matrix} = \\begin{bmatrix} I_\\text{IF} \\\\ - \\end{bmatrix}\end{split}\]

Note that the fields marked with - represent waveforms that are not relevant for the mode.

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

  • domains – The domains used in the schedule, keyed by variable. This is added as temporarily to ensure we do not upload unnecessary waveforms. The domain information will be used to figure out whether or not a “Q” path waveform needs to be uploaded.

Raises:

ValueError – Data is complex (has an imaginary component), but the channel_name is not set as complex (e.g. complex_output_0).

insert_qasm(qasm_program: qblox_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 DigitalOutputStrategy(operation_info: qblox_scheduler.backends.types.qblox.OpInfo, channel_name: str)[source]#

Bases: PulseStrategyPartial, abc.ABC

Interface class for MarkerPulseStrategy and DigitalPulseStrategy.

Both classes work very similarly, since they are both strategy classes for the ~qblox_scheduler.operations.pulse_library.MarkerPulse. The MarkerPulseStrategy is for the QCM/QRM modules, and the DigitalPulseStrategy for the QTM.

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

Returns None as no waveforms are generated in this strategy.

class MarkerPulseStrategy(operation_info: qblox_scheduler.backends.types.qblox.OpInfo, channel_name: str, module_options: qblox_scheduler.backends.types.qblox.ClusterModuleDescription)[source]#

Bases: DigitalOutputStrategy

If this strategy is used a digital pulse is played on the corresponding marker.

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

Inserts the QASM instructions to play the marker pulse. Note that for RF modules the first two bits of set_mrk are used as switches for the RF outputs.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.

class DigitalPulseStrategy(operation_info: qblox_scheduler.backends.types.qblox.OpInfo, channel_name: str)[source]#

Bases: DigitalOutputStrategy

If this strategy is used a digital pulse is played on the corresponding digital output channel.

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

Inserts the QASM instructions to play the marker pulse. Note that for RF modules the first two bits of set_mrk are used as switches for the RF outputs.

Parameters:

qasm_program – The QASMProgram to add the assembly instructions to.