insensitive (up to a multiplicative constant) to the constant implicit in O(Qaux(n)), whereas it is highly
sensitive to the constant in front of Adv(n/b).
We emphasize that the recurrence in Equation (6) involves both the adversary quantity and the quantum
query complexity. At a high level, this is why the bound on Q(n) resulting from solving Equation (6) does
not follow directly from adversary techniques alone nor from quantum algorithmic techniques alone. Indeed,
when we solve Equation (6) as a recurrence relation, we mix adversary and algorithmic techniques at each step
of the recursion. In principle, it is possible to use Equation (6) to construct an explicit quantum algorithm
for P(n) because there is a constructive, complexity-preserving, and two-way correspondence between span
programs—whose complexity is characterized by the adversary quantity—and quantum algorithms [Rei09b,
CJOP20,Jef22]. However, this correspondence is involved.
This quantum divide-and-conquer framework allows us to use classical divide-and-conquer thinking to
come up with a classical recurrence relation that we can easily convert to a corresponding quantum recurrence
relation in the form of Equation (6). Bounding Q(n) then reduces to bounding Qaux(n), which can be easier
than the original problem. In our applications to k-IS and k-CS, we bound Qaux(n) by using quantum
algorithms for the i<kversions of these problems, whose query complexities we can bound inductively.
Note that the base cases (k= 1) of these problems are trivial, being equivalent to search and (bipartite)
element distinctness, respectively.
The form of Equation (6) depends on the way we divide and conquer. Strikingly, in our application
to k-CS, we find that an optimal (up to logarithmic factors) quantum query complexity can be derived by
breaking the problem into seven parts (so that b= 7) but not fewer. Classically, the number of parts we
break the problem into makes no difference as any choice leads to an O(n) classical query complexity.
In the discussion above, we have assumed that the OR function relates P(n) to P(n/b) and Paux(n).
However, this is only to simplify our exposition. In fact, we can use quantum divide and conquer for any
function relating P(n) to P(n/b) and Paux(n). Functions that we use to obtain quantum speedups include
combinations of OR and AND. In our application of quantum divide and conquer to k-CS, the function is a
combination of SWITCH-CASE and OR. While SWITCH-CASE alone yields no quantum speedup, our analysis
relies on an adversary composition theorem that we prove, which allows us to preserve the speedup yielded
by OR. We remark that there are many other functions that could yield quantum speedups, but which we
have not yet considered in applications. Examples include EQUAL (which decides if the subproblems all
return the same answer or not) and EXACT2 of 3 (which decides if exactly 2 of 3 subproblems return 1)—see
[Rˇ
S12, Table 1]—and their combinations with OR,AND, and SWITCH-CASE. We leave the consideration of
such functions for future work.
1.3 Related work
The technique of using adversary composition theorems (and their relatives) to establish upper bounds
on quantum query complexity has been applied in several previous works, beginning with the setting of
formula evaluation [Rei09a,Rˇ
S12]. In [Kim13], an adversary composition theorem is used to bound the
quantum query complexity of a function fgiven a bound on that of fcomposed with itself dtimes. More
generally, the adversary quantity has been used to upper bound the quantum query complexity of problems
including k-distinctness [Bel12a], triangle finding [Bel12b,LMS17], undirected st-connectivity [BR12], and
learning symmetric juntas [Bel14]. In contrast to our work, these prior results typically bound the adversary
quantity using only tools from the adversary world, such as span programs, semidefinite programming, and
composition theorems, without constructing quantum algorithms to use as subroutines.
The first two application areas of quantum divide and conquer that we consider (recognizing regular
languages and String Rotation and String Suffix) arise in [AGS19,AJ22] as discussed above. Turning to
k-IS and k-CS, we first note that, despite the importance of these problems, there have been no significant
works on their quantum complexities. Directly using Grover search [Gro96] over all possible positions of a
1-witness gives trivial O(n) bounds as soon as k≥2. Directly using quantum walk search [Amb07] also
yields highly sub-optimal bounds of O(nk/(k+1)) for k-IS and O(n2k/(2k+1)) for k-CS.
Classically, LIS and LCS are typically solved using dynamic programming. There are many recent works
on quantum speedups for dynamic programming, e.g., [ABI+19,Abb19,GKMV21,ABI+20,KPV22]. The
main idea of these works is to classically query a part of the input and to repeatedly use the result together
with a quantum algorithm to solve many overlapping subproblems. However, we found it difficult to apply
4