Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.pulse.Waveform

class Waveform(samples, name=None, epsilon=1e-07)

GitHub

A pulse specified completely by complex-valued samples; each sample is played for the duration of the backend cycle-time, dt.

Create new sample pulse command.

Parameters

  • samples (Union[ndarray, List[complex]]) – Complex array of the samples in the pulse envelope.
  • name (Optional[str]) – Unique name to identify the pulse.
  • epsilon (float) – Pulse sample norm tolerance for clipping. If any sample’s norm exceeds unity by less than or equal to epsilon it will be clipped to unit norm. If the sample norm is greater than 1+epsilon an error will be raised.

__init__

__init__(samples, name=None, epsilon=1e-07)

Create new sample pulse command.

Parameters

  • samples (Union[ndarray, List[complex]]) – Complex array of the samples in the pulse envelope.
  • name (Optional[str]) – Unique name to identify the pulse.
  • epsilon (float) – Pulse sample norm tolerance for clipping. If any sample’s norm exceeds unity by less than or equal to epsilon it will be clipped to unit norm. If the sample norm is greater than 1+epsilon an error will be raised.

Methods

__init__(samples[, name, epsilon])Create new sample pulse command.
assign_parameters(value_dict)Return a new pulse with parameters assigned.
draw([dt, style, filename, interp_method, …])Plot the interpolated envelope of pulse.

Attributes

idUnique identifier for this pulse.
samplesReturn sample values.

assign_parameters

assign_parameters(value_dict)

Return a new pulse with parameters assigned.

Parameters

value_dict (Dict[ParameterExpression, Union[ParameterExpression, float, int]]) – A mapping from Parameters to either numeric values or another Parameter expression.

Return type

Waveform

Returns

New pulse with updated parameters.

draw

draw(dt=1, style=None, filename=None, interp_method=None, scale=1, interactive=False)

Plot the interpolated envelope of pulse.

Parameters

  • dt (float) – Time interval of samples.
  • style (Optional[PulseStyle]) – A style sheet to configure plot appearance.
  • filename (Optional[str]) – Name required to save pulse image.
  • interp_method (Optional[Callable]) – A function for interpolation.
  • scale (float) – Relative visual scaling of waveform amplitudes.
  • interactive (bool) – When set true show the circuit in a new window. (This depends on the matplotlib backend being used.)

Returns

A matplotlib figure object of the pulse envelope

Return type

matplotlib.figure

id

Unique identifier for this pulse.

Return type

int

samples

Return sample values.

Return type

ndarray

Was this page helpful?
Report a bug or request content on GitHub.