← All papers
First page of The quantum query complexity of the semigroup product problem

The quantum query complexity of the semigroup product problem

Troy Lee, Miklos Santha

quant-ph Sep 30, 2026 · v1
All named results are formalized in Lean 4 on top of a newly built quantum query complexity library and a sunflower-bounds library, with the artifact archived on GitHub/Zenodo.
We study the quantum query complexity of computing a semigroup product $x_1\cdots x_n$, when one query reveals one input element and the multiplication table is given. For a finite aperiodic semigroup of size $N-1$, the argument of Aaronson, Grier, and Schaeffer gives an upper bound of $\sqrt n\,(N\log(nN+2))^{O(N)}$ queries. To obtain query bounds that reflect algebraic structure, we study the product breadth $β$: the smallest bound such that every input word has a subsequence of at most $β$ letters with the same product. For nontrivial finite commutative aperiodic monoids, the bounded-error quantum query complexity is $Θ(\min\{n,\sqrt{nβ}\})$, and is thus characterized by product breadth. We further show that if such a monoid $M$ has aperiodicity index $k$ (the least positive integer satisfying $x^k=x^{k+1}$ for every $x\in M$), then $β=O(k\log(|M|+1)\log\log(|M|+2))$. For monoids with a stable partial order in which the identity is the minimum element, we prove that the bounded-error quantum query complexity is at most $\sqrt{n+1}((β+2)\log(n+2))^{O(\log(β+2))}$. For arbitrary finite aperiodic semigroups of order $N-1$, we improve the bound of Aaronson, Grier, and Schaeffer, obtaining a bounded-error quantum query complexity of at most \[ \min\left\{n,\sqrt n\, \log^{O((N\log(N+2))^{1/3})}(n+2)\right\}. \] The dependence on semigroup size is nearly tight: the bounded-depth Dyck lower bound of Ambainis et al. yields aperiodic monoids requiring $\sqrt n\,2^{Ω(N^{1/3})}$ quantum queries in the relevant parameter range.

The work studies the bounded-error quantum query complexity of computing a semigroup product x_1⋯x_n when each query reveals one element and the multiplication table is known. The aim is bounds that reflect algebraic structure rather than only semigroup size.

The authors introduce product breadth β, the shortest length of a product-preserving subsequence. They prove an essential-width adversary theorem, refining the Beigi–Taghavi guessed-decision-tree framework, and use sampling and recursion arguments for stably ordered monoids. Every named result is formalized in Lean 4 using over 100K lines of code, including a quantum query complexity library and a sunflower-bounds library.

For nontrivial commutative aperiodic monoids the complexity is Θ(min{n, √(nβ)}). Stably ordered monoids admit quasi-√n bounds depending on β. The Aaronson–Grier–Schaeffer bound for general aperiodic semigroups is improved to √n·log^{O((N log N)^{1/3})} n, which is nearly tight. Applications include matroid bases, the stock problem, and unitriangular tropical matrix products.