# 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 (Union[complex, ParameterExpression]) – The amplitude of the Gaussian and of the square pulse.

• sigma (Union[float, ParameterExpression]) – A measure of how wide or narrow the Gaussian risefall is; see the class docstring for more details.

• width (Union[float, ParameterExpression]) – 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.assign_parameters(value_dict) Return a new ParametricPulse with parameters assigned. 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.