qiskit.chemistry.transformations.Transformation
class Transformation
Base class for transformation to qubit operators for chemistry problems
__init__
__init__()
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__ () | Initialize self. |
build_hopping_operators ([excitations]) | Builds the product of raising and lowering operators (basic excitation operators) |
get_default_filter_criterion () | Returns a default filter criterion method to filter the eigenvalues computed by the eigen solver. |
interpret (raw_result) | Interprets an EigenstateResult in the context of this transformation. |
transform (driver[, aux_operators]) | Transformation from the driver to a qubit operator. |
Attributes
commutation_rule | Getter of the commutation rule |
build_hopping_operators
abstract build_hopping_operators(excitations='sd')
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
]]]
commutation_rule
abstract property commutation_rule
Getter of the commutation rule
Return type
bool
get_default_filter_criterion
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
]]
interpret
abstract interpret(raw_result)
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.
transform
abstract transform(driver, aux_operators=None)
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 typeFermionicOperator
if the qubit transformation is fermionic and of typeBosonicOperator
it is bosonic.
Return type
Tuple
[OperatorBase
, List
[OperatorBase
]]
Returns
A qubit operator and a dictionary of auxiliary operators.