qiskit.chemistry.algorithms.GroundStateEigensolver¶
-
class
GroundStateEigensolver
(transformation, solver)[source]¶ Ground state computation using a minimum eigensolver.
- Parameters
transformation (
Transformation
) – Qubit Operator Transformationsolver (
Union
[MinimumEigensolver
,MinimumEigensolverFactory
]) – Minimum Eigensolver or MESFactory object, e.g. the VQEUCCSDFactory.
-
__init__
(transformation, solver)[source]¶ - Parameters
transformation (
Transformation
) – Qubit Operator Transformationsolver (
Union
[MinimumEigensolver
,MinimumEigensolverFactory
]) – Minimum Eigensolver or MESFactory object, e.g. the VQEUCCSDFactory.
Methods
__init__
(transformation, solver)- type transformation
Transformation
evaluate_operators
(state, operators)Evaluates additional operators at the given state.
Whether the eigensolver returns the ground state or only ground state energy.
solve
(driver[, aux_operators])Compute Ground State properties.
Attributes
Returns the minimum eigensolver or factory.
Returns the transformation used to obtain a qubit operator from the molecule.
-
evaluate_operators
(state, operators)[source]¶ Evaluates additional operators at the given state.
- Parameters
state (
Union
[str
,dict
,Result
,list
,ndarray
,Statevector
,QuantumCircuit
,Instruction
,OperatorBase
]) – any kind of input that can be used to specify a state. See alsoStateFn
for more details.operators (
Union
[WeightedPauliOperator
,OperatorBase
,list
,dict
]) – either a single, list or dictionary ofWeightedPauliOperator``s or any kind of operator implementing the ``OperatorBase
.
- Return type
Union
[float
,List
[float
],Dict
[str
,List
[float
]]]- Returns
The expectation value of the given operator(s). The return type will be identical to the format of the provided operators.
-
returns_groundstate
()[source]¶ Whether the eigensolver returns the ground state or only ground state energy.
- Return type
bool
-
solve
(driver, aux_operators=None)[source]¶ Compute Ground State properties.
- Parameters
driver (
BaseDriver
) – a chemistry driver object which defines the chemical problem that is to be solved by this calculation.aux_operators (
Union
[List
[FermionicOperator
],List
[BosonicOperator
],None
]) – Additional auxiliary operators to evaluate at the ground state. Depending on whether a fermionic or bosonic system is solved, the type of the operators must beFermionicOperator
orBosonicOperator
, respectively.
- Raises
NotImplementedError – If an operator in
aux_operators
is not of typeFermionicOperator
.- Return type
Union
[ElectronicStructureResult
,VibronicStructureResult
]- Returns
An eigenstate result. Depending on the transformation this can be an electronic structure or bosonic result.
-
property
solver
¶ Returns the minimum eigensolver or factory.
- Return type
Union
[MinimumEigensolver
,MinimumEigensolverFactory
]
-
property
transformation
¶ Returns the transformation used to obtain a qubit operator from the molecule.
- Return type
Transformation