qiskit.chemistry.algorithms.pes_samplers.PolynomialExtrapolator
class PolynomialExtrapolator(degree=1)
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__
__init__(degree=1)
Constructor.
Parameters
degree (int
) – Degree of polynomial to use for fitting in extrapolation.
Methods
__init__ ([degree]) | 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. |
extrapolate
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).
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.