Dynamic pulse to simulate a specific time-dependent hamiltonian for neutral-atom devices.
:param sequence: a pulser.sequence.Sequence
instance
:param duration: duration of the pulse in nanoseconds
:param amplitude: amplitude of the pulse in rad/µs
:param detuning: detuning of the pulse in rad/s
:param phase: phase in rad
Source code in qadence2_platforms/backends/fresnel1/functions.py
| def dyn_pulse(
sequence: Sequence,
duration: VariableItem | float,
amplitude: VariableItem | float,
detuning: VariableItem | float,
phase: VariableItem | float,
**_: Any,
) -> None:
"""
Dynamic pulse to simulate a specific time-dependent hamiltonian for neutral-atom devices.
:param sequence: a `pulser.sequence.Sequence` instance
:param duration: duration of the pulse in nanoseconds
:param amplitude: amplitude of the pulse in rad/µs
:param detuning: detuning of the pulse in rad/s
:param phase: phase in rad
"""
max_amp = sequence.device.channels["rydberg_global"].max_amp or DEFAULT_AMPLITUDE
max_abs_detuning = (
sequence.device.channels["rydberg_global"].max_abs_detuning or DEFAULT_DETUNING
)
duration *= 1000 * 2 * np.pi / max_amp # type: ignore
amplitude *= max_amp # type: ignore
detuning *= max_abs_detuning # type: ignore
sequence.enable_eom_mode("global", amp_on=amplitude, detuning_on=detuning)
sequence.add_eom_pulse("global", duration=duration, phase=phase) # type: ignore
sequence.disable_eom_mode("global")
|