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.DigitalOutputStrategy quantify_scheduler.backends.qblox.operation_handling.pulses.MarkerPulseStrategy quantify_scheduler.backends.qblox.operation_handling.pulses.DigitalPulseStrategy Attributes ~~~~~~~~~~ .. autoapisummary:: quantify_scheduler.backends.qblox.operation_handling.pulses.logger .. py:data:: logger .. py:class:: PulseStrategyPartial(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, channel_name: str) Bases: :py:obj:`quantify_scheduler.backends.qblox.operation_handling.base.IOperationStrategy` Contains the logic shared between all the pulses. :param operation_info: The operation info that corresponds to this pulse. :param channel_name: Specifies the channel identifier of the hardware config (e.g. `complex_output_0`). .. py:attribute:: _amplitude_path_I :type: float | None .. py:attribute:: _amplitude_path_Q :type: float | None .. py:attribute:: _pulse_info :type: quantify_scheduler.backends.types.qblox.OpInfo .. py:attribute:: channel_name .. py:property:: operation_info :type: quantify_scheduler.backends.types.qblox.OpInfo Property for retrieving the operation info. .. py:class:: GenericPulseStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, channel_name: 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. :param operation_info: The operation info that corresponds to this pulse. :param channel_name: Specifies the channel identifier of the hardware config (e.g. `complex_output_0`). .. py:attribute:: _amplitude_path_I :type: float | None :value: None .. py:attribute:: _amplitude_path_Q :type: float | None :value: None .. py:attribute:: _waveform_index0 :type: int | None :value: None .. py:attribute:: _waveform_index1 :type: int | None :value: None .. py:attribute:: _waveform_len :type: int | None :value: None .. py:method:: generate_data(wf_dict: dict[str, Any]) -> None 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 (:math:`I_\text{IF}`) on sequencer path_I and imaginary data (:math:`Q_\text{IF}`) on sequencer path_Q. .. 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{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} In real mode (e.g. ``real_output_0``), the NCO produces :math:`I_\text{IF}` on path_I .. 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{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} Note that the fields marked with `-` represent waveforms that are not relevant for the mode. :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 channel_name is not set as complex (e.g. ``complex_output_0``). .. py:method:: insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) -> None 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:: DigitalOutputStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, channel_name: str) Bases: :py:obj:`PulseStrategyPartial` Interface class for :class:`MarkerPulseStrategy` and :class:`DigitalPulseStrategy`. Both classes work very similarly, since they are both strategy classes for the `~quantify_scheduler.operations.pulse_library.MarkerPulse`. The ``MarkerPulseStrategy`` is for the QCM/QRM modules, and the ``DigitalPulseStrategy`` for the QTM. .. py:method:: generate_data(wf_dict: dict[str, Any]) -> None Returns None as no waveforms are generated in this strategy. .. py:class:: MarkerPulseStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, channel_name: str) Bases: :py:obj:`DigitalOutputStrategy` If this strategy is used a digital pulse is played on the corresponding marker. .. py:method:: insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) -> None 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_marker_bit_output_addressing_qcm_rf(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram, marker_bit_index: int) -> int :staticmethod: Fix for the swapped marker bit output addressing of the QCM-RF. .. py:class:: DigitalPulseStrategy(operation_info: quantify_scheduler.backends.types.qblox.OpInfo, channel_name: str) Bases: :py:obj:`DigitalOutputStrategy` If this strategy is used a digital pulse is played on the corresponding digital output channel. .. py:method:: insert_qasm(qasm_program: quantify_scheduler.backends.qblox.qasm_program.QASMProgram) -> None 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.