Shortcuts

qiskit.pulse.library.Waveform

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

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__(samples, name=None, epsilon=1e-07)[source]

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

id

Unique identifier for this pulse.

samples

Return sample values.

assign_parameters(value_dict)[source]

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(dt=1, style=None, filename=None, interp_method=None, scale=1, interactive=False)[source]

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

property id

Unique identifier for this pulse.

Return type

int

property samples

Return sample values.

Return type

ndarray

You are viewing lang: English
Languages
English
Japanese
German
Korean