Chained
- class qililab.Chained(waveforms)
Bases:
WaveformRepresents a composite waveform consisting of multiple waveforms played in a chained sequence.
This class allows combining multiple waveforms (such as Ramp, Square, etc.) into a single waveform by playing them one after the other.
- Parameters:
waveforms (
list[Waveform]) – A list of individual waveform objects that will be chained together in sequence.
Examples
The following example creates a Chained waveform composed of a Ramp, a Square, and another Ramp.
import qililab as ql # Create the waveform chained_wf = ql.Chained(waveforms=[ ql.Ramp(from_amplitude=0.0, to_amplitude=1.0, duration=50) ql.Square(amplitude=1.0, duration=100) ql.Ramp(from_amplitude=1.0, to_amplitude=0.0, duration=50) ]) # Get waveform's envelope envelope = chained_wf.envelope() # Get waveform's duration envelope = chained_wf.get_duration()Methods
envelope([resolution])Retrieve the envelope of the chained waveform.
Retrieve the total duration of the chained waveform.
Attributes
yaml_tag- envelope(resolution=1)
Retrieve the envelope of the chained waveform.
The envelope is obtained by concatenating the envelopes of each individual waveform in the sequence, with the specified resolution.
- Parameters:
resolution (
int, optional) – The resolution of the waveform (number of time steps per unit of duration). Defaults to 1.- Returns:
An array representing the amplitude of the waveform at each time step.
- Return type:
np.ndarray