qiskit-documentation/docs/api/qiskit/0.27/qiskit.chemistry.algorithms...

83 lines
4.2 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: PolynomialExtrapolator
description: API reference for qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator
---
# qiskit.chemistry.algorithms.pes\_samplers.PolynomialExtrapolator
<Class id="qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/chemistry/algorithms/pes_samplers/extrapolator.py" signature="PolynomialExtrapolator(degree=1)" modifiers="class">
An extrapolator based on fitting each parameter to a polynomial function of a user-specified degree.
WARNING: Should only be used with window. Using no window includes points after the point being extrapolated in the data window.
Constructor.
**Parameters**
**degree** (`int`) Degree of polynomial to use for fitting in extrapolation.
### \_\_init\_\_
<Function id="qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator.__init__" signature="__init__(degree=1)">
Constructor.
**Parameters**
**degree** (`int`) Degree of polynomial to use for fitting in extrapolation.
</Function>
## Methods
| | |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
| [`__init__`](#qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator.__init__ "qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator.__init__")(\[degree]) | Constructor. |
| [`extrapolate`](#qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator.extrapolate "qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator.extrapolate")(points, param\_dict) | Extrapolate at specified point of interest given a set of variational parameters. |
| [`factory`](#qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator.factory "qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator.factory")(mode, \*\*kwargs) | Factory method for constructing extrapolators. |
### extrapolate
<Function id="qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator.extrapolate" signature="extrapolate(points, param_dict)">
Extrapolate at specified point of interest given a set of variational parameters. Extrapolation is based on a polynomial function/spline fitting with a user-specified degree.
**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).
</Function>
### factory
<Function id="qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator.factory" signature="factory(mode, **kwargs)" modifiers="static">
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**](qiskit.aqua.AquaError "qiskit.aqua.AquaError") if specified mode is unknown.
</Function>
</Class>