Constant¶
- class Constant(duration, amp, name=None, limit_amplitude=None)[source]¶
Bases:
SymbolicPulse
A simple constant pulse, with an amplitude value and a duration:
\[f(x) = amp , 0 <= x < duration f(x) = 0 , elsewhere\]Create new pulse instance.
- Parameters
duration (
Union
[int
,ParameterExpression
]) -- Pulse length in terms of the sampling period dt.amp (
Union
[complex
,ParameterExpression
]) -- The amplitude of the constant square pulse.name (
Optional
[str
]) -- Display name for this pulse envelope.limit_amplitude (
Optional
[bool
]) -- IfTrue
, then limit the amplitude of the waveform to 1. The default isTrue
and the amplitude is constrained to 1.
Methods
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
- constraints¶
Return symbolic expression for the pulse parameter constraints.
- Return type
Expr
- duration¶
- envelope¶
Return symbolic expression for the pulse envelope.
- Return type
Expr
- id¶
Unique identifier for this pulse.
- Return type
int
- limit_amplitude = True¶
- name¶
- parameters¶
- Return type
Dict
[str
,Any
]
- pulse_type¶
Return display name of the pulse shape.
- Return type
str
- valid_amp_conditions¶
Return symbolic expression for the pulse amplitude constraints.
- Return type
Expr