square_pulse

The Boulder Opal Toolkits are currently in beta phase of development. Breaking changes may be introduced.

square_pulse(duration, amplitude, start_time=0.0, end_time=None)

Create a Signal object representing a square pulse.

Parameters
• duration (float) – The duration of the pulse.

• amplitude (float or complex) – The amplitude of the square pulse, $$A$$.

• start_time (float, optional) – The start time of the square pulse, $$t_0$$. Defaults to 0.

• end_time (float, optional) – The end time of the square pulse, $$t_1$$. Must be greater than the start time. Defaults to the duration.

Returns

The square pulse.

Return type

Signal

signals.cosine_pulse()

Create a Signal object representing a cosine pulse.

signals.gaussian_pulse()

Create a Signal object representing a Gaussian pulse.

signals.sech_pulse()

Create a Signal object representing a hyperbolic secant pulse.

signals.square_pulse_pwc()

Graph operation to create a Pwc representing a square pulse.

Notes

The square pulse is defined as

$\mathop{\mathrm{Square}}(t) = A \theta(t-t_0) \theta(t_1-t) ,$

where $$\theta(t)$$ is the Heaviside step function.

Examples

Define a square pulse and discretize it.

>>> pulse = qctrl.signals.square_pulse(
...     duration=4.0, amplitude=2.5, start_time=1.0, end_time=3.0
... )
>>> pulse.export_with_time_step(time_step=1.0)
array([0. , 2.5, 2.5, 0. ])