Gaussian
- class qililab.Gaussian(amplitude, duration, num_sigmas)
Bases:
WaveformGaussian waveform with peak at duration/2 and spanning for num_sigmas over the pulse duration.
Standard centered Gaussian pulse shape, symmetrically spanning for
num_sigmasover the pulse duration.The normal distribution’s parameters \(\mu\) (mean) and \(\sigma\) (standard deviation) will be therefore defined by \(\mu =\)
duration\(/ 2\) and \(\sigma =\)duration\(/\)num_sigmas:\[Gaussian(x) = A * exp(-0.5 * (x - \mu)^2 / \sigma^2)\]You can think of it, as if an infinite expanding gaussian, is symmetrically cut in the given
num_sigmas, then that cut is expanded to occupy all the pulse duration, and then is shifted down so that it starts at 0.Examples
To get the envelope of a gaussian waveform, with
num_sigmasequal toX, you need to do:import qililab as ql gaussian_envelope = ql.Gaussian(num_sigmas=X, duration=50, amplitude=1).envelope()which for
Xbeing1,4,6or8, look respectively like:
- This comes from the following steps, parting from a “full” gaussian (big
num_sigma) [blue]: you cut a full gaussian to the given
num_sigmas, for example1[small purple].in reality this cut gaussian, actually extends all the duration [big purple],
you shift/distortion down the cut gaussian, so it starts at 0 height [red].
- Parameters:
amplitude (
float) – Maximum amplitude of the pulse.duration (
int) – Duration of the pulse (ns).num_sigmas (
float) – Sigma number of the gaussian pulse shape. Defines the width of the gaussian pulse.
Methods
envelope([resolution])Gaussian envelope centered with respect to the pulse.
Get the duration of the waveform.
Attributes
yaml_tag- envelope(resolution=1)
Gaussian envelope centered with respect to the pulse.
The gaussian is symmetrically cut in the given
num_sigmas, meaning that it starts and ends at that sigma width.And then to avoid introducing noise at time 0, the full gaussian is shifted down so that it starts at 0.
- Parameters:
resolution (
int, optional) – Resolution of the pulse. Defaults to 1.- Returns:
Height of the envelope for each time step.
- Return type:
np.ndarray
- This comes from the following steps, parting from a “full” gaussian (big