quantify_scheduler.operations.pulse_factories

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

rxy_drag_pulse(...)

Generate a DRAGPulse that achieves the right

composite_square_pulse(...)

This is an example composite pulse to implement a CZ gate. It applies the

nv_spec_pulse_mw(...)

Generate hermite pulse for spectroscopy experiment.

long_square_pulse(...)

Create a long square pulse using DC voltage offsets.

staircase_pulse(...)

Create a staircase-shaped pulse using DC voltage offsets.

long_ramp_pulse(...)

Creates a long ramp pulse by stitching together shorter ramps.

rxy_drag_pulse(amp180, motzoi, theta, phi, port, duration, clock) quantify_scheduler.operations.pulse_library.DRAGPulse[source]

Generate a 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.

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, t0: float = 0) quantify_scheduler.operations.pulse_library.SquarePulse[source]

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.

Parameters
  • square_amp – Amplitude of the square envelope.

  • square_duration – The square pulse duration in seconds.

  • square_port – Port of the pulse, must be capable of playing a complex waveform.

  • square_clock – Clock used to modulate the pulse.

  • virt_z_parent_qubit_phase – The phase shift in degrees applied to the parent qubit.

  • virt_z_parent_qubit_clock – The clock of which to shift the phase applied to the parent qubit.

  • virt_z_child_qubit_phase – The phase shift in degrees applied to the child qubit.

  • virt_z_child_qubit_clock – The clock of which to shift the phase applied to the child qubit.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule.

nv_spec_pulse_mw(duration: float, amplitude: float, clock: str, port: str) quantify_scheduler.operations.pulse_library.SkewedHermitePulse[source]

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.

Parameters
  • duration – Pulse duration in seconds

  • amplitude – Amplitude of the hermite pulse

  • skewness – Skewness of hermite pulse

  • clock – Name of clock for frequency modulation of hermite pulse

  • port – Name of port where hermite pulse is applied

Returns

Hermite pulse operation

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[source]

Create a long square pulse using DC voltage offsets.

Note

This function creates a StitchedPulse object, which can currently only be compiled by the Qblox backend.

Parameters
  • amp (float) – Amplitude of the envelope.

  • duration (float) – The pulse duration in seconds.

  • port (str) – Port of the pulse, must be capable of playing a complex waveform.

  • clock (str, optional) – Clock used to modulate the pulse. By default the baseband clock.

  • t0 (float, optional) – Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. By default 0.

  • grid_time_ns (int, optional) – 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.

Returns

A StitchedPulse object containing an offset instruction with the specified amplitude.

Return type

StitchedPulse

Raises

ValueError – When the duration of the pulse is not a multiple of grid_time_ns.

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[source]

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 StitchedPulse object, which can currently only be compiled by the Qblox backend.

Parameters
  • start_amp (float) – Starting amplitude of the staircase envelope function.

  • final_amp (float) – Final amplitude of the staircase envelope function.

  • num_steps (int) – The number of plateaus.

  • duration (float) – Duration of the pulse in seconds.

  • port (str) – Port of the pulse.

  • clock (str, optional) – Clock used to modulate the pulse. By default the baseband clock.

  • t0 (float, optional) – Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. By default 0.

  • grid_time_ns (int, optional) – 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.

Returns

A StitchedPulse object containing incrementing or decrementing offset instructions.

Return type

StitchedPulse

Raises

ValueError – When the duration of a step is not a multiple of grid_time_ns.

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[source]

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 StitchedPulse object, which can currently only be compiled by the Qblox backend.

Parameters
  • amp (float) – Amplitude of the ramp envelope function.

  • duration (float) – The pulse duration in seconds.

  • port (str) – Port of the pulse.

  • offset (float, optional) – Starting point of the ramp pulse. By default 0.

  • clock (str, optional) – Clock used to modulate the pulse, by default a BasebandClock is used.

  • t0 (float, optional) – Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. By default 0.

  • part_duration_ns (int, optional) – Duration of each partial ramp in nanoseconds, by default STITCHED_PULSE_PART_DURATION_NS.

Returns

A StitchedPulse composed of shorter ramp pulses with varying DC offsets, forming one long ramp pulse.

Return type

StitchedPulse