sinusoid

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

sinusoid(duration, amplitude, angular_frequency, phase=0.0)

Create a Pulse object representing a sinusoidal oscillation.

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

  • amplitude (float or complex) – The amplitude of the oscillation, \(A\).

  • angular_frequency (float) – The angular frequency of the oscillation, \(\omega\).

  • phase (float, optional) – The phase of the oscillation, \(\phi\). Defaults to 0.

Returns

The sinusoidal oscillation.

Return type

Pulse

See also

pulses.cosine_pulse()

Create a Pulse object representing a cosine pulse.

pulses.hann_series()

Create a Pulse object representing a sum of Hann window functions.

pulses.sinusoid_pwc()

Graph operation to create a Pwc representing a sinusoidal oscillation.

pulses.sinusoid_stf()

Graph operation to create a Stf representing a sinusoidal oscillation.

Notes

The sinusoid is defined as

\[\mathop{\mathrm{Sinusoid}}(t) = A \sin \left( \omega t + \phi \right) .\]

Examples

Define a sinusoidal oscillation.

>>> pulse = qctrl.pulses.sinusoid(
...     duration=2.0,
...     amplitude=1.0,
...     angular_frequency=np.pi,
...     phase=np.pi/2.0,
... )
>>> pulse.export_with_sampling_rate(sampling_rate=0.25)
array([ 0.92387953,  0.38268343, -0.38268343, -0.92387953, -0.92387953,
   -0.38268343,  0.38268343,  0.92387953])