GaussianSquare¶
- class GaussianSquare(duration, amp, sigma, width, name=None)[source]¶
A square pulse with a Gaussian shaped risefall on either side:
\[ \begin{align}\begin{aligned}risefall = (duration - width) / 2\\0 <= x < risefall\\f(x) = amp * exp( -(1/2) * (x - risefall/2)^2 / sigma^2) )\\risefall <= x < risefall + width\\f(x) = amp\\risefall + width <= x < duration\\f(x) = amp * exp( -(1/2) * (x - (risefall + width)/2)^2 / sigma^2) )\end{aligned}\end{align} \]Initialize the gaussian square pulse.
- Parameters
duration (
int
) – Pulse length in terms of the the sampling period dt.amp (
complex
) – The amplitude of the Gaussian and of the square pulse.sigma (
float
) – A measure of how wide or narrow the Gaussian risefall is; see the class docstring for more details.width (
float
) – The duration of the embedded square pulse.name (
Optional
[str
]) – Display name for this pulse envelope.
Attributes
The Gaussian amplitude.
Unique identifier for this pulse.
Return a dictionary containing the pulse’s parameters.
The Gaussian standard deviation of the pulse width.
The width of the square portion of the pulse.
Methods
GaussianSquare.__call__
(channel)Call self as a function.
GaussianSquare.draw
([dt, style, filename, …])Plot the pulse.
Return a SamplePulse with samples filled according to the formula that the pulse represents and the parameter values it contains.
Validate parameters.
GaussianSquare.__call__
(channel)Call self as a function.