112 lines
6.3 KiB
Plaintext
112 lines
6.3 KiB
Plaintext
---
|
||
title: Transformation
|
||
description: API reference for qiskit.chemistry.transformations.Transformation
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.chemistry.transformations.Transformation
|
||
---
|
||
|
||
<span id="qiskit-chemistry-transformations-transformation" />
|
||
|
||
# qiskit.chemistry.transformations.Transformation
|
||
|
||
<Class id="qiskit.chemistry.transformations.Transformation" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.8/qiskit/chemistry/transformations/transformation.py" signature="Transformation" modifiers="class">
|
||
Base class for transformation to qubit operators for chemistry problems
|
||
|
||
### \_\_init\_\_
|
||
|
||
<Function id="qiskit.chemistry.transformations.Transformation.__init__" signature="__init__()">
|
||
Initialize self. See help(type(self)) for accurate signature.
|
||
</Function>
|
||
|
||
## Methods
|
||
|
||
| | |
|
||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
|
||
| [`__init__`](#qiskit.chemistry.transformations.Transformation.__init__ "qiskit.chemistry.transformations.Transformation.__init__")() | Initialize self. |
|
||
| [`build_hopping_operators`](#qiskit.chemistry.transformations.Transformation.build_hopping_operators "qiskit.chemistry.transformations.Transformation.build_hopping_operators")(\[excitations]) | Builds the product of raising and lowering operators (basic excitation operators) |
|
||
| [`get_default_filter_criterion`](#qiskit.chemistry.transformations.Transformation.get_default_filter_criterion "qiskit.chemistry.transformations.Transformation.get_default_filter_criterion")() | Returns a default filter criterion method to filter the eigenvalues computed by the eigen solver. |
|
||
| [`interpret`](#qiskit.chemistry.transformations.Transformation.interpret "qiskit.chemistry.transformations.Transformation.interpret")(raw\_result) | Interprets an EigenstateResult in the context of this transformation. |
|
||
| [`transform`](#qiskit.chemistry.transformations.Transformation.transform "qiskit.chemistry.transformations.Transformation.transform")(driver\[, aux\_operators]) | Transformation from the `driver` to a qubit operator. |
|
||
|
||
## Attributes
|
||
|
||
| | |
|
||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
|
||
| [`commutation_rule`](#qiskit.chemistry.transformations.Transformation.commutation_rule "qiskit.chemistry.transformations.Transformation.commutation_rule") | Getter of the commutation rule |
|
||
|
||
### build\_hopping\_operators
|
||
|
||
<Function id="qiskit.chemistry.transformations.Transformation.build_hopping_operators" signature="build_hopping_operators(excitations='sd')" modifiers="abstract">
|
||
Builds the product of raising and lowering operators (basic excitation operators)
|
||
|
||
**Parameters**
|
||
|
||
**excitations** (`Union`\[`str`, `List`\[`List`\[`int`]]]) – The excitations to be included in the eom pseudo-eigenvalue problem. If a string (‘s’, ‘d’ or ‘sd’) then all excitations of the given type will be used. Otherwise a list of custom excitations can directly be provided.
|
||
|
||
Returns:
|
||
|
||
**Return type**
|
||
|
||
`Tuple`\[`Dict`\[`str`, `WeightedPauliOperator`], `Dict`\[`str`, `List`\[`bool`]], `Dict`\[`str`, `List`\[`Any`]]]
|
||
</Function>
|
||
|
||
### commutation\_rule
|
||
|
||
<Function id="qiskit.chemistry.transformations.Transformation.commutation_rule" signature="commutation_rule" modifiers="abstract property">
|
||
Getter of the commutation rule
|
||
|
||
**Return type**
|
||
|
||
`bool`
|
||
</Function>
|
||
|
||
### get\_default\_filter\_criterion
|
||
|
||
<Function id="qiskit.chemistry.transformations.Transformation.get_default_filter_criterion" signature="get_default_filter_criterion()">
|
||
Returns a default filter criterion method to filter the eigenvalues computed by the eigen solver. For more information see also aqua.algorithms.eigen\_solvers.NumPyEigensolver.filter\_criterion.
|
||
|
||
**Return type**
|
||
|
||
`Optional`\[`Callable`\[\[`Union`\[`List`, `ndarray`], `float`, `Optional`\[`List`\[`float`]]], `bool`]]
|
||
</Function>
|
||
|
||
### interpret
|
||
|
||
<Function id="qiskit.chemistry.transformations.Transformation.interpret" signature="interpret(raw_result)" modifiers="abstract">
|
||
Interprets an EigenstateResult in the context of this transformation.
|
||
|
||
**Parameters**
|
||
|
||
**raw\_result** (`Union`\[`EigenstateResult`, `EigensolverResult`, `MinimumEigensolverResult`]) – an eigenstate result object.
|
||
|
||
**Return type**
|
||
|
||
`EigenstateResult`
|
||
|
||
**Returns**
|
||
|
||
An “interpreted” eigenstate result.
|
||
</Function>
|
||
|
||
### transform
|
||
|
||
<Function id="qiskit.chemistry.transformations.Transformation.transform" signature="transform(driver, aux_operators=None)" modifiers="abstract">
|
||
Transformation from the `driver` to a qubit operator.
|
||
|
||
**Parameters**
|
||
|
||
* **driver** (`BaseDriver`) – A driver encoding the molecule information.
|
||
* **aux\_operators** (`Union`\[`List`\[`FermionicOperator`], `List`\[`BosonicOperator`], `None`]) – Additional auxiliary operators to evaluate. Must be of type `FermionicOperator` if the qubit transformation is fermionic and of type `BosonicOperator` it is bosonic.
|
||
|
||
**Return type**
|
||
|
||
`Tuple`\[`OperatorBase`, `List`\[`OperatorBase`]]
|
||
|
||
**Returns**
|
||
|
||
A qubit operator and a dictionary of auxiliary operators.
|
||
</Function>
|
||
</Class>
|
||
|