boulderopal.signals.gaussian_pulse(duration, amplitude, width=None, center_time=None, drag=0.0, flat_duration=0.0)

Create a Signal object representing a Gaussian pulse.

  • duration (float) – The duration of the signal, \(T\).

  • amplitude (float or complex) – The amplitude of the Gaussian pulse, \(A\).

  • width (float or None, optional) – The standard deviation of the Gaussian pulse, \(\sigma\). Defaults to \(T/10\) or \((T-t_\mathrm{flat})/10\) if flat_duration is passed.

  • center_time (float or None, optional) – The center of the Gaussian pulse, \(t_0\). Defaults to half of the given value of the duration, \(T/2\).

  • drag (float, optional) – The DRAG parameter, \(\beta\). Defaults to 0, in which case there is no DRAG correction.

  • flat_duration (float, optional) – The amount of time to remain constant after the peak of the Gaussian, \(t_\mathrm{flat}\). If passed, it must be nonnegative and less than the duration. Defaults to 0, in which case no constant part is added to the Gaussian pulse.


The Gaussian pulse.

Return type:


See also


Create a Signal object representing a cosine pulse.


Graph operation to create a Pwc representing a Gaussian pulse.


Graph operation to create a Stf representing a Gaussian pulse.


Create a Signal object representing a hyperbolic secant pulse.


Create a Signal object representing a square pulse.


The Gaussian pulse is defined as

\[\begin{split}\mathop{\mathrm{Gaussian}}(t) = \begin{cases} A \left(1-\frac{i\beta (t-t_1)}{\sigma^2}\right) \exp \left(- \frac{(t-t_1)^2}{2\sigma^2} \right) &\mathrm{if} \quad t < t_1=t_0- t_\mathrm{flat}/2\\ A &\mathrm{if} \quad t_0-t_\mathrm{flat}/2 \le t < t_0+t_\mathrm{flat}/2 \\ A \left(1-\frac{i\beta (t-t_2)}{\sigma^2}\right) \exp \left(- \frac{(t-t_2)^2}{2\sigma^2} \right) &\mathrm{if} \quad t > t_2=t_0+t_\mathrm{flat}/2 \end{cases} .\end{split}\]

If the flat duration is zero (the default setting), this reduces to

\[\mathop{\mathrm{Gaussian}}(t) = A \left(1-\frac{i\beta (t-t_0)}{\sigma^2}\right) \exp \left(- \frac{(t-t_0)^2}{2\sigma^2} \right) .\]


Define a Gaussian pulse.

>>> pulse = bo.signals.gaussian_pulse(duration=2.0, amplitude=1.0)
>>> pulse.export_with_time_step(time_step=0.2)
array([4.00652974e-05+0.j, 2.18749112e-03+0.j, 4.39369336e-02+0.j,
   3.24652467e-01+0.j, 8.82496903e-01+0.j, 8.82496903e-01+0.j,
   3.24652467e-01+0.j, 4.39369336e-02+0.j, 2.18749112e-03+0.j,

Define a flat-top Gaussian pulse with a DRAG correction.

>>> pulse = bo.signals.gaussian_pulse(
...     duration=1.0,
...     amplitude=1.0,
...     width=0.2,
...     center_time=0.6,
...     drag=0.1,
...     flat_duration=0.2,
... )
>>> pulse.export_with_sampling_rate(sampling_rate=10.)
array([0.07955951+0.08950445j, 0.21626517+0.18923202j,
   0.45783336+0.28614585j, 0.7548396 +0.28306485j,
   0.96923323+0.12115415j, 1.        +0.j        ,
   1.        +0.j        , 0.96923323-0.12115415j,
   0.7548396 -0.28306485j, 0.45783336-0.28614585j])