GaussianSquare¶
-
class
GaussianSquare
(duration, amp, sigma, width=None, risefall_sigma_ratio=None, name=None)[source]¶ Bases:
qiskit.pulse.library.parametric_pulses.ParametricPulse
- A square pulse with a Gaussian shaped risefall on both sides. Either risefall_sigma_ratio
or width parameter has to be specified.
If risefall_sigma_ratio is not None and width is None:
\(risefall = risefall\) _ \(to\) _ \(sigma * sigma\)
\(width = duration - 2 * risefall\)
If width is not None and risefall_sigma_ratio is None:
\[risefall = (duration - width) / 2\]In both cases, the pulse is defined as:
\[ \begin{align}\begin{aligned}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 (
Union
[int
,ParameterExpression
]) – 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
,None
]) – The duration of the embedded square pulse.risefall_sigma_ratio (
Union
[float
,ParameterExpression
,None
]) – The ratio of each risefall duration to sigma.name (
Optional
[str
]) – Display name for this pulse envelope.
Methods
Assign one parameter to a value, which can either be numeric or another parameter expression.
Return a new ParametricPulse with parameters assigned.
Plot the interpolated envelope of pulse.
Return a Waveform with samples filled according to the formula that the pulse represents and the parameter values it contains.
Return True iff the instruction is parameterized.
Validate parameters.
Attributes
-
amp
¶ The Gaussian amplitude.
- Return type
Union
[complex
,ParameterExpression
]
-
id
¶ Unique identifier for this pulse.
- Return type
int
-
limit_amplitude
= True¶
-
parameters
¶ - Return type
Dict
[str
,Any
]
-
risefall_sigma_ratio
¶ The duration of each risefall in terms of sigma.
- Return type
Union
[float
,ParameterExpression
]
-
sigma
¶ The Gaussian standard deviation of the pulse width.
- Return type
Union
[float
,ParameterExpression
]
-
width
¶ The width of the square portion of the pulse.
- Return type
Union
[float
,ParameterExpression
]