Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.pulse.library.gaussian_square

gaussian_square(duration, amp, sigma, risefall=None, width=None, name=None, zero_ends=True)

GitHub

Generates gaussian square Waveform.

For d=d= duration, A=A= amp, σ=\sigma= sigma, and r=r= risefall, applies the midpoint sampling strategy to generate a discrete pulse sampled from the continuous function:

f(x)={g(xr))xrArxdrg(x(dr))drx\begin{split}f(x) = \begin{cases} g(x - r) ) & x\leq r \\ A & r\leq x\leq d-r \\ g(x - (d - r)) & d-r\leq x \end{cases}\end{split}

where g(x)g(x) is the Gaussian function sampled from in gaussian() with A=A= amp, μ=1\mu=1, and σ=\sigma= sigma. I.e. f(x)f(x) represents a square pulse with smooth Gaussian edges.

If zero_ends == True, the samples for the Gaussian ramps are remapped as in gaussian().

Parameters

  • duration (int) – Duration of pulse. Must be greater than zero.
  • amp (complex) – Pulse amplitude.
  • sigma (float) – Width (standard deviation) of Gaussian rise/fall portion of the pulse.
  • risefall (Optional[float]) – Number of samples over which pulse rise and fall happen. Width of square portion of pulse will be duration-2*risefall.
  • width (Optional[float]) – The duration of the embedded square pulse. Only one of width or risefall should be specified as the functional form requires width = duration - 2 * risefall.
  • name (Optional[str]) – Name of pulse.
  • zero_ends (bool) – If True, zero ends at x = -1, x = duration + 1, but rescale to preserve amp.

Raises

PulseError – If risefall and width arguments are inconsistent or not enough info.

Return type

Waveform

Was this page helpful?
Report a bug or request content on GitHub.