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

  • name (Optional[str]) – Display name for this pulse envelope.

Attributes

Constant.amp

The constant value amplitude.

Constant.id

Unique identifier for this pulse.

Constant.parameters

Return a dictionary containing the pulse’s parameters.

Methods

Constant.assign_parameters(value_dict)

Return a new ParametricPulse with parameters assigned.

Constant.draw([dt, style, filename, …])

Plot the pulse.

Constant.get_sample_pulse()

Deprecated.

Constant.get_waveform()

Return a Waveform with samples filled according to the formula that the pulse represents and the parameter values it contains.

Constant.validate_parameters()

Validate parameters.