Constant¶
- class Constant(duration, amp, name=None)[source]¶
A simple constant pulse, with an amplitude value and a duration:
\[f(x) = amp , 0 <= x < duration f(x) = 0 , elsewhere\]Initialize the constant-valued pulse.
- Parameters
duration (
int
) – Pulse length in terms of the the sampling period dt.amp (
complex
) – The amplitude of the constant square pulse.name (
Optional
[str
]) – Display name for this pulse envelope.
Attributes
The constant value amplitude.
Unique identifier for this pulse.
Return a dictionary containing the pulse’s parameters.
Methods
Constant.__call__
(channel)Call self as a function.
Constant.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.
Constant.__call__
(channel)Call self as a function.