qiskit.algorithms.HamiltonianPhaseEstimation.estimate¶
-
HamiltonianPhaseEstimation.
estimate
(hamiltonian, state_preparation=None, evolution=None, bound=None)[source]¶ Run the Hamiltonian phase estimation algorithm.
- Parameters
hamiltonian (
OperatorBase
) – A Hermitian operator.state_preparation (
Optional
[StateFn
]) – TheStateFn
to be prepared, whose eigenphase will be measured. If this parameter is omitted, no preparation circuit will be run and input state will be the all-zero state in the computational basis.evolution (
Optional
[EvolutionBase
]) – An evolution converter that generates a unitary fromhamiltonian
. IfNone
, then the defaultPauliTrotterEvolution
is used.bound (
Optional
[float
]) – An upper bound on the absolute value of the eigenvalues ofhamiltonian
. If omitted, thenhamiltonian
must be a Pauli sum, or aPauliOp
, in which case a bound will be computed. Ifhamiltonian
is aMatrixOp
, thenbound
may not beNone
. The tighter the bound, the higher the resolution of computed phases.
- Return type
HamiltonianPhaseEstimationResult
- Returns
HamiltonianPhaseEstimationResult instance containing the result of the estimation and diagnostic information.
- Raises
ValueError – If
bound
isNone
andhamiltonian
is not a Pauli sum, i.e. aPauliSumOp
or aSummedOp
whose terms are of typePauliOp
.TypeError – If
evolution
is not of typeEvolutionBase
.