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#
|
Generate a |
|
Generate a Gaussian drive with |
|
Generate a |
An example composite pulse to implement a CZ gate. |
|
|
Generate a Gaussian drive with |
|
Generate hermite pulse for spectroscopy experiment. |
|
Device compilation of the spin init operation. |
- 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 [source]#
Generate a
DRAGPulse
that achieves the right rotation angletheta
based on a calibrated pi-pulse amplitude and motzoi parameter based on linear interpolation of the pulse amplitudes.- Parameters:
amp180 – Unitless amplitude of excitation pulse to get the maximum 180 degree theta.
motzoi – Unitless amplitude of the derivative component, the DRAG-pulse parameter.
theta – Angle in degrees to rotate around an equatorial axis on the Bloch sphere.
phi – Phase of the pulse in degrees.
port – Name of the port where the pulse is played.
duration – Duration of the pulse in seconds.
clock – Name of the clock used to modulate the pulse.
reference_magnitude (
ReferenceMagnitude
,) – Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.
- Returns:
DRAGPulse operation.
- 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 [source]#
Generate a Gaussian drive with
GaussPulse
that achieves the right rotation angletheta
based on a calibrated pi-pulse amplitude.- Parameters:
amp180 – Unitless amplitude of excitation pulse to get the maximum 180 degree theta.
theta – Angle in degrees to rotate around an equatorial axis on the Bloch sphere.
phi – Phase of the pulse in degrees.
port – Name of the port where the pulse is played.
duration – Duration of the pulse in seconds.
clock – Name of the clock used to modulate the pulse.
reference_magnitude (
ReferenceMagnitude
,) – Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.
- Returns:
GaussPulse operation.
- phase_shift(theta: float, clock: str) quantify_scheduler.operations.pulse_library.ShiftClockPhase [source]#
Generate a
ShiftClockPhase
that shifts the phase of theclock
by an angle theta.- Parameters:
theta – Angle to shift the clock by, in degrees.
clock – Name of the clock to shift.
- Returns:
ShiftClockPhase operation.
- 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 [source]#
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.
reference_magnitude (
ReferenceMagnitude
,) – Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule.
- Returns:
SquarePulse operation.
- 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 [source]#
Generate a Gaussian drive with
GaussPulse
that achieves the right rotation angletheta
based on a calibrated pi-pulse amplitude.- Parameters:
amp180 – Unitless amplitude of excitation pulse to get the maximum 180 degree theta.
skewness – First-order amplitude correction to the Hermite pulse. Skewness of 0 returns a standard hermite pulse.
theta – Angle in degrees to rotate around an equatorial axis on the Bloch sphere.
phi – Phase of the pulse in degrees.
port – Name of the port where the pulse is played.
duration – Duration of the pulse in seconds.
clock – Name of the clock used to modulate the pulse.
reference_magnitude (
ReferenceMagnitude
,) – hardware config if not provided.
- Returns:
GaussPulse operation.
- 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 [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
reference_magnitude (
ReferenceMagnitude
,) – Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.
- Returns:
Hermite pulse operation
- 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 [source]#
Device compilation of the spin init operation.