Pulse
- class pulser.pulse.Pulse(amplitude, detuning, phase, post_phase_shift=0.0)
Bases:
object
A generic pulse.
In Pulser, a Pulse is a modulation of a frequency signal in amplitude and/or frequency, with a specific phase, over a given duration. Amplitude and frequency modulations are defined by
Waveform
child classes. Frequency modulation is determined by a detuning waveform, which describes the shift in frequency from the channel’s central frequency over time. If either quantity is constant throughout the entire pulse, use theConstantDetuning
,ConstantAmplitude
orConstantPulse
class method to create it. If defining the pulse’s phase modulation is preferred over its frequency modulation, usePulse.ArbitraryPhase()
.Note
We define the
amplitude
of a pulse to be its Rabi frequency, \(\Omega\), in rad/µs. Equivalently, thedetuning
is \(\delta\), also in rad/µs.- Parameters:
amplitude (
Waveform
|Parametrized
) – The pulse amplitude waveform (in rad/µs).detuning (
Waveform
|Parametrized
) – The pulse detuning waveform (in rad/µs).phase (
float
|TensorLike
|Parametrized
) – The pulse phase (in radians).post_phase_shift (
float
|Parametrized
, default:0.0
) – Optionally lets you add a phase shift(in rad) immediately after the end of the pulse. This allows for enconding of arbitrary single-qubit gates into a single pulse (seeSequence.phase_shift()
for more information).
Attributes
The duration of the pulse (in ns).
post_phase_shift
amplitude
detuning
phase
Methods
Pulse with an arbitrary phase waveform.
Pulse with a constant amplitude and a detuning waveform.
Creates a Pulse with an amplitude waveform and a constant detuning.
Pulse with a constant amplitude and a constant detuning.
Draws the pulse's amplitude and frequency waveforms.
Calculates the extra time needed to ramp down to zero.
Calculates the pulse's full duration after output modulation.
Signatures
- classmethod ArbitraryPhase(cls, amplitude, phase, post_phase_shift=0.0)
Pulse with an arbitrary phase waveform.
- Parameters:
amplitude (
Waveform
|Parametrized
) – The amplitude waveform (in rad/µs).phase (
Waveform
|Parametrized
) – The phase waveform (in rad).post_phase_shift (
float
|Parametrized
, default:0.0
) – Optionally lets you add a phase shift (in rad) immediately after the end of the pulse.
Note
Due to how the Hamiltonian is defined in Pulser, the phase and detuning are related by
\[\phi(t) = \phi_c - \sum_{k=0}^{t} \delta(k)\]where \(\phi_c\) is the pulse’s constant phase offset. From a given phase waveform, we extract the phase offset and detuning waveform that respect this formula for every sample of \(\phi(t)\) and use these quantities to define the Pulse.
Warning
Except when the phase waveform is a
ConstantWaveform
or aRampWaveform
, the extracted detuning waveform will be aCustomWaveform
. This makes the Pulse uncapable of automatically extending its duration to fit a channel’s clock period.- Return type:
- Returns:
A regular Pulse, with the phase waveform translated into a detuning waveform and a constant phase offset.
- classmethod ConstantAmplitude(cls, amplitude, detuning, phase, post_phase_shift=0.0)
Pulse with a constant amplitude and a detuning waveform.
- Parameters:
amplitude (
float
|TensorLike
|Parametrized
) – The pulse amplitude value (in rad/µs).detuning (
Waveform
|Parametrized
) – The pulse detuning waveform (in rad/µs).phase (
float
|TensorLike
|Parametrized
) – The pulse phase (in radians).post_phase_shift (
float
|Parametrized
, default:0.0
) – Optionally lets you add a phase shift (in rad) immediately after the end of the pulse.
- Return type:
- classmethod ConstantDetuning(cls, amplitude, detuning, phase, post_phase_shift=0.0)
Creates a Pulse with an amplitude waveform and a constant detuning.
- Parameters:
amplitude (
Waveform
|Parametrized
) – The pulse amplitude waveform (in rad/µs).detuning (
float
|TensorLike
|Parametrized
) – The detuning value (in rad/µs).phase (
float
|TensorLike
|Parametrized
) – The pulse phase (in radians).post_phase_shift (
float
|Parametrized
, default:0.0
) – Optionally lets you add a phase shift (in rad) immediately after the end of the pulse.
- Return type:
- classmethod ConstantPulse(duration, amplitude, detuning, phase, post_phase_shift=0.0)
Pulse with a constant amplitude and a constant detuning.
- Parameters:
duration (
int
|Parametrized
) – The pulse duration (in ns).amplitude (
float
|TensorLike
|Parametrized
) – The pulse amplitude value (in rad/µs).detuning (
float
|TensorLike
|Parametrized
) – The detuning value (in rad/µs).phase (
float
|TensorLike
|Parametrized
) – The pulse phase (in radians).post_phase_shift (
float
|Parametrized
, default:0.0
) – Optionally lets you add a phase shift (in rad) immediately after the end of the pulse.
- Return type:
- draw()
Draws the pulse’s amplitude and frequency waveforms.
- Return type:
None
- fall_time(channel, in_eom_mode=False)
Calculates the extra time needed to ramp down to zero.
- Return type:
int
- get_full_duration(channel, in_eom_mode=False)
Calculates the pulse’s full duration after output modulation.
The full duration of a pulse is the total time between the start of the input signal and the end of the output signal, as shown in the sequence.
- Parameters:
channel (
Channel
) – The pulse executing the channel.in_eom_mode (
bool
, default:False
) – Whether the pulse is executed in EOM mode.
- Return type:
int
- property duration: int
The duration of the pulse (in ns).