# 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

 GaussianSquare.amp The Gaussian amplitude. GaussianSquare.id Unique identifier for this pulse. GaussianSquare.parameters Return a dictionary containing the pulse’s parameters. GaussianSquare.sigma The Gaussian standard deviation of the pulse width. GaussianSquare.width The width of the square portion of the pulse.

Methods

 GaussianSquare.draw([dt, style, filename, …]) Plot the pulse. Deprecated. Return a Waveform with samples filled according to the formula that the pulse represents and the parameter values it contains. Validate parameters.