pulses#
Classes for handling pulses.
Module Contents#
Classes#
Contains the logic shared between all the pulses. |
|
Default class for handling pulses. |
|
If this strategy is used a digital pulse is played on the corresponding marker. |
Attributes#
- class PulseStrategyPartial(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, io_mode: quantify_scheduler.backends.qblox.enums.IoMode)[source]#
Bases:
quantify_scheduler.backends.qblox.operation_handling.base.IOperationStrategy
Contains the logic shared between all the pulses.
- Parameters:
operation_info – The operation info that corresponds to this pulse.
io_mode – Either
IoMode.REAL
,IoMode.IMAG
orIoMode.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.
- class GenericPulseStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, io_mode: quantify_scheduler.backends.qblox.enums.IoMode)[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.
io_mode – Either
IoMode.REAL
,IoMode.IMAG
orIoMode.COMPLEX
depending on whether the signal affects only path0, path1 or both.
- 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 (
io_mode == IoMode.COMPLEX
), the NCO produces real-valued data (\(I_\text{IF}\)) on sequencer path0 and imaginary data (\(Q_\text{IF}\)) on sequencer path1.\[\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{(path0)} \\ \ \text{(path1)} \end{matrix} = \begin{bmatrix} I_\text{IF} \\ Q_\text{IF} \end{bmatrix}\end{split}\]In real mode (
io_mode == IoMode.REAL
), the NCO produces \(I_\text{IF}\) on path0\[\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{(path0)} \\ \ \text{(path1)} \end{matrix} = \begin{bmatrix} I_\text{IF} \\ - \end{bmatrix}\end{split}\]while in imaginary mode (
io_mode == IoMode.IMAG
), the NCO produces \(I_\text{IF}\) on path1.\[\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{bmatrix} - \\ -Q \cdot \sin\omega t + I \cdot\cos\omega t \end{bmatrix} \begin{matrix} \ \text{(path0)} \\ \ \text{(path1)} \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.
- Raises:
ValueError – Data is complex (has an imaginary component), but the io_mode is not set to
IoMode.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: quantify_scheduler.backends.qblox.enums.IoMode)[source]#
Bases:
PulseStrategyPartial
If this strategy is used a digital pulse is played on the corresponding marker.
- 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_marker_bit_output_addressing_qcm_rf(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram, marker_bit_index: int)[source]#
Fix for the swapped marker bit output addressing of the QCM-RF.