pulses#

Classes for handling pulses.

Module Contents#

Classes#

PulseStrategyPartial

Contains the logic shared between all the pulses.

GenericPulseStrategy

Default class for handling pulses. No assumptions are made with regards to the

MarkerPulseStrategy

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

Attributes#

logger

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

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

Contains the logic shared between all the pulses.

Constructor.

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

  • io_mode – Either “real”, “imag” or complex depending on whether the signal affects only path0, path1 or both.

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

Property for retrieving the operation info.

_check_amplitudes_set()[source]#
class GenericPulseStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, io_mode: str)[source]#

Bases: PulseStrategyPartial

Default class for handling pulses. No assumptions are made with regards to the pulse shape and no optimizations are done.

Constructor for this strategy.

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

  • io_mode – Either “real”, “imag” or “complex” depending on whether the signal affects only path0, path1 or both, respectively.

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

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

In complex mode, real-valued data is produced on sequencer path0 (\(I_\text{IF}\)) and imaginary data on sequencer path1 (\(Q_\text{IF}\)) after the NCO mixing.

\[\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{matrix} \overbrace{ I \cdot \cos\omega t - Q \cdot\sin\omega t}^{\small \textbf{real} \Rightarrow \text{path0}} \\ \underbrace{I \cdot \sin\omega t + Q \cdot\cos\omega t}_{\small \textbf{imag} \Rightarrow \text{path1}} \end{matrix} = \begin{bmatrix} I_\text{IF} \\ Q_\text{IF} \end{bmatrix}\end{split}\]

In real mode, \(I_\text{IF}\) can be produced on either path0 (io_mode == "real") or path1 (io_mode == "imag").

For io_mode == imag, the real-valued input (\(I\)) on path0 is swapped with imaginary input (\(Q\)) on path1. We multiply \(Q\) by -1 (via amp_imag) to undo the 90-degree phase shift resulting from swapping the NCO input paths.

\[\begin{split}\underbrace{\begin{bmatrix} \cos\omega t & -\sin\omega t \\ \sin\omega t & \phantom{-}\cos\omega t \end{bmatrix}}_\text{NCO} \begin{bmatrix} -Q \\ I \end{bmatrix} = \begin{matrix} \\ \underbrace{-Q \cdot \sin\omega t + I \cdot\cos\omega t}_{\small \textbf{real} \Rightarrow \text{path1}} \end{matrix}= \begin{bmatrix} - \\ I_\text{IF} \end{bmatrix}\end{split}\]
Parameters:

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

Raises:

ValueError – Data is complex (has an imaginary component), but the io_mode is not set to “complex”.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram)[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 MarkerPulseStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, io_mode: str)[source]#

Bases: PulseStrategyPartial

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

Constructor.

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

  • io_mode – Either “real”, “imag” or complex depending on whether the signal affects only path0, path1 or both.

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

Returns None as no waveforms are generated in this strategy.

insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram)[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.

static _fix_output_addressing(output)[source]#

Temporary fix for the marker output addressing of the QRM-RF. QRM-RF has swapped addressing of outputs. TODO: change when fixed in firmware