English
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

# qiskit.algorithms.HamiltonianPhaseEstimation.estimate¶

HamiltonianPhaseEstimation.estimate(hamiltonian, state_preparation=None, evolution=None, bound=None)[source]

Run the Hamiltonian phase estimation algorithm.

Parameters
• hamiltonian (PauliOp | MatrixOp | SummedOp | Pauli | SparsePauliOp | PauliSumOp) – A Hermitian operator. If the algorithm is used with a `Sampler` primitive, the allowed types are `Pauli`, `SparsePauliOp`, and `PauliSumOp`. If the algorithm is used with a `QuantumInstance`, `PauliOp, ``MatrixOp`, `PauliSumOp`, and `SummedOp` types are allowed.

• state_preparation (StateFn | QuantumCircuit | Statevector | None) – The `StateFn` 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 (EvolutionSynthesis | EvolutionBase | None) – An evolution converter that generates a unitary from `hamiltonian`. If `None`, then the default `PauliTrotterEvolution` is used.

• bound (float | None) – An upper bound on the absolute value of the eigenvalues of `hamiltonian`. If omitted, then `hamiltonian` must be a Pauli sum, or a `PauliOp`, in which case a bound will be computed. If `hamiltonian` is a `MatrixOp`, then `bound` may not be `None`. The tighter the bound, the higher the resolution of computed phases.

Returns

`HamiltonianPhaseEstimationResult` instance containing the result of the estimation and diagnostic information.

Raises
• TypeError – If `evolution` is not of type `EvolutionSynthesis` when a `Sampler` is provided.

• TypeError – If `hamiltonian` type is not `Pauli` or `SparsePauliOp` or `PauliSumOp` when a `Sampler` is provided.

• ValueError – If `bound` is `None` and `hamiltonian` is not a Pauli sum, i.e. a `PauliSumOp` or a `SummedOp` whose terms are of type `PauliOp`.

• TypeError – If `evolution` is not of type `EvolutionBase` when no `Sampler` is provided.

Return type

HamiltonianPhaseEstimationResult