qiskit-documentation/docs/api/qiskit/0.29/qiskit.chemistry.transforma...

94 lines
3.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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: 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
---
# Transformation
<Class id="qiskit.chemistry.transformations.Transformation" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/chemistry/transformations/transformation.py" signature="Transformation" modifiers="class">
Bases: `abc.ABC`
Base class for transformation to qubit operators for chemistry problems
## Methods
### build\_hopping\_operators
<Function id="qiskit.chemistry.transformations.Transformation.build_hopping_operators" signature="Transformation.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>
### get\_default\_filter\_criterion
<Function id="qiskit.chemistry.transformations.Transformation.get_default_filter_criterion" signature="Transformation.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="Transformation.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="Transformation.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>
## Attributes
### commutation\_rule
<Attribute id="qiskit.chemistry.transformations.Transformation.commutation_rule">
Getter of the commutation rule
**Return type**
`bool`
</Attribute>
</Class>