Quantum phase estimation
Read an eigenphase using controlled powers.
1. Core idea
If an eigenstate |u⟩ of U is available, controlled U^(2^j) operations encode the unknown phase θ into a counting register. Inverse QFT then converts relative phases into a binary approximation. Accuracy depends on the number of counting qubits and eigenstate preparation.
2. Mathematical foundation
The notation describes a precise relationship among states, transformations or probabilities. Identify each symbol, check the dimensions of the objects, and distinguish amplitudes from the probabilities produced by a measurement.
3. Worked example
4. Reasoning flow
- Define the initial register and its basis states.
- Apply the transformations in their intended order.
- Track amplitude magnitudes and relative phases.
- Measure in the basis that reveals the desired property.
- Interpret the result and check the resource assumptions.
Qiskit implementation
Run this standalone Python script with Qiskit installed. It uses exact statevector simulation rather than noisy hardware shots.
from qiskit import QuantumCircuit from qiskit.quantum_info import Statevector from qiskit.circuit.library import QFTGate from qiskit.circuit.library import PhaseGate qc = QuantumCircuit(3) # counting qubits 0,1; eigenstate qubit 2 qc.x(2) # |1> is eigenstate of P(pi/2) qc.h([0, 1]) # counting register |++> qc.cp(3.141592653589793 / 2, 0, 2) # controlled U qc.cp(3.141592653589793, 1, 2) # controlled U^2 qc.append(QFTGate(2).inverse(), [0, 1]) print(qc.draw()) print(Statevector.from_instruction(qc).probabilities_dict()) # The counting register encodes phase 1/4; inspect bit ordering.Download runnable Python
5. Check your understanding
Practice question
Explain what changes if the target is a superposition of different eigenstates.
6. What to watch out for
Ideal-state calculations assume perfect gates and measurements. When assessing an algorithm, separate its mathematical guarantee from the cost of building oracles, preparing inputs, repeating experiments and correcting physical noise.