- Algorithms
- Also: Simon's problem
Simon's Algorithm
A quantum algorithm that finds the hidden period of a two-to-one function using O(n) queries, exponentially faster than any classical algorithm which requires O(2^(n/2)) queries.
Simon’s algorithm, published by Daniel Simon in 1994, solves the following problem: given a function with the promise that there exists a secret string such that if and only if or , find . The algorithm uses quantum queries to the function, while any classical algorithm requires queries. This was the first example of an exponential quantum speedup over classical computation for a concrete (if contrived) problem.
The algorithm
- Initialize two -qubit registers to
- Apply Hadamard gates to the first register:
- Apply the oracle :
- Measure the second register (obtaining some value ), collapsing the first register to
- Apply Hadamard gates to the first register
- Measure the first register to obtain a string
After step 5, the amplitude of is:
This is nonzero only when , meaning the measurement always yields a string orthogonal to (in the binary inner product sense).
Repeating this procedure times gives linearly independent equations , from which can be determined by Gaussian elimination over .
Complexity analysis
| Approach | Query complexity |
|---|---|
| Classical deterministic | (birthday bound) |
| Classical randomized | |
| Quantum (Simon’s) |
The exponential separation is in the query complexity model. The classical lower bound comes from a birthday-type argument: any classical algorithm must query enough inputs to find a collision with , which requires queries by the birthday paradox.
Historical significance
Simon’s algorithm is historically pivotal for two reasons:
-
It provided the first exponential quantum speedup, predating Shor’s algorithm by about a year. The speedup is proven unconditionally in the query model (no complexity-theoretic assumptions needed).
-
It directly inspired Shor’s algorithm. Shor recognized that the hidden subgroup structure in Simon’s problem had an analogue in the integers: finding the period of a function is a hidden subgroup problem over , solvable using the quantum Fourier transform instead of Hadamard transforms.
This conceptual connection, from Simon’s problem over to the period-finding problem over , is one of the most important intellectual threads in quantum algorithm design.
Why it matters for learners
Simon’s algorithm is the clearest demonstration of exponential quantum speedup in a setting simple enough to fully understand. It introduces the hidden subgroup problem framework, which unifies many quantum algorithms, and it shows the power of combining superposition, interference, and classical post-processing. If you understand Simon’s algorithm well, you have the conceptual foundation for understanding Shor’s algorithm.