The quantum Fourier transform is the unitary transformation that applies a normalized discrete
Fourier transform to the amplitudes of a quantum
state. On the standard orthonormal basis , with
,
one sign convention gives
The Fourier matrix represents this transformation (Shor 1997).
Suppose
for positive integers
and
.
Consider the superposition
for . The transformed amplitude at
is
times the geometric
series
. This series equals
when
is divisible by
and vanishes otherwise. Measurement in the standard orthonormal
basis therefore gives each of the
indices
,
, ...,
with probability
. The shift
changes the phases of the amplitudes without changing these
probabilities (Shor 1997, Veritasium 2023).