Hadamard test Created 2026-09-24 Updated 2026-11-05
The Hadamard test converts an overlap into an ancilla measurement probability. Prepare an ancilla in , apply controlled to the data state , apply a Hadamard to the ancilla, and measure it. Then
Interference between the ancilla's two branches reveals the real part of the overlap. One run supplies one binary sample; repeated preparations estimate the probability and hence the expectation value. A single outcome does not reveal a general real number exactly. A Hermitian Pauli operator is a useful choice of , while the imaginary-part Hadamard test changes the reference phase to obtain the other component.