Skip to main content
IBM Quantum Platform
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.

WindowExtrapolator

class WindowExtrapolator(extrapolator=None, window=2)

GitHub

Bases: qiskit.chemistry.algorithms.pes_samplers.extrapolator.Extrapolator

An extrapolator which wraps another extrapolator, limiting the internal extrapolator’s ground truth parameter set to a fixed window size.

Constructor.

Parameters

  • extrapolator (Union[PolynomialExtrapolator, DifferentialExtrapolator, None]) – ‘internal’ extrapolator that performs extrapolation on variational parameters based on data window
  • window (int) – Number of previous points to use for extrapolation. A value of zero indicates that all previous points will be used for bootstrapping.

Methods

extrapolate

WindowExtrapolator.extrapolate(points, param_dict)

Extrapolate at specified point of interest given a set of variational parameters. Based on the specified window, a subset of the data points will be used for extrapolation. A default window of 2 points is used, while a value of zero indicates that all previous points will be used for extrapolation. This method defines the data window before performing the internal extrapolation.

Parameters

  • points (List[float]) – List of point(s) to be used for extrapolation. Can represent some degree of freedom, ex, interatomic distance.
  • param_dict (Optional[Dict[float, List[float]]]) – Dictionary of variational parameters. Each key is the point and the value is a list of the variational parameters.

Return type

Dict[float, List[float]]

Returns

Dictionary of variational parameters for extrapolated point(s).

factory

static WindowExtrapolator.factory(mode, **kwargs)

Factory method for constructing extrapolators.

Parameters

  • mode (str) – Extrapolator to instantiate. Can be one of: - ‘window’ - ‘poly’ - ‘diff_model’ - ‘pca’ - ‘l1’
  • kwargs – arguments to be passed to the constructor of an extrapolator

Return type

Extrapolator

Returns

A newly created extrapolator instance.

Raises

AquaError – if specified mode is unknown.


Attributes

extrapolator

Returns the internal extrapolator.

Return type

Extrapolator

Returns

The internal extrapolator.

window

Returns the size of the window.

Return type

int

Returns

The size of the window.

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