WorksPhysics and Astronomy
Elementary proofs of quantum lower bounds for element distinctness, k-sum and k-distinctness
Abstract
We give elementary proofs of quantum query lower bounds for three well-known problems: the quantum query lower bound for element distinctness, the lower bound for the -sum problem, for fixed and sufficiently large groups and the lower bound for the -distinctness problem, even for small alphabets. The proofs use only basic properties of quantum states and linear algebra, analyzing the differences of algorithm states on different inputs.
Introduction
Element distinctness is a well-known example of a quantum speedup. It is solvable with queries quantumly [3] but requires queries classically. The quantum algorithm played a central role in establishing quantum walks as a general paradigm for algorithm design [22, 19, 21].
The quantum query bound is optimal. The matching lower bound was first established using the polynomial method, as a consequence of Aaronson and Shi’s lower bound for the collision problem [1]. Subsequent proofs used the negative-weight adversary method [6] and the compressed oracle method [23, 13]. These proofs involve either substantial mathematical machinery, such as results from polynomial approximation theory, or a technically involved analysis of quantum queries.
In this note, we give an elementary proof of the quantum lower bound for element distinctness. The proof is slightly more than two pages and requires only basic quantum computing and linear algebra. Our argument refines the original hybrid method of Bennett, Bernstein, Brassard, and Vazirani [10], which established the quantum lower bound for unstructured search. The additional ingredient is a second-order difference of algorithm’s states under changes to two input positions.
We find it surprising that this well-studied lower bound has such a short and transparent proof. This raises a broader question: which other quantum lower bounds have substantially simpler proofs than the currently known ones?
We then extend our argument to two other problems. The first is the -sum problem, which asks whether an input contains entries whose sum equals a prescribed target. This is interesting as the hardest query problem with positive certificates of size : any such problem is solvable with queries [14] and, for the -sum problem, Belovs and Špalek [9] showed that queries are necessary, using the negative-weight adversary method. In this paper, we give an elementary proof of the lower bound using higher-order differences of quantum states.
The second problem is -distinctness, which asks whether some value occurs at least times in the input. Determining its quantum query complexity for fixed was a longstanding open problem. In 2012, Belovs [7] gave a learning-graph algorithm using queries whose optimality remained open until 2026: earlier lower bounds from the polynomial method [11, 20] left polynomial gaps, which Belovs [8] finally closed using a new framework. We recover the tight lower bound in an elementary way using higher-order differences, even for alphabets of only symbols, resolving the small-alphabet question left open in [8].
AI disclosure. This proof was found while working with ChatGPT 6 Astra on a quantum lower bound for element distinctness in the hybrid query model of [4]. A simplification of the proposed proof in the hybrid model led to the proof in the standard model presented in this note.
Element distinctness lower bound
Theorem 1. Let be an alphabet with at least elements. Any bounded-error quantum algorithm for element distinctness on entries over uses queries.
The proof can be extended to cover the case (which is the smallest alphabet size for which the problem is nontrivial) but becomes more complicated. For simplicity, we present a version which does not cover this case.
Proof. We identify with , where , and use the standard value-query oracle
where is the query index, is the answer register, and denotes the remaining workspace. By deferring measurements and padding shorter executions, we can assume that the algorithm makes exactly queries, with input-independent unitaries between queries. We write the state after queries on input as
where is input-independent, denotes the query transformation corresponding to the input and are the input-independent unitaries. Let be the projection to the subspace spanned by basis states with query index .
We choose distinct symbols uniformly at random, and define an input . For each , let be the input obtained from by changing the value of the variable to . Crucially, has the same distribution as , because the joint distribution of is invariant under swapping and .
We first bound the effect of replacing a uniformly random input entry on the algorithm’s state. Let
Lemma 1. For chosen uniformly from , independently of ,
Proof. Input-independent unitaries preserve distances, and the oracles and agree outside query index . Thus
with the last step following from .
For each fixed , the inputs and have the same distribution. Moreover,
Taking expectations therefore gives
Since , the lemma follows.
Let . By concavity of the square-root function, Lemma 1 implies
We now choose a uniformly random ordered pair of distinct indices , independently of , and plant a collision by replacing both and by . Denote the resulting input by , and define
Then
Let . Taking expectations, we get
can be upper-bounded using (3). Therefore, it remains to bound . Let . These operators satisfy
Expanding the terms in (4) according to (2) and regrouping them gives
By unitarity and the triangle inequality,
For fixed , the concavity of the square root gives
Taking the expectation in (7) and using the symmetry between and , we get
Since ,
implying that
Every has distinct entries, whereas every has exactly one colliding pair. An algorithm with error at most must therefore have output probabilities differing by at least on each pair . Since the difference between the probabilities that the algorithm outputs 1 on and is at most twice the Euclidean distance between the algorithm’s final states, we must have
Thus the left-hand side of (8) is at least , and
This implies .
The -sum lower bound
We generalize the proof of Theorem 1 by replacing second-order differences with th-order differences. This gives the lower bound of Belovs and Špalek [9].
Theorem 2. Let be fixed, let be a finite abelian group with , and let . Any bounded-error quantum algorithm that decides whether contains distinct positions whose values sum to uses queries.
Proof. As in Theorem 1, consider a -query algorithm. The queries are similar to (1) but use addition in instead of modular addition. The notation , , and is also the same as in the proof of Theorem 1.
We may assume , since otherwise the claimed lower bound is immediate. We choose independently and uniformly. For , let be obtained from by replacing with for every . We define
In particular, . We first establish a higher-order version of Lemma 1.
Lemma 2. For chosen uniformly among the -subsets of , independently of ,
Here and below, when .
Proof. Let . Outside query indices in , all the oracles in the alternating sum agree. At an index , the alternating sum after the query is the difference between two oracle images of st-order differences. Omitting the input-independent unitary and using therefore gives
Since and are independent and uniform, the two terms in parentheses have the same expectation. Averaging over yields
Since and for , induction and Pascal’s identity prove the lemma.
Let , with a uniform -subset. By concavity of the square root, for and ,
We now plant a solution. Choose uniformly and an independent uniform -subset . Independently of , choose uniformly subject to . For , let now denote replacement by these , and define using these replacements. Put
Expectations involving these planted differences are over , , . Every proper subset of the consists of independent uniform elements of . Also, a uniform -subset of is uniform among all -subsets of . Thus, inclusion–exclusion and the triangle inequality give
It remains to bound .
For , let . As before,
Expanding the definition of gives
By unitarity and the triangle inequality,
For a uniform , the set is a uniform -subset, and is uniform outside . Restricted to , the replacements are independent and uniform, so we can evaluate this expectation using the independent replacement vector from Lemma 2. For fixed , , , the concavity of the square root gives
Averaging and applying (13), we obtain
Since , (10) implies
Combining (10), (11), and (15), and using , gives
The input always contains a solution. Unlike in Theorem 1, need not be a negative input, but a union bound gives
On every pair for which is negative, the final measurement argument in Theorem 1 gives
Thus the left-hand side of (16) is at least . It follows that
and consequently .
The -distinctness lower bound
We again use the th-order differences of algorithm’s states. The argument follows the same structure as the proof for -sum, but requires a different input distribution and new estimates for the lower-order differences.
Theorem 3. Let be fixed and let be an alphabet with at least elements. Any bounded-error quantum algorithm for -distinctness on entries over uses queries.
This gives an optimal lower bound for -distinctness, even for alphabets of small size, which was left as an open question in [8].
Proof. We may assume that is sufficiently large compared to . Set
We choose uniformly among inputs having exactly classes of equal elements of each size and singletons (elements that are distinct from any other ). Let be a uniformly random symbol that does not appear in . Let be the set of singleton positions. For , let be obtained by replacing every entry indexed by by .
We have
As in the proof of Theorem 2, we define
For , define expected differences
In this and the following expectations, and are sampled as above, and is a uniform subset of of the indicated size.
Lemma 3. For all , we have
Proof. Let and let be a set with . For each , we define
with being the projection to the basis states where the query index register contains . Then . In every input appearing in , the value at position is , whereas in every input appearing in , the value there is . Applying a query to changes it to , where is the answer-register shift by .
For any unitaries , the triangle inequality gives
All components outside preserve their norms, as does the common input-independent unitary. Consequently,
where the last inequality is by Cauchy-Schwarz. We bound the two expectations separately.
For the terms, take expectation over . The remaining index is uniform in , so
For the terms, choose uniformly from , and then choose uniformly among the subsets of containing . By Cauchy–Schwarz,
We bound the last expectation by conditioning on . Write .
If , then has singleton positions and, conditional on , the index is uniform among them. Therefore,
If , then has equality classes of size . By symmetry, conditional on and , the newly created class is uniform among these classes, and is uniform within it. Thus is uniform among the positions belonging to classes of size , giving
Since , each conditional expectation is . Averaging over , and recalling that with fixed, we obtain
Consequently, we can now upper bound (17):
It remains to solve this recurrence, for which we use induction. The case follows by the same argument as Lemma 1, with uniform over . Define , . Then . Inductively, if the estimate holds for , summing the upper bound (19) gives
which proves the lemma.
For , define the expected norms
By concavity of the square-root function and Lemma 3, for ,
Now, we upper bound the th-order expected norm.
Lemma 4. We have that
Proof. Let have size , put , and define for . The same expansion as in (12) gives
Since and , unitarity and the triangle inequality imply
We now apply the averaging argument used to obtain (14), with in place of . If is uniform among the -subsets of and is uniform in , then is a uniform -subset of , and, conditional on , , , the index is uniform in . Consequently,
and hence
Let . Since , summing this recurrence and using (20) gives
which proves the lemma.
We now complete the proof of the theorem. Choose uniformly among the -subsets of , and put . The same inclusion–exclusion and triangle-inequality argument as in (11) gives
Here we use that a uniformly chosen -subset of is uniform among the -subsets of .
We may assume , since otherwise the claimed lower bound is immediate. By (20), for . Let . Combining (21) with Lemma 4, we get
Every sampled is a negative input and every sampled is a positive input. As in Theorem 1, an algorithm with error probability at most must satisfy on every such pair. Consequently,
which implies
where
Conclusion
The adversary [2, 17] and polynomials [5] methods have been very successful in proving tight quantum lower bounds for a wide range of problems. Our results suggest that elementary arguments based on comparisons of quantum states can also lead to sharp bounds beyond unstructured search. It is natural to ask how far such arguments can be developed and which other lower bounds admit similarly simple proofs.
For collision-like problems, natural extensions include inputs with prescribed multiplicity profiles and the task of finding several collisions. Our -distinctness proof uses inputs containing many equality classes of every smaller size. It would be interesting to understand how the argument changes when some of these classes are scarce or absent, and whether it can give bounds on the success probability of algorithms required to find multiple collisions.
More broadly, one may ask whether higher-order differences yield a general approach to problems with planted certificates, including copies of fixed subgraphs. One well-known target is the triangle problem. The best upper bound for the triangle problem is [18, 12] where is the number of vertices and the best lower bound is the very recent bound of [15]. Recent lower bounds for cliques and complete bipartite graphs provide further concrete targets [16]. A central question is how the occurrence and overlap of partial certificates affect the growth of these differences.
Acknowledgments. A.A. and M.K. are supported by the HQCC project funded under QuantERA II ERANET Cofund scheme of Horizon 2020 and by the University of Latvia project “Latvian quantum technology excellence and competence centre”. J.V. is supported by the 1.1.1.9 Research application No 1.1.1.9/LZP/2/25/206 of the Activity “Post-doctoral Research” “Practical applications and limitations of quantum search”.
References
- [1]Scott Aaronson and Yaoyun Shi. Quantum lower bounds for the collision and the element distinctness problems. Journal of the ACM, 51(4):595–605, 2004.DOI
- [2]Andris Ambainis. Quantum lower bounds by quantum arguments. Journal of Computer and System Sciences, 64(4):750–767, 2002.
- [3]Andris Ambainis. Quantum walk algorithm for element distinctness. SIAM Journal on Computing, 37(1):210–239, 2007.
- [4]Andris Ambainis, András Gilyén, and Martins Kokainis. Tight bounds for hybrid quantum-classical query algorithms. arXiv:2610.06803, 2026.arxiv.org/abs/2610.06803
- [5]Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf. Quantum lower bounds by polynomials. Journal of the ACM, 48(4):778–797, 2001.
- [6]Aleksandrs Belovs. Adversary lower bound for element distinctness. arXiv:1204.5074, 2012.arxiv.org/abs/1204.5074
- [7]Aleksandrs Belovs. Learning-graph-based quantum algorithm for k-distinctness. In Proceedings of the 53rd Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 207–216. IEEE, 2012.arxiv.org/abs/1205.1534
- [8]Aleksandrs Belovs. Tight quantum lower bound for k-distinctness. In Proceedings of the 67th Annual IEEE Symposium on Foundations of Computer Science. IEEE, 2026. Also available as arXiv:2604.05133.arxiv.org/abs/2604.05133
- [9]Aleksandrs Belovs and Robert Špalek. Adversary lower bound for the k-sum problem. In Proceedings of the 4th Innovations in Theoretical Computer Science Conference, pages 323–328. ACM, 2013.arxiv.org/abs/1206.6528
- [10]Charles H. Bennett, Ethan Bernstein, Gilles Brassard, and Umesh Vazirani. Strengths and weaknesses of quantum computing. SIAM Journal on Computing, 26(5):1510–1523, 1997.DOI
- [11]Mark Bun, Robin Kothari, and Justin Thaler. The polynomial method strikes back: Tight quantum query bounds via dual polynomials. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 297–310. ACM, 2018.
- [12]Titouan Carette, Mathieu Laurière, and Frédéric Magniez. Extended learning graphs for triangle finding. In 34th Symposium on Theoretical Aspects of Computer Science (STACS 2017), volume 66 of Leibniz International Proceedings in Informatics, pages 20:1–20:14. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2017.
- [13]Andrew M. Childs. Lecture notes on quantum algorithms. University of Maryland, https://www.cs.umd.edu/~amchilds/qa/qa.pdf, 2025. Version of April 17, 2025, Section 26.4.
- [14]Andrew M. Childs and Jason M. Eisenberg. Quantum algorithms for subset finding. Quantum Information and Computation, 5(7):593–604, 2005.
- [15]Arjan Cornelissen, Amin Shiraz Gilani, and Xingyu Zhou. A quantum lower bound for triangle finding, 2026. arXiv:2611.06751.arxiv.org/abs/2611.06751
- [16]Amin Shiraz Gilani and Xingyu Zhou. Superlinear quantum query lower bounds for subgraph detection, 2026. arXiv:2609.40263.arxiv.org/abs/2609.40263
- [17]Peter Høyer, Troy Lee, and Robert Špalek. Negative weights make adversaries stronger. In Proceedings of the 39th Annual ACM Symposium on Theory of Computing, pages 526–535. ACM, 2007.DOI
- [18]François Le Gall. Improved quantum algorithm for triangle finding via combinatorial arguments. In Proceedings of the 55th Annual IEEE Symposium on Foundations of Computer Science, pages 216–225. IEEE Computer Society, 2014.DOI
- [19]Frédéric Magniez, Ashwin Nayak, Jérémie Roland, and Miklos Santha. Search via quantum walk. SIAM Journal on Computing, 40(1):142–164, 2011.
- [20]Nikhil S. Mande, Justin Thaler, and Shuchen Zhu. Improved approximate degree bounds for k-distinctness. In 15th Conference on the Theory of Quantum Computation, Communication and Cryptography (TQC 2020), volume 158 of Leibniz International Proceedings in Informatics (LIPIcs), pages 2:1–2:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020.DOI
- [21]Miklos Santha. Quantum walk based search algorithms. In Theory and Applications of Models of Computation (TAMC 2008), volume 4978 of Lecture Notes in Computer Science, pages 31–46. Springer, 2008.arxiv.org/abs/0808.0059
- [22]Mario Szegedy. Quantum speed-up of Markov chain based algorithms. In Proceedings of the 45th Annual IEEE Symposium on Foundations of Computer Science, pages 32–41. IEEE Computer Society, 2004.DOI
- [23]Mark Zhandry. How to record quantum queries, and applications to quantum indifferentiability. In Alexandra Boldyreva and Daniele Micciancio, editors, Advances in Cryptology—CRYPTO 2019, Part II, volume 11693 of Lecture Notes in Computer Science, pages 239–268. Springer, 2019.DOI