Apply the Hadamard transform to the conditional quantum state from c. Since modulo two, its output is
If , the two probability amplitudes cancel by destructive quantum interference. If , they add, giving
Thus every observed string obeys . This Simon Fourier sampling is uniform on the -dimensional vector subspace over the two-element field. Indeed, the nonzero linear functional has a kernel of dimension by the rank-nullity theorem. The distribution does not depend on , so measuring or discarding the second quantum register gives the same statistics for the first.
Simon's algorithm Created 2026-09-28 Updated 2026-10-25
Simon's algorithm prepares hidden-subgroup coset states, applies the quantum Fourier transform over , and samples vectors satisfying over . Repeated samples and Gaussian elimination recover with oracle queries and polynomial computation.
To solve Simon's problem, prepare a uniform quantum superposition, evaluate the function coherently into a second quantum register, and perform Simon Fourier sampling on the first. Each run produces a uniform binary string with over the two-element field. Once the observed rows have matrix rank , Gaussian elimination recovers as the unique nonzero element of their kernel. The random spanning of a binary vector space bounds the required number of runs.