Arbitrary

class qililab.Arbitrary(samples)

Bases: Waveform

Arbitrary waveform. Creates a waveform with the passed envelope.

Parameters:

samples (np.ndarray) – Passed envelope to base the waveform on.

Examples

If you want to create a waveform with an envelope given by:

import numpy as np

samples = np.ones(50)

You would just need to do:

import qililab as ql

arbitrary_envelope = ql.Arbitrary(samples=samples)

Methods

envelope([resolution])

Returns the envelope corresponding to the arbitrary waveform.

get_duration()

Get the duration of the waveform.

Attributes

yaml_tag

envelope(resolution=1)

Returns the envelope corresponding to the arbitrary waveform.

Parameters:

resolution (int, optional) – Pulse resolution. Defaults to 1.

Returns:

Height of the envelope for each time step.

Return type:

np.ndarray