pulse_factories =============== .. py:module:: quantify_scheduler.operations.pulse_factories .. autoapi-nested-parse:: A module containing factory functions for pulses on the quantum-device layer. These factories are used to take a parametrized representation of on a operation and use that to create an instance of the operation itself. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: quantify_scheduler.operations.pulse_factories.rxy_drag_pulse quantify_scheduler.operations.pulse_factories.phase_shift quantify_scheduler.operations.pulse_factories.composite_square_pulse quantify_scheduler.operations.pulse_factories.nv_spec_pulse_mw quantify_scheduler.operations.pulse_factories.long_square_pulse quantify_scheduler.operations.pulse_factories.staircase_pulse quantify_scheduler.operations.pulse_factories.long_ramp_pulse .. py:function:: rxy_drag_pulse(amp180, motzoi, theta, phi, port, duration, clock, reference_magnitude=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. .. 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`. .. 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: float = None, t0: float = 0) -> quantify_scheduler.operations.pulse_library.SquarePulse This is 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: 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:function:: nv_spec_pulse_mw(duration: float, amplitude: float, clock: str, port: str, reference_magnitude: float = 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: Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided. :returns: Hermite pulse operation .. py:function:: long_square_pulse(amp: float, duration: float, port: str, clock: str = BasebandClockResource.IDENTITY, t0: float = 0, grid_time_ns: int = qblox_constants.GRID_TIME) -> quantify_scheduler.operations.stitched_pulse.StitchedPulse Create a long square pulse using DC voltage offsets. .. note:: This function creates a :class:`~quantify_scheduler.operations.stitched_pulse.StitchedPulse` object, which can currently only be compiled by the Qblox backend. :param amp: Amplitude of the envelope. :type amp: float :param duration: The pulse duration in seconds. :type duration: float :param port: Port of the pulse, must be capable of playing a complex waveform. :type port: str :param clock: Clock used to modulate the pulse. By default the baseband clock. :type clock: str, optional :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. By default 0. :type t0: float, optional :param grid_time_ns: Grid time in ns. The duration of the long_square_pulse must be a multiple of this. By default equal to the grid time of Qblox modules. :type grid_time_ns: int, optional :returns: A StitchedPulse object containing an offset instruction with the specified amplitude. :rtype: StitchedPulse :raises ValueError: When the duration of the pulse is not a multiple of ``grid_time_ns``. .. py:function:: staircase_pulse(start_amp: float, final_amp: float, num_steps: int, duration: float, port: str, clock: str = BasebandClockResource.IDENTITY, t0: float = 0, grid_time_ns: int = qblox_constants.GRID_TIME) -> quantify_scheduler.operations.stitched_pulse.StitchedPulse Create a staircase-shaped pulse using DC voltage offsets. This function generates a real valued staircase pulse, which reaches its final amplitude in discrete steps. In between it will maintain a plateau. .. note:: This function returns a :class:`~quantify_scheduler.operations.stitched_pulse.StitchedPulse` object, which can currently only be compiled by the Qblox backend. :param start_amp: Starting amplitude of the staircase envelope function. :type start_amp: float :param final_amp: Final amplitude of the staircase envelope function. :type final_amp: float :param num_steps: The number of plateaus. :type num_steps: int :param duration: Duration of the pulse in seconds. :type duration: float :param port: Port of the pulse. :type port: str :param clock: Clock used to modulate the pulse. By default the baseband clock. :type clock: str, optional :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. By default 0. :type t0: float, optional :param grid_time_ns: Grid time in ns. The duration of each step of the staircase must be a multiple of this. By default equal to the grid time of Qblox modules. :type grid_time_ns: int, optional :returns: A StitchedPulse object containing incrementing or decrementing offset instructions. :rtype: StitchedPulse :raises ValueError: When the duration of a step is not a multiple of ``grid_time_ns``. .. py:function:: long_ramp_pulse(amp: float, duration: float, port: str, offset: float = 0, clock: str = BasebandClockResource.IDENTITY, t0: float = 0, part_duration_ns: int = qblox_constants.STITCHED_PULSE_PART_DURATION_NS) -> quantify_scheduler.operations.stitched_pulse.StitchedPulse Creates a long ramp pulse by stitching together shorter ramps. This function creates a long ramp pulse by stitching together ramp pulses of the specified duration ``part_duration_ns``, with DC voltage offset instructions placed in between. .. note:: This function returns a :class:`~quantify_scheduler.operations.stitched_pulse.StitchedPulse` object, which can currently only be compiled by the Qblox backend. :param amp: Amplitude of the ramp envelope function. :type amp: float :param duration: The pulse duration in seconds. :type duration: float :param port: Port of the pulse. :type port: str :param offset: Starting point of the ramp pulse. By default 0. :type offset: float, optional :param clock: Clock used to modulate the pulse, by default a BasebandClock is used. :type clock: str, optional :param t0: Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. By default 0. :type t0: float, optional :param part_duration_ns: Duration of each partial ramp in nanoseconds, by default :class:`~quantify_scheduler.backends.qblox.constants.STITCHED_PULSE_PART_DURATION_NS`. :type part_duration_ns: int, optional :returns: A ``StitchedPulse`` composed of shorter ramp pulses with varying DC offsets, forming one long ramp pulse. :rtype: StitchedPulse