operations ========== .. py:module:: quantify_scheduler.operations .. autoapi-nested-parse:: Module containing the standard library of commonly used operations as well as the :class:`.Operation` class. .. tip:: Quantify scheduler can trivially be extended by creating custom operations. Take a look at e.g., the pulse library for examples on how to implement custom pulses. Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 acquisition_library/index.rst composite_factories/index.rst control_flow_library/index.rst gate_library/index.rst measurement_factories/index.rst nv_native_library/index.rst operation/index.rst pulse_compensation_library/index.rst pulse_factories/index.rst pulse_library/index.rst shared_native_library/index.rst spin_library/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: quantify_scheduler.operations.Acquisition quantify_scheduler.operations.NumericalSeparatedWeightedIntegration quantify_scheduler.operations.NumericalWeightedIntegration quantify_scheduler.operations.SSBIntegrationComplex quantify_scheduler.operations.ThresholdedAcquisition quantify_scheduler.operations.Timetag quantify_scheduler.operations.TimetagTrace quantify_scheduler.operations.Trace quantify_scheduler.operations.TriggerCount quantify_scheduler.operations.WeightedIntegratedSeparated quantify_scheduler.operations.ConditionalOperation quantify_scheduler.operations.ControlFlowOperation quantify_scheduler.operations.ControlFlowSpec quantify_scheduler.operations.LoopOperation quantify_scheduler.operations.CNOT quantify_scheduler.operations.CZ quantify_scheduler.operations.X90 quantify_scheduler.operations.Y90 quantify_scheduler.operations.Z90 quantify_scheduler.operations.H quantify_scheduler.operations.Measure quantify_scheduler.operations.Reset quantify_scheduler.operations.Rxy quantify_scheduler.operations.Rz quantify_scheduler.operations.X quantify_scheduler.operations.Y quantify_scheduler.operations.Z quantify_scheduler.operations.ChargeReset quantify_scheduler.operations.CRCount quantify_scheduler.operations.Operation quantify_scheduler.operations.ChirpPulse quantify_scheduler.operations.DRAGPulse quantify_scheduler.operations.GaussPulse quantify_scheduler.operations.IdlePulse quantify_scheduler.operations.MarkerPulse quantify_scheduler.operations.NumericalPulse quantify_scheduler.operations.RampPulse quantify_scheduler.operations.ReferenceMagnitude quantify_scheduler.operations.ResetClockPhase quantify_scheduler.operations.SetClockFrequency quantify_scheduler.operations.ShiftClockPhase quantify_scheduler.operations.SkewedHermitePulse quantify_scheduler.operations.SoftSquarePulse quantify_scheduler.operations.SquarePulse quantify_scheduler.operations.StaircasePulse quantify_scheduler.operations.SuddenNetZeroPulse quantify_scheduler.operations.Timestamp quantify_scheduler.operations.VoltageOffset quantify_scheduler.operations.WindowOperation Functions ~~~~~~~~~ .. autoapisummary:: quantify_scheduler.operations.composite_square_pulse quantify_scheduler.operations.nv_spec_pulse_mw quantify_scheduler.operations.phase_shift quantify_scheduler.operations.rxy_drag_pulse quantify_scheduler.operations.rxy_gauss_pulse quantify_scheduler.operations.rxy_hermite_pulse quantify_scheduler.operations.spin_init_pulse .. py:class:: Acquisition(name: str) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` An operation representing data acquisition at the quantum-device abstraction layer. An Acquisition must consist of (at least) an AcquisitionProtocol specifying how the acquired signal is to be processed, and an AcquisitionChannel and AcquisitionIndex specifying where the acquired data is to be stored in the RawDataset. N.B. This class helps differentiate an acquisition operation from the regular operations. This enables us to use :func:`~.quantify_scheduler.schedules._visualization.pulse_diagram.plot_acquisition_operations` to highlight acquisition pulses in the pulse diagrams. .. py:class:: NumericalSeparatedWeightedIntegration(port: str, clock: str, weights_a: list[complex] | numpy.ndarray, weights_b: list[complex] | numpy.ndarray, weights_sampling_rate: float = 1000000000.0, interpolation: str = 'linear', acq_channel: int = 0, acq_index: int = 0, bin_mode: quantify_scheduler.enums.BinMode | str = BinMode.APPEND, phase: float = 0, t0: float = 0) Bases: :py:obj:`WeightedIntegratedSeparated` Subclass of :class:`~WeightedIntegratedSeparated` with parameterized waveforms as weights. A WeightedIntegratedSeparated class using parameterized waveforms and interpolation as the integration weights. Weights are applied as: .. math:: \widetilde{A} = \int \mathrm{Re}(S(t)\cdot W_A(t) \mathrm{d}t .. math:: \widetilde{B} = \int \mathrm{Im}(S(t))\cdot W_B(t) \mathrm{d}t :param port: The acquisition port. :param clock: The clock used to demodulate the acquisition. :param weights_a: The list of complex values used as weights :math:`A(t)` on the incoming complex signal. :param weights_b: The list of complex values used as weights :math:`B(t)` on the incoming complex signal. :param weights_sampling_rate: The rate with which the weights have been sampled, in Hz. By default equal to 1 GHz. Note that during hardware compilation, the weights will be resampled with the sampling rate supported by the target hardware. :param interpolation: The type of interpolation to use, by default "linear". This argument is passed to :obj:`~scipy.interpolate.interp1d`. :param acq_channel: The data channel in which the acquisition is stored, by default 0. Describes the "where" information of the measurement, which typically corresponds to a qubit idx. :param acq_index: The data register in which the acquisition is stored, by default 0. Describes the "when" information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment). :param bin_mode: Describes what is done when data is written to a register that already contains a value. Options are "append" which appends the result to the list or "average" which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND. :param phase: The phase of the pulse and acquisition in degrees, by default 0. :param t0: The acquisition start time in seconds, by default 0. .. py:class:: NumericalWeightedIntegration(port: str, clock: str, weights_a: list[complex] | numpy.ndarray, weights_b: list[complex] | numpy.ndarray, weights_sampling_rate: float = 1000000000.0, interpolation: str = 'linear', acq_channel: int = 0, acq_index: int = 0, bin_mode: quantify_scheduler.enums.BinMode | str = BinMode.APPEND, phase: float = 0, t0: float = 0) Bases: :py:obj:`NumericalSeparatedWeightedIntegration` Subclass of :class:`~NumericalSeparatedWeightedIntegration` returning a complex number. :param port: The acquisition port. :param clock: The clock used to demodulate the acquisition. :param weights_a: The list of complex values used as weights :math:`A(t)` on the incoming complex signal. :param weights_b: The list of complex values used as weights :math:`B(t)` on the incoming complex signal. :param weights_sampling_rate: The rate with which the weights have been sampled, in Hz. By default equal to 1 GHz. Note that during hardware compilation, the weights will be resampled with the sampling rate supported by the target hardware. :param t: The time values of each weight. This parameter is deprecated in favor of ``weights_sampling_rate``. If a value is provided for ``t``, the ``weights_sampling_rate`` parameter will be ignored. :param interpolation: The type of interpolation to use, by default "linear". This argument is passed to :obj:`~scipy.interpolate.interp1d`. :param acq_channel: The data channel in which the acquisition is stored, by default 0. Describes the "where" information of the measurement, which typically corresponds to a qubit idx. :param acq_index: The data register in which the acquisition is stored, by default 0. Describes the "when" information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment). :param bin_mode: Describes what is done when data is written to a register that already contains a value. Options are "append" which appends the result to the list or "average" which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND. :param phase: The phase of the pulse and acquisition in degrees, by default 0. :param t0: The acquisition start time in seconds, by default 0. .. py:class:: SSBIntegrationComplex(port: str, clock: str, duration: float, acq_channel: int = 0, acq_index: int = 0, bin_mode: quantify_scheduler.enums.BinMode | str = BinMode.AVERAGE, phase: float = 0, t0: float = 0) Bases: :py:obj:`Acquisition` Single sideband integration acquisition protocol with complex results. A weighted integrated acquisition on a complex signal using a square window for the acquisition weights. The signal is demodulated using the specified clock, and the square window then effectively specifies an integration window. :param port: The acquisition port. :param clock: The clock used to demodulate the acquisition. :param duration: The acquisition duration in seconds. :param acq_channel: The data channel in which the acquisition is stored, by default 0. Describes the "where" information of the measurement, which typically corresponds to a qubit idx. :param acq_index: The data register in which the acquisition is stored, by default 0. Describes the "when" information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment). :param bin_mode: Describes what is done when data is written to a register that already contains a value. Options are "append" which appends the result to the list or "average" which stores the weighted average value of the new result and the old register value, by default BinMode.AVERAGE. :param phase: The phase of the pulse and acquisition in degrees, by default 0. :param t0: The acquisition start time in seconds, by default 0. .. py:class:: ThresholdedAcquisition(port: str, clock: str, duration: float, acq_channel: int = 0, acq_index: int = 0, bin_mode: quantify_scheduler.enums.BinMode | str = BinMode.AVERAGE, feedback_trigger_label: str | None = None, phase: float = 0, t0: float = 0, acq_rotation: float = 0, acq_threshold: float = 0) Bases: :py:obj:`Acquisition` Acquisition protocol allowing to control rotation and threshold. This acquisition protocol is similar to the :class:`~.SSBIntegrationComplex` acquisition protocol, but the complex result is now rotated and thresholded to produce a "0" or a "1", as controlled by the parameters for rotation angle `.measure.acq_rotation` and threshold value `.measure.acq_threshold` in the device configuration (see example below). The rotation angle and threshold value for each qubit can be set through the device configuration. .. admonition:: Note Thresholded acquisition is currently only supported by the Qblox backend. .. admonition:: Examples .. jupyter-execute:: from quantify_scheduler import Schedule from quantify_scheduler.device_under_test.transmon_element import BasicTransmonElement from quantify_scheduler.operations.acquisition_library import ThresholdedAcquisition # set up qubit qubit = BasicTransmonElement("q0") qubit.clock_freqs.readout(8.0e9) # set rotation and threshold value rotation, threshold = 20, -0.1 qubit.measure.acq_rotation(rotation) qubit.measure.acq_threshold(threshold) # basic schedule schedule = Schedule("thresholded acquisition") schedule.add(ThresholdedAcquisition(port="q0:res", clock="q0.ro", duration=1e-6)) :param port: The acquisition port. :type port: str :param clock: The clock used to demodulate the acquisition. :type clock: str :param duration: The acquisition duration in seconds. :type duration: float :param acq_channel: The data channel in which the acquisition is stored, by default 0. Describes the "where" information of the measurement, which typically corresponds to a qubit idx. :type acq_channel: int :param acq_index: The data register in which the acquisition is stored, by default 0. Describes the "when" information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment). :type acq_index: int :param bin_mode: Describes what is done when data is written to a register that already contains a value. Options are "append" which appends the result to the list or "average" which stores the weighted average value of the new result and the old register value, by default BinMode.AVERAGE. :type bin_mode: BinMode or str :param feedback_trigger_label: The label corresponding to the feedback trigger, which is mapped by the compiler to a feedback trigger address on hardware, by default None. :type feedback_trigger_label: str :param phase: The phase of the pulse and acquisition in degrees, by default 0. :type phase: float :param t0: The acquisition start time in seconds, by default 0. :type t0: float .. py:class:: Timetag(duration: float, port: str, clock: str = DigitalClockResource.IDENTITY, acq_channel: int = 0, acq_index: int = 0, bin_mode: quantify_scheduler.enums.BinMode | str = BinMode.APPEND, time_source: quantify_scheduler.enums.TimeSource | str = TimeSource.FIRST, time_ref: quantify_scheduler.enums.TimeRef | str = TimeRef.START, t0: float = 0, fine_start_delay: float = 0, fine_end_delay: float = 0) Bases: :py:obj:`Acquisition` Acquire a single timetag per acquisition index. .. important:: The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor's :ref:`Reference guide` for more information. :param port: The acquisition port. :param clock: The clock used to demodulate the acquisition. :param duration: The acquisition duration in seconds. :param acq_channel: The data channel in which the acquisition is stored, by default 0. Describes the "where" information of the measurement, which typically corresponds to a qubit idx. :param acq_index: The data register in which the acquisition is stored, by default 0. Describes the "when" information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment). :param bin_mode: Describes what is done when data is written to a register that already contains a value. Options are "append" which appends the result to the list or "average" which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND. :param time_source: Selects the timetag data source for this acquisition type. String enumeration, one of: * ``first`` (default): record the first timetag in the window. * ``second``: record the second timetag in the window. Can be used to measure pulse distance when combined with first as reference. * ``last``: record the last timetag in the window. :param time_ref: Selects the time reference that the timetag is recorded in relation to. String enumeration, one of: * ``start`` (default): record relative to the start of the window. * ``end``: record relative to the end of the window. Note that this always yields a negative timetag. * ``first``: record relative to the first timetag in the window. * ``timestamp``: record relative to the timestamp marked using the :class:`~quantify_scheduler.operations.pulse_library.Timestamp` operation. :param t0: The acquisition start time in seconds, by default 0. :param fine_start_delay: Delays the start of the acquisition by the given amount in seconds. Does not delay the start time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0. :param fine_end_delay: Delays the end of the pulse by the given amount. Does not delay the end time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0. .. py:class:: TimetagTrace(duration: float, port: str, clock: str = DigitalClockResource.IDENTITY, acq_channel: int = 0, acq_index: int = 0, bin_mode: quantify_scheduler.enums.BinMode | str = BinMode.APPEND, time_ref: quantify_scheduler.enums.TimeRef | str = TimeRef.START, t0: float = 0, fine_start_delay: float = 0, fine_end_delay: float = 0) Bases: :py:obj:`Acquisition` The TimetagTrace acquisition protocol records timetags within an acquisition window. .. important:: The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor's :ref:`Reference guide` for more information. :param port: The acquisition port. :param clock: The clock used to demodulate the acquisition. :param duration: The acquisition duration in seconds. :param acq_channel: The data channel in which the acquisition is stored, is by default 0. Describes the "where" information of the measurement, which typically corresponds to a qubit idx. :param acq_index: The data register in which the acquisition is stored, by default 0. Describes the "when" information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment). :param bin_mode: Describes what is done when data is written to a register that already contains a value. Only "BinMode.APPEND" is available at the moment; this option concatenates timetag results with the same acquisition channel and index. :param time_ref: Selects the time reference that the timetag is recorded in relation to. String enumeration, one of: * start (default): record relative to the start of the window. * end: record relative to the end of the window. Note that this always yields a negative timetag. * first: syntactic sugar for first#, where # is the current channel. * timestamp: record relative to the timestamp marked using the ``Timestamp`` operation. :param t0: The acquisition start time in seconds, by default 0. :param fine_start_delay: Delays the start of the acquisition by the given amount in seconds. Does not delay the start time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0. :param fine_end_delay: Delays the end of the pulse by the given amount in seconds. Does not delay the end time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0. .. py:class:: Trace(duration: float, port: str, clock: str, acq_channel: int = 0, acq_index: int = 0, bin_mode: quantify_scheduler.enums.BinMode | str = BinMode.AVERAGE, t0: float = 0) Bases: :py:obj:`Acquisition` The Trace acquisition protocol measures a signal s(t). Only processing performed is rescaling and adding units based on a calibrated scale. Values are returned as a raw trace (numpy array of float datatype). Length of this array depends on the sampling rate of the acquisition device. .. important:: The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor's :ref:`Reference guide` for more information. :param port: The acquisition port. :param clock: The clock used to demodulate the acquisition. :param duration: The acquisition duration in seconds. :param acq_channel: The data channel in which the acquisition is stored, is by default 0. Describes the "where" information of the measurement, which typically corresponds to a qubit idx. :param acq_index: The data register in which the acquisition is stored, by default 0. Describes the "when" information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment). :param bin_mode: Describes what is done when data is written to a memory location that already contains values. Which bin mode can be used for Trace acquisitions may depend on the hardware. ``BinMode.AVERAGE``, the default, works on most hardware. This bin mode stores the weighted average value of the new result and the old values. ``BinMode.FIRST`` is used for hardware where only the result of the first acquisition in a Schedule is stored, e.g. for a Trace acquisition with Qblox QTM modules. :param t0: The acquisition start time in seconds, by default 0. .. py:class:: TriggerCount(port: str, clock: str, duration: float, acq_channel: int = 0, acq_index: int = 0, bin_mode: quantify_scheduler.enums.BinMode | str = BinMode.APPEND, t0: float = 0, fine_start_delay: float = 0, fine_end_delay: float = 0) Bases: :py:obj:`Acquisition` Trigger counting acquisition protocol returning an integer. The trigger acquisition mode is used to measure how many times the trigger level is surpassed. The level is set in the hardware configuration. .. important:: The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor's :ref:`Reference guide` for more information. :param port: The acquisition port. :param clock: The clock used to demodulate the acquisition. :param duration: The duration of the operation in seconds. :param acq_channel: The data channel in which the acquisition is stored, by default 0. Describes the "where" information of the measurement, which typically corresponds to a qubit idx. :param acq_index: The data register in which the acquisition is stored, by default 0. Describes the "when" information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment). :param bin_mode: Describes what is done when data is written to a register that already contains a value. Options are "append" which appends the result to the list or "distribution" which stores the count value of the new result and the old register value, by default BinMode.APPEND. :param t0: The acquisition start time in seconds, by default 0. :param fine_start_delay: Delays the start of the acquisition by the given amount in seconds. Does not delay the start time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0. :param fine_end_delay: Delays the end of the pulse by the given amount in seconds. Does not delay the end time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0. .. py:class:: WeightedIntegratedSeparated(waveform_a: dict[str, Any], waveform_b: dict[str, Any], port: str, clock: str, duration: float, acq_channel: int = 0, acq_index: int = 0, bin_mode: quantify_scheduler.enums.BinMode | str = BinMode.APPEND, phase: float = 0, t0: float = 0) Bases: :py:obj:`Acquisition` Weighted integration acquisition protocol where two sets weights are applied separately to the real and imaginary parts of the signal. Weights are applied as: .. math:: \widetilde{A} = \int \mathrm{Re}(S(t))\cdot W_A(t) \mathrm{d}t .. math:: \widetilde{B} = \int \mathrm{Im}(S(t))\cdot W_B(t) \mathrm{d}t :param waveform_a: The complex waveform used as integration weights :math:`W_A(t)`. :param waveform_b: The complex waveform used as integration weights :math:`W_B(t)`. :param port: The acquisition port. :param clock: The clock used to demodulate the acquisition. :param duration: The acquisition duration in seconds. :param acq_channel: The data channel in which the acquisition is stored, by default 0. Describes the "where" information of the measurement, which typically corresponds to a qubit idx. :param acq_index: The data register in which the acquisition is stored, by default 0. Describes the "when" information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment). :param bin_mode: Describes what is done when data is written to a register that already contains a value. Options are "append" which appends the result to the list or "average" which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND. :param phase: The phase of the pulse and acquisition in degrees, by default 0. :param t0: The acquisition start time in seconds, by default 0. :raises NotImplementedError: .. py:class:: ConditionalOperation(body: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule, qubit_name: str, t0: float = 0.0, hardware_buffer_time: float = 0.0) Bases: :py:obj:`ControlFlowOperation` Conditional over another operation. If a preceding thresholded acquisition on ``qubit_name`` results in a "1", the body will be executed, otherwise it will generate a wait time that is equal to the time of the subschedule, to ensure the absolute timing of later operations remains consistent. :param body: Operation to be conditionally played :param qubit_name: Name of the qubit on which the body will be conditioned :param t0: Time offset, by default 0 :param hardware_buffer_time: Time buffer, by default 0 .. rubric:: Example A conditional reset can be implemented as follows: .. admonition:: example .. jupyter-execute # relevant imports from quantify_scheduler import Schedule from quantify_scheduler.operations.control_flow_library import Conditional from quantify_scheduler.operations.gate_library import Measure, X # define conditional reset as a Schedule conditional_reset = Schedule("conditional reset") conditional_reset.add(Measure("q0", feedback_trigger_label="q0")) conditional_reset.add( ConditionalOperation(body=X("q0"), qubit_name="q0"), rel_time=364e-9, ) .. versionadded:: 0.22.0 For some hardware specific implementations, a ``hardware_buffer_time`` might be required to ensure the correct timing of the operations. This will be added to the duration of the ``body`` to prevent overlap with other operations. .. py:property:: body :type: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule Body of a control flow. .. py:property:: duration :type: float Duration of a control flow. .. py:class:: ControlFlowOperation(name: str) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Control flow operation that can be used as an ``Operation`` in ``Schedule``. This is an abstract class. Each concrete implementation of the control flow operation decides how and when their ``body`` operation is executed. .. py:property:: body :type: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule :abstractmethod: Body of a control flow. .. py:class:: ControlFlowSpec Control flow specification to be used at ``Schedule.add``. The users can specify any concrete control flow with the ``control_flow`` argument to ``Schedule.add``. The ``ControlFlowSpec`` is only a type which by itself cannot be used for the ``control_flow`` argument, use any concrete control flow derived from it. .. py:method:: create_operation(body: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule) -> quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule :abstractmethod: Transform the control flow specification to an operation or schedule. .. py:class:: LoopOperation(body: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule, repetitions: int, t0: float = 0.0) Bases: :py:obj:`ControlFlowOperation` Loop over another operation predefined times. Repeats the operation defined in ``body`` ``repetitions`` times. The actual implementation depends on the backend. :param body: Operation to be repeated :param repetitions: Number of repetitions :param t0: Time offset, by default 0 .. py:property:: body :type: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule Body of a control flow. .. py:property:: duration :type: float Duration of a control flow. .. py:class:: CNOT(qC: str, qT: str, **device_overrides) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Conditional-NOT gate, a common entangling gate. Performs an X gate on the target qubit qT conditional on the state of the control qubit qC. This operation can be represented by the following unitary: .. math:: \mathrm{CNOT} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ \end{bmatrix} :param qC: The control qubit. :param qT: The target qubit :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: CZ(qC: str, qT: str, **device_overrides) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Conditional-phase gate, a common entangling gate. Performs a Z gate on the target qubit qT conditional on the state of the control qubit qC. This operation can be represented by the following unitary: .. math:: \mathrm{CZ} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \\ \end{bmatrix} :param qC: The control qubit. :param qT: The target qubit :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: X90(qubit: str, **device_overrides) Bases: :py:obj:`Rxy` A single qubit rotation of 90 degrees around the X-axis. It is identical to the Rxy gate with theta=90 and phi=0 Defined by the unitary: .. math:: X90 = R_{X90} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & -i \\ -i & 1 \\ \end{bmatrix} :param qubit: The target qubit. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:attribute:: qubit .. py:class:: Y90(qubit: str, **device_overrides) Bases: :py:obj:`Rxy` A single qubit rotation of 90 degrees around the Y-axis. It is identical to the Rxy gate with theta=90 and phi=90 Defined by the unitary: .. math:: Y90 = R_{Y90} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & -1 \\ 1 & 1 \\ \end{bmatrix} :param qubit: The target qubit. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: Z90(qubit: str, **device_overrides) Bases: :py:obj:`Rz` A single qubit rotation of 90 degrees around the Z-axis. This operation can be represented by the following unitary: .. math:: Z90 = R_{Z90} = e^{-\frac{\pi/2}{2}}S = e^{-\frac{\pi/2}{2}}\sqrt{Z} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1-i & 0 \\ 0 & 1+i \\ \end{bmatrix} :param qubit: The target qubit. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: H(*qubits: str, **device_overrides) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A single qubit Hadamard gate. Note that the gate uses :math:`R_z(\pi) = -iZ`, adding a global phase of :math:`-\pi/2`. This operation can be represented by the following unitary: .. math:: H = Y90 \cdot Z = \frac{-i}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ 1 & -1 \\ \end{bmatrix} :param qubit: The target qubit. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: Measure(*qubits: str, acq_channel: Hashable | None = None, acq_index: tuple[int, Ellipsis] | int | None = None, acq_protocol: Literal['SSBIntegrationComplex', 'Timetag', 'TimetagTrace', 'Trace', 'TriggerCount', 'NumericalSeparatedWeightedIntegration', 'NumericalWeightedIntegration', 'ThresholdedAcquisition'] | None = None, bin_mode: quantify_scheduler.enums.BinMode | str | None = None, feedback_trigger_label: str | None = None, **device_overrides) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A projective measurement in the Z-basis. The measurement is compiled according to the type of acquisition specified in the device configuration. .. note:: Strictly speaking this is not a gate as it can not be described by a unitary. :param qubits: The qubits you want to measure. :param acq_channel: Only for special use cases. By default (if None): the acquisition channel specified in the device element is used. If set, this acquisition channel is used for this measurement. :param acq_index: Index of the register where the measurement is stored. If None specified, this defaults to writing the result of all qubits to acq_index 0. By default None. :param acq_protocol: Acquisition protocols that are supported. If ``None`` is specified, the default protocol is chosen based on the device and backend configuration. By default None. :type acq_protocol: "SSBIntegrationComplex" | "Trace" | "TriggerCount" | "NumericalSeparatedWeightedIntegration" | "NumericalWeightedIntegration" | None, optional :param bin_mode: The binning mode that is to be used. If not None, it will overwrite the binning mode used for Measurements in the circuit-to-device compilation step. By default None. :param feedback_trigger_label: The label corresponding to the feedback trigger, which is mapped by the compiler to a feedback trigger address on hardware, by default None. :type feedback_trigger_label: str :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: Reset(*qubits: str, **device_overrides) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Reset a qubit to the :math:`|0\rangle` state. The Reset gate is an idle operation that is used to initialize one or more qubits. .. note:: Strictly speaking this is not a gate as it can not be described by a unitary. .. admonition:: Examples :class: tip The operation can be used in several ways: .. jupyter-execute:: from quantify_scheduler.operations.gate_library import Reset reset_1 = Reset("q0") reset_2 = Reset("q1", "q2") reset_3 = Reset(*[f"q{i}" for i in range(3, 6)]) :param qubits: The qubit(s) to reset. NB one or more qubits can be specified, e.g., :code:`Reset("q0")`, :code:`Reset("q0", "q1", "q2")`, etc.. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: Rxy(theta: float, phi: float, qubit: str, **device_overrides) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A single qubit rotation around an axis in the equator of the Bloch sphere. This operation can be represented by the following unitary as defined in https://doi.org/10.1109/TQE.2020.2965810: .. math:: \mathsf {R}_{xy} \left(\theta, \varphi\right) = \begin{bmatrix} \textrm {cos}(\theta /2) & -ie^{-i\varphi }\textrm {sin}(\theta /2) \\ -ie^{i\varphi }\textrm {sin}(\theta /2) & \textrm {cos}(\theta /2) \end{bmatrix} :param theta: Rotation angle in degrees, will be casted to the [-180, 180) domain. :param phi: Phase of the rotation axis, will be casted to the [0, 360) domain. :param qubit: The target qubit. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: Rz(theta: float, qubit: str, **device_overrides) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A single qubit rotation about the Z-axis of the Bloch sphere. This operation can be represented by the following unitary as defined in https://www.quantum-inspire.com/kbase/rz-gate/: .. math:: \mathsf {R}_{z} \left(\theta\right) = \begin{bmatrix} e^{-i\theta/2} & 0 \\ 0 & e^{i\theta/2} \end{bmatrix} :param theta: Rotation angle in degrees, will be cast to the [-180, 180) domain. :param qubit: The target qubit. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: X(qubit: str, **device_overrides) Bases: :py:obj:`Rxy` A single qubit rotation of 180 degrees around the X-axis. This operation can be represented by the following unitary: .. math:: X180 = R_{X180} = \begin{bmatrix} 0 & -i \\ -i & 0 \\ \end{bmatrix} :param qubit: The target qubit. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: Y(qubit: str, **device_overrides) Bases: :py:obj:`Rxy` A single qubit rotation of 180 degrees around the Y-axis. It is identical to the Rxy gate with theta=180 and phi=90 Defined by the unitary: .. math:: Y180 = R_{Y180} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \\ \end{bmatrix} :param qubit: The target qubit. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: Z(qubit: str, **device_overrides) Bases: :py:obj:`Rz` A single qubit rotation of 180 degrees around the Z-axis. Note that the gate implements :math:`R_z(\pi) = -iZ`, adding a global phase of :math:`-\pi/2`. This operation can be represented by the following unitary: .. math:: Z180 = R_{Z180} = -iZ = e^{-\frac{\pi}{2}}Z = \begin{bmatrix} -i & 0 \\ 0 & i \\ \end{bmatrix} :param qubit: The target qubit. :param device_overrides: Device level parameters that override device configuration values when compiling from circuit to device level. .. py:class:: ChargeReset(*qubits: str) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Prepare a NV to its negative charge state NV$^-$. Create a new instance of ChargeReset operation that is used to initialize the charge state of an NV center. :param qubit: The qubit to charge-reset. NB one or more qubits can be specified, e.g., :code:`ChargeReset("qe0")`, :code:`ChargeReset("qe0", "qe1", "qe2")`, etc.. .. py:class:: CRCount(*qubits: str, acq_channel: Hashable | None = None, acq_index: tuple[int, Ellipsis] | int = None, acq_protocol: Literal['Trace', 'TriggerCount', None] = None, bin_mode: quantify_scheduler.enums.BinMode = None) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Operate ionization and spin pump lasers for charge and resonance counting. Gate level description for an optical CR count measurement. The measurement is compiled according to the type of acquisition specified in the device configuration. :param qubits: The qubits you want to measure :param acq_channel: Only for special use cases. By default (if None): the acquisition channel specified in the device element is used. If set, this acquisition channel is used for this measurement. :param acq_index: Index of the register where the measurement is stored. If None specified, it will default to a list of zeros of len(qubits) :param acq_protocol: Acquisition protocol (currently ``"TriggerCount"`` and ``"Trace"``) are supported. If ``None`` is specified, the default protocol is chosen based on the device and backend configuration. :param bin_mode: The binning mode that is to be used. If not None, it will overwrite the binning mode used for Measurements in the quantum-circuit to quantum-device compilation step. .. py:class:: Operation(name: str) Bases: :py:obj:`quantify_scheduler.json_utils.JSONSchemaValMixin`, :py:obj:`collections.UserDict` A representation of quantum circuit operations. The :class:`~Operation` class is a JSON-compatible data structure that contains information on how to represent the operation on the quantum-circuit and/or the quantum-device layer. It also contains information on where the operation should be applied: the :class:`~quantify_scheduler.resources.Resource` s used. An operation always has the following attributes: - duration (float): duration of the operation in seconds (can be 0). - hash (str): an auto generated unique identifier. - name (str): a readable identifier, does not have to be unique. An Operation can contain information on several levels of abstraction. This information is used when different representations are required. Note that when initializing an operation not all of this information needs to be available as operations are typically modified during the compilation steps. .. tip:: :mod:`quantify_scheduler` comes with a :mod:`~quantify_scheduler.operations.gate_library` and a :mod:`~quantify_scheduler.operations.pulse_library` , both containing common operations. **JSON schema of a valid Operation** .. jsonschema:: https://gitlab.com/quantify-os/quantify-scheduler/-/raw/main/quantify_scheduler/schemas/operation.json .. note:: Two different Operations containing the same information generate the same hash and are considered identical. .. py:attribute:: schema_filename :value: 'operation.json' .. py:attribute:: _class_signature :value: None .. py:attribute:: _duration :type: float :value: 0 .. py:method:: _update() -> None Update the Operation's internals. .. py:property:: name :type: str Return the name of the operation. .. py:property:: duration :type: float Determine operation duration from pulse_info. If the operation contains no pulse info, it is assumed to be ideal and have zero duration. .. py:property:: hash :type: str A hash based on the contents of the Operation. Needs to be a str for easy compatibility with json. .. py:method:: _get_signature(parameters: dict) -> str :classmethod: Returns the constructor call signature of this instance for serialization. The string constructor representation can be used to recreate the object using eval(signature). :param parameters: The current data dictionary. :type parameters: dict .. py:method:: add_gate_info(gate_operation: Operation) -> None Updates self.data['gate_info'] with contents of gate_operation. :param gate_operation: an operation containing gate_info. .. py:method:: add_device_representation(device_operation: Operation) -> None Adds device-level representation details to the current operation. :param device_operation: an operation containing the pulse_info and/or acquisition info describing how to represent the current operation at the quantum-device layer. .. py:method:: add_pulse(pulse_operation: Operation) -> None Adds pulse_info of pulse_operation Operation to this Operation. :param pulse_operation: an operation containing pulse_info. .. py:method:: add_acquisition(acquisition_operation: Operation) -> None Adds acquisition_info of acquisition_operation Operation to this Operation. :param acquisition_operation: an operation containing acquisition_info. .. py:method:: is_valid(object_to_be_validated: Operation) -> bool :classmethod: Validates the object's contents against the schema. Additionally checks if the hash property of the object evaluates correctly. .. py:property:: valid_gate :type: bool An operation is a valid gate if it has gate-level representation details. .. py:property:: valid_pulse :type: bool An operation is a valid pulse if it has pulse-level representation details. .. py:property:: valid_acquisition :type: bool An operation is a valid acquisition if it has pulse-level acquisition representation details. .. py:property:: is_conditional_acquisition :type: bool An operation is conditional if one of the following holds, ``self`` is an an acquisition with a ``feedback_trigger_label`` assigned to it. .. py:property:: is_control_flow :type: bool Determine if operation is a control flow operation. :returns: Whether the operation is a control flow operation. :rtype: bool .. py:property:: has_voltage_offset :type: bool Checks if the operation contains information for a voltage offset. .. py:function:: composite_square_pulse(square_amp: float, square_duration: float, square_port: str, square_clock: str, virt_z_parent_qubit_phase: float, virt_z_parent_qubit_clock: str, virt_z_child_qubit_phase: float, virt_z_child_qubit_clock: str, reference_magnitude: quantify_scheduler.operations.pulse_library.ReferenceMagnitude | None = None, t0: float = 0) -> quantify_scheduler.operations.pulse_library.SquarePulse An example composite pulse to implement a CZ gate. It applies the square pulse and then corrects for the phase shifts on both the qubits. :param square_amp: Amplitude of the square envelope. :param square_duration: The square pulse duration in seconds. :param square_port: Port of the pulse, must be capable of playing a complex waveform. :param square_clock: Clock used to modulate the pulse. :param virt_z_parent_qubit_phase: The phase shift in degrees applied to the parent qubit. :param virt_z_parent_qubit_clock: The clock of which to shift the phase applied to the parent qubit. :param virt_z_child_qubit_phase: The phase shift in degrees applied to the child qubit. :param virt_z_child_qubit_clock: The clock of which to shift the phase applied to the child qubit. :param reference_magnitude: Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :type reference_magnitude: :class:`~quantify_scheduler.operations.pulse_library.ReferenceMagnitude`, :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. :returns: SquarePulse operation. .. py:function:: nv_spec_pulse_mw(duration: float, amplitude: float, clock: str, port: str, reference_magnitude: quantify_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) -> quantify_scheduler.operations.pulse_library.SkewedHermitePulse Generate hermite pulse for spectroscopy experiment. This is a simplified version of the SkewedHermitePulse. It is not skewed. It also sets the phase to 0. This means that no rotation about the z-axis is applied on the qubit. :param duration: Pulse duration in seconds :param amplitude: Amplitude of the hermite pulse :param skewness: Skewness of hermite pulse :param clock: Name of clock for frequency modulation of hermite pulse :param port: Name of port where hermite pulse is applied :param reference_magnitude: Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :type reference_magnitude: :class:`~quantify_scheduler.operations.pulse_library.ReferenceMagnitude`, :returns: Hermite pulse operation .. py:function:: phase_shift(theta: float, clock: str) -> quantify_scheduler.operations.pulse_library.ShiftClockPhase Generate a :class:`~.operations.pulse_library.ShiftClockPhase` that shifts the phase of the ``clock`` by an angle `theta`. :param theta: Angle to shift the clock by, in degrees. :param clock: Name of the clock to shift. :returns: ShiftClockPhase operation. .. py:function:: rxy_drag_pulse(amp180: float, motzoi: float, theta: float, phi: float, port: str, duration: float, clock: str, reference_magnitude: quantify_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) -> quantify_scheduler.operations.pulse_library.DRAGPulse Generate a :class:`~.operations.pulse_library.DRAGPulse` that achieves the right rotation angle ``theta`` based on a calibrated pi-pulse amplitude and motzoi parameter based on linear interpolation of the pulse amplitudes. :param amp180: Unitless amplitude of excitation pulse to get the maximum 180 degree theta. :param motzoi: Unitless amplitude of the derivative component, the DRAG-pulse parameter. :param theta: Angle in degrees to rotate around an equatorial axis on the Bloch sphere. :param phi: Phase of the pulse in degrees. :param port: Name of the port where the pulse is played. :param duration: Duration of the pulse in seconds. :param clock: Name of the clock used to modulate the pulse. :param reference_magnitude: Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :type reference_magnitude: :class:`~quantify_scheduler.operations.pulse_library.ReferenceMagnitude`, :returns: DRAGPulse operation. .. py:function:: rxy_gauss_pulse(amp180: float, theta: float, phi: float, port: str, duration: float, clock: str, reference_magnitude: quantify_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) -> quantify_scheduler.operations.pulse_library.GaussPulse Generate a Gaussian drive with :class:`~.operations.pulse_library.GaussPulse` that achieves the right rotation angle ``theta`` based on a calibrated pi-pulse amplitude. :param amp180: Unitless amplitude of excitation pulse to get the maximum 180 degree theta. :param theta: Angle in degrees to rotate around an equatorial axis on the Bloch sphere. :param phi: Phase of the pulse in degrees. :param port: Name of the port where the pulse is played. :param duration: Duration of the pulse in seconds. :param clock: Name of the clock used to modulate the pulse. :param reference_magnitude: Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :type reference_magnitude: :class:`~quantify_scheduler.operations.pulse_library.ReferenceMagnitude`, :returns: GaussPulse operation. .. py:function:: rxy_hermite_pulse(amp180: float, skewness: float, theta: float, phi: float, port: str, duration: float, clock: str, reference_magnitude: quantify_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) -> quantify_scheduler.operations.pulse_library.SkewedHermitePulse Generate a Gaussian drive with :class:`~.operations.pulse_library.GaussPulse` that achieves the right rotation angle ``theta`` based on a calibrated pi-pulse amplitude. :param amp180: Unitless amplitude of excitation pulse to get the maximum 180 degree theta. :param skewness: First-order amplitude correction to the Hermite pulse. Skewness of 0 returns a standard hermite pulse. :param theta: Angle in degrees to rotate around an equatorial axis on the Bloch sphere. :param phi: Phase of the pulse in degrees. :param port: Name of the port where the pulse is played. :param duration: Duration of the pulse in seconds. :param clock: Name of the clock used to modulate the pulse. :param reference_magnitude: hardware config if not provided. :type reference_magnitude: :class:`~quantify_scheduler.operations.pulse_library.ReferenceMagnitude`, :returns: GaussPulse operation. .. py:function:: spin_init_pulse(square_duration: float, ramp_diff: float, parent_port: str, parent_clock: str, parent_square_amp: float, parent_ramp_amp: float, parent_ramp_rate: float, child_port: str, child_clock: str, child_square_amp: float, child_ramp_amp: float, child_ramp_rate: float) -> quantify_scheduler.schedules.Schedule Device compilation of the spin init operation. .. py:class:: ChirpPulse(amp: float, duration: float, port: str, clock: str, start_freq: float, end_freq: float, reference_magnitude: ReferenceMagnitude | None = None, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A linear chirp signal. A sinusoidal signal that ramps up in frequency. :param amp: Unitless amplitude of the envelope. :param duration: Duration of the pulse. :param port: The port of the pulse. :param clock: Clock used to modulate the pulse. :param start_freq: Start frequency of the Chirp. Note that this is the frequency at which the waveform is calculated, this may differ from the clock frequency. :param end_freq: End frequency of the Chirp. :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :param t0: Shift of the start time with respect to the start of the operation. .. py:class:: DRAGPulse(G_amp: float, D_amp: float, phase: float, duration: float, port: str, clock: str, reference_magnitude: ReferenceMagnitude | None = None, sigma: float = None, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A Gaussian pulse with a derivative component added to the out-of-phase channel. It uses the specified amplitude and sigma. If sigma is not specified it is set to 1/4 of the duration. The DRAG pulse is intended for single qubit gates in transmon based systems. It can be calibrated to reduce unwanted excitations of the :math:`|1\rangle - |2\rangle` transition (:cite:t:`motzoi_simple_2009` and :cite:t:`gambetta_analytic_2011`). The waveform is generated using :func:`.waveforms.drag` . :param G_amp: Unitless amplitude of the Gaussian envelope. :param D_amp: Unitless amplitude of the derivative component, the DRAG-pulse parameter. :param duration: The pulse duration in seconds. :param phase: Phase of the pulse in degrees. :param clock: Clock used to modulate the pulse. :param port: Port of the pulse, must be capable of carrying a complex waveform. :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :param sigma: Width of the Gaussian envelope in seconds. If not provided, the sigma is set to 1/4 of the duration. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. .. py:class:: GaussPulse(G_amp: float, phase: float, duration: float, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, sigma: float = None, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` The GaussPulse Operation is a real-valued pulse with the specified amplitude and sigma. If sigma is not specified it is set to 1/4 of the duration. The waveform is generated using :func:`.waveforms.drag` whith a D_amp set to zero, corresponding to a Gaussian pulse. :param G_amp: Unitless amplitude of the Gaussian envelope. :param duration: The pulse duration in seconds. :param phase: Phase of the pulse in degrees. :param clock: Clock used to modulate the pulse. By default the baseband clock. :param port: Port of the pulse, must be capable of carrying a complex waveform. :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :param sigma: Width of the Gaussian envelope in seconds. If not provided, the sigma is set to 1/4 of the duration. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. .. py:class:: IdlePulse(duration: float) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` The IdlePulse Operation is a placeholder for a specified duration of time. :param duration: The duration of idle time in seconds. .. py:class:: MarkerPulse(duration: float, port: str, t0: float = 0, clock: str = DigitalClockResource.IDENTITY, fine_start_delay: float = 0, fine_end_delay: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Digital pulse that is HIGH for the specified duration. Marker pulse is played on marker output. Currently only implemented for Qblox backend. :param duration: Duration of the HIGH signal. :param port: Name of the associated port. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. :param clock: Name of the associated clock. By default :class:`~quantify_scheduler.resources.DigitalClockResource`. This only needs to be specified if a custom clock name is used for a digital channel (for example, when a port-clock combination of a device element is used with a digital channel). :param fine_start_delay: Delays the start of the pulse by the given amount in seconds. Does not delay the start time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the pulse by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0. :param fine_end_delay: Delays the end of the pulse by the given amount in seconds. Does not delay the end time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the pulse by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0. .. py:class:: NumericalPulse(samples: numpy.ndarray | list, t_samples: numpy.ndarray | list, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, t0: float = 0, interpolation: str = 'linear') Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A pulse where the shape is determined by specifying an array of (complex) points. If points are required between the specified samples (such as could be required by the sampling rate of the hardware), meaning :math:`t[n] < t' < t[n+1]`, `scipy.interpolate.interp1d` will be used to interpolate between the two points and determine the value. :param samples: An array of (possibly complex) values specifying the shape of the pulse. :param t_samples: An array of values specifying the corresponding times at which the ``samples`` are evaluated. :param port: The port that the pulse should be played on. :param clock: Clock used to (de)modulate the pulse. By default the baseband clock. :param reference_magnitude: Scaling value and unit for the unitless samples. Uses settings in hardware config if not provided. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. :param interpolation: Specifies the type of interpolation used. This is passed as the "kind" argument to `scipy.interpolate.interp1d`. .. py:class:: RampPulse(amp: float, duration: float, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, offset: float = 0, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` RampPulse Operation is a pulse that ramps from zero to a set amplitude over its duration. The pulse is given as a function of time :math:`t` and the parameters offset and amplitude by .. math:: P(t) = \mathrm{offset} + t \times \mathrm{amp}. :param amp: Unitless amplitude of the ramp envelope function. :param duration: The pulse duration in seconds. :param offset: Starting point of the ramp pulse :param port: Port of the pulse. :param clock: Clock used to modulate the pulse. By default the baseband clock. :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. .. py:class:: ReferenceMagnitude Dataclass defining a reference level for pulse amplitudes in units of 'V', 'dBm', or 'A'. .. py:attribute:: value :type: float .. py:attribute:: unit :type: Literal['V', 'dBm', 'A'] .. py:method:: from_parameter(parameter: qcodes.InstrumentChannel) -> ReferenceMagnitude | None :classmethod: Initialize from ReferenceMagnitude QCoDeS InstrumentChannel values. .. py:class:: ResetClockPhase(clock: str, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` An operation that resets the phase of a clock. :param clock: The clock of which to reset the phase. .. py:class:: SetClockFrequency(clock: str, clock_freq_new: float | None, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Operation that sets updates the frequency of a clock. This is a low-level operation and therefore depends on the backend. Currently only implemented for Qblox backend, refer to :class:`~quantify_scheduler.backends.qblox.operation_handling.virtual.NcoSetClockFrequencyStrategy` for more details. :param clock: The clock for which a new frequency is to be set. :param clock_freq_new: The new frequency in Hz. If None, it will reset to the clock frequency set by the configuration or resource. :param t0: Time in seconds when to execute the command relative to the start time of the Operation in the Schedule. :param duration: (deprecated) The duration of the operation in seconds. .. py:class:: ShiftClockPhase(phase_shift: float, clock: str, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Operation that shifts the phase of a clock by a specified amount. This is a low-level operation and therefore depends on the backend. Currently only implemented for Qblox backend, refer to :class:`~quantify_scheduler.backends.qblox.operation_handling.virtual.NcoPhaseShiftStrategy` for more details. :param phase_shift: The phase shift in degrees. :param clock: The clock of which to shift the phase. :param t0: Time in seconds when to execute the command relative to the start time of the Operation in the Schedule. :param duration: (deprecated) The duration of the operation in seconds. .. py:class:: SkewedHermitePulse(duration: float, amplitude: float, skewness: float, phase: float, port: str, clock: str, reference_magnitude: ReferenceMagnitude | None = None, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Hermite pulse intended for single qubit gates in diamond based systems. The waveform is generated using :func:`~quantify_scheduler.waveforms.skewed_hermite`. :param duration: The pulse duration in seconds. :param amplitude: Unitless amplitude of the hermite pulse. :param skewness: Skewness in the frequency space. :param phase: Phase of the pulse in degrees. :param clock: Clock used to modulate the pulse. :param port: Port of the pulse, must be capable of carrying a complex waveform. :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. By default 0. .. py:class:: SoftSquarePulse(amp: float, duration: float, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A real valued square pulse convolved with a Hann window for smoothing. :param amp: Unitless amplitude of the envelope. :param duration: The pulse duration in seconds. :param port: Port of the pulse, must be capable of playing a complex waveform. :param clock: Clock used to modulate the pulse. By default the baseband clock. :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. .. py:class:: SquarePulse(amp: complex, duration: float, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A real-valued pulse with the specified amplitude during the pulse. :param amp: Unitless complex valued amplitude of the envelope. :param duration: The pulse duration in seconds. :param port: Port of the pulse, must be capable of playing a complex waveform. :param clock: Clock used to modulate the pulse. By default the baseband clock. :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. .. py:class:: StaircasePulse(start_amp: float, final_amp: float, num_steps: int, duration: float, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A real valued staircase pulse, which reaches it's final amplitude in discrete steps. In between it will maintain a plateau. :param start_amp: Starting unitless amplitude of the staircase envelope function. :param final_amp: Final unitless amplitude of the staircase envelope function. :param num_steps: The number of plateaus. :param duration: Duration of the pulse in seconds. :param port: Port of the pulse. :param clock: Clock used to modulate the pulse. By default the baseband clock. :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. .. py:class:: SuddenNetZeroPulse(amp_A: float, amp_B: float, net_zero_A_scale: float, t_pulse: float, t_phi: float, t_integral_correction: float, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, t0: float = 0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` A pulse that can be used to implement a conditional phase gate in transmon qubits. The sudden net-zero (SNZ) pulse is defined in :cite:t:`negirneac_high_fidelity_2021`. :param amp_A: Unitless amplitude of the main square pulse. :param amp_B: Unitless scaling correction for the final sample of the first square and first sample of the second square pulse. :param net_zero_A_scale: Amplitude scaling correction factor of the negative arm of the net-zero pulse. :param t_pulse: The total duration of the two half square pulses :param t_phi: The idling duration between the two half pulses :param t_integral_correction: The duration in which any non-zero pulse amplitude needs to be corrected. :param port: Port of the pulse, must be capable of playing a complex waveform. :param clock: Clock used to modulate the pulse. By default the baseband clock. :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. .. py:class:: Timestamp(port: str, t0: float = 0, clock: str = DigitalClockResource.IDENTITY) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Operation that marks a time reference for timetags. Specifically, all timetags in :class:`~quantify_scheduler.operations.acquisition_library.Timetag` and :class:`~quantify_scheduler.operations.acquisition_library.TimetagTrace` are measured relative to the timing of this operation, if they have a matching port and clock, and if ``time_ref=TimeRef.TIMESTAMP`` is given as an argument. :param port: The same port that the timetag acquisition is defined on. :param clock: The same clock that the timetag acquisition is defined on. :param t0: Time offset (in seconds) of this Operation, relative to the start time in the Schedule. By default 0. .. py:class:: VoltageOffset(offset_path_I: float, offset_path_Q: float, port: str, clock: str = BasebandClockResource.IDENTITY, t0: float = 0, reference_magnitude: ReferenceMagnitude | None = None) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` Operation that represents setting a constant offset to the output voltage. Please refer to :ref:`sec-qblox-offsets-long-voltage-offsets` in the reference guide for more details. :param offset_path_I: Offset of path I. :type offset_path_I: float :param offset_path_Q: Offset of path Q. :type offset_path_Q: float :param port: Port of the voltage offset. :type port: str :param clock: Clock used to modulate the voltage offset. By default the baseband clock. :type clock: str, optional :param duration: (deprecated) The time to hold the offset for (in seconds). :type duration: float, optional :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. :type t0: float, optional :param reference_magnitude: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. .. py:class:: WindowOperation(window_name: str, duration: float, t0: float = 0.0) Bases: :py:obj:`quantify_scheduler.operations.operation.Operation` The WindowOperation is an operation for visualization purposes. The :class:`~WindowOperation` has a starting time and duration. .. py:property:: window_name :type: str Return the window name of this operation.