Computing Library › Quantum Algorithms
Quantum Algorithms
Quantum Phase Estimation (QPE)
Phase estimation reads the eigenphase of a unitary onto a register of qubits — the workhorse subroutine behind Shor, HHL, and quantum chemistry.
- Output
- θ where U|ψ⟩=e^{2πiθ}|ψ⟩
- Core
- controlled-U powers + inverse QFT
- Precision
- one bit per counting qubit
What it does
Controlled applications of U, U², U⁴, … kick their phases onto a counting register in superposition; an inverse QFT then converts those phases into a binary number you can measure. More counting qubits buy more precision.
Steps
- Counting register in superposition; eigenstate in the target.
- Apply controlled-U^{2ᵏ} for each counting qubit k.
- Inverse QFT on the counting register.
- Measure to read the phase.
Where it's used
Eigenvalue estimation for chemistry and materials, order-finding in Shor, and matrix inversion in HHL.
In code (Qiskit)
python
# controlled-U^{2^k} ladder, then inverse QFT on counting register