pulses ====== .. py:module:: quantify_scheduler.backends.qblox.operation_handling.pulses .. autoapi-nested-parse:: Classes for handling pulses. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: quantify_scheduler.backends.qblox.operation_handling.pulses.PulseStrategyPartial quantify_scheduler.backends.qblox.operation_handling.pulses.GenericPulseStrategy quantify_scheduler.backends.qblox.operation_handling.pulses.MarkerPulseStrategy Attributes ~~~~~~~~~~ .. autoapisummary:: quantify_scheduler.backends.qblox.operation_handling.pulses.logger .. py:data:: logger .. py:class:: PulseStrategyPartial(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, io_mode: str) Bases: :py:obj:`quantify_scheduler.backends.qblox.operation_handling.base.IOperationStrategy` Contains the logic shared between all the pulses. Constructor. :param operation_info: The operation info that corresponds to this pulse. :param io_mode: Either "real", "imag" or complex depending on whether the signal affects only path0, path1 or both. .. py:property:: operation_info :type: quantify_scheduler.backends.types.qblox.OpInfo Property for retrieving the operation info. .. py:method:: _check_amplitudes_set() .. py:class:: GenericPulseStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, io_mode: str) Bases: :py:obj:`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. :param operation_info: The operation info that corresponds to this pulse. :param io_mode: Either "real", "imag" or "complex" depending on whether the signal affects only path0, path1 or both, respectively. .. py:method:: generate_data(wf_dict: Dict[str, Any]) 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 (:math:`I_\text{IF}`) and imaginary data on sequencer path1 (:math:`Q_\text{IF}`) after the NCO mixing. .. math:: \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} In real mode, :math:`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 (:math:`I`) on path0 is swapped with imaginary input (:math:`Q`) on path1. We multiply :math:`Q` by -1 (via ``amp_imag``) to undo the 90-degree phase shift resulting from swapping the NCO input paths. .. math:: \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} :param 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". .. py:method:: insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) Add the assembly instructions for the Q1 sequence processor that corresponds to this pulse. :param qasm_program: The QASMProgram to add the assembly instructions to. .. py:class:: MarkerPulseStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, io_mode: str) Bases: :py:obj:`PulseStrategyPartial` If this strategy is used a digital pulse is played on the corresponding marker. Constructor. :param operation_info: The operation info that corresponds to this pulse. :param io_mode: Either "real", "imag" or complex depending on whether the signal affects only path0, path1 or both. .. py:method:: generate_data(wf_dict: Dict[str, Any]) Returns None as no waveforms are generated in this strategy. .. py:method:: insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) 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. :param qasm_program: The QASMProgram to add the assembly instructions to. .. py:method:: _fix_output_addressing(output) :staticmethod: Temporary fix for the marker output addressing of the QRM-RF. QRM-RF has swapped addressing of outputs. TODO: change when fixed in firmware