Ramp

class qililab.Ramp(from_amplitude, to_amplitude, duration)

Bases: Waveform

Ramp waveform. The waveform’s amplitude changes linearly from from_amplitude to to_amplitude in duration nanoseconds.

Parameters:
  • from_amplitude (float) – The amplitude of the waveform at t=0.

  • to_amplitude (float) – The amplitude of the waveform at t=duration.

  • duration (int) – Duration of the waveform (ns).

Examples

In the following example the waveform’s amplitude will ramp from 0.0 to 1.0 in 50 ns.

import qililab as ql

# Create the waveform
ramp_wf = ql.Ramp(from_amplitude=0.0, to_amplitude=1.0, duration=50)

# Get waveform's envelope
envelope = ramp_wf.envelope()

Methods

envelope([resolution])

Constant amplitude envelope.

get_duration()

Get the duration of the waveform.

Attributes

yaml_tag

envelope(resolution=1)

Constant amplitude envelope.

Parameters:

resolution (float, optional) – Resolution of the pulse. Defaults to 1.

Returns:

Height of the envelope for each time step.

Return type:

np.ndarray

get_duration()

Get the duration of the waveform.

Returns:

The duration of the waveform in ns.

Return type:

int