Simon's algorithm finds the hidden string #
The search version of Simon's problem (Simon, de Wolf, §3.1) asks
for the hidden string s itself, for f : {0,1}^n → {0,1}^n with the promise that f(a) = f(b)
exactly when b ∈ {a, a ⊕ s} (Cslib.QueryComplexity.SimonPromise). de Wolf §3.1 promises
s ≠ 0. Here the quantum algorithm is analyzed on every promise input, including s = 0
(injective f), where the correct output is 0; this is stronger than the problem with s ≠ 0.
As in CslibFrontier/Computability/QueryComplexity/Quantum/Simon.lean, the input is the truth table
X : Fin N → Bool of the N = n 2^n output bits of f, and queries are bit queries.
The algorithm. Simon's algorithm with m rounds (Cslib.Quantum.simonAlg) measures m rows
z_1, …, z_m ∈ {0,1}^n, and the classical post-processing Cslib.Quantum.simonSolve outputs the
unique nonzero string orthogonal to all of them, or 0 if there is none or more than one. It
outputs s whenever the strings orthogonal to all rows are exactly 0 and s
(Cslib.Quantum.SimonDetermines, Cslib.Quantum.simonSolve_eq).
Analysis. Every measured row is orthogonal to s, so the post-processing fails only if some
w ∉ {0, s} is orthogonal to all rows. For s = 0 this is the acceptance event of the decision
version, of probability at most (2^n - 1) / 2^m
(Cslib.Quantum.measureProb_simonAlg_le_of_injective). For s ≠ 0 every fiber of f, applied
rowwise to m rows, has at most 2^m elements (Cslib.Quantum.card_simonG_fiber_le), so each
row matrix is measured with probability at most 2^m / 2^{mn}
(Cslib.Quantum.measureProb_simonAlg_le); and two distinct nonzero strings s, w are both
orthogonal to all m rows of exactly 2^{nm} / 4^m row matrices
(Cslib.BitString.card_kernel_pair). A union bound over the 2^n - 2 strings w
gives failure probability at most (2^n - 1) / 2^m again
(Cslib.Quantum.measureProb_not_simonDetermines_le). So the algorithm finds s with probability
at least 1 - (2^n - 1) / 2^m on every promise input
(Cslib.Quantum.le_measureProb_simonFound), and with m = n + 2 rounds, n (n + 2) bit queries
find s with probability above 3/4 (Cslib.Quantum.simonAlg_search_spec).
The separation. Every randomized decision tree that finds s with error 1/3 on the promise
inputs with s ≠ 0, with no requirement when s = 0, has depth q with 2^n ≤ (q + 2n)²
(Cslib.QueryComplexity.simon_search_ne_zero_two_pow_le_sq): appending the 2n bit queries that
check its output decides Simon's problem. This gives the exponential separation for the search
problem of de Wolf §3.1 (Cslib.Quantum.simon_search_separation), with the quantum side also
correct when s = 0. Both sides count bit queries. If the classical tree is also required to
output 0 when s = 0, the bound is 2^n ≤ q²
(Cslib.QueryComplexity.simon_search_two_pow_le_depth_sq).
Source mapping. de Wolf §3.2 repeats the subroutine O(n) times until the measured rows span
s^⊥, then solves the linear system. Here the m rounds run side by side in one bit-query
algorithm, and the bound 1 - (2^n - 1) / 2^m, which also covers s = 0, is formulated here. The
post-processing Cslib.Quantum.simonSolve searches all 2^n strings; it makes no queries, so it
does not affect the query count, but polynomial-time post-processing by Gaussian elimination is
not formalized.
Main definitions #
Cslib.Quantum.simonSolve: the classical post-processing.Cslib.Quantum.SimonDetermines: the measured rows determine the hidden string.Cslib.Quantum.simonFound: the outcomes on which the post-processing outputss.
Main results #
Cslib.Quantum.card_simonG_fiber_le: under the promise, the fibers offapplied rowwise tomrows have at most2^melements.Cslib.Quantum.measureProb_not_simonDetermines_le: the rows fail to determines ≠ 0with probability at most(2^n - 1) / 2^m.Cslib.Quantum.le_measureProb_simonFound: Simon's algorithm findsswith probability at least1 - (2^n - 1) / 2^m.Cslib.Quantum.simonAlg_search_spec:n (n + 2)bit queries findswith probability above3/4.Cslib.Quantum.simon_search_separation: the exponential separation for the search problem withs ≠ 0.
References #
The classical post-processing #
The classical post-processing of Simon's algorithm: the unique nonzero string orthogonal to
every measured row (the sum of the one-element set Cslib.Quantum.simonSolutions zs), or 0 if
there is none or more than one. It searches all 2^n strings and makes no queries.
The post-processing outputs the hidden string when the rows determine it.
The analysis #
The fibers of f applied rowwise. Under Simon's promise, each row of a preimage of ys is
one of the two preimages of the corresponding row of ys, so the fibers have at most 2^m
elements.
The rows rarely fail to determine a nonzero hidden string: for s ≠ 0 they fail with
probability at most (2^n - 1) / 2^m.
Simon's algorithm finds the hidden string: on every promise input, including s = 0, the
post-processing of the measured rows outputs s with probability at least 1 - (2^n - 1) / 2^m.
Simon's algorithm solves the search version with n (n + 2) bit queries: from a unit
initial state, with n + 2 rounds, the post-processing of the measured rows outputs the hidden
string with probability above 3/4 on every promise input.
The exponential quantum–classical separation for the search version of Simon's problem
(de Wolf, §3.1), in the bit-query model on the truth table X : Fin N → Bool of
f : {0,1}^n → {0,1}^n, for n ≥ 1: Simon's algorithm with classical post-processing finds the
hidden string with n (n + 2) queries and probability above 3/4 on every promise input,
including s = 0, while every randomized decision tree finding it with error 1/3 only on the
promise inputs with s ≠ 0 (as the restriction of a total function S) has depth q with
2^n ≤ (q + 2n)².