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.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

qiskit.chemistry.algorithms.pes_samplers.WindowExtrapolator

class WindowExtrapolator(extrapolator=None, window=2)

GitHub

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.

__init__

__init__(extrapolator=None, window=2)

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

__init__([extrapolator, window])Constructor.
extrapolate(points, param_dict)Extrapolate at specified point of interest given a set of variational parameters.
factory(mode, **kwargs)Factory method for constructing extrapolators.

Attributes

extrapolatorReturns the internal extrapolator.
windowReturns the size of the window.

extrapolate

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).

extrapolator

Returns the internal extrapolator.

Return type

Extrapolator

Returns

The internal extrapolator.

factory

static 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.

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.