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

89 lines
5.4 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: SieveExtrapolator (v0.26)
description: API reference for qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator in qiskit v0.26
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator
---
<span id="qiskit-chemistry-algorithms-pes-samplers-sieveextrapolator" />
# qiskit.chemistry.algorithms.pes\_samplers.SieveExtrapolator
<Class id="qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/chemistry/algorithms/pes_samplers/extrapolator.py" signature="SieveExtrapolator(extrapolator=None, window=2, filter_before=True, filter_after=True)" modifiers="class">
A wrapper extrapolator which clusters the parameter values - either before extrapolation, after, or both - into two large and small clusters, and sets the small clusters parameters to zero.
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.
* **filter\_before** (`bool`) Keyword to perform clustering before extrapolation.
* **filter\_after** (`bool`) Keyword to perform clustering after extrapolation.
### \_\_init\_\_
<Function id="qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator.__init__" signature="__init__(extrapolator=None, window=2, filter_before=True, filter_after=True)">
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.
* **filter\_before** (`bool`) Keyword to perform clustering before extrapolation.
* **filter\_after** (`bool`) Keyword to perform clustering after extrapolation.
</Function>
## Methods
| | |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [`__init__`](#qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator.__init__ "qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator.__init__")(\[extrapolator, window, …]) | Constructor. |
| [`extrapolate`](#qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator.extrapolate "qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator.extrapolate")(points, param\_dict) | Extrapolate at specified point of interest given a set of variational parameters. |
| [`factory`](#qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator.factory "qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator.factory")(mode, \*\*kwargs) | Factory method for constructing extrapolators. |
### extrapolate
<Function id="qiskit.chemistry.algorithms.pes_samplers.SieveExtrapolator.extrapolate" signature="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 finds a cutoff distance based on the maximum average distance or gap between the average values of the variational parameters. This cutoff distance is used as a criteria to divide the parameters into two clusters by setting all parameters that are below the cutoff distance to zero.
**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.SieveExtrapolator.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>