Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version.

qiskit.visualization.pulse.interpolation

interpolation module for pulse visualization.

Functions

interp1d(time, samples, nop[, kind])Scipy interpolation wrapper.
step_wise(time, samples, nop)Keep uniform variation between sample values.

cubic_spline

cubic_spline(time: numpy.ndarray, samples: numpy.ndarray, nop: int, *, kind: str = 'cubic') → Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

Apply cubic interpolation between sampling points.

Parameters

  • time – Time vector with length of samples + 1.
  • samples – Complex pulse envelope.
  • nop – Number of data points for interpolation.

Returns

Interpolated time vector and real and imaginary part of waveform.

interp1d

interp1d(time, samples, nop, kind='linear')

GitHub

Scipy interpolation wrapper.

Parameters

  • time (ndarray) – Time vector with length of samples + 1.
  • samples (ndarray) – Complex pulse envelope.
  • nop (int) – Number of data points for interpolation.
  • kind (str) – Scipy interpolation type. See scipy.interpolate.interp1d documentation for more information.

Return type

Tuple[ndarray, ndarray, ndarray]

Returns

Interpolated time vector and real and imaginary part of waveform.

linear

linear(time: numpy.ndarray, samples: numpy.ndarray, nop: int, *, kind: str = 'linear') → Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

Apply linear interpolation between sampling points.

Parameters

  • time – Time vector with length of samples + 1.
  • samples – Complex pulse envelope.
  • nop – Number of data points for interpolation.

Returns

Interpolated time vector and real and imaginary part of waveform.

step_wise

step_wise(time, samples, nop)

GitHub

Keep uniform variation between sample values. No interpolation is applied. :type time: ndarray :param time: Time vector with length of samples + 1. :type samples: ndarray :param samples: Complex pulse envelope. :type nop: int :param nop: This argument is not used.

Return type

Tuple[ndarray, ndarray, ndarray]

Returns

Time vector and real and imaginary part of waveform.

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