December 23, 2024
The edge list model is arguably the simplest input model for graphs, where the graph is specified by a list of its edges. In this model, we study the quantum query complexity of three variants of the triangle finding problem. The first asks whether there exists a triangle containing a target edge and raises general questions about the hiding of a problem’s input among irrelevant data. The second asks whether there exists a triangle containing a target vertex and raises general questions about the shuffling of a problem’s input. The third asks whether there exists a triangle; this problem bridges the \(3\)-distinctness and \(3\)-sum problems, which have been extensively studied by both cryptographers and complexity theorists. We provide tight or nearly tight results for these problems as well as some first answers to the general questions they raise.
Furthermore, given any graph with low maximum degree, such as a typical random sparse graph, we prove that the quantum query complexity of finding a length-\(k\) cycle in its length-\(m\) edge list is \(m^{3/4-1/(2^{k+2}-4)\pm o(1)}\), which matches the best-known upper bound for the quantum query complexity of \(k\)-distinctness on length-\(m\) inputs up to an \(m^{o(1)}\) factor. We prove the lower bound by developing new techniques within Zhandry’s recording query framework [1] as generalized by Hamoudi and Magniez [2]. These techniques extend the framework to treat any non-product distribution that results from conditioning a product distribution on the absence of rare events. We prove the upper bound by adapting Belovs’s learning graph algorithm for \(k\)-distinctness [3]. Finally, assuming a plausible conjecture concerning only cycle finding, we show that the lower bound can be lifted to an essentially tight lower bound on the quantum query complexity of \(k\)-distinctness, which is a long-standing open question.
The study of graph problems forms a cornerstone of research in theoretical computer science. These problems have been studied when the input data structure is the adjacency matrix or adjacency list of the graph. In the adjacency matrix model of an \(n\)-vertex undirected simple graph, one is given the presence or absence status of every one of the \(\binom{n}{2}\) edges in an \(n\times n\) binary matrix. In the adjacency list model, the input is given as \(n\) lists of neighbors, one for each of the \(n\) vertices. Both models build structural cues into the input: an adjacency matrix assigns each vertex a given row and column, while an adjacency list uses vertices to order edges. These cues allow for fast computation but are arguably not intrinsic to the underlying graph.
In this work, we study graph problems in the edge list model, a minimalist model where the graph is given as an unordered multiset of edges. When computing on edge lists, algorithms must build the graph’s structure for themselves and not rely on any input cues. Thus, studying computation on edge lists offers a new window into the relationship between a graph problem’s structure and complexity.
Figure 1:
.
Figure 2:
.
An edge list can be seen as a shuffled adjacency list: both inputs specify the same displayed graph.
We study the edge list model in the context of quantum query complexity. In quantum query complexity, we assume access to a quantum computer and characterize the complexity of a problem by the number of times the computer queries an input edge list.
Quantum algorithms on edge lists has previously been studied in the area of streaming algorithms. For example, [4] showed that triangle counting can be solved by a quantum streaming algorithm using less space than any classical rival. However, the quantum computational model employed differs significantly from the quantum query model that we study. In the former case, the edge list is still queried classically — only the memory is quantum — whereas we assume the edge list can be queried in quantum superposition. As we will see in this work, this change of model leads to new and interesting questions.
Inspired by the fact that the triangle problem in the adjacency matrix model has driven innovations in quantum query complexity [5]–[10] over many years, we were driven to study the same problem but in the edge list model. Specifically, we study three variants of the triangle problem.
\(\mathop{\mathrm{\mathsf{TriangleEdge}}}\) asks whether there exists a triangle containing a target edge and raises general questions about how a problem’s complexity increases if its input is hidden among irrelevant data. For the specific problem, the irrelevant data consists of those edges in the input that are not incident to the target edge.
\(\mathop{\mathrm{\mathsf{TriangleVertex}}}\) asks whether there exists a triangle containing a target vertex and raises general questions about how a problem’s complexity increases if its input is shuffled. For the specific problem, two parts of the input are shuffled: one part containing edges incident to the target vertex and the other part containing the remaining edges. The notion of shuffling is also inherent in the comparison between the edge list and adjacency list models.
\(\mathop{\mathrm{\mathsf{Triangle}}}\) asks whether a triangle exists and bridges the \(3\)-distinctness and \(3\)-sum problems. The latter two problems have been extensively studied, both in the worst-case setting by complexity theorists seeking to connect problem structure with algorithmic complexity [3], [11]–[14] and in the average-case setting by cryptographers seeking to understand the security of cryptosystems [15], [16].
We provide tight or nearly tight results for these problems as well as some first answers to the general questions they raise. Furthermore, we generalize our results for \(\mathop{\mathrm{\mathsf{Triangle}}}\) to \(k\)-cycle finding, a problem motivated by its close ties to the well-studied problem of \(k\)-distinctness.
In the following, we write \(Q(\cdot)\) for the worst-case (bounded-error) quantum query complexity, \(\mathbb{N}\) for the set of positive integers, and \([n]\mathrel{\vcenter{:}}= \{1,\dots,n\}\) for every \(n\in \mathbb{N}\).
In \(\mathop{\mathrm{\mathsf{TriangleEdge}}}\), when searching for a triangle containing a target edge \(\{u,v\}\), any edge in the input of the form \(\{u',v'\}\) such that \(\{u',v'\} \cap \{u,v\} = \varnothing\) can be viewed as irrelevant data that hides the relevant part of the input. This observation motivates a general definition of hiding.
Definition 1 (Hiding transform). Let \(a,b\) be integers with \(b\geq a\geq 1\). Let \(\widetilde{D},\Sigma\) be finite non-empty sets with \(\widetilde{D}\subseteq \Sigma^a\). For a function \(f\colon \widetilde{D}\to \{0,1\}\), we define the hiding transform of \(f\) to be \[\mathop{\mathrm{\mathsf{HIDE}}}_b[f] \colon D \subseteq (\Sigma \cup \{*\})^b \to \{0,1\},\] where \(*\) is a symbol outside of \(\Sigma\), the set \(D\) consists of all strings \(y \in (\Sigma \cup \{*\})^b\) with exactly \(a\) non-\(*\) symbols such that the length-\(a\) subsequence5 \(\tilde{y}\) formed by those non-\(*\) symbols is an element of \(\widetilde{D}\), and \(\mathop{\mathrm{\mathsf{HIDE}}}_b[f](y)\) is defined to be \(f(\tilde{y})\).
Then \(\mathop{\mathrm{\mathsf{TriangleEdge}}}\) can be seen as \(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d]\), where \(\mathop{\mathrm{\mathrm{ED}}}_d\) is the element distinctness function that decides whether an input string of length \(d\) has two distinct positions containing the same symbol. We show the following.6
Theorem 1 (Informal version of 9 1). \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d]) = \widetilde{\Theta}(\sqrt{m}d^{1/6})\). Consequently, \[Q(\mathop{\mathrm{\mathsf{TriangleEdge}}}) = \widetilde{\Theta}(\sqrt{m} d^{1/6}),\] where the input is a length-\(m\) edge list and the target edge has \(d\) neighboring edges.7
The study of \(\mathop{\mathrm{\mathsf{TriangleEdge}}}\) naturally led us to investigate how \(Q(f)\) relates to \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_b[f])\) for arbitrary \(f\colon \Sigma^a \to \{0,1\}\). As a first step in this direction, we show \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_b[f]) = \widetilde{\Theta}(\sqrt{b/a} \cdot Q(f))\) for every symmetric \(f\colon \{0,1\}^a \to \{0,1\}\), where “symmetric” refers to “symmetric under permuting the positions of input symbols” throughout this work. The symmetry condition is necessary. For example, let \(f:\{0,1\}^a\to\{0,1\}\) be the dictator function \(f(x)=x_1\). Then \(Q(f)=1\), but \(\mathop{\mathrm{\mathsf{HIDE}}}_b[f]\) requires finding the first non-\(\ast\) symbol among the \(b\) positions. On the subdomain where the last \(a-1\) positions are fixed non-\(\ast\) symbols and exactly one of the first \(b-a+1\) positions is non-\(\ast\), computing \(\mathop{\mathrm{\mathsf{HIDE}}}_b[f]\) contains unstructured search on \(b-a+1\) items as a subproblem. Hence \[Q(\mathop{\mathrm{\mathsf{HIDE}}}_b[f])=\Omega(\sqrt{b-a+1}),\] which is not \(O(\sqrt{b/a}\,Q(f))\) in general. On the other hand, we conjecture that the result holds for every symmetric \(f\colon \Sigma^a \to \{0,1\}\), even if \(\mathopen{}\mathclose{\left|\Sigma}\right|>2\). We support this conjecture by showing that its randomized analogue is true in 13.
We show in 14 15 that the quantum query complexity of \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\), when the input is a length-\(m\) edge list and the target vertex \(u\) has degree \(d\) satisfies \[\Omega(\sqrt{m/d} \cdot Q(3\mathsf{\text{-}DIST}_d)) \leq Q(\mathop{\mathrm{\mathsf{TriangleVertex}}}) \leq O(\sqrt{m}d^{1/4}),\] where \(3\mathsf{\text{-}DIST}_d\) is the \(3\)-distinctness function that decides whether an input string of length \(d\) has three distinct positions containing the same symbol. Note that \(Q(3\mathsf{\text{-}DIST}_d)\) is between \(\Omega(d^{2/3})\) – because it is no easier than \(\mathop{\mathrm{\mathrm{ED}}}_d\) (which could be also called \(2\mathsf{\text{-}DIST}_d\)) – and \(O(d^{5/7})\) [3].
When seeking a triangle containing the target vertex \(u\), it is helpful to think of the input edge list as consisting of two parts: part \(A\) containing edges that are incident to \(u\), and part \(B\) containing edges that are not incident to \(u\). We do not a priori know where parts \(A\) and \(B\) are but neither part contains irrelevant data — indeed two edges of the triangle must come from \(A\) and one edge from \(B\) (if it exists). The shuffling of parts \(A\) and \(B\) contributes to the hardness of \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\).
The above discussion and the comparison of the edge list model with the adjacency list and adjacency matrix models naturally led us to investigate how shuffling a function’s input affects its complexity. We formalize and study two concrete versions of this problem.
(I) Shuffled functions. As discussed, the edge list can be seen as a “shuffled version” of the adjacency list. We now formalize this notion.
Definition 2 (Shuffling transform). Let \(n\in \mathbb{N}\). Let \(\widetilde{D},\Sigma\) be finite non-empty sets with \(\widetilde{D}\subseteq \Sigma^n\). For a function \(f\colon \widetilde{D} \to \{0,1\}\), we define the shuffling transform of \(f\) to be \[\mathop{\mathrm{\mathsf{SHUFFLE}}}[f] \colon D \subseteq (\Sigma\times [n])^n \to \{0,1\}, \quad \text{where}\]
the set \(D\) consists of all elements \(x\in (\Sigma\times [n])^n\) satisfying \(x = ((v_1,\pi(1)),\dots,(v_n,\pi(n)))\) for some bijection \(\pi\colon [n]\to [n]\) such that \((v_{\pi^{-1}(1)},v_{\pi^{-1}(2)},\dots,v_{\pi^{-1}(n)})\in \widetilde{D}\).
\(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f](x)\mathrel{\vcenter{:}}= f(v_{\pi^{-1}(1)},v_{\pi^{-1}(2)},\dots,v_{\pi^{-1}(n)})\).
In other words, the inputs to \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) are shuffled versions of the inputs to \(f\) such that each symbol of the input to \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) additionally contains its position pre-shuffling. Of course, every (worst-case) query complexity measure of \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) is at least that of \(f\), since \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) contains a copy of \(f\) under the restriction of the domain \(D\) to those inputs of the form \((x_1,1),\dots, (x_n,n)\), where \(x = x_1 \dots x_n \in \widetilde{D}\). If \(f\) is symmetric, then every query complexity measure on \(f\) is the same as that measure on \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) since the algorithm computing \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) could simply ignore the second coordinates of the input. If \(f\) is not symmetric, then \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])\) could be much larger than \(Q(f)\): the dictator function witnesses a \(\Omega(\sqrt{n})\) versus \(1\) separation.
Given the above discussion, the interesting question becomes: how does the separation between \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])\) and \(Q(f)\) depend on “how symmetric” \(f\) is? Natural (partially) symmetric \(f\) arises from graph properties. We show that there can be massive separations between \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])\) and \(Q(f)\) even if \(f\) has significant symmetry by being defined as a graph property in either (i) the adjacency list model (exponential separation) or (ii) adjacency matrix model (unbounded separation).
Since an edge list can be interpreted as a shuffled adjacency list, result (i) can be interpreted as “quantum computers can compute some graph property exponentially faster given an adjacency list instead of an edge list”; the proof of result (ii) can also be adapted to show “quantum computers can compute some graph property unboundedly faster given an adjacency matrix instead of an edge list”.
Theorem 2 (Informal version of 18 19).
There exists a (family of) graph property \(\mathcal{P}_1:A\to \{0,1\}\), where \(A\) denotes a set of adjacency lists of size \(n\) such that \[Q(\mathcal{P}_1)=O(\mathrm{polylog}(n)) \quad \text{and} \quad Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathcal{P}_1])=n^{\Omega(1)}.\]
There exists a (family of) graph property \(\mathcal{P}_2:M\to\{0,1\}\), where \(M\) denotes a set of \(n\times n\) adjacency matrices such that \[Q(\mathcal{P}_2)=O(1) \quad \text{and} \quad Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathcal{P}_2])=n^{\Omega(1)}.\]
(II) Shuffled direct sum. In \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\), the hardness arising from shuffling is intuitively not due to shuffling within parts \(A\) and \(B\) but rather between them. We formalize a toy version of this type of shuffling in the context of direct sum as follows.
Definition 3 (Shuffled direct sum). Let \(n,k\in \mathbb{N}\). Let \(\Sigma\) be a finite non-empty set. For a function \(f \colon \Sigma^n \to \{0,1\}\), we define the \(k\)-shuffled direct sum of \(f\) to be \[\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]\colon D \subseteq (\Sigma\times [k])^{kn} \to \{0,1\}^k, \quad \text{where}\]
the set \(D\) consists of all elements \(x\in (\Sigma\times [k])^{kn}\) satisfying \(x = ((v_1,c_1),\dots, (v_{kn},c_{kn}))\) such that: for all \(j\in [k]\), there are exactly \(n\) indices \(i\in [kn]\) with \(c_i = j\).
\(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f](x)\) is defined to equal \((f(v^{(1)}),\dots,f(v^{(k)}))\), where \(v^{(j)}\) is the subsequence of \(v\mathrel{\vcenter{:}}= v_1\dots v_{kn}\) indexed by those \(i\in [kn]\) such that \(c_i = j\).
We have \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]) \geq \Omega(kQ(f))\), since computing \(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]\) is at least as hard as computing \(k\) independent copies of \(f\), which costs \(\Omega(kQ(f))\) queries by a well-known direct-sum theorem for quantum query complexity [17], [18]. This direct sum lower bound can be far from tight for \(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]\): again consider \(f\) being the dictator function. At first sight, computing \(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]\) seems harder than computing the \(k\) independent copies of \(f\) even if \(f\) is symmetric. Perhaps counterintuitively, we show in 22 that this is not the case if \(f\) is symmetric and has Boolean domain \(\{0,1\}^n\): for such \(f\), we show \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]) \leq O(kQ(f))\). In 23, we conjecture that the same holds for symmetric \(f\) with non-Boolean domain.
Having discussed \(\mathop{\mathrm{\mathsf{TriangleEdge}}}\) and \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\), we now turn to \(\mathop{\mathrm{\mathsf{Triangle}}}\), where we simply ask whether a triangle exists8 without placing any constraints. In the edge list model, we find that \(\mathop{\mathrm{\mathsf{Triangle}}}\) bridges the \(3\mathsf{\text{-}DIST}\) and \(3\mathsf{\text{-}SUM}\) problems since its structure lies between theirs. Recall that in \(3\mathsf{\text{-}DIST}\), the goal is to decide whether the input contains three repetitions of the same symbol. In \(3\mathsf{\text{-}SUM}\), the input contains symbols from some abelian group and the goal is to decide if there are three symbols that sum to the zero-element of the group.
Intuitively, \(\mathop{\mathrm{\mathsf{Triangle}}}\) should be no easier than \(3\mathsf{\text{-}DIST}\) and no harder than \(3\mathsf{\text{-}SUM}\) by considering its “certificate structure” [13]. In \(3\mathsf{\text{-}DIST}\), once we have found one symbol of a \(1\)-certificate, the next symbol for completing the certificate is determined. In \(3\mathsf{\text{-}SUM}\), once we have found one symbol of a \(1\)-certificate, the next symbol can be arbitrary. In comparison, in \(\mathop{\mathrm{\mathsf{Triangle}}}\), once we have found one edge \((i,j)\) of a \(1\)-certificate, the next edge must be incident to one of \(i\) or \(j\) so it is neither determined nor arbitrary. In 24, we show that this intuition is formally correct by reducing \(3\mathsf{\text{-}DIST}\) to \(\mathop{\mathrm{\mathsf{Triangle}}}\) and \(\mathop{\mathrm{\mathsf{Triangle}}}\) to \(3\mathsf{\text{-}SUM}\).
Our first main result is stated informally below.
Theorem 3 (Informal version of 28 2). Given a length-\(m\) edge list on \(n = \Theta(m)\) vertices, the quantum query complexity of finding a triangle is \[\label{intro95tri95query95complexity95result} Q(\mathop{\mathrm{\mathsf{Triangle}}})\geq \widetilde{\Omega}(m^{5/7}).\tag{1}\] Furthermore, the lower bound holds even if the edge list is uniformly random, which corresponds to a random sparse graph. As a corollary, 1 holds even if the edge list is promised to have a maximum degree at most \(O(\log(m)/\log\log(m))\).
We find 3 interesting for several reasons. Firstly, proving the theorem pushed us to develop new techniques for the recording query framework, which we believe to be of independent interest. The recording query framework was pioneered by Zhandry [1] to prove the security of cryptosystems against quantum adversaries. There is now a growing line of work developing new techniques within the recording query framework, including [2], [16], [19]–[23]. Of particular relevance to our work is [2] by Hamoudi and Magniez, which generalized Zhandry’s original framework in order to lower bound the quantum query complexity of finding collision pairs.
This framework is particularly well suited for proving average-case quantum query lower bounds, where the input is sampled from certain types of distributions. The framework can also yield optimal worst-case lower bounds if the worst-case distribution is of a type it can handle — this is the case for triangle finding on graphs of low maximum degree as we will see. Ideally, to prove our lower bound, we would like to consider a hard distribution supported only on graphs with low max-degree. The low max-degree condition makes finding a cycle harder and hence proving the lower bound easier. To see this, consider the contrapositive in the special case of triangle finding. If there were no degree bound, then an edge queried at step \(t\) could help the algorithm find a very large number of wedges, i.e., length-\(2\) paths. In the extreme case, \(\Omega(t)\) wedges could be found. As each wedge can be completed to a triangle, the more wedges the algorithm finds, the easier triangle finding becomes.
Unfortunately, a product distribution on edge lists cannot be entirely supported on those with low max-degree. In other words, while sampling a graph with high max-degree is a rare event, it is always possible. The main technical contribution of our work is to develop tools to handle such rare events within the recording query framework. We name these tools the Mirroring and Exclusion lemmas. They can be used in conjunction to isolate and bound the contribution to the algorithm’s success probability when rare events occur. These tools extend the recording query framework to treat any non-product distribution that results from conditioning a product distribution on the absence of rare events.
3 is also interesting because the lower bound curiously matches the best-known upper bound on the quantum query complexity of \(3\)-distinctness, which is \(Q(3\mathsf{\text{-}DIST}_m) \leq O(m^{5/7})\), up to logarithmic factors. This upper bound was first proven by Belovs [3] over a decade ago using a ground-breaking learning graph algorithm [6]. There have been no improvements since. On the other hand, the best-known lower bound on \(Q(3\mathsf{\text{-}DIST}_m)\) is still \(\Omega(m^{2/3})\), which is simply inherited from the element distinctness lower bound of Aaronson and Shi [24] proven over two decades ago. This is despite many attempts at raising the lower bound using the polynomial method [25], [26], adversary method [27], [28], and even recording queries (equivalently, compressed oracle) method [16]. In 1, we summarize these results together with those to be discussed later. Note that \(3\mathsf{\text{-}CYCLE}\) is equivalent to \(\mathop{\mathrm{\mathsf{Triangle}}}\).
| Problem | \(k\mathsf{\text{-}DIST}\) Lower Bound | \(k\mathsf{\text{-}DIST}\) Upper Bound | \(k\mathsf{\text{-}CYCLE}\) Tight Bound |
|---|---|---|---|
| \(k=3\) | \(\Omega(m^{2/3})\) [24] | \(O(m^{5/7})\) [3] | \(m^{5/7\pm o(1)}\) (this work) |
| \(k\geq 4\) | \(\widetilde{\Omega}(m^{3/4-1/(4k)})\) [26] | \(O(m^{3/4-1/(2^{k+2}-4)})\) [3] | \(m^{3/4-1/(2^{k+2}-4)\pm o(1)}\) (this work) |
We strongly believe that the matching of the lower bound in 3 and the best-known upper bound on \(Q(3\mathsf{\text{-}DIST}_m)\) is not a coincidence. This is because the “collision structure” of a uniformly random edge list on \(n\) vertices containing \(m = \Theta(n)\) edges resembles that of a candidate worst-case distribution on inputs to \(3\mathsf{\text{-}DIST}_m\). By collision structure of an edge list, we mean the number of wedges and triangles it contains; by collision structure of an input to \(3\)-distinctness, we mean the number of \(2\)-collisions and \(3\)-collisions it contains, where an \(l\)-collision refers to a length-\(l\) tuple of indices at which the input contains the same symbol. (For more details about the resemblance, see the overview of cycle finding below.) Indeed, the similarities between the collision structures were so striking that we were led to ask whether Belovs’s learning graph algorithm for \(3\)-distinctness could be adapted to provide a matching upper bound to 3. As our second main result, we answer this question affirmatively.
Theorem 4 (Informal version of 31 4). Given a length-\(m\) edge list on \(n = \Theta(m)\) vertices with maximum degree at most \(O(\log(m)/\log\log(m))\), we construct a quantum algorithm witnessing \[Q(\mathop{\mathrm{\mathsf{Triangle}}})\leq m^{5/7+o(1)}.\] In particular, the upper bound holds if the edge list is uniformly random, which corresponds to a random sparse graph. Moreover, the algorithm is an adaptation of Belovs’s learning graph algorithm for \(3\)-distinctness as developed in [3].
Taken together, 3 4 give the first example of a problem for which Belovs’s learning graph algorithm in [3] is provably optimal, up to an \(m^{o(1)}\) factor.9 3 also suggests that any quantum algorithm that polynomially improves the best-known \(O(m^{5/7})\) upper bound on \(Q(3\mathsf{\text{-}DIST}_m)\) must exploit more than just the collision structure of the problem, which seems improbable to us.
Our results above suggest that triangle finding in a graph of low maximum degree is closely tied to \(3\)-distinctness. Indeed, they share essentially the same quantum query upper bound and have quite similar quantum algorithms. The \(3\)-distinctness problem generalizes to a well-studied family of problems known as \(k\)-distinctness, where \(k\geq 3\) is an integer (treated as a constant) and the goal is to decide whether an input list contains \(k\) distinct positions with the same symbol. Is there a family of problems generalizing triangle finding in the edge list model that can be similarly tied to \(k\)-distinctness?
The answer is yes with \(k\)-cycle finding being the sought for family. To see why, let us return to the concept of collision structure mentioned above. Let \(k\mathsf{\text{-}DIST}_m\) denote the function computing \(k\)-distinctness on length-\(m\) inputs. A candidate worst-case distribution on inputs to \(k\mathsf{\text{-}DIST}_m\) is the uniform distribution over inputs containing exactly one \(k\)-collision and \(\Omega(m)\) many \((k-1)\)-collisions, cf. [29] and [12]. The intuition is that the many \((k-1)\)-collisions present many dead-ends that effectively hide the location of the \(k\)-collision. In comparison, writing \(P(n,k)\mathrel{\vcenter{:}}= n!/(n-k)!\), a uniformly random length-\(m\) edge list on \(n=\Theta(m)\) vertices contains \[\begin{align} {3} &\Theta(P(n,k)\cdot (m/n^2)^{k-1}) &&= \Theta(m) \;&&\text{length-(k-1) paths} \\ \text{and} \quad &\Theta(P(n,k)\cdot (m/n^2)^k) &&= \Theta(1) \;&&\text{length-k cycles}. \end{align}\]
Since a length-\((k-1)\) path is analogous to a \((k-1)\)-collision and a length-\(k\) cycle is analogous to a \(k\)-collision, the collision structure of the uniformly random edge list resembles that of the aforementioned worst-case distribution on inputs to \(k\)-distinctness. This is also a good point to remark that the uniform distribution over inputs to \(k\)-distinctness, which is studied in [16], cannot be made to resemble the worst-case distribution (for any setting of input length and alphabet size) because it has the property that the number of \((k-1)\)-collisions cannot be too far from the number of \(k\)-collisions.
Our main result for cycle finding generalizes our results for triangle finding as follows.
Theorem 5 (Informal version of 5 7). Given a length-\(m\) edge list on \(n=\Theta(m)\) vertices with maximum degree at most \(O(\log(m)/\log\log(m))\), the quantum query complexity of finding a \(k\)-cycle is \[Q(k\mathsf{\text{-}CYCLE})= m^{3/4-1/(2^{k+2}-4)\pm o(1)}.\] Furthermore, this holds if the edge list is uniformly random, which corresponds to a random sparse graph.
The upper bound is exactly the same as the best known upper bound for \(k\)-distinctness up to an \(m^{o(1)}\) factor and is again shown by adapting Belovs’s learning graph algorithm for \(k\)-distinctness in [3]. We have summarized the state of affairs in 1.
The comparison of collision structures above suggests that the hardness of \(k\)-cycle and \(k\)-distinctness spring from a common source, which hints at the possibility of lifting our nearly tight lower bound for \(k\)-cycle to a nearly tight lower bound for \(k\)-distinctness. In fact, we propose 38, stating that the quantum query complexity of \(k\)-cycle should not decrease too much under a restriction of the input edges, and prove in 40 that it enables such lifting.
Subsequent to this work, Belovs [30] proved a tight quantum query lower bound for \(k\)-distinctness, using a framework inspired by Zhandry’s compressed oracle technique and independently of the lifting conjecture discussed above.
We now highlight some of our work’s main technical contributions. We inherit the notation above.
To lower and upper bound \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d])\), our main observation is that the problem “self-reduces” to a more structured version of itself, \(\mathop{\mathrm{\mathsf{HIDE}}}_m'[\mathop{\mathrm{\mathrm{ED}}}_d]\), whose query complexity is easier to characterize. The inputs to \(\mathop{\mathrm{\mathsf{HIDE}}}_m'[\mathop{\mathrm{\mathrm{ED}}}_d]\) are restricted to have the form of \(d\) blocks each of length \(m/d\),10 where each block contains \((m/d -1)\) \(*\)s and exactly one non-\(*\) symbol. Remarkably, imposing the block structure causes no decrease in hardness.
Observe that \(\mathop{\mathrm{\mathsf{HIDE}}}_m'[\mathop{\mathrm{\mathrm{ED}}}_d]\) can be viewed as the composition of \(\mathop{\mathrm{\mathrm{ED}}}_d\) with the so-called \(\mathrm{pSearch}\) function that extracts the unique non-\(*\) symbol from \(m/d\) symbols. The latter function has query complexity \(\Theta(\sqrt{m/d})\) and a composition theorem [31] yields \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d]) \geq Q(\mathop{\mathrm{\mathsf{HIDE}}}_m'[\mathop{\mathrm{\mathrm{ED}}}_d]) \geq \Omega(\sqrt{m/d} \cdot d^{2/3}) = \Omega(\sqrt{m}d^{1/6})\). To upper bound \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d])\), we consider a quantum algorithm that first randomly permutes the positions of a given input string \(x\). A standard probability argument – like that used to bound the maximum load in a balls-into-bins experiment – implies that the resulting string \(\tilde{x}\) is highly likely to be in a block form similar to inputs of \(\mathop{\mathrm{\mathsf{HIDE}}}_m'[\mathop{\mathrm{\mathrm{ED}}}_d]\), except each block may contain up to \(\log(d)\) non-\(*\) symbols. Since the number of non-\(*\) symbols in each block is so small, we simply Grover search for all of them on the fly while running the quantum algorithm for \(\mathop{\mathrm{\mathrm{ED}}}_{d\log(d)}\) on \(d\log(d)\) symbols. This algorithm has query complexity \(\widetilde{O}(\sqrt{m} d^{1/6})\).
By considering the block structure, we also see \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) = \Omega(\sqrt{m/d} \cdot Q(f))\) for every \(f\colon \Sigma^d \to \{0,1\}\). We show \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) =\widetilde{O}(\sqrt{m/d} \cdot Q(f))\) for symmetric \(f\colon \{0,1\}^d \to \{0,1\}\) using the characterization of the optimal quantum query algorithm for such functions in [32]. We show \(R(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) = O((m/d)\cdot R(f))\) for symmetric \(f\colon \Sigma^d \to \{0,1\}\), where \(R(\cdot)\) denotes the worst-case (bounded-error) randomized query complexity, using the characterization of the optimal randomized query algorithm for such functions in [33].
To obtain \(Q(\mathop{\mathrm{\mathsf{TriangleVertex}}}) \leq O(\sqrt{m} d^{1/4})\) in 14, we use a quantum walk algorithm that walks on the Hamming graph with vertices labeled by \(r \mathrel{\vcenter{:}}= \ceil{d^{3/4}}\) positions from part \(A\) (the part containing edges incident to the target vertex) of the input. Since we do not a priori know where part \(A\) is, we perform amplitude amplification in both the setup and update steps of the quantum walk to keep the walk on part \(A\). Importantly, this uses the fact that the underlying random walk is uniformly random on the Hamming graph. To lower bound \(Q(\mathop{\mathrm{\mathsf{TriangleVertex}}}) \geq \Omega(\sqrt{m/d} \cdot Q(3\mathsf{\text{-}DIST}))\), we give a reduction from \(\mathop{\mathrm{\mathsf{HIDE}}}_m[3\mathsf{\text{-}DIST}]\) to \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\) in 15.
We obtain an exponential separation between \(Q(f)\) and \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])\) when \(f\) is defined by the graph property \(\mathcal{P}\) from [34] in the adjacency list model as follows. [34] showed that computing \(f\) witnesses an exponential separation between randomized and quantum query complexities. But the quantum query complexity of computing \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) is polynomially related to its randomized query complexity since the problem is symmetric [35].
If \(f\) is defined by a graph property in the adjacency matrix model, the above argument cannot work since [34] showed that the quantum query complexity of computing \(f\) is polynomially related to its randomized query complexity. Nonetheless, we found that an unbounded separation between \(Q(f)\) and \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])\) can be witnessed by the following Majority-of-Majority function on a restricted partial domain, that we name \(\mathrm{\Sigma MAJ}\):11
Definition 4. \[\mathrm{\Sigma MAJ}_n \colon D_0\dot{\cup} D_1 \subseteq \{0,1\}^{n^2} \to \{0,1\},\] where \(\mathrm{\Sigma MAJ}_n(x) = 0\) if and only if \(x\in D_0\) and
\(x = (x_{1,1},x_{1,2},\dots, x_{n,n}) \in \{0,1\}^{n^2}\) is in \(D_0\) if and only if there exists a subset \(S\subseteq[n]\) of size \(\geq 2n/3\) such that for all \(i\in S\), \(x^i \mathrel{\vcenter{:}}= (x_{i,1},\dots,x_{i,n})\) has Hamming weight \(\mathopen{}\mathclose{\left|x^i}\right| \geq 2n/3\) and for all \(i\in [n]-S\), \(\mathopen{}\mathclose{\left|x^i}\right| \leq n/3\).
\(x = (x_{1,1},x_{1,2},\dots, x_{n,n}) \in \{0,1\}^{n^2}\) is in \(D_1\) if and only if there exists a subset \(S\subseteq[n]\) of size \(\leq n/3\) such that for all \(i\in S\), \(x^i \mathrel{\vcenter{:}}= (x_{i,1},\dots,x_{i,n})\) has Hamming weight \(\mathopen{}\mathclose{\left|x^i}\right| \geq 2n/3\) and for all \(i\in [n]-S\), \(\mathopen{}\mathclose{\left|x^i}\right| \leq n/3\).
In other words, inputs in \(D_0\) have at least \(2n/3\) “dense” rows, i.e., a substring of the form \(x_{i,1}x_{i,2}\dots x_{i,n}\) for some \(i\in [n]\), with at least \(2n/3\) ones; and at most \(n/3\) “sparse” rows with at most \(n/3\) ones. In contrast, inputs in \(D_1\) have at most \(n/3\) dense rows and at least \(2n/3\) sparse rows.
It is not hard to see that \(R(\mathrm{\Sigma MAJ}_n) = O(1)\) as follows. For a given row, we can test whether it is dense or sparse using \(O(1)\) queries. Since the fractions of dense blocks for inputs in \(D_0\) and \(D_1\) differ by a constant, we can distinguish between these cases using \(O(1)\) queries. Therefore \(Q(\mathrm{\Sigma MAJ}_n) \leq R(\mathrm{\Sigma MAJ}_n) = O(1)\).
In contrast, computing \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]\) seems at least as hard as finding two distinct input symbols \((x_{i_1,j_1},(i_1,j_1))\) and \((x_{i_2,j_2},(i_2,j_2))\) that came from the same row pre-shuffling, i.e., \(i_1=i_2\) but \(j_1\neq j_2\), which is a collision-type problem. Formally, we prove \(R(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]) = \Omega(\sqrt{n})\) in 19 by showing that two particular distributions, one supported on the set \(D_0\) and another on \(D_1\), are hard to distinguish by any few-query randomized algorithm using a hands-on total variation distance argument. Therefore, \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]) = \Omega(R(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n])^{1/3}) = \Omega(n^{1/6})\), where the first equality uses [35], which applies since \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]\) is symmetric.
We prove our lower bound on triangle finding (3) in Zhandry’s recording query framework [1]. Following the framework, we define a “progress quantity” that tracks the progress the algorithm has made in “recording” the searched-for object in its internal memory. The progress quantity can be roughly thought of as the square root of the probability with which the quantum algorithm can find the searched-for object, where the probability is over randomness in both the input distribution and the algorithm. The progress quantity depends on the number of queries the quantum algorithm makes. If this quantity is small after the last query, then the algorithm cannot find what it is searching for with high probability.
Our proof has two steps:12
we first show that the progress in recording much more than \(r^*(t)\mathrel{\vcenter{:}}= t^{3/2}\log^2(n)/\sqrt{n}\) wedges in \(t\) queries is negligible;
then we show that, given we record \(O(r^*(t))\) wedges in \(t\) queries, the progress of recording a triangle at the \((t+1)\)-th query increases by at most \(O(\sqrt{r^*(t)}/n)\), which corresponds to the square root of the probability that a random edge completes one of the \(r^*(t)\) recorded wedges to a triangle.
Therefore, at the \(T\)-th query, the progress of recording a triangle is \(\sum_{t=0}^T \sqrt{r^*(t)}/n\), which equals \(O(T^{7/4}\log(n)/n^{5/4})\), and is \(o(1)\) unless \(T \geq \Omega(n^{5/7}/\log^{4/7}(n))\). The ability to perform this type of step-by-step analysis is a known strength of the recording query framework.13 For example, it was exploited to great effect by Liu and Zhandry [16] in proving their tight lower bound on the quantum query complexity of average-case \(k\)-distinctness.
What is new to our work is how we perform step (i) above. As previously discussed, the issue is that a newly queried edge could contribute to more than one wedge. Let us now see how this issue manifests itself at a technical level. We begin by following the recording queries framework and define a progress quantity \(\Lambda_{t,r} \in [0,1]\) for integer \(t,r\) with \(t\geq 0\) where \(\Lambda_{t,r}^2\) represents the probability a quantum query algorithm has recorded at least \(r\) wedges immediately after the \(t\)-th query. Directly using existing techniques in the framework gives the following recurrence for \(\Lambda_{t,r}\): \[\label{eq:naive95recurrence} \Lambda_{t,r} \leq \Lambda_{t-1,r} + O(\sqrt{t/n}) \cdot \Lambda_{t-1,r-t+1},\tag{2}\] where the factor \(O(\sqrt{t/n}) = O(\sqrt{tn/n^2})\) arises as the square root of the probability that a randomly chosen edge is incident to one of the at most \(t-1\) edges that can be recorded after the \((t-1)\)-th query; the subscript \(r-t+1 = r - (t-1)\) arises from the possibility of the new edge recorded at the \(t\)-th query contributing \(t-1\) additional wedges. However, solving 2 leads to a trivial lower bound for triangle finding that does not even beat the \(\Omega(m^{2/3})\) lower bound it inherits from element distinctness.
The main problem with 2 is the subscript \(r-t+1\) on the second term on the right-hand side. However, the event it corresponds to seems unlikely to happen when the input is a sparse graph and \(t\) is large: if the new edge contributes \(t-1\) additional wedges, it must be incident to a degree-\(\Omega(t)\) vertex recorded by the quantum query algorithm. Now, our input is a random sparse graph whose maximum degree is at most \(O(\log(n)/\log\log(n)) \leq O(\log(n))\) with high probability, independent of \(t\). Does this property also hold for the internal memory of the quantum query algorithm doing the recording? Our first technical contribution, the Mirroring Lemma (5), answers this question affirmatively. This lemma allows us to transfer, or mirror, properties of the initial input distribution onto the internal memory of the quantum algorithm, independently of the value of \(t\). Directly using this technique allows us to improve 2 to \[\label{eq:intermediate95recurrence} \Lambda_{t,r} \leq \Lambda_{t-1,r} + O(\sqrt{t/n}) \cdot \Lambda_{t-1,r-O(\log^2(n))} + \varepsilon,\tag{3}\] where \(\varepsilon>0\) is a small number corresponding to the tail probability of the input graph having a vertex of degree \(\Omega(\log(n))\).
Unfortunately, 3 still does not yield the desired result: to see this, note that the solution to a similar recurrence \(A_{t,r} = A_{t-1,r} + p A_{t-1,r-1} + \varepsilon\) (with \(p,\varepsilon\in [0,1]\) and boundary conditions \(A_{0,0} = 1\) and \(A_{0,r} = 0\) for all \(r>0\)) is \(A_{t,r} = \binom{t}{r}p^r + \varepsilon(1 + (1+p) + \dots + (1+p)^{t-1})\). Even for an exponentially small \(\varepsilon\), the term \(\varepsilon(1+p)^{t-1}\) blows up for large \(t\). Our second technical contribution, the Exclusion Lemma (2), allows us to overcome this problem. To employ this lemma, we introduce a new progress quantity called \(\Lambda_{t,r}'\) that is defined like \(\Lambda_{t,r}\) except we additionally require the quantum query algorithm to not have recorded a degree-\(\Omega(\log(n))\) vertex at any point before the \(t\)-th query. By definition, \(\Lambda_{t,r}'\) satisfies recurrence 3 with \(\varepsilon\) set to \(0\), that is, \[\label{eq:final95recurrence} \Lambda_{t,r}' \leq \Lambda_{t-1,r}' + O(\sqrt{t/n}) \cdot \Lambda_{t-1,r-O(\log^2(n))}'.\tag{4}\] The Exclusion Lemma allows us to upper bound \(\Lambda_{t,r}\) by \(\Lambda_{t,r}' + O(t \varepsilon)\), where the second term no longer blows up for large \(t\) and is easy to make negligible. Therefore, solving 4 first for \(\Lambda_{t,r}'\) and then using \(\Lambda_{t,r} \leq \Lambda_{t,r}' + O(t \varepsilon)\) yields the claimed result of step (i).
We prove our upper bound on triangle finding (3) by adapting Belovs’s learning graph algorithm for \(3\)-distinctness from [3]. Formally, a “learning graph algorithm” is a directed acyclic graph that encapsulates a solution to a semi-definite program that characterizes quantum query complexity [18], [41]. Our main adaptation of Belovs’s algorithm pertains to its handling of so-called faults in [3].
The notion of a fault is easier to explain in Jeffery and Zur’s interpretation of Belovs’s algorithm as a quantum walk [42].14 The following explanation is based on [42]. The quantum walk first creates a uniform superposition over subsets \(R_1\) of indices of some size \(r_1\), and queries all \(r_1\) indices. Then, for each \(R_1\) in the superposition, the algorithm creates a uniform superposition over all subsets \(R_2\) (disjoint from \(R_1\)) of indices of some size \(r_2\). But rather than querying every index in \(R_2\), the algorithm only queries those \(i_2 \in R_2\) that have a match in \(R_1\), i.e., \(x_{i_2} = x_{i_1}\) for some \(i_1\in R_1\), where \(x\) is the input. This significantly reduces query complexity by exploiting the structure of \(3\)-distinctness: any two unequal symbols could not be part of a \(1\)-certificate. Unfortunately, it also leads to the aforementioned faults. The issue is that when performing the update step of the quantum walk by adding a new index \(j_1\) to \(R_1\), we cannot afford the queries needed to update a corresponding \(R_2\) by searching for a \(j_2 \in R_2\) such that \(x_{j_2} = x_{j_1}\) because \(R_2\) was not fully queried. But if we do not search and there does exist \(j_2\in R_2\) with \(x_{j_2} = x_{j_1}\), then the set of queried indices in \(R_2\) becomes incorrect, introducing a fault.
In our setting, there can be more faults because “matching” in our case naturally needs to be redefined to mean: \(i_2\in R_2\) matches with \(i_1\in R_1\) if and only if \(x_{i_2}\) (which is an edge in our case) is incident to \(x_{i_1}\). In particular, \(i_2\) could match \(i_1\) even if \(x_{i_2} \neq x_{i_1}\). However, the number of faults introduced is bounded above by using the maximum degree \(d\) of the input, which for a random sparse graph satisfies \(d\leq O(\log(n)/\log\log(n))\). Then we adapt the “error-correcting” technique of [3] to correct \(O(d)\) faults by paying a multiplicative factor of \(2^{O(d)} = n^{o(1)}\) on the quantum query complexity, which leads to the theorem. Along the way, we construct a learning graph algorithm that may be easier to understand than that in [3]; for example, our algorithm genuinely corresponds to a graph, unlike that in [3].
We prove our lower and upper bounds on \(k\)-cycle finding by generalizing our proofs in the \(k=3\) (triangle) case.15 Here is a sketch of how this works.
To prove the lower bound, we consider a uniformly random length-\(m\) edge list on \(n\) vertices such that \(n=\Theta(m)\). Our proof proceeds in \((k-1)\) steps. We use the Mirroring Lemma in the first step for the same reason it was used in the triangle case. On the other hand, the role of the Exclusion Lemma is expanded “by a factor of order \(k\)” as it serves to “glue” together the \((k-1)\) steps. For \(i\in \{1,\dots,k-2\}\), we show in the \(i\)-th step that it is hard for a \(t\)-query algorithm to record much more than \(r_{i+1}(t)\) length-\((i+1)\) paths without having recorded at least \(r_{j}(t)\) length-\(j\) paths for some \(1\leq j \leq i\). Here, the \(r_l(t)\)s are certain positive integers essentially defined by the relation \(r_l(t) = t\sqrt{r_{l-1}(t)/n}\) and boundary condition \(r_1(t) = t+1\). The term \(\sqrt{r_{l-1}(t)/n}\) corresponds to the square root of the probability that a single uniformly random edge \(e\) extends one of the \(r_{l-1}(t)\) length-\((l-1)\) paths to a length-\(l\) path. (Note that the precise expression of this probability is \(r_{l-1}(t)\cdot 2(n-l)/(n(n-1)/2)\), which is \(\Theta(r_{l-1}(t)/n)\).) One technical challenge here (that was not present in the triangle case) is the need to account for the scenario of edge \(e\) creating a length-\(l\) path by joining together a length-\(a\) path with a length-\(b\) path such that \(a,b\) are non-negative integers and \(a+b+1 = l\) but neither \(a\) nor \(b\) equals \(0\). However, we find that this scenario can be neglected as its effect is dominated by that of the extension scenario, i.e., the scenario where \(a\) or \(b\) is \(0\). After concluding the first \((k-2)\) steps, we show in the \((k-1)\)-th step that it is hard for a \(t\)-query algorithm to record a \(k\)-cycle without having recorded at least \(r_{k-1}(t)\) length-\((k-1)\) paths. Finally, we use the Exclusion Lemma \((k-1)\) times to glue together the results of all steps and show that it is hard for a few-query algorithm to record a \(k\)-cycle.
On the upper bound side, our algorithm for \(k\)-cycle remains an adaptation of Belovs’s algorithm for \(k\)-distinctness. The adaptation again pertains to the handling of faults due to a natural redefinition of what matching means. By the degree bound, the maximum number of faults that can occur is fewer than \(2d\) where \(d\) is the maximum degree of the input edge list. We again adapt Belovs’s error correcting technique to handle them by paying a multiplicative factor of \(2^{O(dk)}\), which is \(m^{o(1)}\) when \(d\leq O(\log(m)/\log\log(m))\).
Interestingly, the exact same \(r_{l}(t)\)s mentioned in the lower bound overview play a “dual” role in both Belovs’s learning graph algorithm for \(k\)-distinctness and our adaptation of it to \(k\)-cycle: given \(t\) queries, the learning graph can be thought of as “recording” \(r_j(t)\) number of \(j\)-collisions (in the case of \(k\)-distinctness) or length-\(j\) paths (in the case of \(k\)-cycle) at the \(j\)-th step, or “stage” as Belovs calls it. Therefore, our lower bound can be interpreted as saying that the learning graph algorithm for \(k\)-cycle is tight at every stage.
\(\mathbb{N}\) denotes the set of positive integers. Notation such as \(\mathbb{Z}_{\geq 0}\) denotes the set of non-negative integers, \(\mathbb{R}_{>0}\) denotes the set of positive reals, for \(a\geq 0\), \(\mathbb{Z}_{[0,a]}\) denotes the set \(\mathbb{Z}\cap[0,a]\), and so on. For \(n\in \mathbb{N}\), \([n]\) denotes the set \(\{1,\dots,n\}\). For two complex square matrices \(X,Y\) of the same dimension, we write \(X\leq Y\) to mean \(Y-X\) is positive semidefinite, and \(X\geq Y\) to mean \(X-Y\) is positive semidefinite. We use \(\mathop{\mathrm{\mathbb{I}}}\) to denote an identity matrix of a context-appropriate dimension.
An alphabet is a finite non-empty set. For an alphabet \(A\) and \(k\in \mathbb{Z}_{\geq 0}\), \(\binom{A}{k}\) denotes the set of all size-\(k\) subsets of \(A\). For \(n\in \mathbb{N}\) and \(\gamma \geq 0\), we write \(\binom{n}{<\gamma}\) for the sum \(\sum_{i \in \{0,1,\dots, n\} \cap [0,\gamma)} \binom{n}{i}\). Given two disjoint sets \(A,B\), we sometimes write \(A\dot{\cup}B\) for their union, where the dot emphasizes that \(A\) and \(B\) are disjoint. (If we write \(A\cup B\) instead, \(A\) and \(B\) could still be disjoint.) For an alphabet \(\Sigma\), we write \(x\leftarrow \Sigma\) for sampling \(x\) uniformly at random from \(\Sigma\). For \(x\in \Sigma^n\) and \(a,b\in \mathbb{N}\), \(x[a\mathop{\mathrm{..}}b]\) denotes the substring of \(x\) from index \(a\) to \(b\) inclusive; if \(b<a\), then this denotes the empty string. For \(k, n\in \mathbb{N}\) with \(k\geq 3\), we say \(\{u_1,v_1\}, \dots, \{u_k,v_k\} \in \binom{[n]}{2}\) form a \(k\)-cycle if there exists distinct \(w_1,\dots,w_k\in [n]\) such that \(\{u_1,v_1\} = \{w_1,w_2\}\), \(\dots\), \(\{u_{k-1},v_{k-1}\} = \{w_{k-1},w_k\}\), and \(\{u_k,v_k\} = \{w_k,w_1\}\). For \(k,n,m\in \mathbb{N}\) with \(k\geq 3\), we say \(x\in \binom{[n]}{2}^m\) contains a \(k\)-cycle if there exist distinct \(i_1,\dots,i_k \in [m]\) such that \(x_{i_1},\dots,x_{i_k}\) form a \(k\)-cycle. The word “triangle” formally refers to a \(3\)-cycle.
For an alphabet \(U\), we denote the symmetric group acting on \(U\) by \(\mathfrak S_U\). For \(n\in \mathbb{N}\), we also use \(\mathfrak S_n\) to denote the symmetric group acting on \([n]\). We say a function \(f\colon E \subseteq \Sigma^n \to \{0,1\}\) is symmetric if \(x_1,\dots,x_n \in E \implies x_{\sigma(1)},\dots, x_{\sigma(n)} \in E\) and \(f(x_1,\dots,x_n) = f(x_{\sigma(1)},\dots, x_{\sigma(n)})\) for all \(x\in \Sigma^n\) and for all permutations \(\sigma \in \mathfrak S_n\). Note that we do not require a symmetric \(f\) to be invariant under permutations of the alphabet \(\Sigma\).
The abbreviation “wlog” stands for “without loss of generality”; “s.t.” stands for “such that”; “with high probability” stands for “with probability at least \(1-10^{-10}\)” unless stated otherwise. The symbol \(\log\) stands for the base-\(2\) logarithm.
For a function \(f\colon D \subseteq \Sigma^n \to \Gamma\), where \(D,\Sigma,\Gamma\) are alphabets and \(n\in \mathbb{N}\), and \(\varepsilon\in (0,1/2)\), we write \(Q_\varepsilon(f)\) and \(R_\varepsilon(f)\) for the quantum and randomized query complexities for \(f\) with two-sided failure probability at most \(\varepsilon\), respectively. We write \(Q(f)\) and \(R(f)\) for \(Q_{1/3}(f)\) and \(R_{1/3}(f)\), respectively.
For \(m,d,n,s,k\in \mathbb{N}\), \(u,v\in [n]\) with \(u\neq v\), \(G\) a finite abelian group with identity element \(0\), we define the following functions of interest in this work.
\(k\mathsf{\text{-}DIST}_m\colon [s]^m \to \{0,1\}\) denotes the \(k\)-distinctness function which is defined by \(k\mathsf{\text{-}DIST}_m(x) = 1\) if and only if there exist \(k\) distinct indices \(1\leq i_1<i_2<\dots<i_k \leq m\) such that \(x_{i_1} = x_{i_2} = \dots = x_{i_k}\). We also write \(\mathop{\mathrm{\mathrm{ED}}}_m\) for \(2\mathsf{\text{-}DIST}_m\), commonly known as the element distinctness function.
\(k\mathsf{\text{-}SUM}_m\colon G^m \to \{0,1\}\) denotes the \(k\)-sum function which is defined by \(k\mathsf{\text{-}SUM}_m(x) = 1\) if and only if there exist \(k\) distinct indices \(1\leq i_1<i_2<\dots<i_k \leq m\) such that \(x_{i_1} + x_{i_2} + \dots + x_{i_k} = 0\).
\(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{u,v\}}_m \colon D\subseteq \binom{[n]}{2}^m \to \{0,1\}\) denotes the triangle edge function which is defined by \(x\in D\) if and only if \(x_i\neq x_j\) for all \(i\neq j\), and \(\mathop{\mathrm{\mathsf{TriangleEdge}}}_m^{\{u,v\}}(x) = 1\) if and only if there exist distinct \(i,j\in [m]\) such that \(x_i\), \(x_j\) and \(\{u,v\}\) form a triangle.
\(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{u,v\}}_{m,d} \colon D_d\subseteq \binom{[n]}{2}^m \to \{0,1\}\) is the restriction of \(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{u,v\}}_m\) such that \(x \in D_d\) if and only if \(x_i\neq x_j\) for all \(i\neq j\) and \(\mathopen{}\mathclose{\left|\{i\in [m] \mid \mathopen{}\mathclose{\left|x_i \cap \{u,v\}}\right| = 1\}}\right| = d\).
\(\mathop{\mathrm{\mathsf{TriangleVertex}}}^{u}_m \colon \binom{[n]}{2}^m \to \{0,1\}\) denotes the triangle vertex function which is defined by \(\mathop{\mathrm{\mathsf{TriangleVertex}}}^{u}_m(x) = 1\) if and only if there exist distinct \(i,j,k\in [m]\) such that \(x_i\), \(x_j\) and \(x_k\) form a triangle containing vertex \(u\).
\(\mathop{\mathrm{\mathsf{TriangleVertex}}}^{u}_{m,d} \colon D_d\subseteq \binom{[n]}{2}^m \to \{0,1\}\) is the restriction of \(\mathop{\mathrm{\mathsf{TriangleVertex}}}^{u}_{m,d}\) such that \(x\in D_d\) if and only if \(\mathopen{}\mathclose{\left|\{i\in [m] \mid \mathopen{}\mathclose{\left|x_i \cap \{u\}}\right| = 1\}}\right| \leq d\).
\(k\mathsf{\text{-}CYCLE}_m \colon \binom{[n]}{2}^m \to \{0,1\}\) denotes the \(k\)-cycle function which is defined by \(k\mathsf{\text{-}CYCLE}_m(x) = 1\) if and only if there exist \(k\) distinct indices \(1\leq i_1<i_2<\dots<i_k \leq m\) such that \(x_{i_1}, \dots, x_{i_k}\) form a \(k\)-cycle. We also write \(\mathop{\mathrm{\mathsf{Triangle}}}_m\) for \(3\mathsf{\text{-}CYCLE}_m\).
\(k\mathsf{\text{-}CYCLE}_{m,d} \colon D_d \subseteq \binom{[n]}{2}^m \to \{0,1\}\) denotes the restriction of \(k\mathsf{\text{-}CYCLE}_m\) such that \(x\in D_{d}\) if and only if for all \(u\in [n]\), \(\mathopen{}\mathclose{\left|\{i\in [m] \mid \mathopen{}\mathclose{\left|x_i \cap \{u\}}\right| = 1\}}\right| \leq d\). (That is, the maximum degree of the graph represented by \(x\) is at most \(d\).) We also write \(\mathop{\mathrm{\mathsf{Triangle}}}_{m,d}\) for \(3\mathsf{\text{-}CYCLE}_{m,d}\).
For \(\mathop{\mathrm{\mathsf{TriangleEdge}}}_m^{\{u,v\}}\), \(\mathop{\mathrm{\mathsf{TriangleEdge}}}_{m,d}^{\{u,v\}}\), \(\mathop{\mathrm{\mathsf{TriangleVertex}}}_{m}^{u}\), and \(\mathop{\mathrm{\mathsf{TriangleVertex}}}_{m,d}^{u}\), we refer to their superscripts as their target edge and target vertex respectively. We will often omit these superscripts since the (quantum) query complexity of these problems does not depend on them.
We note that the definitions of \(\mathop{\mathrm{\mathsf{TriangleEdge}}}_m\) and \(\mathop{\mathrm{\mathsf{TriangleEdge}}}_{m,d}\) appear more restrictive than that of the other triangle problems: the input cannot have duplicate edges and the number of input edges incident (but not equal) to the target edge is exactly \(d\). These restrictions allow us to more directly relate them to the hiding transform of element distinctness.
Let \(k\in \mathbb{N}_{\geq 3}\) be a constant. We construct a search algorithm for finding a \(k\)-cycle in a length-\(m\) edge list, or deciding that none exists, that is correct with high probability using \(O(\log^2(m))\) calls to a bounded error decision algorithm for \(k\mathsf{\text{-}CYCLE}_m\). The details are as follows.
Using standard probability amplification techniques, we reduce the error of the bounded-error \(k\mathsf{\text{-}CYCLE}_m\) algorithm to \(O(1/m)\) by repeating it \(O(\log (m))\) times and taking the majority vote.
Given that each positive instance of \(k\mathsf{\text{-}CYCLE}_m\) contains a size-\(k\) certificate, we can divide the input into \(k+1\) parts. Among these, there exist \(k\) parts that together contain the certificate. Identifying these \(k\) parts requires \(\binom{k}{k-1}=O(1)\) calls to the \(k\mathsf{\text{-}CYCLE}_m\) algorithm, and in each call, we pad the input with a disjoint cycle-free graph to maintain the input size. By doing this, we reduce the search range by a factor of \(k/(k+1)\). Repeating this process \(O(\log(m))\) times shrinks the search range to \(O(1)\), at which point the certificate can be directly identified. By applying the union bound over all calls, the probability of any error occurring remains at most \(O(\log(m)/m)\), thus ensuring correctness with high probability.
In the other direction, a search algorithm can be directly used as a decision algorithm. Therefore, we typically do not distinguish between the search and decision versions of the \(k\)-cycle problem.
Technically, all of the above functions should also be parametrized by their input alphabet size, especially since their (quantum) query complexity can strictly increase as a function of this size.16 In this work, we often omit this parametrization under the convention that the input alphabet size is sufficiently large. For example, consider \(\mathop{\mathrm{\mathrm{ED}}}_m\colon [s] \to \{0,1\}\) as defined above. We write \(Q(\mathop{\mathrm{\mathrm{ED}}}_m) = \Omega(m^{2/3})\) to mean: for all sufficiently large \(s\in \mathbb{N}\), \(Q(\mathop{\mathrm{\mathrm{ED}}}_m) = \Omega(m^{2/3})\). We write \(Q(\mathop{\mathrm{\mathrm{ED}}}_m) = O(m^{2/3})\) to mean: for all \(s\in \mathbb{N}\), \(Q(\mathop{\mathrm{\mathrm{ED}}}_m) = O(m^{2/3})\). Note that we do not need “sufficiently large” \(s\) here since the (quantum) query complexity is always non-decreasing with respect to \(s\). We write \(Q(\mathop{\mathrm{\mathrm{ED}}}_m) = \Theta(m^{2/3})\) to mean: \(Q(\mathop{\mathrm{\mathrm{ED}}}_m) = O(m^{2/3})\) and \(Q(\mathop{\mathrm{\mathrm{ED}}}_m) = \Omega(m^{2/3})\) in the aforementioned senses.
As discussed in the introduction, \(\mathop{\mathrm{\mathsf{TriangleEdge}}}\) can be seen as an instantiation of the general hiding phenomenon. We recall the formal definition of hiding from the introduction, 1.
Let \(a,b\) be integers with \(b\geq a\geq 1\). Let \(\widetilde{D},\Sigma\) be finite non-empty sets with \(\widetilde{D}\subseteq \Sigma^a\). For \(f\colon \widetilde{D}\to \{0,1\}\), the hiding transform of \(f\) is defined to be \[\mathop{\mathrm{\mathsf{HIDE}}}_b[f] \colon D \subseteq (\Sigma \cup \{*\})^b \to \{0,1\},\] where \(*\) is a symbol outside of \(\Sigma\), the set \(D\) consists of all strings \(y \in (\Sigma \cup \{*\})^b\) with exactly \(a\) non-\(*\) symbols such that the length-\(a\) subsequence17 \(\tilde{y}\) formed by those non-\(*\) symbols is an element of \(\widetilde{D}\), and \(\mathop{\mathrm{\mathsf{HIDE}}}_b[f](y)\) is defined to be \(f(\tilde{y})\).
By hiding the input in a more structured way, one can get a composition-like problem, for which it is easier to show lower bounds.
Definition 5 (pSearch [31]). Let \(m\in \mathbb{N}\) and \(\Sigma\) an alphabet. The \(\mathrm{pSearch}_m\) function is defined by \(\mathrm{pSearch}_m \colon D\subseteq (\{*\}\dot{\cup} \Sigma)^m \to \Sigma\), where \(D\) contains all length-\(m\) strings in \((\{*\}\dot{\cup} \Sigma)^m\) with exactly one non-\(*\) symbol and \(\mathrm{pSearch}(x)\) outputs the non-\(*\) symbol in \(x \in D\).
Theorem 6 ([31]). Let \(n,m\in\mathbb{N}\) and \(f\colon \Sigma^n \to \{0,1\}\). Then \[Q(f\circ \mathrm{pSearch}_m) = \Omega(\sqrt{m}\cdot Q(f)).\]
We begin with a general result on hiding.
Proposition 7. Let \(m,n\in \mathbb{N}\) with \(m\geq n\) and \(f\colon \Sigma^n \to \{0,1\}\). Then \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) \geq \Omega(\sqrt{m/n} \cdot Q(f))\). Moreover, if \(\Sigma = \{0,1\}\) and \(f\) is symmetric, then \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) \leq \widetilde{O}(\sqrt{m/n} \cdot Q(f))\).
Proof. For the lower bound, we observe that \(f\circ \mathrm{pSearch}_{m/n}\) is a subfunction of \(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]\). Therefore, by 6, \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) \geq \Omega(\sqrt{m/n}\cdot Q(f))\).
Consider the “moreover” part. From [32], we have \(Q(f) = \Theta(\sqrt{n(n- \Gamma(f))})\), where \(\Gamma(f) \mathrel{\vcenter{:}}= \min\{\mathopen{}\mathclose{\left|2k-n+1}\right|\mid f_k \neq f_{k+1}\}\) and \(f_k \mathrel{\vcenter{:}}= f(x)\) for all \(x\) such that \(\mathopen{}\mathclose{\left|x}\right| = k\) as \(f\) is symmetric. Observe that \(f_k\) must be constant for all \(k\in \{\ceil{(n-\Gamma(f))/2},\dots, \ceil{(n+\Gamma(f)-2)/2}\}\). Call this constant \(b\in \{0,1\}\). We also write \(A \mathrel{\vcenter{:}}= \ceil{(n-\Gamma(f))/2}\) and \(B\mathrel{\vcenter{:}}= \ceil{(n+\Gamma(f)-2)/2}\) for convenience.
We consider the following quantum algorithm for \(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]\).
The quantum query complexity of this algorithm, accounting for error suppression, is \[\widetilde{O}(\sqrt{mA} + \sqrt{m(n-B})) = \widetilde{O}(\sqrt{m/n}\cdot \sqrt{nA}) = \widetilde{O}(\sqrt{m/n}\cdot Q(f)),\] using the basic fact that collecting (up to) \(\alpha\) marked items from a list of \(\beta\) items costs \(\widetilde{O}(\sqrt{\alpha \beta})\) quantum queries by Grover search [43].
Correctness can be seen as follows. If \(\mathopen{}\mathclose{\left|y}\right|<A\), the first part of the algorithm determines \(\mathopen{}\mathclose{\left|y}\right|\) exactly and outputs accordingly. Otherwise, \(\mathopen{}\mathclose{\left|y}\right|\geq A\) and the algorithm continues. Then, if \(\mathopen{}\mathclose{\left|y}\right|>B\), so that \(y\) contains fewer than \((n-B)\) \(0\)s, the second part of the algorithm determines \(\mathopen{}\mathclose{\left|y}\right|\) exactly and outputs accordingly. Otherwise, \(A\leq \mathopen{}\mathclose{\left|y}\right|\leq B\), so \(\mathop{\mathrm{\mathsf{HIDE}}}_m[f](y) = b\). ◻
Remark 8. The “moreover” part of 7 is false if \(f\) is not symmetric. For example, if \(f(x) = x_1\), then it is not hard to see that \(Q(g) = \Omega(\sqrt{m-n})\), which is not \(O(\sqrt{m/n})\).
Now, \(\mathop{\mathrm{\mathsf{TriangleEdge}}}\) can be seen as the hiding transform of the element distinctness function. Intuitively, having no triangle that contains the target edge \(\{u,v\}\) is equivalent to the neighbors of \(u\) and the neighbors of \(v\) being distinct.
Theorem 9. For \(m,d\in \mathbb{N}\) with \(m\geq d\), \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d]) = \widetilde{\Theta}(\sqrt{m}\cdot d^{1/6})\).
Proof. Since \(Q(\mathop{\mathrm{\mathrm{ED}}}_d) = \Omega(d^{2/3})\), the lower bound \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}]) = \Omega(\sqrt{m}\cdot d^{1/6})\) follows directly from the lower bound in 7. The upper bound, however, does not follow from the upper bound in 7 since that is only stated for \(\Sigma = \{0,1\}\). We can nonetheless prove the upper bound by a different argument as follows.
Assume \(d\) is not a constant as otherwise, we can decide the problem by using Grover’s algorithm to find all non-\(\ast\) symbols in \(O(\sqrt{m})\) queries. Also, we can assume \(r\mathrel{\vcenter{:}}= m/d\) is an integer, or we can work with the least integer \(m'>m\) such that \(m'/d\) is an integer since \(m'\leq m+d \leq 2m\). We proceed to describe a quantum algorithm for \(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d]\).
Given an input \(\tilde{x} \in (\Sigma\cup\{*\})^m\) to \(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d]\), we first apply a uniformly random permutation to \(\tilde{x}\). Let \(x\) denote the resulting string. For \(b\in [d]\), let \(x^{(b)} \mathrel{\vcenter{:}}= x[(b-1)r+1\mathop{\mathrm{..}}br] \in (\Sigma\cup\{*\})^r\). A standard probability argument, such as that used to bound the maximum load in a balls-into-bins experiment [44], yields \[\label{eq:block95form95whp} \Pr[\text{\forall b \in [d], x^{(b)} contains at most \log(d) non-* symbols}]\geq 1 - O(1/d),\tag{5}\] where the probability is over the random permutation. We continue assuming the event in 5 occurs.
For each given \(b\in [d]\), we can Grover search for all of the non-\(*\) symbols in \(x^{(b)}\) using \(O(\sqrt{r\log(d)})\) queries [43] and output a string of length \(\ceil{\log(d)}\), such that its first symbols are the non-\(*\) symbols in \(x^{(b)}\) and the rest are \(*\)s. Therefore, we can instantiate one query to a string \(y\) of length \(d \cdot \ceil{\log(d)}\) containing \(*\)s and precisely the same non-\(*\) symbols as \(x\) using \(O(\sqrt{r\log(d)})\) queries to \(x\).
Now, we run the optimal quantum algorithm for element distinctness on \(y\) while mapping \(y_i\) to some symbol \(\bot_i\) outside of \(\Sigma\cup \{*\}\) if \(y_i=*\). (The \(\bot_i\)s are distinct for distinct \(i\)s.) This allows us to compute \(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d]\) with \(O(\sqrt{r\log(d)}\cdot (d\log(d))^{2/3}) = \widetilde{O}(\sqrt{m}\cdot d^{1/6})\) queries to the original input \(x\), as required. ◻
Remark 10.
Another way of showing the upper bound in 9 is by a quantum walk that is amplified to the non-\(*\) part of the input \(x\) using \(\widetilde{O}(\sqrt{m/d})\) overhead, cf. proof of 14.
A benefit of the upper bound approach described in 9 is that it does not rely on the implementation details of the optimal quantum algorithm for element distinctness but rather only the structure of the problem. More specifically, this structure is used in the line “mapping \(y_i\) to some symbol \(\bot_i\) outside of \(\Sigma\cup \{*\}\) if \(y_i=*\)”. In particular, the same argument would also show that, for every constant integer \(k\geq 2\), \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[k\mathsf{\text{-}DIST}_d]) \leq \widetilde{O}(\sqrt{m/d} \cdot Q(k\mathsf{\text{-}DIST}_d))\) because \(k\mathsf{\text{-}DIST}_d\) has that same structure. Informally, using the same argument as in 1, this implies that the problem of deciding whether a length-\(m\) edge list contains a \((k+1)\)-clique that completes a target \(k\)-clique with \(d\) neighbor has quantum query complexity \(\widetilde{O}(\sqrt{m/d} \cdot Q(k\mathsf{\text{-}DIST}_d))\).
We now formally show that \(\mathop{\mathrm{\mathsf{TriangleEdge}}}_{m,d}\) has the same quantum query complexity as \(\mathop{\mathrm{\mathsf{HIDE}}}_m(\mathop{\mathrm{\mathrm{ED}}}_d)\) by reducing these problems to each other. Our reduction also works in non-quantum query models.
Corollary 1. For \(m,d\in \mathbb{N}\) with \(m\geq d\), \(Q(\mathop{\mathrm{\mathsf{TriangleEdge}}}_{m,d}) = \widetilde{\Theta}(\sqrt{m}d^{1/6})\).
Proof. Let \(x \in \binom{[n]}{2}^m\) be in the domain of \(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{1,2\}}_{m,d}\). Let \(\mathop{\mathrm{\mathrm{ED}}}_d \colon [n]^d \to \{0,1\}\). We can compute \(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{1,2\}}_{m,d}(x)\) by computing \(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d](\tilde{x})\), where for each \(i\in [m]\), \(\tilde{x}_i\) is defined from \(x_i \mathrel{\vcenter{:}}= \{u,v\}\) by \[\tilde{x}_i \mathrel{\vcenter{:}}= \begin{cases} * &\text{if \{u,v\} \cap \{1,2\} = \varnothing or \{u,v\} = \{1,2\}}, \\ v &\text{if u = 1 and v \neq 2}, \\ u &\text{if u \neq 1 and v = 2}, \end{cases}\] Observe that the mapping from \(x_i\) to \(\tilde{x}_i\) can be performed on the fly. Therefore \(Q(\mathop{\mathrm{\mathsf{TriangleEdge}}}_{m,d}) \leq O(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d])) \leq \widetilde{O}(\sqrt{m} d^{1/6})\) by 9.
Conversely, let \(\tilde{x}\in ([s]\cup \{*\})^m\) be in the domain of \(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d']\), where \(\mathop{\mathrm{\mathrm{ED}}}_d'\) is \(\mathop{\mathrm{\mathrm{ED}}}_d\) but restricted to inputs containing at most a single collision pair (i.e., two symbols that are the same). Assume that \(s\geq m\).18 Let \(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{s+1,s+2\}}_{m,d} \colon \binom{[s+2]}{2}^{m} \to \{0,1\}\). Then we can compute \(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d'](\tilde{x})\) by computing \(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{s+1,s+2\}}_{m,d}(x)\), where for each \(i\in [m]\), \(x_i\) is defined by \[x_i \mathrel{\vcenter{:}}= \begin{cases} \{s+1,\tilde{x}_i\} \text{ or } \{s+2,\tilde{x}_i\} &\text{if \tilde{x}_i \in [s]}, \\ \{1,i\} &\text{if \tilde{x}_i= *}, \end{cases}\] where the choice of “or” in the first case is made uniformly at random. (Note that we consider \(\mathop{\mathrm{\mathrm{ED}}}_d'\) instead of \(\mathop{\mathrm{\mathrm{ED}}}_d\) and assume \(s\geq m\) so that the \(x\) defined above is in the domain of \(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{s+1,s+2\}}_{m,d}\) for some choices of “or”.)
If \(\tilde{x}\) contains a collision pair, then with probability at least \(1/2\), \(x\) will be a yes-instance of \(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{s+1,s+2\}}_{m,d}\). On the other hand, if \(\tilde{x}\) does not contain any collision pairs, \(x\) will be a no-instance of \(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{s+1,s+2\}}_{m,d}\). Therefore, by repeating the above reduction a constant number of times, we can distinguish between these cases with high probability. Therefore \(Q(\mathop{\mathrm{\mathsf{TriangleEdge}}}^{\{s+1,s+2\}}_{m,d}) \geq \Omega(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[\mathop{\mathrm{\mathrm{ED}}}_d'])) =\Omega(\sqrt{m/d} \cdot Q(\mathop{\mathrm{\mathrm{ED}}}_d')) = \Omega(\sqrt{m}d^{1/6})\) by 7 since \(Q(\mathop{\mathrm{\mathrm{ED}}}_d') = \Omega(d^{2/3})\).19 ◻
Remark 11. The quantum query complexity of the analogue of the \(\mathop{\mathrm{\mathsf{TriangleEdge}}}\) for \(3\mathsf{\text{-}DIST}_m\) is \(\Theta(\sqrt{m})\) and for \(3\mathsf{\text{-}SUM}_m\) is \(\Theta(m^{2/3})\). By analogue, we mean detecting whether the input contains a full certificate given one position of the certificate. So we see that the quantum query complexity of \(\mathop{\mathrm{\mathsf{TriangleEdge}}}\) lies between that of these analogues.
The results of this section naturally raise the following conjecture.
Conjecture 12. Let \(m,n\in \mathbb{N}\) with \(m\geq n\). For every symmetric \(f\colon \Sigma^n \to \{0,1\}\), \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) \leq O(\sqrt{m/n} \cdot Q(f))\).
We proved this conjecture (up to logarithmic factors) when the domain of \(f\) is Boolean using the structure of the optimal quantum query algorithm for such \(f\). On the other hand, we proved this conjecture when \(f=\mathop{\mathrm{\mathrm{ED}}}_d\) using the structure of the function itself. We believe that attacking this conjecture for arbitrary \(f\) would yield further insights into the structure of symmetric functions and their optimal quantum query algorithms.
Towards the above conjecture, we show the following proposition.
Proposition 13. Let \(m,n\in \mathbb{N}\) with \(m\geq n\). For every symmetric \(f\colon \Sigma^n \to \{0,1\}\), \(R(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) \leq O(\frac{m}{n}\cdot R(f))\). Moreover, \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) \leq O(\sqrt{m/n}\cdot Q(f)^3 \cdot \log^{3/2}(n))\).
Proof. Write \(k \mathrel{\vcenter{:}}= R_{1/100}(f) \geq 1\). Since \(f\) is symmetric, [33] applies and shows that there exists a variable oblivious, uniform \(k\)-query randomized algorithm for computing \(f\) with bounded error \(1/100\) of the following form.
Let \(K \mathrel{\vcenter{:}}= \frac{m}{n}\cdot 100k\) and consider the following \(K\)-query randomized algorithm for computing \(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]\):
This algorithm behaves exactly the same as the previous algorithm provided we reach the third step. The expected number of non-\(*\) symbols in \(Y\) is \(100k\). By the Paley-Zygmund inequality, the probability of \(Y\) containing at least \(k\) non-\(*\) symbols is at least \((1-1/100)^2 K^2/(K+K^2) \geq 0.97\) since \(K\geq 100\). Therefore, we reach the third step with probability at least \(0.97\). Therefore the algorithm is correct with probability at least \(0.97(1-1/100)\geq 2/3\). Hence \(R(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) \leq O(\frac{m}{n}\cdot R(f))\).
For the “moreover” part, by the same permutation argument as in the proof of the upper bound in 9, it follows that \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) \leq O(\sqrt{(m/n)\cdot \log(n)} \cdot Q(\mathop{\mathrm{\mathsf{HIDE}}}_{\ceil{n\log(n)}}[f]))\). Therefore, it suffices to show that \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_{\ceil{n\log(n)}}[f]) \leq O(Q(f)^3 \cdot \log(n))\). But this is true since \[Q(\mathop{\mathrm{\mathsf{HIDE}}}_{\ceil{n\log(n)}}[f]) \leq R(\mathop{\mathrm{\mathsf{HIDE}}}_{\ceil{n\log(n)}}[f]) \leq O(\log(n)\cdot R(f)) \leq O(\log(n) \cdot Q(f)^3),\] where the first inequality uses \(Q(\cdot) \leq R(\cdot)\), the second inequality uses the first part of this proposition, and the third inequality uses the result of [35] for symmetric functions \(f\). ◻
In this section, we consider the \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\) problem of deciding whether an input edge list of length \(m\) has a triangle containing a target vertex of degree \(d \leq m\).
We take this opportunity to study the shuffling transformation as well. As mentioned in the introduction, the edge list itself can be viewed as a shuffled adjacency list. In \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\), there is an additional “block-wise” notion of shuffling, where the blocks consist of edges incident and not incident to the target vertex, respectively. This latter notion motivates our definition of shuffled direct sum.
We first build intuition by directly working out some upper and lower bounds on the quantum query complexity of \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\). The upper bound uses a quantum walk algorithm, and the lower bound uses a reduction from the hiding transform of \(3\mathsf{\text{-}DIST}\).
Proposition 14. For \(m,d\in \mathbb{N}\) with \(m\geq d\), \(Q(\mathop{\mathrm{\mathsf{TriangleVertex}}}_{m,d}) = \widetilde{O}(\sqrt{m}d^{1/4})\).
Proof. Suppose the given vertex is vertex \(u\). Let \(x\in \binom{[n]}{2}^m\) be the input to the \(\mathop{\mathrm{\mathsf{TriangleVertex}}}_{m,d}\) problem. Then \(\mathopen{}\mathclose{\left|\{i\in [m] \mid \mathopen{}\mathclose{\left|x_i \cap \{u\}}\right| = 1\}}\right| \leq d\) and we may wlog assume the inequality is saturated. Observe that \(x\) can be viewed as having two parts: one part \(A\subseteq[m]\) such that \(i\in A\) if and only if \(x_i\) is an edge incident to vertex \(u\), and the other part \(B \mathrel{\vcenter{:}}= [m]-A\) containing the remaining edges. Note \(\mathopen{}\mathclose{\left|A}\right| = d\).
We perform a quantum walk based on the uniform random walk on the Hamming graph \(G\) labeled by \(r\)-tuples of indices from \(A\), where \(r\in \mathbb{N}\) will be optimized later. We say a vertex \((i_1,\dots,i_r) \in A^r\) of \(G\) is marked if there exists a \(b\in B\) such that \(x_b\) forms a triangle with \(x_{i_j}\) and \(x_{i_k}\) for some \(j,k\in [r]\). At each vertex, we also store the data \((x_{i_1},\dots,x_{i_r})\).
We now analyze the query complexity of this quantum walk following [45].
Therefore, [45] shows that the query complexity of the quantum walk is \[O\Bigl(S + \frac{1}{\sqrt{\varepsilon}}\bigl(\frac{1}{\sqrt{\delta}}\cdot U + C\bigr)\Bigr) = \widetilde{O}\Bigl(r \sqrt{\frac{m}{d}} + \sqrt{m} + \frac{1}{\sqrt{r}}\sqrt{md} +\frac{d}{r}\sqrt{m}\Bigr) = \widetilde{O}(\sqrt{m}\cdot d^{1/4}),\] by optimally setting \(r\) to be \(\ceil{d^{3/4}}\). ◻
Proposition 15. For \(m,d\in \mathbb{N}\) with \(m\geq d\), \(Q(\mathop{\mathrm{\mathsf{TriangleVertex}}}_{m,d})\geq \Omega(\sqrt{m/d}\cdot Q(3\mathsf{\text{-}DIST}_d))\).
Proof. We describe a reduction from \(\mathop{\mathrm{\mathsf{HIDE}}}_m[3\mathsf{\text{-}DIST}_d]\) to \(\mathop{\mathrm{\mathsf{TriangleVertex}}}_{m,d}\). Assume wlog that \(m\) is a multiple of \(3\). Let \(x \in ([s]\cup \{*\})^m\) be an input to \(\mathop{\mathrm{\mathsf{HIDE}}}_m[3\mathsf{\text{-}DIST}_d]\). Choose a uniformly random partition of \([m]\) into three subsets \(X,Y,Z\) of the same size \(m/3\). Let \(x^X,x^Y,x^Z\) denote the subsequence of \(x\) formed by indices in \(X,Y,Z\) respectively. If \(x\) has a \(3\)-collision, the probability of the event that exactly one of the three colliding indices is in each of \(X\), \(Y\), and \(Z\) is at least \(2/9\).
We can compute \(\mathop{\mathrm{\mathsf{HIDE}}}_m[3\mathsf{\text{-}DIST}_d](x)\) by computing \(\mathop{\mathrm{\mathsf{TriangleVertex}}}_{m,d}\) on an edge list \(y\) with vertex set \[\{v\} \;\dot{\cup} \;\{u\} \;\dot{\cup} \;\{a^X\mid a \in [s]\} \;\dot{\cup} \;\{a^Y\mid a\in [s]\} \;\dot{\cup} \;\{*_i \mid i \in [m]\}\] and target vertex \(v\). For each \(i\in [m]\), we map \(x_i\) to an edge \(y_i\) as follows.
Case \(x_i \in [s]\): Map \(x_i\) to edge \(\{x_i^X,v\}\) if \(i\in X\), edge \(\{x_i^Y,v\}\) if \(i\in Y\), and edge \(\{x_i^X,x_i^Y\}\) if \(i\in Z\).
Case \(x_i = *\): Map \(x_i\) to \(\{u,*_i\}\).
Note that \(y\) defined this way is of length \(m\), and the number of edges in \(y\) incident to \(v\) is exactly \(d\). Therefore, \(y\) is a valid input to \(\mathop{\mathrm{\mathsf{TriangleVertex}}}_{m,d}\).
If \(x\) has a \(3\)-collision, then \(y\) has a triangle containing vertex \(v\) with probability at least \(2/9\). If \(x\) does not have a \(3\) collision, then \(y\) never has a triangle containing vertex \(v\). Therefore, repeating the reduction a constant number of times allows us to compute \(\mathop{\mathrm{\mathsf{HIDE}}}_m[3\mathsf{\text{-}DIST}_d](x)\) with high probability. Therefore, \(Q(\mathop{\mathrm{\mathsf{TriangleVertex}}}_{m,d})\) is lower bounded by \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[3\mathsf{\text{-}DIST}_d])\), which is \(\Omega(\sqrt{m/d}\cdot Q(3\mathsf{\text{-}DIST}_d))\) by 7, as required. ◻
Observe that in the proof of 14 above, the algorithm does not a priori know which part of the input \(x\) is in \(A\) and which part is in \(B\). It appears that the shuffling of these parts adds to the complexity of the problem. To investigate how generic this phenomenon is, we consider two types of questions motivated by shuffling.
How does shuffling a function change its complexity?
How does shuffling affect direct sum theorems?
We formalize these questions in the next two sections and prove some first results.
We recall 2 of shuffling from the introduction. Let \(n\in \mathbb{N}\). Let \(\widetilde{D},\Sigma\) be finite non-empty sets with \(\widetilde{D}\subseteq \Sigma^n\). For a function \(f\colon \widetilde{D} \to \{0,1\}\), the shuffling transform of \(f\) is defined to be \[\mathop{\mathrm{\mathsf{SHUFFLE}}}[f] \colon D \subseteq (\Sigma\times [n])^n \to \{0,1\}, \quad \text{where}\]
the set \(D\) consists of all elements \(x\in (\Sigma\times [n])^n\) satisfying \(x = ((v_1,\pi(1)),\dots,(v_n,\pi(n)))\) for some bijection \(\pi\colon [n]\to [n]\) such that \((v_{\pi^{-1}(1)},v_{\pi^{-1}(2)},\dots,v_{\pi^{-1}(n)})\in \widetilde{D}\).
\(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f](x)\mathrel{\vcenter{:}}= f(v_{\pi^{-1}(1)},v_{\pi^{-1}(2)},\dots,v_{\pi^{-1}(n)})\).
Next, we collect some simple facts about \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\).
Fact 16. For every \(f\colon E\subseteq\Sigma^n\to\{0,1\}\), the following holds:
\(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])=\Omega(Q(f)).\)
If \(f\) is symmetric, then \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])=Q(f).\)
\(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])=O(\sqrt{n}\cdot Q(f)).\) Moreover, there exists \(f\) such that \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])=\Omega(\sqrt{n}\cdot Q(f))\).
Proof. [enu:shuffle-vs-origin]: Every query complexity measure on \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) is at least that on the \(f\) since \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) contains \(f\) as a subfunction. [enu:shuffle-sym]: If \(f\) is symmetric, then every query complexity measure on \(f\) is the same as that measure on \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) since the algorithm computing \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) could simply ignore the second coordinate of each input symbol. [enu:shuffle-sep]: Let \(\mathop{\mathrm{\mathcal{A}}}\) be an arbitrary algorithm for \(f\). For each \(z\in \Sigma^n\), we can simulate the quantum query oracle in the algorithm \(\mathop{\mathrm{\mathcal{A}}}\) by exact Grover search through \(x\in (\Sigma\times [n])^n\) over the second coordinate for the target index, and exact Grover search incurs a multiplicative overhead of \(O(\sqrt{n})\). The “moreover” part follows by simply taking \(f(x) = x_1\) to be the dictator function. This \(f\) witnesses a \(1\) vs \(\Omega(\sqrt{n})\) separation between \(Q(f)\) and \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])\). ◻
We record one more fact that relates the quantum and randomized query complexities for \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\).
Fact 17 (cf. [35]). For every \(f\colon E\subseteq\Sigma^n\to\{0,1\}\), \[Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])) = \Omega(R(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])^{1/3}).\]
The importance of the above fact is that it provides a generic lower bound method for the quantum query complexity for problems in the edge list model, since analyzing the randomized query complexity is often easier. The proof of this fact is based on the simple observation that \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]\) transforms every function \(f\) into a symmetric function. The beautiful work of Chailloux [35] shows that the quantum query complexity of every symmetric function is at least big-\(\Omega\) of its randomized query complexity raised to the power \(1/3\).
As we have observed, for general \(f\), \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f])\) can be unboundedly larger than \(Q(f)\) while for symmetric \(f\), \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[f]) = Q(f)\). Therefore, the interesting question becomes what happens when \(f\) is partially symmetric, for example, by being defined via graph properties? This question can be used to understand how the complexity of a graph property changes in the edge list model versus the adjacency list and adjacency matrix models.
Can there be a large separation between the quantum query complexity of a graph property in the edge list model versus the adjacency list model?
We show there can be an exponential separation.
Theorem 18. There is (partial) graph property \(\mathcal{P}\) on graphs of maximum degree \(5\), such that its quantum query complexity in the adjacency list model is \(O(\mathrm{polylog}(n))\), but its quantum query complexity in the edge list model is \(\Omega(n^{1/48}).\)
Proof. We know from [34] that there is a graph property \(\mathcal{P}\) in the adjacency list model on graphs of maximum degree \(5\) with quantum query complexity \(O(\mathrm{polylog}(n))\) and randomized query complexity \(\Omega(n^{1/16})\), where the input adjacency list has size \(n\). Now, by 17, when we try to compute \(\mathcal{P}\) in the edge list model, the quantum query complexity is at least \(\Omega(n^{1/48})\). ◻
As the edge list model is the shuffled version of the adjacency list model, we find it natural to also consider the shuffled version of the adjacency matrix model and ask the following question.
Can there be a large separation between the quantum query complexity of a graph property in the adjacency matrix model versus the shuffled adjacency matrix model?
We can no longer appeal to the previous argument because [34] shows that the quantum query complexity of every graph property in the adjacency matrix model is at least that of its randomized query complexity raised to the \(1/6\) power. Nonetheless, we can answer the question with “yes” by considering a function \(\mathrm{\Sigma MAJ}_n\) defined in 4. \(\mathrm{\Sigma MAJ}_n\) can be seen as a (directed) graph property computed in the adjacency matrix model.
Recall that \(\mathrm{\Sigma MAJ}_n\colon D_0\dot{\cup} D_1 \subseteq \{0,1\}^{n^2} \to \{0,1\}\) is defined to be the following restriction of \(\mathrm{MAJ}_n\circ \mathrm{MAJ}_n\) on \(n^2\) bits. \[\label{eq:maj95circ95maj} \mathrm{\Sigma MAJ}_n : x \mapsto \begin{cases} 0, &x\in D_0,\\ 1, &x\in D_1, \end{cases}\tag{6}\] where \(D_0\) consists of all \(x = (x_{1,1},x_{1,2},\dots, x_{n,n}) \in \{0,1\}^{n^2}\) such that there exists a subset \(S\subseteq[n]\) of size at least \(2n/3\) such that for all \(i\in S\), \(x^i \mathrel{\vcenter{:}}= (x_{i,1},\dots,x_{i,n})\) has Hamming weight \(\mathopen{}\mathclose{\left|x^i}\right| \ge 2n/3\) and for all \(i\in [n]-S\), \(\mathopen{}\mathclose{\left|x^i}\right| \le n/3\); while \(x = (x_{1,1},x_{1,2},\dots, x_{n,n}) \in \{0,1\}^{n^2}\) is in \(D_1\) if and only if there exists a subset \(S\subseteq[n]\) of size at most \(n/3\) such that for all \(i\in S\), \(x^i \mathrel{\vcenter{:}}= (x_{i,1},\dots,x_{i,n})\) has Hamming weight \(\mathopen{}\mathclose{\left|x^i}\right| \ge 2n/3\) and for all \(i\in [n]-S\), \(\mathopen{}\mathclose{\left|x^i}\right| \le n/3\).
Theorem 19. \(R(\mathrm{\Sigma MAJ}_n) = O(1)\) but \(R(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]) = \Omega(\sqrt{n})\). In addition, \(Q(\mathrm{\Sigma MAJ}_n) = O(1)\) but \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]) = \Omega(n^{1/6})\).
Proof. To see that \(R(\mathrm{\Sigma MAJ}_n) = O(1)\), observe that for a given \(x^i\) we can test with high probability whether \(\mathopen{}\mathclose{\left|x^i}\right| \geq 2n/3\) (call such an \(x^i\) dense) or \(\mathopen{}\mathclose{\left|x^i}\right| \leq n/3\) (call such an \(x^i\) sparse) by querying \(x^i\) repeatedly at uniformly random locations a constant number of times. Then we choose a subset of \(T\subseteq [n]\) of constant size uniformly at random and for each \(i\in T\) test whether \(x^i\) is dense or sparse. If more than half are dense, we output \(0\). If at most half are dense, we output \(1\). It is not hard to see that this algorithm computes \(\mathrm{\Sigma MAJ}_n\) with at most \(1/3\) probability of error.20 Therefore, \(Q(\mathrm{\Sigma MAJ}_n) \leq R(\mathrm{\Sigma MAJ}_n) = O(1)\).
For the lower bounds, by 17, it suffices to show \(R(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]) = \Omega(\sqrt{n})\) to conclude the proof. Assume wlog that \(n\) is a multiple of \(12\). Then by Yao’s lemma, it suffices to show that the following two distributions \(\mathop{\mathrm{\mathcal{D}}}_0\) and \(\mathop{\mathrm{\mathcal{D}}}_1\) on inputs to \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]\) are hard to distinguish by a deterministic algorithm of query complexity \(O(\sqrt{n})\), where we define
\(\mathop{\mathrm{\mathcal{D}}}_b\): sample \(x\leftarrow H_b\) and \(\pi \leftarrow \mathfrak S_{[n]\times [n]}\) (the set of all permutations on \([n]\times [n]\)), then output \[(x_{\pi(1,1)}, \pi(1,1)), (x_{\pi(1,2)}, \pi(1,2)), \dots, (x_{\pi(n,n)}, \pi(n,n)).\]
Here, \(H_0\subseteq D_0\) and \(H_1\subseteq D_1\) are defined by \[\begin{align} H_0 \mathrel{\vcenter{:}}= \{(x_{1,1},x_{1,2},&\dots, x_{n,n}) \in \{0,1\}^{n^2} \mid \exists S\subseteq[n] , \text{ s.t.} \\ & \text{(i) } |S|=2n/3,\, \text{(ii) }\forall i\in S, \, |x^i| = 3n/4, \text{ and (iii) }\forall i\not\in S, \, |x^i|=0\}, \\ H_1 \mathrel{\vcenter{:}}= \{(x_{1,1},x_{1,2},&\dots, x_{n,n}) \in \{0,1\}^{n^2} \mid \exists S\subseteq[n] , \text{ s.t.} \\ & \text{(i) } |S|=n/3,\, \text{(ii) }\forall i\in S, \, |x^i| = n, \text{ and (iii) }\forall i\not\in S, \, |x^i|=n/4\}. \end{align}\]
Let \(t\in \mathbb{N}\). For \(0 \leq \beta < 1/2 < \alpha\leq 1\) and \(\gamma \in [0,1]\), define the random process \(P(\alpha,\beta,\gamma)\) as in 3. We refer to \(P(3/4,0,2/3)\) as \(P_0\) and \(P(1,1/4,1/3)\) as \(P_1\). The \(P_i\)s are defined in such a way that the distribution on query outcomes induced by every \(t\)-query deterministic decision tree (that we assume wlog never queries an index it has already queried and is a balanced tree) running on an input chosen sampled according to \(\mathop{\mathrm{\mathcal{D}}}_i\) is the same as the distribution \(P_i\).
Our goal is to show that the total variation distance between the output distributions of \(P_0\) and \(P_1\) scales as \(O(t^2/n)\). We write \(\mathrm{TVD}\) for this particular total variation distance. In the following, we write \(\Pr_i[\cdot]\) for taking the probability of an event over the randomness in the process \(P_i\). We also assume \(t-1\leq n^2/2\) to help simplify calculations.
Let \(\mathrm{Bad}\) denote the subset of \(([n]\times[n]\times\{0,1\})^t\) such that a \(t\)-tuple \((i_k,j_k,b_k)\), \(k=1,2,\dots,t\) belongs to \(\mathrm{Bad}\) if and only if there exists \(k_1\neq k_2\) such that \(i_{k_1} = i_{k_2}\). Then it is easy to see that \[\begin{align} \mathrm{Pr}_0[\mathrm{Bad}] = \mathrm{Pr}_1[\mathrm{Bad}] =& 1 - 1\cdot \frac{n^2-n}{n^2-1}\cdot \frac{n^2-2n}{n^2-2} \cdots \frac{n^2-(t-1)n}{n^2-(t-1)} \\ =&1 - 1\cdot \Bigl(1 - \frac{n-1}{n^2-1}\Bigr)\cdot \Bigl(1 - \frac{2n-2}{n^2-2}\Bigr)\cdots \Bigl(1 - \frac{(t-1)(n-1)}{n^2-(t-1)}\Bigr) \leq \frac{t^2}{n}, \end{align}\] where the last inequality uses \(\forall a,b\geq 0, (1-a)(1-b) \geq 1-a-b\) and \(t-1 \leq n^2/2\).
Let \(X,Y\in ([n]\times[n]\times \{0,1\})^t\) denote the output of process \(P_0\) and \(P_1\) respectively. Then \[\label{eq:tvd95two95parts} \mathrm{TVD}= \sum_{x}\mathopen{}\mathclose{\left|\mathrm{Pr}_0[X = x] - \mathrm{Pr}_1[Y = x]}\right| \leq \sum_{x \notin \mathrm{Bad}}\mathopen{}\mathclose{\left|\mathrm{Pr}_0[X = x] - \mathrm{Pr}_1[Y = x]}\right| + \frac{2t^2}{n}.\tag{7}\]
We proceed to analyze the first term. Write \(X^1 \in ([n]\times [n])^t\) for the non-bit-part of \(X\). Write \(X^2 \in \{0,1\}^t\) for the bit-part of \(X\). Similarly write \(Y^i,x^i\). Write \(\mathrm{Bad}^1 \subseteq ([n]\times [n])^t\) for the non-bit-part of \(\mathrm{Bad}\). Then \[\begin{align} \sum_{x \notin \mathrm{Bad}}\bigl|&\mathrm{Pr}_0[X = x] - \mathrm{Pr}_1[Y = x]\bigr| \nonumber \\ =& \sum_{x \notin \mathrm{Bad}}\bigl|\mathrm{Pr}_0[X^1 = x^1, X^2 = x^2] - \mathrm{Pr}_1[Y^1 = x^1, Y^2 = x^2]\bigr| \nonumber \\ =&\sum_{x \notin \mathrm{Bad}}\bigl|\mathrm{Pr}_0[X^2 = x^2\mid X^1 = x^1]\Pr[X^1 = x^1] - \mathrm{Pr}_1[Y^2 = x^2 \mid Y^1 = x^1 ]\Pr[Y^1 = x^1]\bigr| \nonumber \\ =&\sum_{x \notin \mathrm{Bad}}\bigl|\mathrm{Pr}_0[X^2 = x^2\mid X^1 = x^1] - \mathrm{Pr}_1[Y^2 = x^2 \mid Y^1 = x^1 ]\bigr| \cdot \Pr[X^1 = x^1], \nonumber\\ =&\sum_{x^1 \notin \mathrm{Bad}^1}\biggl(\sum_{x^2}\bigl|\mathrm{Pr}_0[X^2 = x^2\mid X^1 = x^1] - \mathrm{Pr}_1[Y^2 = x^2 \mid Y^1 = x^1 ]\bigr| \biggr)\cdot \Pr[X^1 = x^1], \label{eq:tvd95no95collision} \end{align}\tag{8}\] where the second-to-last equality uses \(\Pr[X^1 = x^1] = \Pr[Y^1 = x^1]\), which holds because the first steps defining \(P_0\) and \(P_1\) are identical.
Now, write \(U,V \in \{\mathrm{dense},\mathrm{sparse}\}^t\) for the sequence of “dense” or “sparse” choices during the process \(P_0\) and \(P_1\) respectively. Given \(u\in \{\mathrm{dense},\mathrm{sparse}\}^t\), write \(\bar{u}\) for \(u\) but switching “dense” and “sparse” component-wise.
For a fixed \(x\notin \mathrm{Bad}\), write \(\widetilde{\mathrm{Pr}}_0[\cdot]\) for \(\Pr_0[\cdot \mid X^1 = x^1]\) and \(\widetilde{\mathrm{Pr}}_1[\cdot]\) for \(\Pr_1[\cdot \mid Y^1 = x^1]\). Then, \[\begin{align} \mathrm{Pr}_0[X^2 &= x^2\mid X^1 = x^1] - \mathrm{Pr}_1[Y^2 = x^2 \mid Y^1 = x^1]\nonumber\\ =&\sum_u \widetilde{\mathrm{Pr}}_0[X^2 = x^2\mid U = u]\widetilde{\mathrm{Pr}}_0[U=u] - \widetilde{\mathrm{Pr}}_1[Y^2 = x^2 \mid V = u]\widetilde{\mathrm{Pr}}_1[V=u]\nonumber \\ =&\sum_u \Bigl(\widetilde{\mathrm{Pr}}_0[X^2 = x^2\mid U = u] - \widetilde{\mathrm{Pr}}_1[Y^2 = x^2 \mid V = \bar{u}]\Bigr)\widetilde{\mathrm{Pr}}_0[U=u],\label{eq:tvd95to95simplify} \end{align}\tag{9}\] where the last equality uses \(\mathrm{Pr}_0[U=u \mid X^1 = x^1] = \mathrm{Pr}_1[V=\bar{u} \mid Y^1 = x^1]\), which holds because when \(x\notin \mathrm{Bad}\), “dense” and “sparse” choices are made randomly in both \(P_0\) and \(P_1\); the important bar over \(u\) on the right-hand side arises from the fact that the \(\gamma\) defining \(P_1\) is \(1\) minus that defining \(P_0\).
Now let \(W \in \{\mathrm{dense},\mathrm{sparse}\}^t\) denote a random variable such that each \(W_i \in \{\mathrm{dense},\mathrm{sparse}\}\) is independently distributed and equal to “dense” with probability \(2/3\). Consider a bag of \(n\) balls such that \(2n/3\) are labeled “dense” and \(n/3\) are labeled “sparse”. Observe that the distribution on \(u \in \{\mathrm{dense},\mathrm{sparse}\}^t\) defined by \(\widetilde{\mathrm{Pr}}_0[U=u]\) is the same as the distribution of labels when drawing \(t\) balls from the bag without replacement. On the other hand, the distribution of \(W\) is the same as the distribution of labels when drawing \(t\) balls from the bag with replacement. Therefore, we can appeal to [46] to deduce that \[\label{eq:tvd95replacement95sampling} \sum_u \bigl|\Pr[W=u] - \widetilde{\mathrm{Pr}}_0[U=u]\bigr| \leq \frac{t(t-1)}{2n}.\tag{10}\] Therefore, summing 9 over \(x^2\in \{0,1\}^t\) gives \[\begin{align} \sum_{x^2}\Bigl|\mathrm{Pr}_0[&X^2 = x^2\mid X^1 = x^1] - \mathrm{Pr}_1[Y^2 = x^2 \mid Y^1 = x^1]\Bigr|\nonumber \\ =&\sum_{x^2}\Bigl|\sum_u \Bigl(\widetilde{\mathrm{Pr}}_0[X^2 = x^2\mid U = u]\widetilde{\mathrm{Pr}}_0[U=u] - \widetilde{\mathrm{Pr}}_1[Y^2 = x^2 \mid V = \bar{u}]\widetilde{\mathrm{Pr}}_0[U=u]\Bigr)\Bigr|\nonumber \\ \leq&\sum_{x^2}\Bigl| \sum_u \Bigl(\widetilde{\mathrm{Pr}}_0[X^2 = x^2\mid U = u]\widetilde{\mathrm{Pr}}_0[U=u] - \widetilde{\mathrm{Pr}}_0[X^2 = x^2\mid U = u]\mathrm{Pr}[W=u]\Bigr)\Bigr|\nonumber \\ & + \sum_{x^2}\Bigl|\sum_u\Bigl(\widetilde{\mathrm{Pr}}_0[X^2 = x^2\mid U = u]\mathrm{Pr}[W=u] - \widetilde{\mathrm{Pr}}_1[Y^2 = x^2 \mid V = \bar{u}]\mathrm{Pr}[W=u]\Bigr)\Bigr|\nonumber \\ & + \sum_{x^2} \Bigl| \sum_u\Bigl(\widetilde{\mathrm{Pr}}_1[Y^2 = x^2 \mid V = \bar{u}]\mathrm{Pr}[W=u] - \widetilde{\mathrm{Pr}}_1[Y^2 = x^2 \mid V = \bar{u}]\widetilde{\mathrm{Pr}}_0[U=u] \Bigr) \Bigr|\nonumber \\ \leq&\sum_{x^2}\Bigl|\sum_u \Bigl(\widetilde{\mathrm{Pr}}_0[X^2 = x^2\mid U = u] - \widetilde{\mathrm{Pr}}_1[Y^2 = x^2 \mid V = \bar{u}]\Bigr)\mathrm{Pr}[W=u]\Bigr|+ \frac{2t^2}{n} = \frac{2t^2}{n},\label{eq:iid95conversion} \end{align}\tag{11}\] where the first inequality is the triangle inequality, the second inequality uses 10 twice, and the last equality follows from the observations that
the distribution over \(x^2 \in \{0,1\}^t\) defined by \(\sum_u\widetilde{\mathrm{Pr}}_0[X^2 = x^2\mid U = u] \cdot \mathrm{Pr}[W=u]\) is the same as binomial \(B \mathrel{\vcenter{:}}= \mathrm{Bin}(t, \frac{2}{3}\cdot \frac{3}{4}) = \mathrm{Bin}(t,\frac{1}{2})\).
the distribution over \(x^2 \in \{0,1\}^t\) defined by \(\sum_u\widetilde{\mathrm{Pr}}_1[Y^2 = x^2 \mid V = \bar{u}]\cdot\Pr[W=u]\) is the same as binomial \(\mathrm{Bin}(t, \frac{2}{3}\cdot\frac{1}{4} + \frac{1}{3} \cdot 1) = \mathrm{Bin}(t,\frac{1}{2}) = B\).
Combining 8 11 7 , we see \[\begin{align} \mathrm{TVD}&~\leq~ \frac{2t^2}{n} + \sum_{x \notin \mathrm{Bad}}\bigl|\mathrm{Pr}_0[X = x] - \mathrm{Pr}_1[Y = x]\bigr| \nonumber \\ &~\leq~ \frac{2t^2}{n} + \sum_{x^1 \notin \mathrm{Bad}^1}\frac{2t^2}{n}\Pr[X^1 = x^1] \leq \frac{4t^2}{n},\nonumber \end{align}\] as required, where the first step uses 7 , and the second step uses 8 and (11 ). ◻
Remark 20. The lower bound for \(R(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n])=\Omega(\sqrt n)\) is tight: for large enough constant \(C\), when we query \(C\sqrt n\) random positions of the input, there will be \(\Omega(1)\) blocks in each of which we have queried at least \(2\) entries. Then we can determine \(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]\) with an \(\Omega(1)\) advantage. We conjecture that \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}[\mathrm{\Sigma MAJ}_n]) = \Omega(n^{1/3})\).
In the \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\) problem, the shuffling can be seen as arising from a two-step process. The first step shuffles among edges incident to the target vertex \(v\) (or not incident to \(v\)), and the second step shuffles between edges incident or not incident to \(v\). The latter type of shuffling motivates the notion of shuffled direct sum in 3, which we now recall.
Let \(n,k\in \mathbb{N}\). Let \(\Sigma\) be a finite non-empty set. For a function \(f \colon \Sigma^n \to \{0,1\}\), the \(k\)-shuffled direct sum of \(f\) is defined to be \[\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]\colon D \subseteq (\Sigma\times [k])^{kn} \to \{0,1\}^k, \quad \text{where}\]
the set \(D\) consists of all elements \(x\in (\Sigma\times [k])^{kn}\) satisfying \(x = ((v_1,c_1),\dots, (v_{kn},c_{kn}))\) such that, for all \(j\in [k]\), there are exactly \(n\) indices \(i\in [kn]\) with \(c_i = j\).
\(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f](x)\) is defined to equal \((f(v^{(1)}),\dots,f(v^{(k)}))\), where \(v^{(j)}\) is the subsequence of \(v\mathrel{\vcenter{:}}= v_1\dots v_{kn}\) indexed by those \(i\in [kn]\) such that \(c_i = j\).
Naturally, the question is how \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k(f))\) relates to \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}(f))\). Since \(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k(f)\) restricts to the \(k\)-fold direct sum of \(f\), the direct sum theorem for the quantum query complexity [17], [18] immediately gives the following.
Fact 21. For every \(f\colon\Sigma^n \to \{0,1\}\), \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f])=\Omega(k\cdot Q(f))\).
The following result shows that the above lower bound is tight when the domain of \(f\) is \(\{0,1\}^n\).
Proposition 22. For every symmetric \(f\colon \{0,1\}^n \to \{0,1\}\), \(Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]) = \widetilde{\Theta}(k \cdot Q(f))\).
Proof. As in the proof of 7, we use the fact from [32] that \(Q(f) = \Theta(\sqrt{n(n- \Gamma(f))})\), where \(\Gamma(f) \mathrel{\vcenter{:}}= \min\{\mathopen{}\mathclose{\left|2k-n+1}\right|\mid f_k \neq f_{k+1}\}\) and \(f_k \mathrel{\vcenter{:}}= f(x)\) for all \(x\) such that \(\mathopen{}\mathclose{\left|x}\right| = k\). Observe that \(f_k\) must be constant for all \(k\in \{(n-\Gamma(f))/2,\dots, (n+\Gamma(f)-2)/2\}\). Call this constant \(b\in \{0,1\}\). We also write \(A \mathrel{\vcenter{:}}= (n-\Gamma(f))/2\) and \(B\mathrel{\vcenter{:}}= (n+\Gamma(f)-2)/2\) for convenience.
We consider the quantum algorithm for \(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]\) defined in 4. The quantum query complexity of this algorithm, accounting for error suppression, is \[\widetilde{O}(\sqrt{kA\cdot (kn)} + \sqrt{k(n-B)\cdot (kn)}) = \widetilde{O}(k\sqrt{n(n-\Gamma(f)})) = \widetilde{O}(k\cdot Q(f)),\] using the basic fact that collecting (up to) \(\alpha\) marked items from a list of \(\beta\) items costs \(\widetilde{O}(\sqrt{\alpha \beta})\) quantum queries by Grover search [43].
The correctness of the algorithm can be argued similarly to 7 so we omit it. ◻
We conjecture that 22 still holds for symmetric \(f\colon \Sigma^n\to \{0,1\}\) even if \(\Sigma\) is non-Boolean.
Conjecture 23. For every symmetric \(f\colon \Sigma^n \to \{0,1\}\), \[\Omega(k\cdot Q(f)) \leq Q(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]) \leq O(k\log(k) \cdot Q(f)).\]
We remark that this conjecture holds for randomized query complexity, i.e., with \(Q(\cdot)\) replaced by \(R(\cdot)\): the upper bound follows by a similar argument to the proof of 13, while the lower bound follows by [47].
None
Figure 4: Algorithm for \(\mathop{\mathrm{\mathsf{SHUFFLE}}}^k[f]\)..
In this section, we study the triangle problem, \(\mathop{\mathrm{\mathsf{Triangle}}}\). We first show that this problem bridges \(3\mathsf{\text{-}DIST}\) and \(3\mathsf{\text{-}SUM}\). Then, we give a nearly tight characterization of the problem’s quantum query complexity when the input has low maximum degree, for example, if it is a random sparse graph.
We formalize the aforementioned connection of \(\mathop{\mathrm{\mathsf{Triangle}}}\) to \(3\mathsf{\text{-}DIST}\) and \(3\mathsf{\text{-}SUM}\) in the following proposition.
Proposition 24. The following relationships hold between \(3\mathsf{\text{-}DIST}_m\), \(\mathop{\mathrm{\mathsf{Triangle}}}_m\), and \(3\mathsf{\text{-}SUM}_m\).
\(Q(3\mathsf{\text{-}DIST}_m) \leq O(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m))\)
\(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m) \leq O(Q(3\mathsf{\text{-}SUM}_m))\).
In particular, if \(Q(3\mathsf{\text{-}DIST}_m) \geq \Omega(m^\alpha)\), then \(\Omega(m^{\alpha})\leq Q(\mathop{\mathrm{\mathsf{Triangle}}}_m) \leq O(m^{3/4})\).
For comparison, we note that the “trivial” lower bound on \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m)\) by reducing from \(\mathop{\mathrm{\mathrm{OR}}}_{m-2}\) is \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m)=\Omega(\sqrt{m})\) while the above proposition gives \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m)=\Omega(m^{2/3})\) as the latter is the best-known lower bound on \(3\mathsf{\text{-}DIST}_m\) [24].
Proof. We prove each item as follows.
[itm:3-dist95tri] We show \(Q(3\mathsf{\text{-}DIST}_m) \leq O(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m))\) by the following reduction. Let \(x\) be an input to \(3\mathsf{\text{-}DIST}_m\). Assume wlog that \(m\) is a multiple of \(3\). Uniformly randomly partition \([m]\) into \(3\) sets \(P_1, P_2, P_3\) of length \(m/3\) each. We construct a length-\(m\) edge list \(y\) of a graph on vertex set \(V \mathrel{\vcenter{:}}= \{(x_i,v):i \in [m], v \in [3]\}\) as follows. For each \(j \in [m]\), \(y_j\) is the edge \(\{(x_j,\ell), (x_j,\ell+1 \bmod 3)\}\) where \(\ell \in [3]\) is such that \(j \in P_\ell\). Note that for each \(j \in [n]\), querying \(y_j\) only requires querying \(x_j\). Compute \(\mathop{\mathrm{\mathsf{Triangle}}}(y)\) and output the result. Repeat the entire procedure a large but constant number of times, if the output of some repeat is \(1\), output \(1\), otherwise, output \(0\).
We now show correctness. Suppose \(x\) contains a \(3\)-collision in \(x\). That is, there exist indices \(i_1, i_2, i_3\) and an element \(z\) such that \(x_{i_1} = x_{i_2} = x_{i_3} = z\). Then, each of the sets \(P_1, P_2, P_3\) will contain exactly one index from \(\{i_1, i_2, i_3\}\) with probability at least \(2/9\). In that case, \(y\) will contain the edges \(\{(z,1), (z,2)\}\), \(\{(z,2), (z,3)\}\), \(\{(z,3), (z,1)\}\), which form a triangle.
Conversely, suppose \(y\) contains a triangle. Then there must exist an element \(z\) such that \(y\) contains the edges \(\{(z,1), (z,2)\}\), \(\{(z,2), (z,3)\}\), \(\{(z,3), (z,1)\}\). Therefore, there exist \(j_1\in P_1\), \(j_2\in P_2\), \(j_3\in P_3\) such that \(x_{j_1}=x_{j_2} = x_{j_3} = z\), which implies that \(z\) occurs (at least) \(3\) times in \(x\).
[itm:tri953-sum] We show \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m) \leq O(Q(3\mathsf{\text{-}SUM}_m))\) by the following reduction. Assume wlog that \(m\) is a multiple of \(3\). Let \(\tilde{x}\) be an input to \(\mathop{\mathrm{\mathsf{Triangle}}}_m\). Apply a uniformly random permutation to \(\tilde{x}\) and denote the resulting string as \(x\). Choose a uniformly random element \(s\in (\{-1,1\}^2)^m\). For a given \(i\in [m]\), we map the edge \(x_i = \{a,b\}\), where \(a<b\), to the \(4\)-dimensional vector \((0,s_i(1)a,s_i(2)b,-1)\) if \(i\in [1,m/3]\), \((s_i(1)a,0,s_i(2)b,-2)\) if \(i\in [m/3+1,2m/3]\), and \((s_i(1)a,s_i(2)b,0,3)\) if \(i\in[2m/3+1,m]\), where \(s_i = (s_i(1), s_i(2))\in \{-1,1\}^2\). Denote the string after the mapping by \(y\in (\mathbb{Z}^4)^m\). Compute \(3\mathsf{\text{-}SUM}(y)\) and output the result. Repeat the entire procedure a large but constant number of times, if the output of some repeat is \(1\), output \(1\), otherwise, output \(0\).
We now show correctness. Write \(y^{i}\mathrel{\vcenter{:}}= y[(i-1)m/3+1\mathop{\mathrm{..}}im/3]\) for \(i\in \{1,2,3\}\). Suppose \(\tilde{x}\) contains the triangle \(\{a,b\}\), \(\{b,c\}\), \(\{a,c\}\) where \(a<b<c\). Then with probability at least a constant, \(y\) will contain symbols \((0,-b,-c,-1)\) in \(y^1\), \((-a,0,c,-2)\) in \(y^2\), and \((a,b,0,3)\) in \(y^3\), which sum to \(0\).
Conversely, suppose \(y\) is a yes-instance for \(3\mathsf{\text{-}SUM}\), then \(y\) must contain symbol \((0,a_1,b_1,-1)\) in \(y^1\), \((a_2,0,b_2,-2)\) in \(y^2\), and \((a_3,b_3,0,3)\) in \(y^3\) that sum to \(0\) for some \(a_i,b_i\in \mathbb{Z}\). (Note that the last coordinate ensures that one symbol must come from each of \(y^1,y^2,y^3\) in the yes-certificate.) Therefore \(\mathopen{}\mathclose{\left|a_2}\right|=\mathopen{}\mathclose{\left|a_3}\right|\) (call \(a\)), \(\mathopen{}\mathclose{\left|a_1}\right| = \mathopen{}\mathclose{\left|b_3}\right|\) (call \(b\)), and \(\mathopen{}\mathclose{\left|b_1}\right| = \mathopen{}\mathclose{\left|b_2}\right|\) (call \(c\)), so \(x\) contains edges \(\{b,c\}\), \(\{a,c\}\), and \(\{a,b\}\), which form a triangle.
The “in particular” part follows from \(Q(3\mathsf{\text{-}SUM}_m) \leq O(m^{3/4})\) [29], [48]. ◻
Remark 25. Notice that the lower bound of \(\mathop{\mathrm{\mathsf{Triangle}}}_m\) in 24 applies when \(n = \Omega(m)\). On the other hand, when \(n = O(1)\), we have \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m) = O(\sqrt{m})\) since we can search whether one of the size-\(3\) subsets of \([n]\) form a triangle. What is the complexity of \(\mathop{\mathrm{\mathsf{Triangle}}}_m\) when \(n = \omega(1)\) and \(n = o(m)\)? In particular, can we show a better lower bound when \(n = \Theta(\sqrt{m})\), which also captures dense graphs? The answer is yes, and we can reduce \(\mathop{\mathrm{\mathrm{ED}}}_{n^2}\) to \(\mathop{\mathrm{\mathsf{Triangle}}}_{\Theta(n^2)}\) (with \(\Theta(n)\) vertices) as follows.
Let \(x \in ([n] \times [n])^{n^2}\) be an input to \(\mathop{\mathrm{\mathrm{ED}}}_{n^2}\). We create an edge list \(y\) of size \(m = n^2 + n\) as follows. Let \(V = \{j^A, j^B, j^C: j \in [n]\}\). For each \(j \in [n]\), add an edge \((j^A, j^B)\) in \(y\). Partition the set \([n^2]\) into two sets \(A\) and \(B\) of equal size. For each \(i \in [n^2]\), denote \(x_i = (j_i,k_i)\in ([n]\times [n])\), if \(i \in A\) (respectively \(B\)), add the edge \((j_i^A, k_i^C)\) (respectively \((j_i^B, k_i^C)\)) in \(y\). We see the correctness of this reduction as follows. Suppose \(x\) is a positive instance of \(\mathop{\mathrm{\mathrm{ED}}}_{n^2}\). Then, with probability \(1/2\), we will have indices \(i_1\) and \(i_2\) such that \(i_1 \in A\), \(i_2 \in B\) and \(x_{i_1} = x_{i_2} = (j,k)\) for some \(j, k \in [n]\). Thus, we will have \((j^A, j^B), (j^A, k^C), (j^B, k^C) \in y\) so \(y\) will be a positive instance of triangle. On the other hand, suppose that \(y\) is a positive instance of triangle. Then, for some \(j, k \in [n]\), we will have \((j^A, j^B), (j^A, k^C), (j^B, k^C) \in y\) since this is the only way there could be a triangle in \(y\). It follows that \((j,k)\) must have appeared at least twice in \(x\) so \(x\) is a positive instance of \(\mathop{\mathrm{\mathrm{ED}}}_{n^2}\).
We now turn to the average-case analysis of \(\mathop{\mathrm{\mathsf{Triangle}}}\). In particular, we consider the random graph model with \(m\) (multi-)edges, such that the \(m\) edges are each sampled independently and uniformly from \(\binom{[n]}{2}\). In other words, we consider the sample-with-replacement model. In this model, the input edge list \(x\) can be written succinctly as \(x\leftarrow \binom{[n]}{2}^m\).
Denote the graph on \(n\) vertices formed by the edges in \(x\) by \(\mathop{\mathrm{\mathcal{G}}}(x)\). We use \(\mathop{\mathrm{\mathrm{maxdeg}}}(\mathop{\mathrm{\mathcal{G}}}(x))\) or simply \(\mathop{\mathrm{\mathrm{maxdeg}}}(x)\) to denote the max vertex degree of \(\mathop{\mathrm{\mathcal{G}}}(x)\). A wedge in \(\mathop{\mathrm{\mathcal{G}}}(x)\) is a length-two path. Since \(x\) could contain repeated edges, \(\mathop{\mathrm{\mathcal{G}}}(x)\) could be non-simple. In particular, the degree and wedge counts of \(\mathop{\mathrm{\mathcal{G}}}(x)\) account for the multiplicities of repeated edges. Later, we will also consider strings \(x\in (\binom{[n]}{2}\cup \{\bot\})^m\), where \(\bot\) means the input edge has not yet been revealed.
Our focus will be the \(m=\Theta(n)\) regime of sparse graphs. In this regime, we obtain near-matching upper and lower bounds for the quantum query complexity of triangle finding. The following basic facts about sparse random graphs will be useful. We defer the proof to 7.
Fact 26 (Sparse Random Graph). Let \(x\leftarrow \binom{[n]}{2}^m\).
(Low max degree) For \(m \leq O(n)\), \[\Pr[\mathop{\mathrm{\mathrm{maxdeg}}}(x) \leq 2\log (n) /\log\log (n)] \geq 1-o(1).\]
(Existence of a triangle) For \(m \geq \Omega(n)\), \[\Pr[x \mathrm{ contains a triangle}] \geq \Omega(1).\]
In particular, for \(m = \Theta(n)\), \[\Pr[\mathop{\mathrm{\mathrm{maxdeg}}}(x) \leq 2\log(n) /\log\log(n) \mathrm{ and x contains a triangle}] \geq \Omega(1).\]
For a technical reason, we also need the following simple fact.
Fact 27 (Vertex Avoidance). Let \(x\in\binom{[n]}{2}^m\) and let \(d\mathrel{\vcenter{:}}= \mathop{\mathrm{\mathrm{maxdeg}}}(x)\). Let \(T\subseteq [n]\) and let \(t\) denote its size. Let \(s\in \{0,1,\dots,m\}\). Then, \[\label{eq:vertex95avoidance} \Pr\Bigl[\bigl\{v\in [n]\mid \mathrm{v\in x_i for some i\in S}\bigr\} \cap T = \varnothing \Bigm| S \leftarrow {\scalebox{1.25}{\binom{[m]}{s}}}\Bigr] \ge 1-\frac{tds}{m-td+1}.\qquad{(1)}\]
Note that \(\{v\in [n]\mid \mathrm{v\in x_i for some i\in S}\}\) is formal notation for the set of vertices involved in the edges in \(x\) at positions in \(S\).
Proof. By direct calculation, the left-hand side of ?? is at least \[\begin{align} \binom{m-td}{s}\binom{m}{s}^{-1} &= \frac{(m-td)!(m-s)!}{m!(m-td-s)!}=\frac{(m-s)\cdot(m-s-1)\cdots (m-s-td+1)}{m\cdot(m-1)\cdots(m-td+1)} \nonumber\\ &=\Bigl(1-\frac{s}{m}\Bigr)\cdots\Bigl(1-\frac{s}{m-td+1}\Bigr) \geq 1- \frac{tds}{m-td+1}. \nonumber\qedhere \end{align}\] ◻
We call a graph \(x \in \binom{[n]}{2}^m\) good if \(\mathop{\mathrm{\mathrm{maxdeg}}}(\mathop{\mathrm{\mathcal{G}}}(x)) = O( \log(n) / \log\log(n) )\) and \(x\) contains a triangle. Our quantum lower and upper bounds will hold for good graphs. By 26, a random graph \(x\leftarrow\binom{[n]}{2}^m\) is good with probability \(\Omega(1)\) for \(m = \Theta(n)\).
27 states that a small subgraph of a good graph \(x\) does not touch any vertex from some small subset \(T\) with high probability. The vertex set \(T\) that the subgraph wants to avoid will be a triangle, and \(s\) will be of size \(o(m)\). Thus, the avoidance property holds almost surely.
Our lower bound result reads:
Theorem 28. Let \(n\in \mathbb{N}\). Suppose \(m, T\in \mathbb{N}\) are functions of \(n\) such that \(m=\Theta(n)\) and \(T \leq o(m^{5/7}/\log^{4/7}(m))\). Then, for every \(T\)-query quantum query algorithm \(\mathop{\mathrm{\mathcal{A}}}_T\), we have \[\Pr[\mathrm{\mathop{\mathrm{\mathcal{A}}}_T(x) = (i,j,k) such that x_i,x_j,x_k form a triangle}] \leq o(1),\] where \(\mathop{\mathrm{\mathcal{A}}}_T(x)\) denotes the output of \(\mathop{\mathrm{\mathcal{A}}}_T\) when its queries are made to \(x\), and the probability is over \(x \leftarrow \binom{[n]}{2}^m\) and the randomness of \(\mathop{\mathrm{\mathcal{A}}}_T\).
A simple corollary of 28 is that \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m)\geq \widetilde{\Omega}(m^{5/7})\). In fact, the lower bound holds even if we are promised the maximum degree of the input graph is low.
Corollary 2. For all \(m\in \mathbb{N}\) and \(d = 2\log (m)/\log\log(m)\), \[Q(\mathop{\mathrm{\mathsf{Triangle}}}_{m}) \geq Q(\mathop{\mathrm{\mathsf{Triangle}}}_{m, d}) \geq \widetilde{\Omega}(m^{5/7}).\]
Proof. The first inequality follows by restriction so it suffices to prove the second inequality. By the search-to-decision reduction (see preliminaries section), if \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_{m,d}) \leq o(m^{5/7}/\log^{4/7+2}(m))\) then there exists a quantum algorithm for triangle search with query complexity \(\leq o(m^{5/7}/\log^{4/7}(m))\) that is correct with at least constant probability. Now let \(n\in \mathbb{N}\) and consider an input \(x \leftarrow \binom{[n]}{2}^m\). By 26, for \(n=m\), \(x\) contains a triangle and has degree at most \(2\log (m)/\log\log(m)\) with at least constant probability, so a triangle can be found by the search algorithm using \(o(m^{5/7}/\log^{4/7}(m))\) queries with at least constant probability, contradicting 28. ◻
For the rest of this section, we prove 28.
We start by reviewing the recording query framework [1], [2]. For convenience of notation, we write \(N \mathrel{\vcenter{:}}= \binom{n}{2}\) and identify \([N]\) with \(\binom{[n]}{2}\) for the rest of this section. A projector refers to a complex square matrix \(P\) of some context-appropriate dimension such that \(P^\dagger = P\) and \(P^2 = P\).
Let \(m, T\in \mathbb{N}\) and \(\Sigma\) be an alphabet. Given a relation \(R\subseteq [N]^m \times \Sigma\), a \(T\)-query quantum query algorithm for computing \(R\) is specified by a sequence of unitary matrices \(U_0,\dots,U_T\) acting on \(\mathbb{C}^m\otimes \mathbb{C}^N \otimes \mathbb{C}^K\) for some \(K\in \mathbb{N}\). \(\mathbb{C}^K\) is referred to as a workspace register.
For \(t\in \{0,1,\dots,T\}\), the state of the algorithm at the \(t\)-th step given input \(x\in [N]^m\) is defined by \[\ket{\psi_t^x} \mathrel{\vcenter{:}}= U_t\mathcal{O}_xU_{t-1}\mathcal{O}_x\cdots U_1\mathcal{O}_xU_0\ket{0}.\] Here, \(\mathcal{O}_x\) is the quantum oracle of \(x\), i.e., the unitary matrix acting on \(\mathbb{C}^m\otimes \mathbb{C}^N \otimes \mathbb{C}^K\) defined by \[\forall (i,u,w)\in [m]\times [N]\times [K]\colon \mathcal{O}_x\ket{i,u,w} \mathrel{\vcenter{:}}= \omega_N^{ux_i}\ket{i,u,w},\] where the \(\ket{i,u,w}\)s form the computational basis of \(\mathbb{C}^m\otimes \mathbb{C}^N \otimes \mathbb{C}^K\) and \(\omega_N \mathrel{\vcenter{:}}= \exp(2\pi\mathrm{i}/N)\) is the \(N\)-th root of unity.
The algorithm finishes by measuring \(\mathbb{C}^K\) in the computational basis, parses the output \(w\in [K]\) as a string, and outputs a substring of \(w\) at a fixed location.21 For \(x\in [N]^m\), let \(W_x \mathrel{\vcenter{:}}= \{s\in \Sigma \mid (x,s)\in R\}\) denote the set of all desired outputs associated with \(x\), and let \(\Pi_{\mathop{\mathrm{\mathrm{succ}}}}^x\) be the projector onto all basis states \(\ket{i,u,w}\) such that the substring \(w'\) of \(w\) at the fixed location satisfies \(w' \in W_x\). The success probability of the quantum algorithm on input \(x\in [N]^m\) is then defined by \(\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}^x\ket{\phi_T}}\right\|^2\).
Following [36], a quantum query algorithm can be viewed as acting on basis states \(\ket{i,u,w}\ket{x}\), where \(x\in [N]^m\) and \(\ket{x} \mathrel{\vcenter{:}}= \bigotimes_{i\in[m]} \ket{x_i}\) is the state on an additional input register. Suppose \(\mathop{\mathrm{\mathcal{D}}}\) is a probability distribution over \([N]^m\), the state of the algorithm at the \(t\)-th step given an input sampled according to \(\mathop{\mathrm{\mathcal{D}}}\) can be represented by \[\label{eq:standard95model95state} \ket{\psi_t^{\mathop{\mathrm{\mathcal{D}}}}} \mathrel{\vcenter{:}}= (U_t\otimes\mathop{\mathrm{\mathbb{I}}})\mathcal{O}(U_{t-1}\otimes\mathop{\mathrm{\mathbb{I}}})\mathcal{O}\cdots (U_1\otimes\mathop{\mathrm{\mathbb{I}}})\mathcal{O}(U_0\otimes\mathop{\mathrm{\mathbb{I}}})(\ket{0}\ket{\mathop{\mathrm{\mathcal{D}}}}),\tag{12}\] where \(\mathcal{O}\) is the standard query operator that maps each basis state \(\ket{i,u,w}\ket{x}\) to \((\mathcal{O}_x\ket{i,u,w})\ket{x}\), and \[\ket{\mathop{\mathrm{\mathcal{D}}}} \mathrel{\vcenter{:}}= \sum_{x\in[N]^m}\sqrt{\mathrm{Pr}[x\leftarrow\mathop{\mathrm{\mathcal{D}}}]}\ket{x}.\]
Let \(\Pi_{\mathop{\mathrm{\mathrm{succ}}}} \mathrel{\vcenter{:}}= \sum_{x\in[N]^m}\Pi_{\mathop{\mathrm{\mathrm{succ}}}}^x\otimes|x\rangle\langle x|\). The success probability of the algorithm on \(\mathop{\mathrm{\mathcal{D}}}\) is defined to be \(\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\ket{\psi^{\mathop{\mathrm{\mathcal{D}}}}_T}}\right\|\). It is not hard to see that \[\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\ket{\psi_T^{\mathop{\mathrm{\mathcal{D}}}}}}\right\|^2 = \sum_{x\in[N]^m} \mathrm{Pr}[x\leftarrow\mathop{\mathrm{\mathcal{D}}}]\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}^x\ket{\psi^x_T}}\right\|^2.\] which shows that \(\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\ket{\psi_T^{\mathop{\mathrm{\mathcal{D}}}}}}\right\|^2\) equals the expected success probability of the quantum query algorithm when the input is sampled from the distribution \(\mathop{\mathrm{\mathcal{D}}}\).
The recording query framework works with an alternative view of 12 . We follow the prescription of this method described by Hamoudi and Magniez in [2] that specializes to the case where \[\mathop{\mathrm{\mathcal{D}}}= \mathop{\mathrm{\mathcal{D}}}_1 \times \mathop{\mathrm{\mathcal{D}}}_2 \times \dots \times \mathop{\mathrm{\mathcal{D}}}_m\] is a product distribution on \([N]^m\). To reach this alternative view, we first augment the alphabet \([N]\) by an additional character \(\bot\), and extend the action of \(\mathcal{O}\) by defining \[\mathcal{O}\ket{i,u,w}\ket{x} \mathrel{\vcenter{:}}= \ket{i,u,w}\ket{x},\] whenever \(x_i = \bot\). (The lack of change in the above equation explains why \(x_i=\bot\) can be thought of as the algorithm’s lack of knowledge of the value of \(x_i\).)
Now, define \(\ket{\mathop{\mathrm{\mathcal{D}}}_i} \mathrel{\vcenter{:}}= \sum_{y\in[N]}\sqrt{\mathrm{Pr}[y\leftarrow \mathop{\mathrm{\mathcal{D}}}_i]}\ket{y}\) so that the initial state of the input register in the standard query model can be written as \(\ket{\mathop{\mathrm{\mathcal{D}}}} = \bigotimes_{i\in[m]}\ket{\mathop{\mathrm{\mathcal{D}}}_i}\). In the recording query model, the corresponding initial state of the input register in the recording query model is defined to be \(\bigotimes_{i\in[m]}\ket{\bot} = \ket{\bot^m}\).
Then, we define the recording query operator, which is \(\mathop{\mathrm{\mathcal{O}}}\) under a change of basis defined using \(\cal{D}\).
Definition 6 ([2]). For all \(i\in[m]\), define the unitary matrix \(\mathop{\mathrm{\mathcal{S}}}_i\) acting on \(\mathbb{C}^{N+1}\) by \[\mathop{\mathrm{\mathcal{S}}}_i \colon \mathopen{}\mathclose{\left\{ \begin{alignedat}{2} &\ket{\bot} &&\mapsto \ket{\mathcal{D}_i},\\ &\ket{\mathcal{D}_i} &&\mapsto \ket{\bot},\\ &\ket{\phi} &&\mapsto \ket{\phi}, \quad \text{if } \langle \phi | \bot \rangle = \langle \phi | \mathcal{D}_i \rangle = 0. \end{alignedat} }\right.\] The registers of \(\ket{i,u,w}\ket{x} \in \mathop{\mathrm{\mathcal{H}}}\mathrel{\vcenter{:}}= \mathbb{C}^m\otimes \mathbb{C}^N\otimes \mathbb{C}^K \otimes \mathbb{C}^{N^m}\) are labeled as \(\ket{i}_Q\ket{u}_P\ket{w}_W\ket{x}_I\). The register labels \(Q,P,W,I\) stand for “query”, “phase”, “work”, and “input” respectively. Then, define the following unitary operators acting on \(\mathop{\mathrm{\mathcal{H}}}\). \[\begin{align} \mathcal{T}_{\mathop{\mathrm{\mathcal{D}}}} &\mathrel{\vcenter{:}}= \mathop{\mathrm{\mathbb{I}}}_{QPW}\otimes\bigotimes_{i\in[m]}\mathop{\mathrm{\mathcal{S}}}_i, \\ \mathop{\mathrm{\mathcal{S}}}_{\mathop{\mathrm{\mathcal{D}}}} &\mathrel{\vcenter{:}}= \sum_{i\in[m]}|i\rangle\langle i|_Q\otimes\mathop{\mathrm{\mathbb{I}}}_{PW}\otimes\bigotimes_{j=1}^{i-1}\mathop{\mathrm{\mathbb{I}}}_{I_j}\otimes \mathop{\mathrm{\mathcal{S}}}_i\otimes\bigotimes_{j=i+1}^{m}\mathop{\mathrm{\mathbb{I}}}_{I_j}, \\ \mathop{\mathrm{\mathcal{R}}}_{\mathop{\mathrm{\mathcal{D}}}} &\mathrel{\vcenter{:}}= \mathop{\mathrm{\mathcal{S}}}_{\mathop{\mathrm{\mathcal{D}}}}^\dagger\mathcal{O}\mathop{\mathrm{\mathcal{S}}}_{\mathop{\mathrm{\mathcal{D}}}}.\label{eq:recording95query95operator} \end{align}\tag{13}\] \(\mathop{\mathrm{\mathcal{R}}}_{\mathop{\mathrm{\mathcal{D}}}}\) is referred to as the recording query operator.
In the recording query model, the state of the quantum query algorithm after the \(t\)-th recording query is defined by \[\label{eq:recording95model95state} \ket{\phi_t^{\mathop{\mathrm{\mathcal{D}}}}} \mathrel{\vcenter{:}}= (U_t\otimes\mathop{\mathrm{\mathbb{I}}}_I)\mathop{\mathrm{\mathcal{R}}}_{\mathop{\mathrm{\mathcal{D}}}}(U_{t-1}\otimes\mathop{\mathrm{\mathbb{I}}}_I)\mathop{\mathrm{\mathcal{R}}}_{\mathop{\mathrm{\mathcal{D}}}}\cdots (U_1\otimes\mathop{\mathrm{\mathbb{I}}}_I)\mathop{\mathrm{\mathcal{R}}}_{\mathop{\mathrm{\mathcal{D}}}}(U_0\otimes\mathop{\mathrm{\mathbb{I}}}_I)(\ket{0}\ket{\bot^m}).\tag{14}\] For convenience, we will often abuse notation and write \(U_i\) for the \(U_i \otimes \mathop{\mathrm{\mathbb{I}}}_I\) in 14 .
The recording query model is particularly useful due to the following facts established in the previous works. First, the recording query model is essentially the same as the standard average-case query model up to a rotation on the input register at the end of the algorithm. Consequently, a measurement on the other registers sees no difference at all. Formally, we have
Theorem 29 ([2]). For all \(t\in \mathbb{Z}_{[0,T]}\), \[\ket{\phi^{\mathop{\mathrm{\mathcal{D}}}}_t} = \mathcal{T}_{\mathop{\mathrm{\mathcal{D}}}}\ket{\psi^{\mathop{\mathrm{\mathcal{D}}}}_t},\] where \(\ket{\phi^{\mathop{\mathrm{\mathcal{D}}}}_t}\) and \(\ket{\psi^{\mathop{\mathrm{\mathcal{D}}}}_t}\) are defined in 14 12 respectively.
A crucial but easy-to-see fact in the recording query framework is22
Fact 30 ([2]). The state \(\ket{\phi_t^{\mathop{\mathrm{\mathcal{D}}}}}\) is a linear combination of basis states \(\ket{i,u,w}\ket{x}\) where \(x\) contains at most \(t\) entries different from \(\bot\).
Moreover, the effect of the recording query operator can be exactly calculated as
Lemma 1 ([2]). Let \(i\in [m]\). Suppose \(\mathop{\mathrm{\mathcal{D}}}_i\) is uniform over \([N]\). Suppose the recording query operator \(\mathop{\mathrm{\mathcal{R}}}_{\mathop{\mathrm{\mathcal{D}}}}\) is applied to a basis state \(\ket{i,u,w}\ket{x}\). If \(u\neq 0\), the register \(\ket{x_i}_{I_i}\) is mapped to \[\begin{dcases} \sum_{y\in[N]}\frac{\omega_N^{u y}}{\sqrt{N}}\ket{y}, & \text{if }x_i=\bot,\\[1.5mm] \frac{\omega^{u x_i}_N}{\sqrt{N}}\ket{\bot}+\frac{1+\omega^{u x_i}_N(N-2)}{N}\ket{x_i}+\sum_{y\in[N]\backslash\{x_i\}}\frac{1-\omega^{u y}_N-\omega^{u x_i}_N}{N}\ket{y}, & \text{if } x_i\in[N], \end{dcases}\] and the other registers are unchanged. If \(u = 0\) then none of the registers are changed.
30 is due to the “reveal-on-demand” or “lazy-sampling” nature of the recording query operator. 1 formally grounds the intuition that once a value of \(x_i\) has been recorded, later queries should not significantly alter it (note the coefficient on \(\ket{x_i}\) has a large norm).
As we are proving 28, we will henceforth specialize \(\mathop{\mathrm{\mathcal{D}}}\) to be the uniform (product) distribution on \([N]^m = \binom{[n]}{2}^m\). We abbreviate \[\ket{\phi_t},\ket{\psi_t}, \mathop{\mathrm{\mathcal{T}}},\mathop{\mathrm{\mathcal{S}}},\mathop{\mathrm{\mathcal{R}}}\quad \text{to} \quad \ket{\phi_t^{\mathop{\mathrm{\mathcal{D}}}}}, \ket{\psi_t^{\mathop{\mathrm{\mathcal{D}}}}}, \mathop{\mathrm{\mathcal{T}}}_{\mathop{\mathrm{\mathcal{D}}}}, \mathop{\mathrm{\mathcal{S}}}_{\mathop{\mathrm{\mathcal{D}}}}, \mathop{\mathrm{\mathcal{R}}}_{\mathop{\mathrm{\mathcal{D}}}},\] respectively. These states and operators depend on the \(m\) and \(n\) that parametrize \(\mathop{\mathrm{\mathcal{D}}}\), but we leave these parameters implicit for notational convenience.
Recall that \(x\in \binom{[n]}{2}^m\), we write \(\mathop{\mathrm{\mathcal{G}}}(x)\) for the graph on \(n\) vertices formed by the edges in \(x\). The notation trivially generalizes to \(x\in (\binom{[n]}{2}\cup \{\bot\})^m\). We say \(x\) (or \(\ket{x}\)) records a triangle if \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains a triangle; we say \(x\) (or \(\ket{x}\)) records \(k\) wedges if \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains \(k\) wedges; and so on. Since there is a trivial bijection between \(N= \binom{n}{2}\) and \(\binom{[n]}{2}\), we do not distinguish \([N]\) and \(\binom{[n]}{2}\), as for the recording query framework, the notation \([N]^m\) is arguably more natural. We will assume that \(m = n\). This is without loss of generality since the only property of the regime \(m = \Theta(n)\) that we use in the proof is \(\mathop{\mathrm{\mathrm{maxdeg}}}(x) \leq O(\log(n))\), which is promised with high probability by 26. Nonetheless, we will keep the notation \(m\) and \(n\) separate until we need to use \(m=n\). This is for clarity as most parts of the proof do not use \(m=n\). Indeed, the only places that do are 3 and the few results invoking it, which includes 28.
Our analysis revolves around bounding the norm of the projection of \(\ket{\phi_t}\) onto computational basis states \(\ket{i,u,w}\ket{x}\) where \(x\) records properties key to finding triangles, such as: \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains a large number of high-degree vertices; \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains a large number of wedges; and, of course, \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains a triangle. 1 allows us to carry out our analysis on a query-by-query basis. This discussion motivates the following definitions.
Definition 7 (Recording projectors). For \(R\subseteq\mathbb{R}\) and \(y\in \binom{[n]}{2}\cup \{\bot\}\), define the following projectors by giving the basis states
onto which they project.
| \(\Pi^\triangle\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains a triangle. |
| \(\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{R}\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that the number of wedges in \(\mathop{\mathrm{\mathcal{G}}}(x)\) is in \(R\). |
| \(\Pi_y\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that \(u\neq 0\) and \(x_i = y\). |
Definition 8 (Progress measures for wedges and triangle). For \(t\in \mathbb{Z}_{[0,T]}\) and \(r\geq 0\), define \[\begin{align} \Lambda_{t,r}:=\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\ket{\phi_t}}\right\| \quad\text{and} \quad \Delta_{t}\mathrel{\vcenter{:}}=\mathopen{}\mathclose{\left\|\Pi^\triangle\ket{\phi_t}}\right\|. \end{align}\]
Thus, \(\Lambda_{t,r}\) measures the progress of recording \(r\) wedges in \(t\) queries; while \(\Delta_t\) measures the progress of recording a triangle in \(t\) queries. Our strategy is to first show that a large investment of queries is needed to record many wedges. That is, \(\Lambda_{t,r}\) is negligible when \(t\) is small and \(r\) large. Then, we show that, to record a triangle, a large number of wedges must have been recorded during the execution of the algorithm. That is, \(\Delta_t\) will be negligible as long as \(\Lambda_{t,r}\) remains negligible for a somewhat large \(r\).
A naive implementation of the above strategy falls short of giving the tight bound. One technical challenge is that the \(t\)-th query can, in principle, lead to as many as \(\Omega(t)\) extra wedges being recorded. This result in an overestimate on the wedge progress in each step and therefore an underestimate on the final query lower bound. However, as the input is drawn from the distribution \(\mathop{\mathrm{\mathcal{D}}}\), the underlying graph has a maximum degree of \(O(\log(n))\) with high probability. By excluding graphs with a maximum degree of \(\Omega(\log^2(n))\), we ensure that each query records at most \(\widetilde{O}(1)\) wedges. This motivates
Definition 9 (Excluding projectors). For \(d \in \mathbb{Z}_{\geq 0}\), vertex \(v\in [n]\), we define the following projectors by giving the basis states onto which they
project.
| \(\Pi^{\deg}_{v,\geq d}\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that the degree of \(v\) in \(\mathop{\mathrm{\mathcal{G}}}(x)\) is at least \(d\). |
| \(\Pi^{\deg}_{\geq d}\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains a vertex with degree at least \(d\). |
| \(\Pi_{\mathrm{Bad}}\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains a vertex with degree at least \(\ceil{\log(n)}^2\). |
In the next three subsections, we discuss the above three pieces in detail, starting from controlling the high-degree vertices, and then analyzing \(\Lambda_{t,r}\) and \(\Delta_t\).
A random sparse graph is rarely a high-degree graph. We show how we can exclude these graphs in the recording query framework so that the wedge count does not jump by a large amount at each query. While some aspects of our presentation are tailored to our specific problem, we have made an effort to generalize our proofs so that they can be applied in other contexts.
We start with a generic treatment stated in 2 that enables us to exclude unfavorable events from consideration during the analysis of recording progress, deferring their accounting to the final recording probability. 5 establishes that when the input is sampled from \(\mathop{\mathrm{\mathcal{D}}}\), if a certain event occurs with negligible probability, then no quantum algorithm can reliably record that event. (As mentioned above, we have dropped \(\mathop{\mathrm{\mathcal{D}}}\)-superscripts, \(\mathop{\mathrm{\mathcal{D}}}\)-subscripts, and the identities tensored to the \(U_i\)s for notational convenience.)
Lemma 2 (Exclusion Lemma). Let \(t\in \mathbb{Z}_{[1,T-1]}\). Let \(\Pi_1,\Pi_2,\dots,\Pi_{t-1}\); \(\Pi_1',\Pi_2',\dots,\Pi_{t-1}'\) be projectors. For \(i\in [t]\), let \(\ket{\alpha_i}\) and \(\ket{\alpha_i'}\) denote the (possibly unnormalized) states \[\begin{align} \ket{\alpha_i} \mathrel{\vcenter{:}}=& U_i\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{i-1})U_{i-1}\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{i-2})U_{i-2}\mathop{\mathrm{\mathcal{R}}}\cdots (\mathop{\mathrm{\mathbb{I}}}-\Pi_1)U_1\mathop{\mathrm{\mathcal{R}}}U_0(\ket{0}\ket{\bot^m}), \\ \ket{\alpha_i'} \mathrel{\vcenter{:}}=& U_i\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{i-1}')(\mathop{\mathrm{\mathbb{I}}}-\Pi_{i-1})U_{i-1}\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{i-2}')(\mathop{\mathrm{\mathbb{I}}}-\Pi_{i-2})U_{i-2}\mathop{\mathrm{\mathcal{R}}}\cdots (\mathop{\mathrm{\mathbb{I}}}-\Pi_1')(\mathop{\mathrm{\mathbb{I}}}-\Pi_1)U_1\mathop{\mathrm{\mathcal{R}}}U_0(\ket{0}\ket{\bot^m}). \end{align}\] Then, \[\mathopen{}\mathclose{\left\|\ket{\alpha_t} - \ket{\alpha_t'}}\right\| \leq \sum_{i=1}^{t-1}\mathopen{}\mathclose{\left\|\Pi_i'(\mathop{\mathrm{\mathbb{I}}}-\Pi_i)\ket{\alpha_i}}\right\|.\] In particular, for every projector \(\Pi_{\mathop{\mathrm{\mathrm{rec}}}}\), \[\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{rec}}}}\ket{\alpha_t}}\right\|\leq \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{rec}}}}\ket{\alpha'_t}}\right\|+\sum_{i=1}^{t-1}\mathopen{}\mathclose{\left\|\Pi_i'(\mathop{\mathrm{\mathbb{I}}}-\Pi_i)\ket{\alpha_i}}\right\|.\]
Proof. We adopt the product notation \(\prod\) for the non-commutative product in right-to-left order, i.e., for \(a,b\in \mathbb{N}\), \[\prod_{i=a}^b X_i \mathrel{\vcenter{:}}= \begin{cases} X_b X_{b-1}\cdots X_{a+1}X_a, & \text{if a\leq b},\\ \mathop{\mathrm{\mathbb{I}}}, & \text{if a>b}. \end{cases}\] For \(i\in\mathbb{Z}_{[1,t-1]}\), define \(M_i \mathrel{\vcenter{:}}= (\mathop{\mathrm{\mathbb{I}}}-\Pi_i)U_i\). Then, \[\begin{align} \ket{\alpha_t} &= U_t\mathop{\mathrm{\mathcal{R}}}\Bigl(\prod_{i=1}^{t-1}(\Pi_i'+(\mathop{\mathrm{\mathbb{I}}}-\Pi_{i}'))M_i\mathop{\mathrm{\mathcal{R}}}\Bigr)U_0(\ket{0}\ket{\bot^m}) \notag \\ &= U_t\mathop{\mathrm{\mathcal{R}}}\biggl(\Bigl(\prod_{i=1}^{t-1}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{i}')M_i\mathop{\mathrm{\mathcal{R}}}\Bigr)+\sum_{i=1}^{t-1}\Bigl(\prod_{j=i+1}^{t-1}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{j}')M_j\mathop{\mathrm{\mathcal{R}}}\Bigr)\Pi_i'\Bigl(\prod_{k=1}^{i}M_k\mathop{\mathrm{\mathcal{R}}}\Bigr)\biggr)U_0(\ket{0}\ket{\bot^m}) \notag \\ &= \ket{\alpha'_t}+\sum_{i=1}^{t-1}U_t\mathop{\mathrm{\mathcal{R}}}\Bigl(\prod_{j=i+1}^{t-1}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{j}')M_j\mathop{\mathrm{\mathcal{R}}}\Bigr)\Pi_i'(\mathop{\mathrm{\mathbb{I}}}-\Pi_i)\ket{\alpha_i}, \label{eq:exclusion95proof} \end{align}\tag{15}\] where the second equality can be interpreted as the hybrid argument [49].
Observe that \[\biggl\|U_t\mathop{\mathrm{\mathcal{R}}}\Bigl(\prod_{j=i+1}^{t-1}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{j}')M_j\mathop{\mathrm{\mathcal{R}}}\Bigr)\Pi_i'(\mathop{\mathrm{\mathbb{I}}}-\Pi_i)\ket{\alpha_i}\biggr\| \leq \mathopen{}\mathclose{\left\|\Pi_i'(\mathop{\mathrm{\mathbb{I}}}-\Pi_i)\ket{\alpha_i}}\right\|,\] because the \(\Pi_j\), \(\Pi_j'\)s are projectors, and \(\mathop{\mathrm{\mathcal{R}}}\) and the \(U_j\)s are unitaries.
Therefore, applying the triangle inequality on 15 gives \[\mathopen{}\mathclose{\left\|\ket{\alpha_t}-\ket{\alpha'_t}}\right\| \leq \sum_{i=1}^{t-1}\mathopen{}\mathclose{\left\|\Pi_i'(\mathop{\mathrm{\mathbb{I}}}-\Pi_i)\ket{\alpha_i}}\right\|,\] The “in particular” part of the lemma follows from \(\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{rec}}}}\ket{\alpha_t} - \Pi_{\mathop{\mathrm{\mathrm{rec}}}}\ket{\alpha'_t}}\right\| \leq \mathopen{}\mathclose{\left\|\ket{\alpha_t} - \ket{\alpha'_t}}\right\|\) and the reverse triangle inequality. ◻
Now we study a rather general situation using the Exclusion Lemma. Consider the product distribution \(\mathop{\mathrm{\mathcal{D}}}= \mathop{\mathrm{\mathcal{D}}}_1 \times \dots \times \mathop{\mathrm{\mathcal{D}}}_m\), where each \(\mathop{\mathrm{\mathcal{D}}}_i\) is over the finite domain \([N]\).
For each \(i\in [m]\), fix some partition \[[N] = \Sigma_0^{(i)}\dot{\cup}\Sigma_1^{(i)}.\] Symbols from \(\Sigma_1^{(i)}\) can be interpreted as a “logical 1” and correspond to the symbols of interest for the \(i\)-th index. We abuse the Hamming weight notation \(|\cdot|\) to apply to \(x\in \Sigma_1^{(1)}\times\cdots\times\Sigma^{(m)}_1\), such that \[\mathopen{}\mathclose{\left|x}\right| \mathrel{\vcenter{:}}= \Bigl|\bigl\{i\in[m] \mid x_i \in \Sigma_1^{(i)}\bigr\}\Bigr|.\] Then we have the natural probability distribution in the form of the product of independent Bernoulli distributions, where the probability \(p_i\) of the \(i\)-th symbol being a logical 1 is \[p_i\mathrel{\vcenter{:}}= \mathrm{Pr}[e\in\Sigma_1^{(i)}\mid e\leftarrow\mathop{\mathrm{\mathcal{D}}}_i].\] We also write \[p\mathrel{\vcenter{:}}=\max_{i\in[m]}p_i.\] The above definition hints at the events that we are going to focus on: \(\mathopen{}\mathclose{\left|x}\right|\) being large. Define the binary-valued logical 0-1 measurement on the \(i\)-th index as \[\Bigl\{\Pi_0^{(i)} = \textstyle\sum_{c\in\Sigma_0^{(i)}}|c\rangle\langle c|, \;\Pi_1^{(i)} = \textstyle\sum_{c\in\Sigma_1^{(i)}}|c\rangle\langle c| \Bigr\}.\]
We first show the operator \(\mathop{\mathrm{\mathcal{S}}}_i\) causes little “leakage" from the logical-\(0\) subspace to the logical-\(1\) subspace by defining the following leakage operator and bounding its norm.
Definition 10 (Leakage operator). For \(i\in [m]\), the leakage operator on the \(i\)-th index is \[L_i \mathrel{\vcenter{:}}= \Pi_0^{(i)}\mathop{\mathrm{\mathcal{S}}}_i^\dagger \Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i\Pi_0^{(i)}\in \mathbb{C}^{([N] \cup \{\bot\}) \times ([N] \cup \{\bot\}) }.\]
Lemma 3 (Bound on leakage). For all \(i\in [m]\), \[\mathopen{}\mathclose{\left\|L_i}\right\| = p_i(1-p_i).\]
Proof. When \(p_i=0\) or \(p_i=1\), the proof is trivial as one of the projectors \(\Pi_0^{(i)}\) or \(\Pi_1^{(i)}\) is 0, so we assume \(p_i\in (0,1)\). Notice \(L_i\) is sandwiched by projectors \(\Pi_0^{(i)}\), so \(L_i\) is a block matrix that is all zero except on the \(\Sigma_0^{(i)} \times \Sigma_0^{(i)}\) block. Therefore, the norm of \(L_i\) equals its norm restricted to that block. For \(x\in [N]\), write \(p_{i,x}\mathrel{\vcenter{:}}= \mathrm{Pr}[z = x\mid z\leftarrow\mathop{\mathrm{\mathcal{D}}}_i]\). Then, for all \(k,l \in \Sigma_0^{(i)}\),
\[\begin{align} \bra{k}L_i\ket{l} =& \bra{k}\Pi_0^{(i)}\mathop{\mathrm{\mathcal{S}}}_i^\dagger \Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i\Pi_0^{(i)}\ket{l} \notag \\ =&\bra{k}\mathop{\mathrm{\mathcal{S}}}_i^\dagger \Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i\ket{l} \notag \\ =&\Bigl(\braket{k|\mathop{\mathrm{\mathcal{D}}}_i}\bra{\mathop{\mathrm{\mathcal{D}}}_i} + (\bra{k} - \braket{k|\mathop{\mathrm{\mathcal{D}}}_i}\bra{\mathop{\mathrm{\mathcal{D}}}_i})\Bigr) \, \mathop{\mathrm{\mathcal{S}}}_i^\dagger \Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i \, \Bigl(\braket{l|\mathop{\mathrm{\mathcal{D}}}_i}\ket{\mathop{\mathrm{\mathcal{D}}}_i} + (\ket{l} - \braket{l|\mathop{\mathrm{\mathcal{D}}}_i}\ket{\mathop{\mathrm{\mathcal{D}}}_i})\Bigr) \notag \\ =&\Bigl(\sqrt{p_{i,k}}\bra{\bot} + (\bra{k} - \sqrt{p_{i,k}}\bra{\mathop{\mathrm{\mathcal{D}}}_i})\Bigr) \, \Pi_1^{(i)} \, \Bigl(\sqrt{p_{i,l}}\ket{\bot} + (\ket{l} - \sqrt{p_{i,l}}\ket{\mathop{\mathrm{\mathcal{D}}}_i})\Bigr) \notag \\ =&\sqrt{p_{i,k}\, p_{i,l}}\bra{\mathop{\mathrm{\mathcal{D}}}_i}\Pi_1^{(i)}\ket{\mathop{\mathrm{\mathcal{D}}}_i}=\sqrt{p_{i,k}\, p_{i,l}} \;{\textstyle \sum_{x\in\Sigma_1^{(i)}}} \, p_{i,x}=\sqrt{p_{i,k}\, p_{i,l}} \, p_i,\label{eq95leakage95op95095block} \end{align}\tag{16}\] where the fourth equality uses 6 of \(\mathop{\mathrm{\mathcal{S}}}_i\) and the fact that \(\ket{x} - \braket{x|\mathop{\mathrm{\mathcal{D}}}_i} \ket{\mathop{\mathrm{\mathcal{D}}}_i}\) is orthogonal to \(\ket{\mathop{\mathrm{\mathcal{D}}}_i}\) and \(\ket{\bot}\) for all \(x\in [N]\).
Now, define \(\ket{\varphi}\in\mathbb{C}^{\Sigma_0^{(i)}}\) by \[\ket{\varphi}\mathrel{\vcenter{:}}= \frac{1}{\sqrt{1-p_i}}{\textstyle \sum_{x\in\Sigma_0^{(i)}}}\sqrt{p_{i,x}} \, \ket{x},\] which is normalized since \[\braket{\varphi|\varphi}= \frac{1}{(\sqrt{1-p_i})^2}{\textstyle \sum_{x\in\Sigma_0^{(i)}}}(\sqrt{p_{i,x}})^2 = \frac{1}{1-p_i}{\textstyle \sum_{x\in\Sigma_0^{(i)}}} \, p_{i,x} = 1.\]
From 16 , we see that the \(\Sigma_0^{(i)} \times \Sigma_0^{(i)}\) block of \(L_i\) is exactly \(p_i(1-p_i)\, |\varphi\rangle\langle\varphi|\) since \[\bra{k}(\, p_i(1-p_i) \, |\varphi\rangle\langle\varphi| \,)\ket{l} = p_i\sqrt{p_{i,k}\, p_{i,l}}.\]
Therefore, \[\mathopen{}\mathclose{\left\|L_i}\right\| = p_i(1-p_i)\, \mathopen{}\mathclose{\left\||\varphi\rangle\langle\varphi|}\right\| = p_i(1-p_i),\] as required. ◻
The Chernoff bound tells us that the probability that \(\mathopen{}\mathclose{\left|x}\right|\) is large decays exponentially. We will use the following version of Chernoff bound specialized to i.i.d. Bernoulli random variables.
Lemma 4 (Chernoff bound). Let \(m\in \mathbb{N}\), \(p\in [0,1]\), and \(\mu \mathrel{\vcenter{:}}= pm\). Let \(X_1,\dots, X_m\) be independent and identically distributed Bernoulli random variables such that \(\Pr[X_1 = 1] = p\). Then, for every \(c > 0\), \[\Pr[X_1+\dots + X_m \geq c] \leq \Bigl(\frac{e \cdot \mu}{c}\Bigr)^c.\]
Proof. We may assume \(p \neq 0\), else the lemma trivially holds. If \(p>0\), so that \(\mu>0\), there are two cases:
\(0<c\leq \mu\): in this case, \(\mu/c\geq 1\) so \((e\mu/c)^c \geq e^c > 1\) so the lemma trivially holds.
\(c>\mu\): in this case, the lemma follows from [50].
◻
Now we instantiate the Exclusion Lemma to handle the kind of rare events arising from the large deviation property of i.i.d. random variables. To formally state the result, define the following projectors:
For \(r\geq0\), let \(\Pi_{\geq r}\) be the projector onto those \(\ket{g}\)s such that \(g\in([N]\cup\{\bot\})^m\) and \(\mathopen{}\mathclose{\left|g}\right|\geq r\).
For \(r\geq 0\), let \(P_{\geq r}\) be the projector onto those \(\ket{f}\)s such that \(f\in[N]^m\) and \(\mathopen{}\mathclose{\left|f}\right|\geq r\); let \(P_{< r}\) be the projector that projects onto those \(\ket{f}\)s such that \(f\in[N]^m\) and \(\mathopen{}\mathclose{\left|f}\right|< r\).
These projectors look similar but will serve different purposes. The projector \(\Pi_{\geq r}\) will be applied to the input register of the recording query model; while projectors \(P_{\geq r}\) and \(P_{<r}\) will be applied to the input register of the standard query model.
With the above preparation, we are now ready to state the key technical result of this part that allows us to exclude high Hamming-weight inputs (which form the “Hamming event”) during the quantum query algorithm’s execution:
Lemma 5 (Mirroring Lemma). For every \(\Gamma, \gamma \geq 0\) and \(t\in \mathbb{Z}_{[0,T]}\), we have \[\begin{align} \mathopen{}\mathclose{\left\|(\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma}) \ket{\phi_t}}\right\|^2 \leq 2\mathop{\mathrm{\mathrm{Pr}}}[\mathopen{}\mathclose{\left|x}\right| \geq \gamma \mid x \leftarrow \mathop{\mathrm{\mathcal{D}}}] + 2\mathopen{}\mathclose{\left\|(\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma}) \mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}\otimes P_{< \gamma})}\right\|^2. \end{align}\] Moreover, for all integers \(\Gamma \geq \gamma \geq 0\), \[\mathopen{}\mathclose{\left\|(\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma}) \mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}\otimes P_{< \gamma})}\right\|^2 \leq \binom{m}{\Gamma}{\binom{m}{<\gamma}} p^{\Gamma - \gamma}.\]
Proof. Let \(\ket{\psi_t}\) be the state after \(t\) queries of the quantum algorithm in the standard oracle model (with additional input register) as defined in 12 . Note that there exist unit vectors \(\ket{\chi_x}\)s such that \[\ket{\psi_t} = \sum_{x\in[N]^m} \sqrt{\mathop{\mathrm{\mathrm{Pr}}}[x\leftarrow \mathop{\mathrm{\mathcal{D}}}]}\ket{\chi_x}\ket x.\]
By 29, we can write \((\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma}) \ket{\phi_t}\) as \[\begin{align} (\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma}) \ket{\phi_t} =& (\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma}) \mathop{\mathrm{\mathcal{T}}}\ket{\psi_t}. \end{align}\] Then, \[\begin{align} \|(\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma}) \ket{\phi_t}\|^2 \notag =&~ \mathopen{}\mathclose{\left\|(\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma}) \mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}\otimes (P_{\geq \gamma} + P_{< \gamma}))\ket{\psi_t}}\right\|^2 \notag \\ \le&~ \mathopen{}\mathclose{\left(\mathopen{}\mathclose{\left\|(\mathop{\mathrm{\mathbb{I}}}\otimes\Pi_{\geq \Gamma}) \mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}\otimes P_{\geq \gamma})\ket{\psi_t}}\right\| +\mathopen{}\mathclose{\left\|(\mathop{\mathrm{\mathbb{I}}}\otimes\Pi_{\geq \Gamma}) \mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}\otimes P_{< \gamma})\ket{\psi_t}}\right\|}\right) ^2 \notag \\ \le&~ \mathopen{}\mathclose{\left(\mathopen{}\mathclose{\left\| (\mathop{\mathrm{\mathbb{I}}}\otimes P_{\geq \gamma})\ket{\psi_t}}\right\| +\mathopen{}\mathclose{\left\|(\mathop{\mathrm{\mathbb{I}}}\otimes\Pi_{\geq \Gamma}) \mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}\otimes P_{< \gamma})\ket{\psi_t}}\right\|}\right) ^2 \notag \\ \le&~ 2\mathopen{}\mathclose{\left\| (\mathop{\mathrm{\mathbb{I}}}\otimes P_{\geq \gamma})\ket{\psi_t}}\right\|^2 +2\mathopen{}\mathclose{\left\|(\mathop{\mathrm{\mathbb{I}}}\otimes\Pi_{\geq \Gamma}) \mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}\otimes P_{< \gamma})\ket{\psi_t}}\right\| ^2 \notag \\ \leq&~ 2\mathop{\mathrm{\mathrm{Pr}}}[\mathopen{}\mathclose{\left|x}\right| \geq \gamma \mid x\leftarrow \mathop{\mathrm{\mathcal{D}}}] + 2\mathopen{}\mathclose{\left\|(\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma}) \mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}\otimes P_{< \gamma})}\right\|^2, \notag \end{align}\] where the first inequality uses the triangle inequality, the second inequality holds as \((\mathop{\mathrm{\mathbb{I}}}\otimes \Pi_{\geq \Gamma})\mathop{\mathrm{\mathcal{T}}}\) is a contraction, and the third inequality uses the Cauchy-Schwarz inequality.
Now consider the “moreover” part. Write \[\mathop{\mathrm{\mathcal{T}}}' \mathrel{\vcenter{:}}= \bigotimes_{i\in [m]} \mathop{\mathrm{\mathcal{S}}}_i,\] so that \(\mathop{\mathrm{\mathcal{T}}}= \mathop{\mathrm{\mathbb{I}}}\otimes \mathop{\mathrm{\mathcal{T}}}'\). Then, the “moreover” part is equivalent to: every unit vector \(\ket{v} \in \mathbb{C}^{([N]\cup\{\bot\})^m}\) satisfies \[\mathopen{}\mathclose{\left\|\Pi_{\geq \Gamma}\mathop{\mathrm{\mathcal{T}}}' P_{< \gamma} \ket{v}}\right\|^2 \leq \binom{m}{\Gamma} \binom{m}{<\gamma}p^{\Gamma - \gamma}.\]
To show this, we first write \[\label{eq:Pgammav} P_{< \gamma} \ket{v} = \sum_{S\subseteq [m], \mathopen{}\mathclose{\left|S}\right| <\gamma} \beta_S\ket{v_S},\tag{17}\] for some \(\beta_S \in \mathbb{C}\) satisfying \(\sum_S \mathopen{}\mathclose{\left|\beta_S}\right|^2 \leq 1\), and \(\ket{v_S}\) is a normalized quantum state supported only on basis states in \[\label{eq:condition95betag} \Bigl\{\ket{g} \bigm| g\in[N]^m \;\text{such that} \;g_i\in\Sigma_1^{(i)} \Longleftrightarrow i\in S \;\text{for all} \;i\in [m] \Bigr\}.\tag{18}\]
For any subset of indices \(R\subseteq [m]\), if we measure the state \(\mathop{\mathrm{\mathcal{T}}}'\ket{v_S}\) at indices in \(R\) using the logical 0-1 measurements \(\{\Pi_0^{(i)}, \Pi_1^{(i)}\}_{i\in R}\), the probability of getting all-ones is equal to \[\begin{align} &\Bigl\|\Bigl(\bigotimes_{i\in R}\Pi_1^{(i)}\otimes \mathbb{I}\Bigr)\mathop{\mathrm{\mathcal{T}}}'\ket{v_S}\Bigr\|^2 \notag \\ =&\bra{v_S}(\mathop{\mathrm{\mathcal{T}}}')^\dagger\Bigl(\bigotimes_{i\in R}\Pi_1^{(i)}\otimes \mathbb{I}\Bigr)\mathop{\mathrm{\mathcal{T}}}'\ket{v_S}\notag \\ =&\bra{v_S}\Bigl(\bigotimes_{i\in S\cap R}\Pi_1^{(i)}\otimes \bigotimes_{i\in R\backslash S}\Pi_0^{(i)}\otimes \mathbb{I}\Bigr)^\dagger(\mathop{\mathrm{\mathcal{T}}}')^\dagger\Bigl(\bigotimes_{i\in R}\Pi_1^{(i)}\otimes \mathbb{I}\Bigr)\mathop{\mathrm{\mathcal{T}}}'\Bigl(\bigotimes_{i\in S\cap R}\Pi_1^{(i)}\otimes \bigotimes_{i\in R\backslash S}\Pi_0^{(i)}\otimes \mathbb{I}\Bigr)\ket{v_S} \notag \\ =&\bra{v_S}\Bigl(\bigotimes_{i\in S\cap R}\Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i^\dagger \Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i\Pi_1^{(i)} \otimes \bigotimes_{i\in R\backslash S}\Pi_0^{(i)}\mathop{\mathrm{\mathcal{S}}}_i^\dagger \Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i\otimes\Pi_0^{(i)}\otimes \mathbb{I}\Bigr)\ket{v_S} \notag \\ \leq & \Bigl(\prod_{i\in S\cap R}\mathopen{}\mathclose{\left\|\Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i^\dagger \Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i\Pi_1^{(i)}}\right\|\Bigr)\cdot \Bigl(\prod_{i\in R\backslash S}\mathopen{}\mathclose{\left\|\Pi_0^{(i)}\mathop{\mathrm{\mathcal{S}}}_i^\dagger \Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i\Pi_0^{(i)}}\right\|\Bigr) \leq \prod_{i\in R\backslash S}\mathopen{}\mathclose{\left\|\Pi_0^{(i)}\mathop{\mathrm{\mathcal{S}}}_i^\dagger \Pi_1^{(i)}\mathop{\mathrm{\mathcal{S}}}_i\Pi_0^{(i)}}\right\|. \label{eq:mirror95SR95connection} \end{align}\tag{19}\] Each factor in 19 is exactly the leakage operator in 10. By 3, we have \[\label{eq:bound95fixedS} \Bigl\|\Bigl(\bigotimes_{i\in R}\Pi_1^{(i)}\otimes\mathop{\mathrm{\mathbb{I}}}\Bigr)\mathop{\mathrm{\mathcal{T}}}'\ket{v_S}\Bigr\|^2\leq \prod_{i\in R\backslash S}p_i(1-p_i) \leq p^{\mathopen{}\mathclose{\left|R\backslash S}\right|}.\tag{20}\]
Now, observe the matrix inequality \[\label{eq:matrix95ineq} \Pi_{\geq \Gamma} \leq \sum_{R \subseteq [m], \mathopen{}\mathclose{\left|R}\right| = \Gamma} \Bigl(\bigotimes_{i\in R}\Pi_1^{(i)}\otimes \mathop{\mathrm{\mathbb{I}}}\Bigr).\tag{21}\] Therefore, \[\begin{align} &\mathopen{}\mathclose{\left\|\Pi_{\geq \Gamma}\mathop{\mathrm{\mathcal{T}}}' P_{< \gamma} \ket{v}}\right\|^2\\ =&\bra{v} P_{< \gamma}^\dagger (\mathop{\mathrm{\mathcal{T}}}')^\dagger \Pi_{\geq \Gamma}\mathop{\mathrm{\mathcal{T}}}' P_{< \gamma} \ket{v}\\ \leq &\sum_{R \subseteq [m], \mathopen{}\mathclose{\left|R}\right| = \Gamma} \Bigl\|\Bigl(\bigotimes_{i\in R}\Pi_1^{(i)}\otimes \mathbb{I}\Bigr)\mathop{\mathrm{\mathcal{T}}}'\Bigl(\sum_{S\subseteq [m], \mathopen{}\mathclose{\left|S}\right| <\gamma} \beta_S\ket{v_S}\Bigr)\Bigr\|^2&&\text{\ref{eq:Pgammav} \ref{eq:matrix95ineq}} \\ \leq &\sum_{R \subseteq [m], \mathopen{}\mathclose{\left|R}\right| = \Gamma} \Bigl(\sum_{S\subseteq [m], \mathopen{}\mathclose{\left|S}\right|<\gamma}\mathopen{}\mathclose{\left|\beta_S}\right|^2\Bigr)\Bigl(\sum_{S\subseteq [m], \mathopen{}\mathclose{\left|S}\right|<\gamma} p^{\mathopen{}\mathclose{\left|R\backslash S}\right|}\Bigr)&&\text{Cauchy-Schwarz and \ref{eq:bound95fixedS}}\\ \leq&\sum_{R \subseteq [m], \mathopen{}\mathclose{\left|R}\right| = \Gamma} \sum_{S\subseteq [m], \mathopen{}\mathclose{\left|S}\right|<\gamma} p^{\mathopen{}\mathclose{\left|R\backslash S}\right|}\\ \leq&\binom{m}{\Gamma}\binom{m}{<\gamma}p^{\Gamma - \gamma}, \end{align}\] as required. ◻
The Mirroring Lemma is intuitive in view of 29 and 1: \(\ket{\phi_t}\) and \(\ket{\psi_t}\) are “mirror images” of each other up to the change of \(\mathop{\mathrm{\mathcal{T}}}\) whose effect is controllable, and \(\ket{\psi_t}\) clearly cannot record a rare event with a probability larger than that of the event happening. Now we instantiate the lemma into the following quantitative statement that is useful in our setting.
Lemma 6 (Excluding high-degree graphs). Let \(\Delta\in\mathbb{N}\). If \(n\geq 2\), we have \[\label{eq:exclusion95high95degree} \mathopen{}\mathclose{\left\|\Pi^{\deg}_{\geq \Delta} \ket{\phi_t}}\right\|^2 \leq 2n \Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}+2n\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}.\tag{22}\]
Proof. Fix \(v\in [n]\). For \(x\in \binom{[n]}{2}^m\), we write \(|x|\) for the degree of \(v\) in \(\mathcal{G}(x)\) in this proof. When \(\Delta\geq \ceil{\log(n)}\), applying 5 with \(\Gamma = \Delta\) and \(\gamma = \ceil{\log(n)}\) gives \[\begin{align} \label{eq:instantiated95combine} \mathopen{}\mathclose{\left\|\Pi^{\deg}_{v,\geq \Delta} \ket{\phi_t}}\right\|^2 &\leq 2 \mathop{\mathrm{\mathrm{Pr}}}[\mathopen{}\mathclose{\left|x}\right| \geq \gamma \mid x \leftarrow \mathop{\mathrm{\mathcal{D}}}] + 2\binom{m}{\Delta}\binom{m}{<\ceil{\log(n)}}\Bigl(\frac{n-1}{\binom{n}{2}}\Bigr)^{\Delta - \ceil{\log(n)}} \\ &\leq 2 \mathop{\mathrm{\mathrm{Pr}}}[\mathopen{}\mathclose{\left|x}\right| \geq \gamma \mid x \leftarrow \mathop{\mathrm{\mathcal{D}}}]+2\mathopen{}\mathclose{\left(\frac{em}{\Delta}}\right)^{\Delta}\Bigl(\frac{em}{\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}} \cdot \Bigl(\frac{2}{n}\Bigr)^{\Delta - \ceil{\log(n)}} \notag \\ &\leq 2 \Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}+2\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}, \notag \end{align}\tag{23}\] where the last step holds due to the Chernoff bound in 4.
Now unfixing \(v\) and summing over all \(v\in[n]\), we obtain \[\mathopen{}\mathclose{\left\|\Pi^{\deg}_{\geq \Delta} \ket{\phi_t}}\right\|^2 \leq \sum_{v\in [n]} \mathopen{}\mathclose{\left\|\Pi^{\deg}_{v,\geq \Delta} \ket{\phi_t}}\right\|^2 \leq 2n \Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}+2n\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}},\] as required.
When \(\Delta < \ceil{\log(n)}\), the bound also holds as the second term on the right hand side of 23 is strictly greater than 1, while the left hand side is less than or equal to 1. ◻
Recall that \(\ket{\phi_t}\) depends on the \(m\) and \(n\) that specify the distribution \(\mathop{\mathrm{\mathcal{D}}}\). When \(m=n\), the previous lemma implies that only a tiny fraction of basis states \(\ket{i,u,w}\ket{x}\) in the support \(\ket{\phi_t}\) can have \(x\) recording a high-degree vertex, irrespective of the value of \(t\). More formally, we have the following corollary.
Corollary 3. Suppose \(m = n\) is sufficiently large. Then for all \(d\in \mathbb{Z}\) such that \(d\geq \ceil{\log(n)}^2\), and for all \(t\in \mathbb{Z}_{[0,T]}\), we have \[\mathopen{}\mathclose{\left\|\Pi_{\geq d}^{\deg}\ket{\phi_t}}\right\| \leq \frac{1}{n^2}.\] In particular, \[\sum_{i=1}^{t}\mathopen{}\mathclose{\left\|\Pi_{\mathrm{Bad}}\ket{\phi_i}}\right\| \leq \frac{t}{n^2}.\]
Proof. By 6 (with its \(\Delta\) set to \(\ceil{\log(n)}^2\)), \[\begin{align} \mathopen{}\mathclose{\left\|\Pi_{\geq d}^{\deg}\ket{\phi_t}}\right\|\leq& 2n\Bigl(\frac{2e}{\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}} + 2n\mathopen{}\mathclose{\left(\frac{2e}{\ceil{\log(n)}^2}}\right)^{\ceil{\log(n)}^2}\Bigl(\frac{en^2}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}\\ =& 2n\Bigl(\frac{2e}{\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}} + 2n\Bigl(\frac{2^{\ceil{\log(n)}}e^{\ceil{\log(n)}+1}n^2}{2\ceil{\log(n)}^{2\ceil{\log(n)} + 1}}\Bigr)^{\ceil{\log(n)}}\leq\frac{1}{n^2}, \end{align}\] where the first inequality uses \(m=n\), and second inequality uses \(\ceil{\log(n)}^{\ceil{\log(n)}} = \omega(n^k)\) for any constant \(k\). The “in particular” part follows immediately from recalling that \(\Pi_{\mathrm{Bad}}\) is defined to be \(\Pi_{\geq \ceil{\log(n)}^2}^{\deg}\). ◻
To reliably record a triangle, there must be many wedges recorded along the way. In this part, we bound the progress of a quantum query algorithm in recording wedges. Recall the measure of progress of recording at least \(r\) wedges in \(t\) queries is defined as \[\Lambda_{t,r} \mathrel{\vcenter{:}}= \mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\ket{\phi_t}}\right\|.\]
As mentioned previously, high-degree vertices can potentially cause an overestimate of the power of quantum algorithms to record wedges. We apply the Exclusion Lemma to suppress these high-degree vertices. In particular, invoking 2 with \(\Pi_i\mathrel{\vcenter{:}}= 0\), \(\Pi_i'\mathrel{\vcenter{:}}= \Pi_{\mathrm{Bad}}\) for all \(i\in [t-1]\) and \(\Pi_{\mathop{\mathrm{\mathrm{rec}}}} \mathrel{\vcenter{:}}= \Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\) gives \[\label{eq:vtr95good95bad} \Lambda_{t,r} \leq \mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\ket{\phi'_t}}\right\| + \sum_{i=1}^{t-1}\mathopen{}\mathclose{\left\|\Pi_{\mathrm{Bad}}\ket{\phi_i}}\right\|,\tag{24}\] where \(\ket{\phi'_t}\) is the (possibly unnormalized) state defined by \[\ket{\phi'_t} \mathrel{\vcenter{:}}= U_t\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{t-1}')U_{t-1}\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{t-2}')U_{t-2}\mathop{\mathrm{\mathcal{R}}}\cdots (\mathop{\mathrm{\mathbb{I}}}-\Pi_1')U_1\mathop{\mathrm{\mathcal{R}}}U_0(\ket{0}\ket{\bot^m}).\] The term \(\sum_{i=1}^{t-1}\mathopen{}\mathclose{\left\|\Pi_{\mathrm{Bad}}\ket{\phi_i}}\right\|\) in 24 can be bounded using 3. Therefore, to bound \(\Lambda_{t,r}\), it suffices to bound \[\Lambda'_{t,r} \mathrel{\vcenter{:}}= \mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\ket{\phi'_t}}\right\|.\]
Lemma 7 (Wedges progress recurrence). For all \(t\in \mathbb{Z}_{[0,T]}\) and \(r\geq 0\), we have \[\Lambda'_{t+1,r} \leq \Lambda'_{t,r} + 8\sqrt{\frac{t}{n}}\Lambda'_{t,r-2\ceil{\log(n)}^2}.\label{eq:v-prime-recurrence}\tag{25}\] In addition, \(\Lambda'_{0,0} = 1\), and \(\Lambda'_{0,r} =0\) for all \(r\geq 1\).
Proof. It is clear that the boundary condition \(\Lambda'_{0,0} = 1\), and \(\Lambda'_{0,r} =0\) for all \(r\geq 1\) since \(\ket{\phi_0'}=\ket{\phi_0}=\ket{0}\ket{\bot^m}\). So in the remainder of the proof, we focus on deriving the recurrence 25 .
For integer \(t\) with \(t+1\in\mathbb{Z}_{[0,T]}\), since \(U_{t+1}\) acts as identity on the input register, \[\Lambda'_{t+1,r} = \mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}U_{t+1}\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\ket{\phi'_t}}\right\|=\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\ket{\phi'_t}}\right\|.\]
Consider a basis state \(\ket{i,u,w}\ket{x}\). If \(x\) does not record at least \(r\) wedges, then \(x\) must record at least \(r-2\mathop{\mathrm{\mathrm{maxdeg}}}(\mathop{\mathrm{\mathcal{G}}}(x))\) wedges in order for \(\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x} \neq 0\). Recall \(\mathop{\mathrm{\mathrm{maxdeg}}}(\mathop{\mathrm{\mathcal{G}}}(x))\) denotes the maximum vertex degree of \(\mathop{\mathrm{\mathcal{G}}}(x)\). This is because \(\mathop{\mathrm{\mathcal{R}}}\) can introduce at most one new edge in register \(I_i\), and that new edge can introduce at most \(2\mathop{\mathrm{\mathrm{maxdeg}}}(\mathop{\mathrm{\mathcal{G}}}(x))\) new wedges. (This bound is saturated when the new edge connects two disconnected vertices in \(\mathop{\mathrm{\mathcal{G}}}(x)\) of degree \(\mathop{\mathrm{\mathrm{maxdeg}}}(\mathop{\mathrm{\mathcal{G}}}(x))\) each.) If \(\ket{i,u,w}\ket{x}\) is in the support of \((\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\ket{\phi_t'}\), then \(\mathop{\mathrm{\mathrm{maxdeg}}}(\mathop{\mathrm{\mathcal{G}}}(x)) < \ceil{\log(n)}^2\) by the definition of \(\Pi_{\mathrm{Bad}}\). Therefore, \[\begin{align} \Lambda'_{t+1,r}~\leq~ &\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\ket{\phi'_t}}\right\| + \mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\| \notag \\ ~=~&\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\ket{\phi'_t}}\right\| +\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}(\mathbb{I}-|0\rangle\langle 0|_{P})(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\| \nonumber\\ ~\leq~&\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\ket{\phi'_t}}\right\| + \sum_{y\in [N]\cup\{\bot\}}\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\Pi_y(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\| \nonumber\\ ~=~&\Lambda'_{t,r} + \sum_{y\in [N]\cup\{\bot\}}\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\Pi_y(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\|.\label{eq:wedge95recurrence95terms} \end{align}\tag{26}\] To go from the second term in the first line to that in the second line, we used the fact that \(\mathop{\mathrm{\mathcal{R}}}\) acts as identity on each basis state \(\ket{i,u,w}\ket{x}\) when \(u=0\), so no more wedges will be recorded. In the third step, note that \(\mathbb{I}_{P}-|0\rangle\langle 0|_{P} = \sum_{y\in[N]\cup \{\bot\}} \Pi_y\), then it follows from triangle inequality.
Abbreviate \[\ket\rho\mathrel{\vcenter{:}}=(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t},\] we bound the second term in 26 based on whether \(y=\bot\) or not. We will show \[\begin{align} \mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\Pi_\bot\ket\rho}\right\| &\le 2\sqrt{\frac{t}{n}}\Lambda'_{t,r-2\ceil{\log(n)}^2}, \tag{27} \\ \sum_{y\in[N]} \mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\Pi_y\ket\rho}\right\| &\le 6\sqrt{\frac{t}{n}}\Lambda'_{t,r-2\ceil{\log(n)}^2}. \tag{28} \end{align}\] Plugging 27 28 into 26 , we obtain our main recurrence 25 stated in the lemma, concluding the proof.
When \(y=\bot\), consider each basis state \(\ket{i,u,w}\ket{x}\) in the support of \[\Pi_\bot(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}.\] Due to \(\Pi_\bot\), we have \(x_i = \bot\) and \(u\neq 0\), so 1 states \[\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x} = \ket{i,u,w}\biggl(\sum_{y\in [N]}\frac{\omega_N^{u y}}{\sqrt{N}}\ket{y}_{I_i}\biggr)\otimes\bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}.\] Since \(\ket{i,u,w}\ket{x}\) is also in the support of \(\ket{\phi_t'}\), \(x\) records at most \(t\) edges by 30. Due to \(\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\), \(x\) records fewer than \(r\) wedges. Therefore, in order for \(\ket{y}_{I_i} \otimes \bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}\) to record at least \(r\) wedges, \(y\) must be an edge adjacent to some edge recorded in \(x\), of which there are at most \(t \cdot 2(n-1)\) possibilities. Therefore, \[\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x}}\right\|\leq\sqrt{\frac{t \cdot 2(n-1)}{N}}=2\sqrt{\frac{t}{n}}.\] Since any two distinct basis states in the support of \(\Pi_\bot(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}\) remain orthogonal after \(\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\) is applied,23 we have \[\begin{align} &\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\Pi_\bot(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\| \\ &\qquad \le 2\sqrt{\frac{t}{n}}\mathopen{}\mathclose{\left\|\Pi_\bot(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\| \leq 2\sqrt{\frac{t}{n}}\Lambda'_{t,r-2\ceil{\log(n)}^2}. \end{align}\]
When \(y\in [N]\), consider each basis state \(\ket{i,u,w}\ket{x}\) with non-zero amplitude in \[\Pi_y(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}.\] Due to \(\Pi_y\), we have \(x_i = y\) and \(u\neq 0\), so 1 states \[\label{eq:wedge95recurrence95nonperp} \begin{align} \mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x} =\ket{i,u,w}&\biggl(\frac{\omega^{u y}_N}{\sqrt{N}}\ket{\bot}_{I_i}+\frac{1+\omega^{u y}_N(N-2)}{N}\ket{y}_{I_i}\\ &\qquad\qquad+\sum_{y'\in [N]\backslash\{y\}}\frac{1-\omega^{u y'}_N-\omega^{u y}_N}{N}\ket{y'}_{I_i}\biggr)\otimes\bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}. \end{align}\tag{29}\] Applying similar reasoning as in the previous case, we deduce \[\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x}}\right\|\leq 3\frac{\sqrt{t\cdot 2(n-1)}}{N}.\] Since any two distinct basis states in the support of \(\Pi_y(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}\) remain orthogonal after \(\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\) is applied, we have \[\begin{align} &\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\Pi_y(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\| \\ &\qquad\leq 3\frac{\sqrt{t\cdot 2(n-1)}}{N}\mathopen{}\mathclose{\left\|\Pi_y(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\|. \end{align}\] Therefore, applying the Cauchy-Schwarz inequality gives \[\begin{align} &\sum_{y\in [N]}\mathopen{}\mathclose{\left\|\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\Pi_y(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\| \nonumber\\ &\qquad \le 3\sqrt{\frac{t\cdot 2(n-1)}{N}}\sqrt{\sum_{y\in [N]}\mathopen{}\mathclose{\left\|\Pi_y(\mathop{\mathrm{\mathbb{I}}}-\Pi_{\mathrm{Bad}})\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r-2\ceil{\log(n)}^2,r)}\ket{\phi'_t}}\right\|^2} \nonumber\\ &\qquad \leq 6\sqrt{\frac{t}{n}}\Lambda'_{t,r-2\ceil{\log(n)}^2}.\qedhere \end{align}\] ◻
Solving the wedges progress recurrence, we obtain
Lemma 8 (Wedges progress). For all \(t \in \mathbb{Z}_{[0,T]}\) and \(r \geq 2\ceil{\log(n)}^2\), we have \[\Lambda'_{t,r} \leq \biggl(\frac{8et^{3/2}}{\lfloor \frac{r}{2\ceil{\log(n)}^2}\rfloor\sqrt{n}}\biggr)^{\lfloor \frac{r}{2\ceil{\log(n)}^2}\rfloor}.\]
Proof. Let \(k \mathrel{\vcenter{:}}= \lfloor \frac{r}{2\ceil{\log(n)}^2}\rfloor \geq 1\). By definition, \(\Lambda'_{t,r} \leq \Lambda'_{t,k\cdot 2\ceil{\log(n)}^2}\). Therefore, \[\Lambda'_{t,r}\leq \Lambda'_{t,k\cdot 2\ceil{\log(n)}^2} \leq \binom{t}{k}\biggl(8\sqrt{\frac{t}{n}}\biggr)^{k} \leq \biggl(\frac{8et^{3/2}}{k\sqrt{n}}\biggr)^{k},\] where we solved the recurrence from 7 in the second inequality. ◻
We move on to bounding the progress of a quantum query algorithm in recording a triangle. Recall that we defined the progress measure of finding a triangle within \(t\) queries \[\Delta_t\mathrel{\vcenter{:}}= \mathopen{}\mathclose{\left\|\Pi^\triangle\ket{\phi_t}}\right\|.\]
Let \[r^* \mathrel{\vcenter{:}}= \biggl\lceil \frac{n^{4/7}}{\log^{6/7}(n)}\biggr\rceil \cdot 2\ceil{\log(n)}^2.\] and for \(t\in \mathbb{Z}_{[0,T]}\), define \[\label{eq:phit95star} \ket{\phi_t^*}\mathrel{\vcenter{:}}= U_t\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^*)U_{t-1}\mathop{\mathrm{\mathcal{R}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^*)U_{t-2}\mathop{\mathrm{\mathcal{R}}}\cdots (\mathop{\mathrm{\mathbb{I}}}-\Pi^*)U_1\mathop{\mathrm{\mathcal{R}}}U_0(\ket{0}\ket{\bot^m}),\tag{30}\] where \(\Pi^*\) denotes the projector onto every basis state \(\ket{i,u,w}\ket{x}\) such that \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains at least \(r^*\) wedges. Then, define \[\label{eq:triangleprogress95star} \Delta_t^*\mathrel{\vcenter{:}}= \mathopen{}\mathclose{\left\|\Pi^\triangle\ket{\phi_t^*}}\right\|.\tag{31}\]
We can bound \(\Delta_t\) by bounding \(\Delta_t^*\) due to the next lemma.
Lemma 9. For all sufficiently large \(n\) and \(T\leq o(n^{5/7}/\log^{4/7}(n))\), we have \[\Delta_T \leq \Delta_T^* + o(1).\]
Proof. We have \[\begin{align} \mathopen{}\mathclose{\left\|\ket{\phi_T^*} - \ket{\phi_T}}\right\| \leq& \sum_{t=1}^T \mathopen{}\mathclose{\left\|\Pi^*\ket{\phi_t}}\right\| &&\text{\ref{lem:exclusion95lemma}} \\ =& \sum_{t=1}^T\Lambda_{t,r^*} &&\text{by definition} \\ \leq&\sum_{t=1}^T \biggl(\Lambda_{t,r^*}' + \sum_{i=1}^{t-1}\mathopen{}\mathclose{\left\|\Pi_{\mathrm{Bad}}\ket{\phi_i}}\right\|\biggr) &&\text{\ref{eq:vtr95good95bad}} \\ \leq& \sum_{t=1}^T \biggl(\Lambda_{t,r^*}' + \frac{t}{n^2}\biggr) &&\text{\ref{cor95bad95event95bound}} \\ \leq& (T/n)^2 + \sum_{t=1}^T \Lambda_{t,r^*}'. \end{align}\] But if \(t\in \mathbb{N}\) is such that \(t\leq T \leq o(n^{5/7}/\log^{4/7}(n))\), then 8 gives \[\Lambda'_{t,r^*} \leq \biggl(\frac{8et^{3/2}}{\lfloor \frac{r^*}{2\ceil{\log(n)}^2}\rfloor\sqrt{n}}\biggr)^{\lfloor \frac{r^*}{2\ceil{\log(n)}^2}\rfloor} \leq 2^{-{\lfloor \frac{r^*}{2\ceil{\log(n)}^2}\rfloor}} \leq 2^{-\sqrt{n}}\] for sufficiently large \(n\).
Therefore, \(\mathopen{}\mathclose{\left\|\ket{\phi_T^*} - \ket{\phi_T}}\right\| \leq (T/n)^2 + T/2^{\sqrt{n}}\), which is at most \(o(1)\) for \(T\leq o(n^{5/7}/\log^{4/7}(n))\). ◻
Lemma 10 (Triangle progress recurrence). For all \(t\in \mathbb{Z}_{[0,T]}\), \[\label{eq:triangle95recurrence} \Delta_{t+1}^* \leq \Delta_t^* + 4\sqrt{\frac{r^*}{N}},\tag{32}\] and \(\Delta_0^* = 0\)
Proof of 10. The boundary condition \(\Delta_0^* = 0\) in 32 is immediate since \(\ket{\phi_0^*} = U_0 (\ket{0}\ket{\bot^m})\) does not record any wedges. To prove the recurrence, observe that \[\begin{align} \Delta^*_{t+1} =&~ \mathopen{}\mathclose{\left\|\Pi^{\triangle} \ket{\phi_{t+1}^*}}\right\| &&\text{definition \ref{eq:triangleprogress95star}} \notag \\ =&~ \mathopen{}\mathclose{\left\|\Pi^{\triangle} U_{t+1} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}- \Pi^*\bigr)\ket{\phi_t^{*}}}\right\| &&\text{definition \ref{eq:phit95star}} \notag \\ =&~\mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}- \Pi^*\bigr)\ket{\phi_t^{*}}}\right\| &&\text{\Pi^{\triangle}, U_{t+1} commute} \notag \\ \leq&~ \mathopen{}\mathclose{\left\|\Pi^{\triangle} \ket{\phi_t^{*}}}\right\| + \mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}- \Pi^* \bigr)\bigl(\mathbb{I}-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}}\right\| &&\text{triangle inequality} \notag \\ =&~ \Delta^*_{t} + \mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}- \Pi^*\bigr)\bigl(\mathbb{I}-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}}\right\| &&\text{definition \ref{eq:triangleprogress95star}}\label{eq:triangle95recurrence95terms} \end{align}\tag{33}\]
Abbreviate \[\ket{\rho} \mathrel{\vcenter{:}}= \bigl(\mathbb{I}- \Pi^{*} \bigr)\bigl(\mathbb{I}-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}.\] Then, we can write the second term in 33 as \[\mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\ket{\rho}}\right\| \leq \sum_{y\in [N]\cup \{\bot\}} \mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\Pi_y \ket{\rho}}\right\|,\] using \(\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}|0\rangle\langle 0|_P \ket{\rho} = 0\) because \(\ket{\rho}\) has recorded no triangle and \(\mathop{\mathrm{\mathcal{R}}}|0\rangle\langle 0|_P = |0\rangle\langle 0|_P\).
We will show \[\label{eq:triangle95progress95bound} \mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\Pi_{\bot}\ket{\rho}}\right\| \leq \sqrt{\frac{r^*}{N}} \quad \text{and} \quad \sum_{y\in [N]}\mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\Pi_y \ket{\rho}}\right\| \leq 3\sqrt{\frac{r^*}{N}}.\tag{34}\]
When \(y=\bot\), consider each basis state \(\ket{i,u,w}\ket{x}\) in the support of \[\Pi_\bot \bigl(\mathbb{I}- \Pi^*\bigr)\bigl(\mathbb{I}-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}.\] Due to \(\Pi_\bot\), we have \(x_i = \bot\) and \(u\neq 0\), so 1 states \[\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x} = \ket{i,u,w}\biggl(\sum_{y\in [N]}\frac{\omega_N^{u y}}{\sqrt{N}}\ket{y}_{I_i}\biggr)\otimes\bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}.\] Since \(\ket{i,u,w}\ket{x}\) is also in the support of \((\mathbb{I}-\Pi^{*})\), \(x\) records at most \(r^*\) wedges. Due to \(\bigl(\mathbb{I}-\Pi^{\triangle}\bigr)\), \(x\) does not record a triangle. Therefore, in order for \(\ket{y}_{I_i} \otimes \bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}\) to record a triangle, edge \(y\) must connect the two ends of a wedge. The number of such \(y\)s is at most \(r^*\). Therefore, \[\mathopen{}\mathclose{\left\|\Pi^{\triangle}\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x}}\right\|\leq\sqrt{\frac{r^*}{N}}.\] Since any two distinct basis states in the support of \(\Pi_\bot \bigl(\mathbb{I}- \Pi^{*}\bigr)\bigl(\mathbb{I}-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}\) remain orthogonal after \(\Pi^{\triangle}\mathop{\mathrm{\mathcal{R}}}\) is applied, we have \[\begin{align} \mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\Pi_{\bot}\ket{\rho}}\right\| &= \mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\Pi_{\bot}\bigl(\mathbb{I}-\Pi^{*}\bigr)\bigl(\mathbb{I}-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}}\right\| \leq\sqrt{\frac{r^*}{N}}. \end{align}\]
When \(y\in [N]\), consider each basis state \(\ket{i,u,w}\ket{x}\) in the support of \[\Pi_y \bigl(\mathbb{I}- \Pi^{*}\bigr)\bigl(\mathbb{I}-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}.\] Due to \(\Pi_y\), we have \(x_i = y\) and \(u\neq 0\), so 1 states \[\begin{align} \mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x} =\ket{i,u,w}&\biggl(\frac{\omega^{u y}_N}{\sqrt{N}}\ket{\bot}_{I_i}+\frac{1+\omega^{u y}_N(N-2)}{N}\ket{y}_{I_i}\\ &\qquad\qquad+\sum_{y'\in [N]\backslash\{y\}}\frac{1-\omega^{u y'}_N-\omega^{u y}_N}{N}\ket{y'}_{I_i}\biggr)\otimes\bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}. \end{align}\] Applying similar reasoning as in the proof of the first bound in 34 , we deduce \[\mathopen{}\mathclose{\left\|\Pi^{\triangle}\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x}}\right\|\leq 3\frac{\sqrt{r^*}}{N}.\] Since any two distinct basis states in the support of \(\Pi_y \bigl(\mathbb{I}- \Pi^*\bigr)\bigl(\mathbb{I}-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}\) remain orthogonal after \(\Pi^{\triangle}\mathop{\mathrm{\mathcal{R}}}\) is applied, we have \[\mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\Pi_{y}\bigl(\mathbb{I}-\Pi^*\bigr)\bigl(1-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}}\right\| \leq 3\frac{\sqrt{r^*}}{N}\mathopen{}\mathclose{\left\|\Pi_{y}\bigl(\mathbb{I}-\Pi^*\bigr)\bigl(1-\Pi^{\triangle}\bigr)\ket{\phi_t^*}}\right\|.\] Therefore, the Cauchy-Schwarz inequality gives \[\begin{align} &\sum_{y\in [N]} \mathopen{}\mathclose{\left\|\Pi^{\triangle} \mathop{\mathrm{\mathcal{R}}}\Pi_{y}\bigl(\mathbb{I}-\Pi^*\bigr)\bigl(1-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}}\right\| \nonumber\\ &\qquad \le 3\sqrt{\frac{r^*}{N}}\sqrt{\sum_{y\in [N]}\mathopen{}\mathclose{\left\|\Pi_{y}\bigl(\mathbb{I}-\Pi^*\bigr)\bigl(1-\Pi^{\triangle}\bigr)\ket{\phi_t^{*}}}\right\|^2} \leq 3\sqrt{\frac{r^*}{N}}.\qedhere \end{align}\] ◻
Lemma 11 (Hardness of recording a triangle). For all sufficiently large \(n\), \(T\leq o(n^{5/7}/\log^{4/7}(n))\) and \(m = n\), we have \[\Delta_T \leq o(1) .\]
Proof. Solving the recurrence in 10 gives \[\Delta_T^* \leq 4T \sqrt{\frac{r^*}{N}} \leq O\biggl(T\sqrt{\frac{n^{4/7} \log^{8/7}(n)}{n^2}}\biggr) \leq O\biggl(T\frac{\log^{4/7}(n)}{n^{5/7}}\biggr),\] where we recalled the definition of \(r^*\) in the second inequality.
Therefore, \(\Delta_T^*\leq o(1)\) if \(T\leq o(n^{5/7}/\log^{4/7}(n))\). But \(\Delta_T \leq \Delta_T^* + o(1)\) if \(T\leq o(n^{5/7}/\log^{4/7}(n))\) by 9. Hence the lemma. ◻
To finish the proof, we use the next lemma, which bounds the probability of the algorithm succeeding even if it does not record a triangle. Intuitively, if the algorithm does not record a triangle, it should not be significantly better at finding a triangle than guessing at random. The lemma is standard in the recording query framework — indeed, our proof is based on [2] — but we include it for completeness.
Let \(\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\) denote the projector onto basis states \(\ket{i,u,w}\ket{x}\) such that \(w\) contains an output substring (i.e., a substring located at some fixed output register) of the form \((a_1,a_2,a_3,b_1,b_2,b_3) \in [m]^3 \times \binom{[n]}{2}^3\) where the \(a_i\)s are distinct, the \(b_i\)s form a triangle, and \(x_{a_i} = b_i\) for all \(i\).
Lemma 12 (Hardness of guessing a triangle). For every state \(\ket{\phi}\), \(\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^\triangle)\ket{\phi}}\right\| \leq O(\frac{1}{n})\).
With the above lemma, 28 becomes a simple corollary. If \(T = o(n^{5/7}/\log^{4/7}(n))\), we have \[\label{eq:final95step} \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\ket{\psi_T}}\right\| = \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}\ket{\phi_T}}\right\|\leq \mathopen{}\mathclose{\left\|\Pi^\triangle \ket{\phi_T}}\right\| + \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^\triangle)\ket{\phi_T}}\right\| = o(1),\tag{35}\] where we used 11 to bound the first term and 12 to bound the second term.
Proof of 12. For \(k,l\in \mathbb{Z}_{\geq 0}\) with \(k+l\leq 3\), we define the projector \(P_{k,l}\) to be onto basis states \(\ket{i,u,w}\ket{x}\), where
\(w\) contains the output substring \((a_1,a_2,a_3,b_1,b_2,b_3) \in [m]^3 \times \binom{[n]}{2}^3\) where the \(a_i\)s are distinct and the \(b_i\)s form a triangle;
there are exactly \(k\) indices \(i\in [3]\) such that \(x_{a_i} = \bot\);
there are exactly \(l\) indices \(i \in [3]\) such that \(x_{a_i} \neq \bot\) and \(x_{a_i} \neq b_i\).
Observe that if \(\ket{i,u,w}\ket{x}\) is in the support of \(\mathop{\mathrm{\mathbb{I}}}-\Pi^\triangle\), then \(P_{0,0} \ket{i,u,w}{\ket{x}} = 0\). This is because if \(\ket{i,u,w}\ket{x}\) is in the support of \(P_{0,0}\), then \(x_{a_i} = b_i\) for all \(i\) and the \(b_i\)s form a triangle, which contradicts the assumption.
For a state \(\ket{i,u,w}\ket{x}\) in the support of \(P_{k,l}\), we have \[\label{eq:succ95single95basis95kl} \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}} \mathop{\mathrm{\mathcal{T}}}\ket{i,u,w}\ket{x}}\right\| \leq (1/\sqrt{N})^k(1/N)^l,\tag{36}\] using the definition of \(\mathop{\mathrm{\mathcal{T}}}\).
For \(\ket{i,u,w}\ket{x}\) in the support of \(P_{k,l}\), we write \(w_{a}\mathrel{\vcenter{:}}= \{a_1,a_2,a_3\}\) for the set containing the first three elements of the output substring. Observe that \(\ket{i,u,w}\ket{x}\) and \(\ket{i',u',w'}\ket{x'}\) remain orthogonal after applying \(\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}\) unless \(i=i',u=u',w=w'\) and \(x_s = x'_s\) for all \(s\in [m]-\{a_1,a_2,a_3\}\).
Therefore, for a state \(\ket{\chi} \mathrel{\vcenter{:}}= \sum_{i,u,w,x}\alpha_{i,u,w,x} \ket{i,u,w}\ket{x}\) in the support of \(P_{k,l}\), we have \[\label{eq:succ95kl} \begin{align} \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}\ket{\chi}}\right\|^2 &= \sum_{i,u,w,(x_{a'})_{a'\notin w_a}}\biggl\|\sum_{(x_{a'})_{a'\in w_a}} \alpha_{i,u,w,x} \Pi_{\mathop{\mathrm{\mathrm{succ}}}} \mathop{\mathrm{\mathcal{T}}}\ket{i,u,w}\ket{x}\biggr\|^2 \\ &\leq \sum_{i,u,w,(x_{a'})_{a'\notin w_a}}\Bigl(\sum_{(x_{a'})_{a'\in w_a}} \mathopen{}\mathclose{\left|\alpha_{i,u,w,x}}\right|^2 \Bigr)\Bigl(\sum_{(x_{a'})_{a'\in w_a}}\mathop{\mathrm{\mathbb{1}}}[\alpha_{i,u,w,x}\neq 0]\cdot \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}} \mathop{\mathrm{\mathcal{T}}}\ket{i,u,w}\ket{x}}\right\|^2\Bigr) \\ &\leq \binom{3}{k,l,3-(k+l)}(N-1)^l \cdot \Bigl(\frac{1}{N}\Bigr)^k\Bigl(\frac{1}{N^2}\Bigr)^l \leq \frac{6}{N^{k+l}}, \end{align}\tag{37}\] where the first inequality is Cauchy-Schwarz and the second inequality is 36 .
Finally, write \(P\) for the projector onto basis states \(\ket{i,u,w}\ket{x}\) not satisfying the first condition defining \(P_{k,l}\) so that \(\mathop{\mathrm{\mathbb{I}}}= P + \sum_{k,l\in \mathbb{Z}_{\geq 0}\colon k+l \leq 3}P_{k,l}\). Therefore \[\begin{align} \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^\triangle)\ket{\phi}}\right\|^2 &= \biggl\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^{\triangle})\Bigl(P + \sum_{k,l\in \mathbb{Z}_{\geq 0}\colon k+l \leq 3} P_{k,l}\Bigr)\ket{\phi}\biggr\|^2 \notag \\ &=\biggl\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^{\triangle})\Bigl(\sum_{k,l\in \mathbb{Z}_{\geq 0}\colon 0< k+l \leq 3} P_{k,l}\Bigr)\ket{\phi}\biggr\|^2 \notag \\ &= \biggl\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}\Bigl(\sum_{k,l\in \mathbb{Z}_{\geq 0}\colon 1\leq k+l \leq 3} P_{k,l}\Bigr) (\mathop{\mathrm{\mathbb{I}}}-\Pi^{\triangle})\ket{\phi}\biggr\|^2 \leq \frac{54}{N},\label{eq:guessing95prob} \end{align}\tag{38}\] where the second equality uses \(\Pi_{\mathop{\mathrm{\mathrm{succ}}}}P = 0\) and \((\mathop{\mathrm{\mathbb{I}}}-\Pi^{\triangle}) P_{0,0} = 0\) as observed previously, and the last inequality uses 37 and the restriction on the sum of \(P_{k,l}\)s to \(1 \leq k+l\).
The lemma follows from 38 after taking square roots on both sides and recalling \(N = \binom{n}{2}\). ◻
In this section, we prove the following theorem.
Theorem 31. For all \(m,d \in \mathbb{N}\), \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_{m,d}) \leq O(2^{(12/7)d}d^{3/7}m^{5/7})\).
Corollary 4. For all \(m\in \mathbb{N}\) and \(d\leq O(\log(m)/\log\log(m))\), \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_{m,d}) \leq O(m^{5/7 + o(1)})\). In view of 26, if \(n\geq \Omega(m)\) there exists a quantum query algorithm using \(O(m^{5/7 + o(1)})\) queries that finds a triangle in a random sparse graph \(x \leftarrow \binom{[n]}{2}^m\), or decides it does not exist, with success probability \(\geq 1 - o(1)\).
We prove 31 by adapting Belovs’s learning graph algorithm for \(3\)-distinctness [3]. A key challenge in Belovs’s work is the presence of faults, as intuitively described in the introduction. At a technical level, faults are violations of the feasibility conditions in the semi-definite program characterizing quantum query complexity. Belovs found that directly using a learning graph algorithm of the type in his earlier work [6] led to faults. In [3], for \(k\)-distinctness, Belovs devised a technique based on the inclusion-exclusion principle to “error-correct” these faults at the cost of an exponential-in-\(k\) factor, which is constant for constant \(k\).
Technically speaking, in \(3\)-distinctness, at most one fault can occur because negative instances are limited to having \(2\)-collisions, and once one index of a \(2\)-collision is fixed, only its second index could possibly contribute a fault. In our problem, however, a single edge can belong to up to \(2(d - 1)\) wedges, where \(d\) is the maximum degree of the graph, introducing the possibility of multiple faults. Fortunately, Belovs’s learning graph algorithm for \(k\)-distinctness for general \(k\) shows how inclusion-exclusion can be used to handle multiple faults. We adapt this technique to our problem and it represents the main change we make to his \(3\)-distinctness algorithm. The additional changes we make, such as explicitly defining the graph, replacing the concept of “arcs taken” with “active arcs,” and elaborating on somewhat opaque definitions, are primarily for improved clarity and accessibility. These adjustments do not alter the underlying algorithm and are not strictly necessary.
In summary, our algorithm for triangle finding is closely aligned with Belovs’s original learning graph algorithm for \(3\)-distinctness, which highlights the deep structural similarities between \(3\)-distinctness and triangle finding.
When \(d\geq \log(m)\), the trivial bound \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_m)\leq m\) applies, ensuring 31 is satisfied. When \(d\leq \log(m)\), we employ the learning graph method along with 27 to confirm the validity of 31.
In [3], Belovs used a learning graph approach to construct matrices for the adversary bound. For every function \(g:\mathcal{D}\subseteq \Sigma^m\to\{0,1\}\), the adversary bound \(\mathrm{Adv}^{\pm}(g)\) satisfies the following theorem.
\(\mathrm{Adv}^{\pm}(g)\) can be formulated as the following semi-definite program [41]: \[\begin{align} {2} &\text{minimize}\qquad && \max_{x \in \mathcal{D}} \sum_{j \in [m]} X_j[x,x],\tag{39}\\ &\text{subject to}\qquad && \sum_{j \in [m] \colon x_j \neq y_j} X_j[x,y] = 1\qquad \text{if } g(x) \neq g(y);\tag{40}\\ & &&0 \leq X_j \in \mathbb{C}^{\mathop{\mathrm{\mathcal{D}}}\times \mathop{\mathrm{\mathcal{D}}}} \quad \text{for all j \in [m]}. \end{align}\]
Every valid construction of \(\{X_j\}_{j\in[m]}\) provides an upper bound for \(\mathrm{Adv}^\pm(g)\) and, consequently, an upper bound for \(Q(g)\) up to constant factors. We construct \(\{X_j\}_{j\in[m]}\) using the learning graph framework, following a similar approach to that in [3]. Specifically, for each arc \(A_j^{R,S}\) in the learning graph from vertex \(R\) and to vertex \(S\) where \(R\) and \(S\) uniquely determines \(j\) (to be shown in detail later), we associate a positive semi-definite matrix \(X_j^{R,S}\), and define \[X_j \mathrel{\vcenter{:}}= \sum_{R,S} X_j^{R,S}.\]
We first describe the construction of the learning graph. For simplicity, we use \(f\) to denote \(\mathop{\mathrm{\mathsf{Triangle}}}_{m,d}\). The vertices of the learning graph are \[\dot{\bigcup}_{i\in\{0,1,2,3,4\}} V^{(i)},\] where a vertex \(S^{(i)}\) in \(V^{(i)}\) is (labelled by) an array of length \((2^{2d} - 1) + 2d\) containing pairwise-disjoint subsets of \([m]\); we refer to entries of \(S^{(i)}\) by \[S^{(i)} = (S_1^{(i)}(\Gamma),S_2^{(i)}(\gamma))_{\varnothing\neq \Gamma \subseteq [2d],\, \gamma\in [2d]} = (S_1^{(i)}(\{1\}),\dots, S_1^{(i)}([2d]), S_2^{(i)}(1), \dots, S_2^{(i)}(2d)).\] We further impose conditions on the sizes of these sets using some \(r_1,r_2\in \mathbb{N}\) that will be chosen later, at the end of 5.4.5. To describe these conditions, it is convenient to write \(\mu(A)\) for the minimum element of a finite non-empty subset \(A \subset \mathbb{Z}\).
First, \(V^{(1)}\) consists of all vertices \(S^{(1)}\) such that \[\forall \varnothing\neq \Gamma\subseteq[2d], \gamma\in[2d], \quad \mathopen{}\mathclose{\left|S_1^{(1)}(\Gamma)}\right| = r_1 \quad \text{and} \quad \mathopen{}\mathclose{\left|S_2^{(1)}(\gamma)}\right| = r_2.\] Then, for \(i\in \{2,3,4\}\), we impose that the set \(V^{(i)}\) can be partitioned as \(V^{(i)} = \dot{\cup}_{\varnothing\neq \Gamma \subseteq[2d]} V^{(i)}(\Gamma)\) such that
\(V^{(2)}(\Gamma)\) consists of all vertices \(S^{(2)}\) with \[\mathopen{}\mathclose{\left|S_1^{(2)}(\Gamma)}\right| = r_1+1, \qquad \forall \Gamma'\neq \Gamma,\mathopen{}\mathclose{\left|S_1^{(2)}(\Gamma')}\right| = r_1,\qquad \forall \gamma\in[2d], \mathopen{}\mathclose{\left|S_2^{(2)}(\gamma)}\right| = r_2.\]
\(V^{(3)}(\Gamma)\) consists of all vertices \(S^{(3)}\) such that \[\mathopen{}\mathclose{\left|S_1^{(3)}(\Gamma)}\right| = r_1+1, \qquad \forall \Gamma'\neq \Gamma,\mathopen{}\mathclose{\left|S_1^{(3)}(\Gamma')}\right| = r_1,\] and \[\mathopen{}\mathclose{\left|S_2^{(3)}(\mu(\Gamma))}\right| = r_2+1,\qquad \forall \gamma\neq \mu(\Gamma),\mathopen{}\mathclose{\left|S_2^{(3)}(\gamma)}\right| = r_2.\]
\(V^{(4)}(\Gamma)\) consists of all vertices \(S^{(4)}\) such that \[\mathopen{}\mathclose{\left|S_1^{(4)}(\Gamma)}\right| = r_1+1, \qquad \forall \Gamma'\neq \Gamma,\mathopen{}\mathclose{\left|S_1^{(4)}(\Gamma')}\right| = r_1,\] and \[\mathopen{}\mathclose{\left|S_2^{(4)}(\mu(\Gamma))}\right| = r_2+2,\qquad \forall \gamma\neq \mu(\Gamma),\mathopen{}\mathclose{\left|S_2^{(4)}(\gamma)}\right| = r_2.\]
For each vertex \(R\) in the learning graph, define \[\bigcup R_1\mathrel{\vcenter{:}}= \bigcup_{\varnothing\neq \Gamma\subseteq[2d]}R_1(\Gamma), \quad \bigcup R_2\mathrel{\vcenter{:}}= \bigcup_{\gamma\in[2d]}R_2(\gamma), \quad \text{and} \quad \bigcup R\mathrel{\vcenter{:}}= \bigcup R_1 \cup \bigcup R_2.\] We refer to indices contained in the first, second, and third sets as having been loaded in \(R_1\), \(R_2\), and \(R\), respectively. If there is an arc from vertex \(R\) to vertex \(S\) in the learning graph, by the construction in the following paragraphs, it must satisfy \(\bigcup S = \bigcup R \cup \{j\}\). We denote the arc as \(A^{R,S}_j\), and accordingly, we say \(A^{R,S}_j\) is associated with the loading of \(j\).
There exists a unique vertex \(R^{(0)}\in V^{(0)}\) such that \(\bigcup R^{(0)} = \varnothing\). We refer to this vertex as the source, denoted by \(\varnothing\). Each vertex \(R^{(1)}\in V^{(1)}\) loads exactly \(r \mathrel{\vcenter{:}}= r_1\cdot (2^{2d}-1) + r_2\cdot(2d)\) indices. We fix an arbitrary ordering \(t_1,\dots, t_r\) of indices in \(\bigcup R^{(1)}\) such that all indices in \(\bigcup R^{(1)}_1\) precede those in \(\bigcup R^{(1)}_2\). There exists a length-\(r\) path from the source \(\varnothing\) to \(R^{(1)}\), with all intermediate vertices lying in \(V^{(0)}\). Along this path, the element \(t_i\) is loaded on the \(i\)-th arc for \(i\in[r]\) in stages I.1 and I.2. Specifically,
If \(t_i\in \bigcup R_1^{(1)}\), it is loaded in stage I.1,
If \(t_i\in \bigcup R_2^{(1)}\), it is loaded in stage I.2.
All such paths are disjoint except at the source \(\varnothing\). Therefore, there are \(r\bigl|V^{(1)}\bigr|\) arcs in stages I.1 and I.2 in total.
In stage II.1, for each \(R^{(1)}\in V^{(1)}\), \(j\not\in\bigcup R^{(1)}\) and \(\varnothing\neq \Gamma\subseteq[2d]\), there is an arc, denoted \(A^{R^{(1)}, R^{(2)}}_j\), from \(R^{(1)}\) to \(R^{(2)} \in V^{(2)}(\Gamma)\) defined by \[\mathopen{}\mathclose{\left\{\begin{alignedat}{3} &R^{(2)}_1(\Gamma) &&= R^{(1)}_1(\Gamma)\cup\{j\},&&\\ &R^{(2)}_1(\Gamma') &&= R^{(1)}_1(\Gamma'),&& \text{for all \varnothing\neq \Gamma'\subseteq [2d] s.t. \Gamma'\neq \Gamma},\\ &R^{(2)}_2(\gamma) &&= R^{(1)}_2(\gamma),&&\text{for all \gamma\in[2d].} \end{alignedat}}\right.\]
In stage II.2, for each \(\varnothing\neq \Gamma\subseteq[2d]\), \(R^{(2)}\in V^{(2)}(\Gamma)\), and \(j\not\in\bigcup R^{(2)}\), there is an arc, denoted \(A^{R^{(2)},R^{(3)}}_j\), from \(R^{(2)}\) to \(R^{(3)} \in V^{(3)}(\Gamma)\) defined by \[\mathopen{}\mathclose{\left\{\begin{alignedat}{3} & R^{(3)}_1(\Gamma') &&= R^{(2)}_1(\Gamma'),\qquad &&\text{for all \varnothing\neq \Gamma'\subseteq[2d]},\\ &R^{(3)}_2(\gamma) &&= R^{(2)}_2(\gamma),&& \text{for all \gamma \neq \mu(\Gamma)},\\ &R^{(3)}_2(\mu(\Gamma)) &&= R^{(2)}_2(\mu(\Gamma))\cup\{j\}.&& \end{alignedat}}\right.\]
In stage II.3, for each \(\varnothing\neq \Gamma\subseteq[2d]\), \(R^{(3)}\in V^{(3)}(\Gamma)\), and \(j\not\in\bigcup R^{(3)}\), there is an arc, denoted \(A^{R^{(3)},R^{(4)}}_j\), from \(R^{(3)}\) to \(R^{(4)} \in V^{(4)}(\Gamma)\) defined by \[\mathopen{}\mathclose{\left\{\begin{alignedat}{3} & R^{(4)}_1(\Gamma') &&= R^{(3)}_1(\Gamma'),\qquad &&\text{for all \varnothing\neq \Gamma'\subseteq[2d]},\\ &R^{(4)}_2(\gamma) &&= R^{(3)}_2(\gamma),&& \text{for all \gamma \neq \mu(\Gamma)},\\ &R^{(4)}_2(\mu(\Gamma)) &&= R^{(3)}_2(\mu(\Gamma))\cup\{j\}.&& \end{alignedat}}\right.\]
For every \(x\in f^{-1}(1)\), let \(\mathcal{C}(x) = \{a_1, a_2, a_3\}\subseteq[m]\) be a specific certificate for \(x\) such that \(a_1<a_2<a_3\) and \(x_{a_1}\), \(x_{a_2}\), and \(x_{a_3}\) form a triangle.
We say \(R^{(1)}\in V^{(1)}\) is consistent with \(x\in f^{-1}(1)\) if edges indexed by \(\mathcal{C}(x)\) are vertex disjoint from edges indexed by \(\bigcup R^{(1)}\). Let \(n_x\) be the number of \(R^{(1)}\in V^{(1)}\) that are consistent with \(x\), and define \[q\mathrel{\vcenter{:}}= \bigl(\min_{x\in f^{-1}(1)}\{n_x\}\bigr)^{-1},\] so that for all \(x\in f^{-1}(1)\), there exist at least \(q^{-1}\) vertices in \(V^{(1)}\) that are consistent with \(x\). By 27, when \(rd\leq o(m)\) — a condition satisfied since we only need to consider \(d\leq\log_2(m)\) and use the \(r\) specified in 5.4.5 — it follows that \(q^{-1}\geq\Omega(\bigl|V^{(1)}\bigr|)\).
Let \(\mathrm{Cst}(x)\) denote a fixed but arbitrary set of \(q^{-1}\) vertices \(R^{(1)}\in V^{(1)}\) that are consistent with \(x\). For each \(R^{(1)}\in \mathrm{Cst}(x)\), \(\mathrm{Act}(x,R^{(1)})\) is a set of active arcs consisting of the following arcs:
In stage I.1 and I.2, all arcs along the unique shortest length \(r\) path from source \(\varnothing\) to \(R^{(1)}\).
In stage II.1, all arcs from \(R^{(1)}\) that loads \(a_1\) into \(R^{(1)}\). Notice that there are \(2^{2d}-1\) such arcs, one for each choice of \(\varnothing\neq \Gamma\subseteq [2d]\).
In stage II.2, for each vertex \(R^{(2)}\in V^{(2)}\) that has an incoming active arc from \(\mathrm{Act}(x,R^{(1)})\), the arc that loads \(a_2\) into \(R^{(2)}\).
In stage II.3, for each vertex \(R^{(3)}\in V^{(3)}\) that has an incoming active arc from \(\mathrm{Act}(x,R^{(1)})\), the arc that loads \(a_3\) into \(R^{(3)}\).
Notice that in stage II.2 and II.3, for each vertex that has an incoming active arc, there is only one outgoing active arc, so the total number of active arcs in stages II.2 and II.3 is \(2(2^{2d}-1)\).
Lastly, the set of all active arcs of \(x\) is defined by \[\mathrm{Act}(x)\mathrel{\vcenter{:}}= \dot{\bigcup}_{R^{(1)}\in \mathrm{Cst}(x)}\mathrm{Act}(x,R^{(1)}).\]
For every vertex \(R\) in the learning graph, an assignment on \(R\) refers to a function \(\alpha_R: \bigcup R\to \binom{[n]}{2}\cup\{*\}\) such that:
for all \(j\in \bigcup R_1\), \[\alpha_R(j)\neq *;\]
for all \(\gamma\in [2d]\) and \(j\in R_2(\gamma)\), \[\alpha_R(j)\in\{*\}\cup\Bigl\{e\in \textstyle\binom{[n]}{2}\Bigm| \exists k\in \bigcup_{\Gamma\ni \gamma}R_1(\Gamma)\text{ s.t. e is incident to \alpha_R(k)} \Bigr\}.\] Note that the special symbol \(*\) is not incident to any edge.
We say an input \(z\in \binom{[n]}{2}^m\) satisfies assignment \(\alpha_{R}\) if, for all \(t\in \bigcup R\), \[\label{eq:alpha95def} \alpha_{R}(t) = \begin{cases} z_t, &\text{if t\in \bigcup R_1},\\ z_t, &\text{if t\in R_2(\gamma) and \exists k\in \bigcup_{\Gamma\ni \gamma}R_1(\Gamma) s.t. z_t is incident to z_k},\\ *, &\text{otherwise}. \end{cases}\tag{41}\] For each vertex \(R\) in the learning graph, we write \(\alpha_R^x\) for the unique assignment on \(R\) that \(x\) satisfies. We say arc \(A^{R,S}_j\) uncovers \(j\) if \(\alpha_S^x(j)\neq *\). We say inputs \(x,y\in \binom{[n]}{2}^m\) agree on \(R\) if they satisfy \(\alpha_R^x = \alpha_R^y\); we also say they agree on a subset of \(\bigcup R\) if the restrictions of \(\alpha_R^x\) and \(\alpha_R^y\) to that subset equal.
Define \[X_j^{R,S}\mathrel{\vcenter{:}}= \sum_{\alpha_R} Y_{\alpha_R},\] where the summation is over all assignments \(\alpha_R\) on \(R\).
For each arc \(A_j^{R,S}\) in stage I.1, define \(Y_{\alpha_R}\mathrel{\vcenter{:}}= q\psi_{\alpha_R}\psi_{\alpha_R}^\dagger\), where \(\psi_{\alpha_R}\) is a real vector indexed by \(\binom{[n]}{2}^m\) and defined entry-wise by \[\psi_{\alpha_R}[z] \mathrel{\vcenter{:}}= \begin{cases} 1/\sqrt{w}, & \text{if f(z)=1, z satisfies \alpha_R, and A^{R,S}_j\in \mathrm{Act}(z)},\\ \sqrt{w}, & \text{if f(z)=0, and z satisfies \alpha_R},\\ 0,&\text{otherwise.} \end{cases}\] Here, \(w\) is a positive real number that will be specified later. With the above definition, we see that \(X_j^{R,S}\) consists of blocks of the form: \[\label{X95block95form95I461} \renewcommand{\arraystretch}{1.25} \begin{array}{c|c|c} & x & y \\ \hline x & q/w & q \\ \hline y & q & qw \end{array}\tag{42}\] where \(x\in f^{-1}(1)\), \(y\in f^{-1}(0)\), \(A^{R,S}_j\in \mathrm{Act}(x)\), and both \(x\) and \(y\) agree on \(R\).
For arcs \(A_j^{R,S}\) in stage I.2, define \(Y_{\alpha_R}\mathrel{\vcenter{:}}= q(\psi_{\alpha_R}\psi_{\alpha_R}^\dagger+\phi_{\alpha_R}\phi_{\alpha_R}^\dagger)\) where \(\psi_{\alpha_R}\) and \(\phi_{\alpha_R}\) are real vectors indexed by \(\binom{[n]}{2}^m\) and defined entry-wise by \[\psi_{\alpha_R}[z] \mathrel{\vcenter{:}}= \begin{cases} 1/\sqrt{w_1}, & \text{if f(z)=1, \alpha_S^z(j)\neq*, z satisfies \alpha_R, and A^{R,S}_j\in \mathrm{Act}(z)},\\ \sqrt{w_1}, & \text{if f(z)=0, and z satisfies \alpha_R},\\ 0,&\text{otherwise;} \end{cases}\] and \[\phi_{\alpha_R}[z] \mathrel{\vcenter{:}}= \begin{cases} 1/\sqrt{w_0}, & \text{if f(z)=1, \alpha_S^z(j)=*, z satisfies \alpha_R, and A^{R,S}_j\in \mathrm{Act}(z)},\\ \sqrt{w_0}, & \text{if f(z)=0, \alpha_S^z(j)\neq*, and z satisfies \alpha_R},\\ 0, & \text{otherwise.} \end{cases}\] Here, \(w_0\) and \(w_1\) are positive real numbers that will be specified later. With the above definition, we see that \(X_j^{R,S}\) consists of blocks of the form: \[\label{X95block95form95I462} \begin{array}{l|c|c|c|c} & x: x_j =\alpha_S^x(j)\neq * & x: \alpha_S^x(j)= * & y: y_j =\alpha_S^y(j)\neq * & y: \alpha_S^y(j)= * \\ \hline x: x_j =\alpha_S^x(j)\neq * & q/w_1 & 0 & q & q \\ \hline x: \alpha_S^x(j)= * & 0 & q/w_0 & q & 0 \\ \hline y: y_j =\alpha_S^y(j)\neq * & q & q & q(w_0 + w_1) & qw_1 \\ \hline y: \alpha_S^y(j)= * & q & 0 & qw_1 & qw_1 \\ \end{array}\tag{43}\] where \(x\in f^{-1}(1)\), \(y\in f^{-1}(0)\), \(A^{R,S}_j\in \mathrm{Act}(x)\), and both \(x\) and \(y\) agree on \(R\).
For arcs \(A_j^{R,S}\) in stage II.\(s\) where \(s\in[3]\), there exists a unique \(\varnothing\neq \Gamma\subseteq[2d]\) such that \(S\in V^{(s+1)}(\Gamma)\). Define \(Y_{\alpha_R}\mathrel{\vcenter{:}}= q\psi_{\alpha_R}\psi_{\alpha_R}^\dagger\) where \[\psi_{\alpha_R}[z] \mathrel{\vcenter{:}}= \begin{cases} 1/\sqrt{w_2},& \text{if f(z)=1, z satisfies \alpha_R, and A_j^{R,S}\in \mathrm{Act}(z)},\\ (-1)^{1+\mathopen{}\mathclose{\left|\Gamma}\right|}\sqrt{w_2}, & \text{if f(z)=0, and z satisfies \alpha_R},\\ 0,&\text{otherwise.} \end{cases}\] \(X_j^{R,S}\) consists of blocks of the form: \[\label{X95block95form95II} \renewcommand{\arraystretch}{1.25} \begin{array}{c|c|c} & x & y \\ \hline x & q/w_2 & (-1)^{1+\mathopen{}\mathclose{\left|\Gamma}\right|}q \\ \hline y & (-1)^{1+\mathopen{}\mathclose{\left|\Gamma}\right|}q & qw_2 \end{array}\tag{44}\] where \(x\in f^{-1}(1)\), \(y\in f^{-1}(0)\), \(A^{R,S}_j\in \mathrm{Act}(x)\), and both \(x\) and \(y\) agree on \(R\).
We show \(Q(\mathop{\mathrm{\mathsf{Triangle}}}_{m,d}) = O(2^{(12/7)d}d^{3/7}m^{5/7})\) by computing 39 . Define \(W\) as the maximum number of wedges in any input to \(\mathop{\mathrm{\mathsf{Triangle}}}_{m,d}\). Since the graph has maximum degree \(d\), and each edge in the graph contributes to at most \(2(d-1)\) wedges, we have \(W\leq O(md)\).
For stage I.1, we set the weight \(w=1\) for all arcs in this stage. There are \(r_1(2^{2d}-1)\bigl|V^{(1)}\bigr|\) arcs in this stage. By 42 , each of them contributes \(\max\{qw, q/w\} = q\) to the complexity, so the complexity of this stage is \(r_1(2^{2d}-1)\bigl|V^{(1)}\bigr|q = O(2^{2d}r_1)\).
For stage I.2, there are \(2dr_2\bigl|V^{(1)}\bigr|\) arcs in this stage. For each input \(z\), we need to bound the number of arcs that can uncover an element, so we get a refined bound on the contribution from 43 . Suppose such an arc in this stage is on the shortest length-\(r\) path from source \(\varnothing\) to \(R^{(1)}\in V^{(1)}\), and is uncovering \(j\) in \(R_2^{(1)}(\gamma)\) for some \(\gamma\in[2d]\), then, \(z_j\) must form a wedge with \(z_i\) for some \(i\in R^{(1)}_1(\Gamma)\) and \(\gamma\in \Gamma\subseteq[2d]\). The number of such ordered tuples \((i,j)\) is at most \(2W\), and the number of vertices in stage I.2 that loads \(j\) in its outgoing arc and has loaded \(i\) in stage I.1 is upper bounded by \[(2^{2d}-1)(2d)\binom{m-2}{r_1-1,\underbrace{r_1,\cdots,r_1}_{2^{2d}-2},r_2-1,\underbrace{r_2,\cdots,r_2}_{2d-1}} = O\Bigl(\frac{r_1r_2d2^{2d}}{m^2}\bigl|V^{(1)}\bigr|\Bigr).\]
Therefore, for a negative input, by 43 , stage I.2’s contribution to the complexity is \[O\Bigl(qw_0W\frac{r_1r_2d2^{2d}}{m^2}\bigl|V^{(1)}\bigr|+qw_12dr_2\bigl|V^{(1)}\bigr|\Bigr)=O\Bigl(\frac{r_1r_2d^22^{2d}}{m}w_0+r_2dw_1\Bigr);\] and for a positive input, by 43 , stage I.2’s contribution to the complexity is \[O\Bigl(\frac{q}{w_1}W\frac{r_1r_2d2^{2d}}{m^2}\bigl|V^{(1)}\bigr|+\frac{q}{w_0}2dr_2\bigl|V^{(1)}\bigr|\Bigr)=O\Bigl(\frac{r_1r_2d^22^{2d}}{mw_1}+\frac{r_2d}{w_0}\Bigr).\] If we set \(w_0=\frac{1}{2^d}\sqrt{\frac{m}{r_1d}}\), and \(w_1 = 1/w_0\), the total contribution to the complexity is \(O(r_2d^{3/2}2^d\sqrt{\frac{r_1}{m}})\).
For stage II,
The total number of arcs in stage II.1 is \[(m-r)(2^{2d}-1)\bigl|V^{(1)}\bigr|\leq O\bigl(2^{2d}m\bigl|V^{(1)}\bigr|\bigr).\]
The total number of arcs in stage II.2 is \[(m-r-1)\bigl|V^{(2)}\bigr| = \frac{(m-r-1)(m-r)(2^{2d}-1)\bigl|V^{(1)}\bigr|}{r_1+1},\] since each vertex in \(V^{(1)}\) has \((m-r)(2^{2d}-1)\) outgoing arcs into \(V^{(2)}\), and each vertex in \(V^{(2)}\) has \(r_1+1\) incoming arcs from \(V^{(1)}\). There are \(O\mathopen{}\mathclose{\left(2^{2d}m^2\bigl|V^{(1)}\bigr|/r_1}\right)\) arcs in this stage.
The total number of arcs in stage II.3 is \[(m-r-2)\bigl|V^{(3)}\bigr| = \frac{(m-r-2)(m-r-1)(m-r)(2^{2d}-1)\bigl|V^{(1)}\bigr|}{(r_1+1)(r_2+1)},\] since each vertex in \(V^{(2)}\) has \(m-r-1\) outgoing arcs into \(V^{(3)}\), and each vertex in \(V^{(3)}\) has \(r_2+1\) incoming arcs from \(V^{(2)}\). There are \(O(2^{2d}m^3\bigl|V^{(1)}\bigr|/(r_1r_2))\) arcs in this stage.
For every negative input, by 44 , each arc contributes \(qw_2\) to the complexity, so the total contribution is \[O\biggl(\frac{2^{2d}m^3\bigl|V^{(1)}\bigr|}{r_1r_2}qw_2\biggr) = O\biggl(\frac{2^{2d}m^3w_2}{r_1r_2}\biggr).\]
For every positive input, there are exactly \(3q^{-1}(2^{2d}-1)\) active arcs in stage II, by 44 , each of them contributes \(q/w_2\) to the complexity, so the total contribution is \[\frac{3(2^{2d}-1)}{q}\cdot \frac{q}{w_2} = \frac{3(2^{2d} -1)}{w_2} \leq O\mathopen{}\mathclose{\left(\frac{2^{2d}}{w_2}}\right).\]
To balance the contribution from negative inputs and positive inputs, we can set \(w_2=\sqrt{r_1r_2/m^3}\) so that the total contribution in stage II is \[O\bigl(2^{2d}\sqrt{m^3/(r_1r_2)}\bigr).\]
The total complexity of all stages is \[O\biggl(2^{2d}r_1 + r_2d^{3/2} \, 2^d\sqrt{\frac{r_1}{m}} + 2^{2d}\sqrt{\frac{m^3}{r_1r_2}}\biggr).\] To balance the summands, we set \(r_1 = \ceil{m^{5/7}d^{3/7}/2^{(2/7)d}}\) and \(r_2 = \ceil{2^{(6/7)d}m^{6/7}/d^{9/7}}\), which leads to a complexity of \(O(2^{(12/7)d}d^{3/7}m^{5/7})\).
Fix two inputs \(x\in f^{-1}(1)\) and \(y\in f^{-1}(0)\), to prove 40 holds, it is equivalent to show \[\sum_{A_j^{R,S} \in \mathrm{Act}(x) \colon x_j \neq y_j} X_j^{R,S}[x,y] = 1.\] Since \(\mathrm{Act}(x)= \dot{\bigcup}_{R^{(1)}\in \mathrm{Cst}(x)}\mathrm{Act}(x,R^{(1)})\), it suffices to prove \[\label{eq:feasibility} \sum_{A_j^{R,S} \in \mathrm{Act}(x,R^{(1)}) \colon x_j \neq y_j} X_j^{R,S}[x,y] = \frac{1}{\mathopen{}\mathclose{\left|\mathrm{Cst}(x)}\right|} = q,\tag{45}\] for each \(R^{(1)}\in \mathrm{Cst}(x)\).
Recall \(\mathcal{C}(x) = \{a_1,a_2,a_3\}\) is a specific certificate for \(x\) we choose. Let \(t_1, t_2,\cdots,t_r\in[m]\) be the order of elements in \(\bigcup R^{(1)}\) get loaded in \(R^{(1)}\). Let \(T_i, i\in\mathbb{Z}_{[0,r]}\), be the vertex that has loaded \(i\) elements on the unique shortest length-\(r\) path from source \(\varnothing\) to \(R^{(1)}\) (\(\mathopen{}\mathclose{\left|\bigcup T_i}\right| = i\), \(T_0 = \varnothing\) and \(T_r= R^{(1)}\)), so that arcs from \(\varnothing\) to \(R^{(1)}\) is in the form of \(A_{t_i}^{T_{i-1},T_i}\in \mathrm{Act}(x, R^{(1)})\). Depending on if \(x\) and \(y\) agree on \(R^{(1)}\),
If \(x\) and \(y\) disagree on \(R^{(1)}\), there exists \(i^* \in [r]\) such that \(x\) and \(y\) disagree on \(T_i\) if and only if \(i\geq i^*\). This follows from the fact that, for each arc \(A_j^{R,S}\) in stage I, the following holds by 41 : \[\forall k\in \bigcup R, \alpha_S^x(k) = \alpha_R^x(k) \text{ and } \alpha_S^y(k) = \alpha_R^y(k),\] so if \(x\) and \(y\) disagree on \(R\), then they disagree on \(S\).
We show that \(X_{t_{i^*}}^{T_{i^*-1}, T_{i^*}}[x,y] = q\), and for each \(A_j^{R,S}\in \mathrm{Act}(x,R^{(1)})\backslash\{A_{t_{i^*}}^{T_{i^*-1}, T_{i^*}}\}\), either \(x_j = y_j\) or \(X_j^{R,S}[x,y] = 0\).
When we load \(t_{i^*}\) into \(T_{i^*-1}\), \(x\) and \(y\) agree on \(T_{i^*-1}\) but not \(T_{i^*}\). Since \(x\) and \(y\) agree on \(T_{i^*-1}\), for all \(i\in \bigcup T_{i^*-1}\), we have \[\alpha_{T_{i^*}}^x(i) = \alpha_{T_{i^*-1}}^x(i) = \alpha_{T_{i^*-1}}^y(i) = \alpha_{T_{i^*}}^y(i),\] so we must have \(\alpha_{T_{i^*}}^x(t_{i^*}) \neq \alpha_{T_{i^*}}^y(t_{i^*})\) as \(x\) and \(y\) disagree on \(T_{i^*}\). Therefore, \(x_{t_{i^*}} \neq y_{t_{i^*}}\) as otherwise \(\alpha_{T_{i^*}}^x(t_{i^*}) = \alpha_{T_{i^*}}^y(t_{i^*})\). Hence, the term \(X_{t_{i^*}}^{T_{i^*-1}, T_{i^*}}[x,y]\) is included in the summation in 45 . Depending on which stage \(A_{t_{i^*}}^{T_{i^*-1},T_{i^*}}\) is in, either by 42 or by 43 , \[X_{t_{i^*}}^{T_{i^*-1}, T_{i^*}}[x,y] = q.\]
When we load \(t_i\) into \(T_{i-1}\) such that \(i\in[i^*-1]\), \(x\) and \(y\) agree on both \(T_{i-1}\) and \(T_{i}\). Then, either \(x_{t_i} = \alpha_{T_i}^x(t_i) = \alpha_{T_i}^y(t_i) = y_{t_i} \neq *\), or \(\alpha_{T_i}^x(t_i) = \alpha_{T_i}^y(t_i) = *\) so that by 43 , \(X^{T_{i-1},T_i}_{t_i}[x,y] = 0\). Therefore, arc \(A_{t_{i}}^{T_{i-1}, T_{i}}\) does not contribute to 45 .
Every other arc \(A^{R,S}_j\in \mathrm{Act}(x,R^{(1)})\) is either in stage I and of the form \(A_{t_i}^{T_{i-1},T_i}\) for some \(i>i^*\), \(i\in[r]\), or the arc is in stage II. If the arc is in stage I, then \(x\) and \(y\) disagree on \(R\). Depending on which stage \(A_{t_i}^{T_{i-1},T_i}\) is in, either by 42 or by 43 , \(X_j^{R,S}[x,y]=0\).
If \(A^{R,S}_j\) is in stage II, it suffices to show that if \(x\) and \(y\) disagree on \(R\), then they also disagree on \(S\). If this holds, a short induction establishes that \(x\) and \(y\) disagree on \(R\) for all \(A^{R,S}_j\in \mathrm{Act}(x, R^{(1)})\) in stage II. By 44 , it then follows that \(X_j^{R,S}[x,y]=0\).
By the definition of consistency, after loading \(j\in\mathcal{C}(x)\), \[\forall i\in \bigcup R, \alpha_S^x(i) = \alpha_R^x(i).\] If \(x\) and \(y\) agree on \(S\), we must have \[\label{eq:feasibility95contradiciton95agree95on95S} \forall i\in \bigcup R, \alpha_S^y(i) = \alpha_S^x(i) = \alpha_R^x(i).\tag{46}\] However, there exists \(k\in\bigcup R\) such that \(\alpha_R^y(k) \neq \alpha_R^x(k) = \alpha_S^y(k)\) because \(x\) and \(y\) disagree on \(R\). Since \(\{\alpha_R^y(k),\alpha_S^y(k)\} \subseteq \{*, y_k\}\), if 46 holds, it follows that \(\alpha_R^y(k) = *\) and \(y_k = \alpha_S^y(k) = \alpha_S^x(k) = x_k\). Consequently, we must have \(k\in \bigcup S_2\) and \(j\in \bigcup S_1\), implying \(j=a_1\), and \(y_k = x_k\) is incident to \(y_{a_1} = x_{a_1}\). This contradicts the definition of consistency. Therefore, \(x\) and \(y\) must disagree on \(S\).
If \(x\) and \(y\) agree on \(R^{(1)}\), we first show the contribution from arcs in \(\mathrm{Act}(x,R^{(1)})\) in stage I to 45 is 0. For each \(i\in[r]\), when we load \(t_i\) into \(T_{i-1}\) , \(x\) and \(y\) agree on both \(T_{i-1}\) and \(T_{i}\). An identical argument as in a previous case when \(i\in[i^*-1]\) shows arc \(A_{t_{i}}^{T_{i-1}, T_{i}}\) does not contribute to 45 .
For stage II, let \(k\) be the smallest number in \([3]\) that \(x_{a_k} \neq y_{a_k}\). \(k\) must exist because \(y\) is a negative instance. For active arcs in stage II.\(k'\) such that \(k' < k\), those arcs are loading \(a_{k'}\) but \(x_{a_{k'}}=y_{a_{k'}}\), so those arcs’ \(X\) are not included in the summation in 45 .
For arcs in stage II.\(k'\) such that \(k' > k\), \(x\) and \(y\) disagree on the vertices before loading \(a_{k'}\). This is because \(a_{k}\) gets uncovered in \(x\), so \(y_{a_{k}}\) must be equal to \(x_{a_k}\) for \(x\) and \(y\) to agree, which leads a contradiction. Then, by 44 , those active arcs’ contribution to 45 is also 0.
Next, we show the contribution from arcs in \(\mathrm{Act}(x,R^{(1)})\) in stage II.\(k\) to 45 is exactly \(q\).
If \(k=1\), there are \(2^{2d}-1\) arcs in \(\mathrm{Act}(x,R^{(1)})\) in stage II.1. They are of the form \(A^{R^{(1)}, R_\Gamma^{(2)}}_{a_1}\) where \(R_\Gamma^{(2)}\in V^{(2)}(\Gamma)\), one for each \(\varnothing\neq \Gamma\subseteq[2d]\). Since \(x\) and \(y\) agree on \(R^{(1)}\) (and \(x_{a_1}\neq y_{a_1}\)), 44 gives \(X^{R^{(1)}, R_\Gamma^{(2)}}_{a_1}[x,y] = (-1)^{1+\mathopen{}\mathclose{\left|\Gamma}\right|}q\). Therefore, the total contribution of stage II.1 to 45 is \[\sum_{\varnothing\neq \Gamma \subseteq [2d]} (-1)^{1+\mathopen{}\mathclose{\left|\Gamma}\right|}q = q.\]
If \(k=2\), there are \(2^{2d}-1\) arcs in \(\mathrm{Act}(x,R^{(1)})\) in stage II.2. They are of the form \(A^{R_\Gamma^{(2)}, R_\Gamma^{(3)}}_{a_2}\) where \(R_\Gamma^{(2)}\in V^{(2)}(\Gamma)\) and \(R_\Gamma^{(3)}\in V^{(3)}(\Gamma)\), one for each \(\varnothing\neq \Gamma\subseteq[2d]\). In this case, \(x\) and \(y\) may not agree on \(R_\Gamma^{(2)}\) due to what are known as faults.
We say that an index \(i\in \bigcup (R_\Gamma^{(2)})_2\) is faulty if \(y_i\) is incident to \(y_{a_1}\). For \(\gamma\in [2d]\), we say the subset \((R_\Gamma^{(2)})_2(\gamma)\) is faulty if \((R_\Gamma^{(2)})_2(\gamma)\) contains a faulty index. Let \(I\) denote the set of all \(\gamma\in [2d]\) such that \((R_\Gamma^{(2)})_2(\gamma)\) is not faulty.
We now show \[\text{x,y agree on R^{(2)}_\Gamma} \iff \varnothing\neq \Gamma \subseteq I.\]
“\(\implies\)”: consider the contrapositive. Let \(\gamma \in \Gamma-I\). Suppose \(j\in (R^{(2)}_\Gamma)_2(\gamma)\) is faulty. Then by our definition of assignment, \(\alpha_{R^{(2)}_\Gamma}^y(j) = y_j\). On the other hand, \(\alpha_{R^{(2)}_\Gamma}^x(j)\) cannot be equal to \(y_j\) since \(y_j\) is incident to \(y_{a_1} = x_{a_1}\) and \(R^{(1)}\) is consistent with \(x\).
“\(\impliedby\)”: note that \(x\) and \(y\) certainly agree on \(\bigcup (R^{(2)}_\Gamma)_1\) since \(x_{a_1} = y_{a_1}\) and \(x\) and \(y\) agreed on \(\bigcup R^{(1)}_1\). But since \(\Gamma \subseteq I\), and \(x\) and \(y\) agreed on \(\bigcup R^{(1)}_2\) the definition of \(I\) implies that \(x\) and \(y\) must agree on \(\bigcup (R^{(2)}_\Gamma)_2\) as well.
Since \(\mathop{\mathrm{\mathrm{maxdeg}}}(\mathop{\mathrm{\mathcal{G}}}(y))\leq d\), \(y_{a_1}\) can be part of at most \(2(d-1)\) wedges. Therefore, the set \(I\) defined above has size \(\mathopen{}\mathclose{\left|I}\right| \geq 2d - 2(d-1) = 2>0\). Therefore, by 44 , the total contribution of stage II.2 to 45 is \[\sum_{\varnothing\neq \Gamma \subseteq I} X^{R^{(2)}_\Gamma,R^{(3)}_\Gamma}_{a_2}[x,y] = \sum_{\varnothing\neq \Gamma \subseteq I} (-1)^{1+\mathopen{}\mathclose{\left|\Gamma}\right|}q = q.\]
If \(k=3\), arcs in \(\mathrm{Act}(x,R^{(1)})\) in stage II.3 are of the form \(A^{R_\Gamma^{(3)}, R_\Gamma^{(4)}}_{a_3}\) where \(R_\Gamma^{(3)}\in V^{(3)}(\Gamma)\) and \(R_\Gamma^{(4)}\in V^{(4)}(\Gamma)\), one for each \(\varnothing\neq \Gamma\subseteq[2d]\).
For each arc \(A^{R_\Gamma^{(2)}, R_\Gamma^{(3)}}_{a_2}\) in stage II.2, since \(x_{a_2} = y_{a_2}\), and loading \(a_2\) does not uncover additional elements by the definition 41 , it follows that \(x\) and \(y\) agree on \(R^{(3)}_\Gamma\) if and only if \(x\) and \(y\) agree on \(R^{(2)}_\Gamma\).
Therefore, using the same \(I\) as defined in the previous case, the total contribution of stage II.3 to 45 is \[\sum_{\varnothing\neq \Gamma \subseteq I} X^{R^{(3)}_\Gamma,R^{(4)}_\Gamma}_{a_3}[x,y] = \sum_{\varnothing\neq \Gamma \subseteq I} (-1)^{1+\mathopen{}\mathclose{\left|\Gamma}\right|}q = q.\]
In this section, we study the \(k\mathsf{\text{-}CYCLE}\) problem, which is a natural generalization of \(\mathop{\mathrm{\mathsf{Triangle}}}\). We give a nearly tight characterization of the quantum query complexity of \(k\mathsf{\text{-}CYCLE}\) for graphs with low maximum degree such as random sparse graphs. We note that the proof of 24 can be straightforwardly extended to any \(k \geq 3\) to show that \(k\mathsf{\text{-}CYCLE}\) is harder than \(k\mathsf{\text{-}DIST}\) but easier than \(k\mathsf{\text{-}SUM}\).
The most general form of our lower bound reads:
Theorem 33. Let \(k,m\in \mathbb{N}\) with \(k\geq 3\) and let \(\varepsilon>0\). Then, for all sufficiently large \(n\in \mathbb{N}\) and every \(T, \Delta\in \mathbb{N}\) with \(1\leq T \leq n^{1-\varepsilon}\) and \(1\leq \Delta \leq n^{o(1)}\), the following holds for every \(T\)-query quantum algorithm \(\mathop{\mathrm{\mathcal{A}}}_T\): \[\begin{align} &\Pr[\mathop{\mathrm{\mathcal{A}}}_T(x) = (i_1,\dots,i_k)\in [m]^k \mathrm{ such that x_{i_1},\dots,x_{i_k} form a k-cycle}] \\ &\qquad\qquad\leq O\Bigl(\Delta^k\cdot \Bigl(\frac{T}{n^{3/4-1/(2^{k+2}-4)}} \Bigr)^{2-2/2^k} + \Delta^{k/2}\cdot T\frac{\sqrt{\log n}}{n}\\ &\qquad\qquad\qquad\qquad+ Tn\Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}+Tn\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}\Bigr),\label{eq:kcycle95avg95lower} \end{align}\tag{47}\] where \(\mathop{\mathrm{\mathcal{A}}}_T(x)\) denotes the output of \(\mathop{\mathrm{\mathcal{A}}}_T\) when its queries are made to \(x\), and the probability is over \(x\leftarrow \binom{[n]}{2}^m\) and the randomness of \(\mathop{\mathrm{\mathcal{A}}}_T\).
From 33 and the standard fact that random graphs with \(m=\Omega(n)\) edges contain at least one \(k\)-cycle with constant probability, as formally stated in 41, we deduce that the search problem of finding \(k\)-cycle in a random graph is hard in the average case for \(m=\Theta(n)\). It follows that the decision version of \(k\)-cycle is also hard on average, based on the search-to-decision reduction in the edge list model discussed in the preliminaries section. Formally, 33 gives
Corollary 5. Let \(k\in \mathbb{N}_{\geq 3}\). For all \(m\in \mathbb{N}\) and \(d = 2\log(m)/\log\log(m)\), \[Q(k\mathsf{\text{-}CYCLE}_{m}) \geq Q(k\mathsf{\text{-}CYCLE}_{m,d}) \geq \widetilde{\Omega}(m^{(3/4-1/(2^{k+2}-4))}).\]
Proof of 5. The first inequality follows by restriction so it suffices to prove the second inequality. Let \(n\mathrel{\vcenter{:}}= m\). When \(x\) is chosen uniformly at random from \(\binom{[n]}{2}^m\), 41 gives \[\Pr[\mathrm{x contains a k-cycle and x has \mathop{\mathrm{\mathrm{maxdeg}}}(x) \leq 2\log(m)/\log\log(m)}] \geq \Omega(1).\] Therefore, every bounded-error quantum query algorithm for \(k\mathsf{\text{-}CYCLE}_{m,d}\) can be used to find a \(k\)-cycle in \(x\) with probability at least \(\Omega(1)\), where the probability is over both the algorithm and the randomness in \(x\). By the search-to-decision reduction (see preliminaries section), the quantum query complexity of the search algorithm is at most \(Q(k\mathsf{\text{-}CYCLE}_{m,d})\) times \(O(\log^2(m))\).
Suppose for contradiction that \(Q(k\mathsf{\text{-}CYCLE}_{m,d}) \leq o(m^{(3/4-1/(2^{k+2}-4))}/\log^{2k/(2-2/2^k)+2}(m))\). Then, by the above remark, there exists a \(T\)-query quantum algorithm with \[\label{eq:kcycle95high95success} \Pr[\mathop{\mathrm{\mathcal{A}}}_T(x) = (i_1,\dots,i_k)\in [m]^k \mathrm{ such that x_{i_1},\dots,x_{i_k} form a k-cycle}] \geq \Omega(1),\tag{48}\] where \(T\leq o(m^{(3/4-1/(2^{k+2}-4))}/\log^{2k/(2-2/2^k)}(m))\).
On the other hand, 33 with \(\Delta\) in its statement set equal to \(\ceil{\log(n)}^2\) gives \[\begin{align} &\Pr[\mathop{\mathrm{\mathcal{A}}}_T(x) = (i_1,\dots,i_k)\in [m]^k \mathrm{ such that x_{i_1},\dots,x_{i_k} form a k-cycle}]\\ &\qquad\qquad \leq O\Bigl(\log^{2k}(n)\cdot \Bigl(\frac{T}{n^{3/4-1/(2^{k+2}-4)}} \Bigr)^{2-2/2^k} + \log^k(n)\cdot T \frac{\sqrt{\log n}}{n}\\ &\qquad\qquad\qquad\qquad + Tn \Bigl(\frac{2e}{\ceil{\log n}}\Bigr)^{\ceil{\log(n)}}+Tn\Bigl(\frac{2^{\ceil{\log(n)}}e^{\ceil{\log(n)}+1}n^2}{2\ceil{\log(n)}^{2\ceil{\log(n)} + 1}}\Bigr)^{\ceil{\log(n)}}\Bigr).\label{eq:kcycle95low95success} \end{align}\tag{49}\] But recall \(n=m\), so if \(T\leq o(m^{(3/4-1/(2^{k+2}-4))}/\log^{2k/(2-2/2^k)}(m))\), each summand in the expression appearing in 49 is at most \(o(1)\). This contradicts 48 . Hence the corollary. ◻
In the subsequent subsections, we prove 33.
Let \(k,m,\varepsilon,n,T,\Delta\) be as given in the statement of 33. For convenience, we write \[\label{eq:constant95factor} N\mathrel{\vcenter{:}}= \scalebox{1.25}{\binom{n}{2}} \quad \text{and} \quad c \mathrel{\vcenter{:}}= 32e \cdot k\Delta^{k/2}.\tag{50}\] We also identify the symbol \([N]\) with \(\binom{[n]}{2}\) for convenience.
We follow the overall proof strategy as in the triangle case, except there are now more sub-graph structures to keep track of, including length-\(l\) paths for \(l=2,3,\ldots, k-1\), to measure progress in the algorithm. We will argue that to find a \(k\)-cycle, a lot of queries should be spent to find many \((k-1)\)-paths first, which in turn requires a large investment of queries to find many \((k-2)\)-paths and so on. Thus, we define the following projectors to measure the progress of recording edges, paths, and cycles, etc.
Definition 11 (Recording projectors). For \(R\subseteq\mathbb{R}\), \(l\in \mathbb{N}_{\geq 2}\), and \(y\in \binom{[n]}{2}\cup
\{\bot\}\), we define the following projectors by giving the basis states onto which they project.
| \(\Pi^\square\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains a \(k\)-cycle. |
| \(\Pi^{\{1\}}_{R}\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that the number of edges in \(\mathop{\mathrm{\mathcal{G}}}(x)\) is in \(R\) or \(\mathop{\mathrm{\mathcal{G}}}(x)\) |
| contains a vertex of degree at least \(\Delta\). | |
| \(\Pi^{\{l\}}_{R}\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that the number of \(l\)-paths in \(\mathop{\mathrm{\mathcal{G}}}(x)\) is in \(R\). |
| \(\Pi_{y}\) | : every basis state \(\ket{i,u,w}\ket{x}\) such that \(u\neq 0\) and \(x_i = y\). |
We define formally \(\boldsymbol{\square}_t\) to measure the progress of recording a \(k\)-cycle in \(t\) queries as below
Definition 12. (Progress measure for recording cycle) For \(t\in \mathbb{Z}_{[0,T]}\), define \[\boldsymbol{\square}_t \mathrel{\vcenter{:}}= \mathopen{}\mathclose{\left\|\Pi^\square \ket{\phi_t}}\right\|.\]
In the triangle case, a technical obstacle is that high-degree vertices can distort our analysis by overestimating the increase in the number of new wedges recorded per query. To address this, we developed the Exclusion Lemma to filter out high-degree vertices. In the \(k\)-cycle case, an unexpectedly large number of \((l-1)\)-paths becomes a new source of overestimating the increase of \(l\)-paths recorded per query. This issue, in principle, can be addressed by excluding these unexpected cases; which, however, introduces some extra technical nuances. In particular, we define the following family of functions \(r_j:\mathbb{N}\to\mathbb{N}\), for \(j\in \mathbb{N}\), \[\label{eq:rjt95definition} r_j(t) \mathrel{\vcenter{:}}= \max\mathopen{}\mathclose{\left\{\biggl\lceil \Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^j} (t+1)^{2/2^j}\biggr\rceil, \ceil{\log n}}\right\}\cdot(j\Delta^{j-1}).\tag{51}\] A routine calculation reveals the following analytical property of \(r_j(t)\).
Claim 34. Let \(l\in \mathbb{N}_{\geq 2}\) and \(j \in \{1,\dots, \floor{\frac{l-1}{2}}\}\). Then, for all sufficiently large \(n\in \mathbb{N}\) and every \(t\in \mathbb{Z}_{[0,T]}\), \[r_j(t)r_{l-1-j}(t) \leq r_{l-1}(t) n.\]
Proof. By definition, \(r_j(t)\) and \(r_{l-1-j}(t)\) are each a max of two terms. Since \(\max(a,b)\cdot \max(c,d)\leq \max(ac,ad,bc,bd)\) for all \(a,b,c,d\in \mathbb{R}\), it suffices to show that each of the following four terms is at most \(r_{l-1}(t)n\).
Term \(\biggl\lceil \Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^j} (t+1)^{2/2^j}\biggr\rceil \cdot \biggl\lceil \Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^{l-1-j}} (t+1)^{2/2^{l-1-j}}\biggr\rceil \cdot(l^2\Delta^l)\). This term is at most \(r_{l-1}(t)n\) because the term divided by \(r_{l-1}(t)n\) is at most \[\begin{align} &\frac{\biggl\lceil\Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^j} (t+1)^{2/2^j}\biggr\rceil \cdot \biggl\lceil \Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^{l-1-j}} (t+1)^{2/2^{l-1-j}}\biggr\rceil \cdot(l^2\Delta^l)}{\biggl\lceil\Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^{l-1}} (t+1)^{2/2^{l-1}}\biggr\rceil\cdot n} \\ &\qquad\qquad\leq O\Bigl(\mathop{\mathrm{\mathrm{poly}}}(\Delta)\cdot \Bigl(\frac{t}{n}\Bigr)^{2-2/2^j - 2/2^{l-1-j} +2/2^{l-1}}\Bigr) \leq 1, \end{align}\] where the last inequality holds for sufficiently large \(n\) and uses \(t\leq T \leq n^{1-\varepsilon}\) and \(\Delta \leq n^{o(1)}\).
Term \(\biggl\lceil \Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^j} (t+1)^{2/2^j}\biggr\rceil \cdot \ceil{\log n} \cdot(l^2\Delta^l)\). Since \(t\leq T \leq n^{1-\varepsilon}\), this term is at most \(O(n^{1-\Omega(1)}\, \mathop{\mathrm{\mathrm{poly}}}(\log n))\), which is at most \(r_{l-1}(t)n\) because \(r_{l-1}(t)n \geq \Omega(n \log n)\).
Term \(\biggl\lceil \Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^{l-1-j}} (t+1)^{2/2^{l-1-j}}\biggr\rceil \cdot \ceil{\log n} \cdot(l^2\Delta^l)\). The previous argument applies.
Term \(\ceil{\log n}^2 \cdot(l^2\Delta^l)\). This is at most \(r_{l-1}(t)n\) because \(r_{l-1}(t)n \geq \Omega(n \log n)\) and \(\Delta \leq n^{o(1)}\).
◻
The mysterious-looking family of functions \(r_j(t)\) corresponds to upper bounds on the number of \(j\)-paths that we can record with \(t\) queries, and is calculated from an optimization that only becomes clear after the analysis is carried out: we will show that it is difficult to record more than \(r_j(t)\) number of \(j\)-paths with \(t\) queries. The above discussion motivates the following excluding projectors.
Definition 13 (Excluding projectors). We define the following excluding projectors.
For \(r\geq0\), let \(\Pi^{\deg}_{\geq r}\) be the projector onto every basis state \(\ket{i,u,w}\ket{x}\) such that there exists a vertex in \(\mathop{\mathrm{\mathcal{G}}}(x)\) with degree at least \(r\).
Let \(t\in \mathbb{Z}_{[0,T]}\). For \(l\in \mathbb{N}\), define \(\Pi_{\mathrm{Bad},t}^{(l)}\) to be the projector onto every basis state \(\ket{i,u,w}\ket{x}\) such that \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains a vertex of degree at least \(\Delta\) or there exists an integer \(1\leq j\leq l\) such that \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains at least \(r_{j}(t)\) length-\(j\) paths. For convenience, we also define \(\Pi_{\mathrm{Bad},t}^{(0)}\mathrel{\vcenter{:}}= 0\).
\(\Pi_{\ge r}^{\deg}\) is the same operator we used to exclude high-degree vertices. By the same argument as in the triangle case we can exclude high-degree graphs with the degree threshold set to \(\Delta\).
\(\Pi^{(l)}_{\mathrm{Bad}, t}\) is the new operator that in addition excludes the case that there are unexpectedly many (i.e. at least \(r_j(t)\)) \(j\)-paths for some \(1\le j \le l\) with \(t\) queries. By our definition, for every \(t\in \mathbb{Z}_{[0,T]}\) and \(l\in \mathbb{N}\), \[\label{eq:bad95recurrence} \mathbb{I}- \Pi^{(l)}_{\mathrm{Bad}, t} = \bigl(\mathbb{I}- \Pi^{\{l\}}_{[r_l(t),\infty)}\bigr) \bigl(\mathbb{I}- \Pi^{(l-1)}_{\mathrm{Bad}, t}\bigr).\tag{52}\]
Recall that, for \(t\in \mathbb{Z}_{[0,T]}\), \[\ket{\phi_t} \mathrel{\vcenter{:}}= U_t \mathop{\mathrm{\mathcal{R}}}U_{t-1}\mathop{\mathrm{\mathcal{R}}}\dots U_1 \mathop{\mathrm{\mathcal{R}}}U_0 (\ket{0}\ket{\bot^m}).\]
For \(t\in \mathbb{Z}_{[0,T]}\) and \(l\in \mathbb{Z}_{\geq 0}\), let \[\label{eq:phi95i94l} \ket{\phi_t^{(l)}} \mathrel{\vcenter{:}}= U_t \mathop{\mathrm{\mathcal{R}}}(\mathbb{I}-\Pi_{\mathrm{Bad},t-1}^{(l)}) U_{t-1} \mathop{\mathrm{\mathcal{R}}}(\mathbb{I}-\Pi_{\mathrm{Bad},t-2}^{(l)}) \dots (\mathbb{I}-\Pi_{\mathrm{Bad},1}^{(l)})U_1 \mathop{\mathrm{\mathcal{R}}}U_0 (\ket{0}\ket{\bot^m}).\tag{53}\] The above definition implies: \[\label{eq:phi95i94l95properties} \begin{align} &\ket{\phi_t^{(0)}} = \ket{\phi_t} \quad \text{and} \\ &\ket{\phi_{t+1}^{(l)}} =U_{t+1} \mathop{\mathrm{\mathcal{R}}}(\mathbb{I}- \Pi^{(l)}_{\mathrm{Bad},t})\ket{\phi_t^{(l)}} \quad \text{for all integers 0\leq t \leq T-1.} \end{align}\tag{54}\]
Now, to measure progress in recording length-\(l\) paths, we use the following somewhat technical but convenient definition, that excludes unlikely events in advance.
Definition 14 (Progress measures for recording paths). For \(t\in \mathbb{Z}_{[0,T]}\), \(l\in \mathbb{N}\), and \(r\geq 0\), define \[\label{eq:P94l95123i44p125} {\Lambda}^{\{l\}}_{t,r} \mathrel{\vcenter{:}}= \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \ket{\phi_t^{(l-1)}}}\right\|.\tag{55}\]
In the next two subsections, we analyze our progress measures \({\Lambda}_{t,r}^{\{l\}}\) and \(\boldsymbol{\square}_t\) in detail.
In this part, we analyze the progress of recording \(l\)-paths. We start with the base case \(l=1\), the progress of recording \(1\)-paths, i.e., edges, or a vertex of degree at least \(\Delta\). Recall that the definition of \(\Pi^{\{1\}}_R\) involves a degree condition that is not present in the definitions of \(\Pi^{\{l\}}_R\) for \(l\in \mathbb{N}_{\geq 2}\). The degree condition is crucial for carrying out the induction.
Proposition 35. If \(n\geq 2\) and \(t\in \mathbb{Z}_{[0,T]}\), \[{\Lambda}^{\{1\}}_{t,{r_1(t)}} \leq 2n \Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}+2n\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}.\]
Proof. First, we recall the definitions \[r_1(t) \mathrel{\vcenter{:}}= \max\mathopen{}\mathclose{\left\{t+1, \ceil{\log n}}\right\} \quad \text{and} \quad {\Lambda}^{\{1\}}_{t,{r_1(t)}} = \mathopen{}\mathclose{\left\|\Pi_{[r_1(t),\infty)}^{\{1\}} \ket{\phi_t}}\right\|,\] where \(\Pi_{[r_1(t),\infty)}^{\{1\}}\) is the projector onto every basis state \(\ket{i,u,w}\ket{x}\) such that \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains at least \(r_1(t)\geq t+1\) edges or a vertex of degree at least \(\Delta\).
By 30, \(\ket{\phi_t}\) is only supported on the basis states \(\ket{i,u,w}\ket{x}\) such that \(\mathop{\mathrm{\mathcal{G}}}(x)\) contains at most \(t\) edges. Therefore, \[\mathopen{}\mathclose{\left\|\Pi_{[r_1(t),\infty)}^{\{1\}} \ket{\phi_t}}\right\| = \mathopen{}\mathclose{\left\|\Pi^{\deg}_{\geq \Delta} \ket{\phi_t}}\right\| \leq 2n \Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}+2n\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}},\] where we used 6 for the inequality, as required. ◻
Next, we analyze the progress recording \(l\)-paths for \(l\ge 2\), relying on the following recurrence.
Lemma 13 (\(l\)-paths progress recurrence). Let \(l\in \mathbb{N}_{\geq 2}\). For all \(t\in \mathbb{Z}_{[0,T]}\) and \(r\geq 0\), we have \[\label{eq:paths95recurrence} {\Lambda}^{\{l\}}_{t+1,r} \leq {\Lambda}_{t,r}^{\{l\}} + 4 \sqrt{\frac{B_{l}(t)}{N}} {\Lambda}^{\{l\}}_{t,r-l\Delta^{l-1}},\tag{56}\] where \[\label{eq:blt} B_l(t) \mathrel{\vcenter{:}}= 2r_{l-1}(t) n + 4\sum_{j=1}^{\floor{\frac{l-1}{2}}} r_j(t)r_{l-1-j}(t).\tag{57}\]
Proof of 13. Let \(l \in \mathbb{N}_{\geq 2}\). For \(t\in \mathbb{Z}_{[0,T]}\) and \(r\geq0\), \[\begin{align} {\Lambda}^{\{l\}}_{t+1,r} =\;& \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \ket{\phi_{t+1}^{(l-1)}}}\right\| &&\text{definition \ref{eq:P^l_{i} \ref{p}}}\notag \\ =\;&\mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}}U_{t+1}\mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\ket{\phi_t^{(l-1)}}}\right\| &&\text{\ref{eq:phi95i94l95properties}}\notag \\ =\;&\mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}}\mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\ket{\phi_t^{(l-1)}}}\right\| && \text{\Pi_{[r,\infty)}^{\{l\}}, U_{t+1} commute}\notag \\ \leq\;& \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}}\ket{\phi_t^{(l-1)}}}\right\|+ \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi_{[r,\infty)}^{\{l\}}\bigr)\ket{\phi_t^{(l-1)}}}\right\| &&\text{triangle inequality}\notag \\ =\;& {\Lambda}_{t,r}^{\{l\}} + \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi_{[r,\infty)}^{\{l\}}\bigr)\ket{\phi_t^{(l-1)}}}\right\|&&\text{definition \ref{eq:P^l_{i} \ref{p}}}\notag \\ =\;& {\Lambda}_{t,r}^{\{l\}} + \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi_t^{(l-1)}}}\right\|, \label{eq:paths95recurrence95terms} \end{align}\tag{58}\] where the last equality uses the fact that adding a new edge of a graph of maximum degree at most \(\Delta\) can introduce at most \(\sum_{i=0}^{l-1} \Delta^{l-1-i}\Delta^i = l \Delta^{l-1}\) new length-\(l\) paths.
Abbreviate \[\ket{\rho} \mathrel{\vcenter{:}}= \bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi_{t}^{(l-1)}}.\] Then, we can write the second term in 58 as \[\mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\ket{\rho}}\right\| \le \sum_{y\in [N] \cup \{\bot\}} \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\Pi_y \ket{\rho}}\right\|,\] since \(\mathop{\mathrm{\mathbb{I}}}= |0\rangle\langle 0|_P + \sum_{y\in[N]\cup\{\perp\}}\Pi_y\), and \(\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}|0\rangle\langle 0|_P \ket{\rho} = 0\) because \(\ket{\rho}\) has recorded fewer than \(r\) length-\(l\) paths and \(\mathop{\mathrm{\mathcal{R}}}|0\rangle\langle 0|_P = |0\rangle\langle 0|_P\).
We will show \[\label{eq:path95progress95bound} \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\Pi_{\bot}\ket{\rho}}\right\| \leq \sqrt{\frac{B_{l}(t)}{N}}{\Lambda}^{\{l\}}_{t,r-l\Delta^{l-1}} \quad \text{and} \quad \sum_{y\in [N]}\mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\Pi_y\ket{\rho}}\right\| \leq 3\sqrt{\frac{B_{l}(t)}{N}}{\Lambda}^{\{l\}}_{t,r-l\Delta^{l-1}}.\tag{59}\]
When \(y=\bot\), consider each basis state \(\ket{i,u,w}\ket{x}\) in the support of \[\Pi_\bot\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi^{(l-1)}_t}.\] Due to \(\Pi_\bot\), we have \(x_i = \bot\) and \(u\neq 0\), so 1 states \[\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x} = \ket{i,u,w}\biggl(\sum_{y\in [N]}\frac{\omega_N^{u y}}{\sqrt{N}}\ket{y}_{I_i}\biggr)\otimes\bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}.\] Since \(\ket{i,u,w}\ket{x}\) is also in the support of \((\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t})\), \(x\) records at most \(r_j(t)\) length-\(j\) paths for every \(1\leq j \leq l-1\). Due to \(\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\), \(x\) records fewer than \(r\) length-\(l\) paths. Therefore, in order for \(\ket{y}_{I_i} \otimes \bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}\) to record at least \(r\) length-\(l\) paths, edge \(y\) must join one end of a length-\(j\) path with one end of a length-\((l-1-j)\) path for some \(0\leq j\leq \floor{\frac{l-1}{2}}\), where a length-\(0\) path refers to a vertex. When \(j=0\), the number of such \(y\)s is at most \(2 r_{l-1}(t) n\), where the factor of \(2\) accounts for the two ends of the length-\((l-1)\) path. When \(j>0\), the number of such \(y\)s is at most \(4r_j(t) r_{l-1-j}(t)\), where the factor of \(4\) accounts for the four ways to connect a length-\(j\) path and a length-\((l-1-j)\) path. Therefore, \[\mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}}\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x}}\right\|\leq\sqrt{\frac{B_{l}(t)}{N}}.\] Since any two distinct basis states in the support of \(\Pi_\bot\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi^{(l-1)}_t}\) remain orthogonal after \(\Pi^{\{l\}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\) is applied, we have \[\begin{align} & \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\Pi_{\bot}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi_t^{(l-1)}}}\right\| \\ &\qquad \leq \sqrt{\frac{B_{l}(t)}{N}}\mathopen{}\mathclose{\left\|\Pi_{\bot}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi_t^{(l-1)}}}\right\| \leq \sqrt{\frac{B_l(t)}{N}}{\Lambda}^{\{l\}}_{t,r-l\Delta^{l-1}}. \end{align}\]
When \(y\in [N]\), consider each basis state \(\ket{i,u,w}\ket{x}\) in the support of \[\Pi_y\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi^{(l-1)}_t}.\] Due to \(\Pi_y\), we have \(x_i = y\) and \(u\neq 0\), so 1 states \[\begin{align} \mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x} =\ket{i,u,w}&\biggl(\frac{\omega^{u y}_N}{\sqrt{N}}\ket{\bot}_{I_i}+\frac{1+\omega^{u y}_N(N-2)}{N}\ket{y}_{I_i}\\ &\qquad\qquad+\sum_{y'\in [N]\backslash\{y\}}\frac{1-\omega^{u y'}_N-\omega^{u y}_N}{N}\ket{y'}_{I_i}\biggr)\otimes\bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}. \end{align}\] Applying similar reasoning as in the proof of the first bound in 59 , we deduce \[\mathopen{}\mathclose{\left\|\Pi^{\{l\}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x}}\right\|\leq 3\frac{\sqrt{B_{l}(t)}}{N}.\] Since any two distinct basis states in the support of \(\Pi_y(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t})\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi^{(l-1)}_t}\) remain orthogonal after \(\Pi^{\{l\}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\) is applied, we have \[\mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\Pi_{y}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi_t^{(l-1)}}}\right\| \leq 3\frac{\sqrt{B_l(t)}}{N}\mathopen{}\mathclose{\left\|\Pi_{y}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi_t^{(l-1)}}}\right\|.\] Therefore, the Cauchy-Schwarz inequality gives \[\begin{align} &\sum_{y\in [N]} \mathopen{}\mathclose{\left\|\Pi_{[r,\infty)}^{\{l\}} \mathop{\mathrm{\mathcal{R}}}\Pi_{y}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi_t^{(l-1)}}}\right\| \nonumber\\ &\qquad \le 3\sqrt{\frac{B_{l}(t)}{N}}\sqrt{\sum_{y\in [N]}\mathopen{}\mathclose{\left\|\Pi_{y}\bigl(\mathbb{I}-\Pi^{(l-1)}_{\mathrm{Bad},t}\bigr)\Pi_{[r-l\Delta^{l-1},r)}^{\{l\}}\ket{\phi_t^{(l-1)}}}\right\|^2} \leq 3\sqrt{\frac{B_{l}(t)}{N}}{\Lambda}^{\{l\}}_{t,r-l\Delta^{l-1}}.\qedhere \end{align}\] ◻
Solving the recurrence, we deduce
Lemma 14 (\(l\)-paths progress). Let \(l \in \mathbb{N}_{\geq 2}\). For all sufficiently large \(n\in \mathbb{N}\) and every \(t\in \mathbb{Z}_{[0,T]}\), \[{\Lambda}^{\{l\}}_{t,{r_l(t)}} \leq \frac{1}{n}.\]
Proof of 14. We start by solving the recurrence 56 in 13 to obtain \[{\Lambda}_{t,r \cdot l\Delta^{l-1}}^{\{l\}} \leq \Bigl(\frac{et}{r}\cdot 4\sqrt{\frac{B_l(t)}{N}}\Bigr)^{r}.\] Therefore, setting \(r\) equal to the non-negative integer \[s_{l}(t) \mathrel{\vcenter{:}}= r_{l}(t)/(l\Delta^{l-1}) = \max\mathopen{}\mathclose{\left\{\biggl\lceil\Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^l} (t+1)^{2/2^l}\biggr\rceil, \ceil{\log n}}\right\}\] gives \[\begin{align} {\Lambda}_{t,r_l(t)}^{\{l\}} &\leq \biggl(\frac{et}{s_l(t)}\cdot 4\sqrt{\frac{B_l(t)}{N}}\biggr)^{s_{l}(t)} \\ &= \biggl(\frac{et}{s_l(t)}\cdot 4\sqrt{\frac{2l r_{l-1}(t)n}{N}}\biggr)^{s_{l}(t)} &&\text{\ref{claim:inductive95step95technical},~\ref{eq:blt}} \\ &\leq \biggl(\frac{8\sqrt{2}et}{s_l(t)}\cdot \sqrt{\frac{l r_{l-1}(t)}{n}}\biggr)^{s_{l}(t)} &&\text{N \geq n^2/4}. \end{align}\] Now, we recall the definition \[r_{l-1}(t) \mathrel{\vcenter{:}}= \max\mathopen{}\mathclose{\left\{\lceil \alpha \rceil, \ceil{\log n}}\right\}\cdot(l-1)\Delta^{l-2},\quad \text{where} \quad \alpha \mathrel{\vcenter{:}}= \Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^{l-1}} (t+1)^{2/2^{l-1}}.\]
There are two cases depending on where the max is attained in the expression \(\max\mathopen{}\mathclose{\left\{\lceil \alpha \rceil, \ceil{\log n}}\right\}\).
Case 1: \(\ceil{\log n}\ge \ceil{\alpha}\).
In this case, \[\ceil{\log n}\geq \biggl\lceil \Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^{l-1}} (t+1)^{2/2^{l-1}}\biggr\rceil \geq \Omega\Bigl(n \Bigl(\frac{t}{n}\Bigr)^{2-4/2^l}\Bigr),\] rearranging gives \[t \leq \Bigl(n \cdot \Bigl(\frac{O(\log(n))}{n}\Bigr)^{1/(2-4/2^l)}\Bigr) \leq n^{1/2 - \Omega(1)}.\] Therefore, for sufficiently large \(n\), we have \[{\Lambda}_{t,r_l(t)}^{\{l\}} \leq \Bigl(\frac{8\sqrt{2}et}{s_l(t)}\cdot \sqrt{\frac{l r_{l-1}(t)}{n}}\Big)^{s_{l}(t)} \leq O(n^{-\Omega(\log(n))})\leq \frac{1}{n},\]
Case 2: \(\ceil{\alpha}\ge\ceil{\log n}\). Note that \(\alpha\geq 1\) since we assume \(n\) is sufficiently large. Then \[{\Lambda}_{t,r_l(t)}^{\{l\}}\leq \Bigl(\frac{8\sqrt{2}et}{s_l(t)}\cdot \sqrt{\frac{l r_{l-1}(t)}{n}}\Bigr)^{s_{l}(t)} \leq \Bigl(\frac{16e\sqrt{l(l-1)\Delta^{l-2}}}{c}\Bigr)^{s_l(t)} \leq 2^{-s_{l}(t)} \leq \frac{1}{n},\] where we used \(r_{l-1}(t) = \ceil{\alpha} (l-1)\Delta^{l-2} \leq 2 \alpha (l-1)\Delta^{l-2}\), which holds since \(\alpha\geq 1\), in the second inequality, and recall we define \(c = 32e k\Delta^{k/2}\). ◻
For \(t\in \mathbb{Z}_{[0,T]}\), define \[\label{eq:def95cycleprogress} \boldsymbol{\square}'_t \mathrel{\vcenter{:}}= \mathopen{}\mathclose{\left\|\Pi^{\square}\ket{\phi_t^{(k-1)}}}\right\|,\tag{60}\] which corresponds to the progress of recording a \(k\)-cycle given that not many length-\((k-1)\) paths have ever been recorded, and serves as a good estimator of the actual progress.
Lemma 15. For all sufficiently large \(n\), \[\boldsymbol{\square}_T \leq \boldsymbol{\square}'_T + T\cdot \Bigl(2n \Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}+2n\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}} + \frac{k}{n}\Bigr).\]
Proof. Using the reverse triangle inequality and the fact that \(\Pi^\square\) is a contraction, we have \[\boldsymbol{\square}_T - \boldsymbol{\square}'_T = \bigl\|\Pi^{\square}\ket{\phi_T}\bigr\| - \bigl\|\Pi^{\square}\ket{\phi_T^{(k-1)}}\bigr\| \leq \big\|\Pi^{\square}\ket{\phi_T} - \Pi^{\square}\ket{\phi_T^{(k-1)}}\bigr\| \leq \bigl\|\ket{\phi_T} - \ket{\phi_T^{(k-1)}}\bigr\|.\] The RHS of the above equation can bounded by the triangle inequality applied to the telescoping sum \[\label{eq:overall95exclusion95bound} \mathopen{}\mathclose{\left\|\ket{\phi_T} - \ket{\phi_T^{(k-1)}}}\right\|\leq \mathopen{}\mathclose{\left\|\ket{\phi_T^{(0)}} - \ket{\phi_T^{(1)}}}\right\| + \dots + \mathopen{}\mathclose{\left\|\ket{\phi_T^{(k-2)}} - \ket{\phi_T^{(k-1)}}}\right\|.\tag{61}\] Recall that 52 , for each \(l\in [k-1]\) and \(t\in \mathbb{Z}_{[0,T]}\), \[\mathbb{I}- \Pi^{(l)}_{\mathrm{Bad}, t} = \bigl(\mathbb{I}- \Pi^{\{l\}}_{r_l(t)}\bigr) \bigl(\mathbb{I}- \Pi^{(l-1)}_{\mathrm{Bad}, t}\bigr).\] Applying the Exclusion Lemma (2) and notice the projectors on basis states commute, we obtain \[\mathopen{}\mathclose{\left\|\ket{\phi_T^{(l-1)}} - \ket{\phi_T^{(l)}}}\right\| \leq \sum_{t=1}^{T-1} \mathopen{}\mathclose{\left\|\Pi^{\{l\}}_{r_l(t)} \ket{\phi_t^{(l-1)}}}\right\| = \sum_{t=1}^{T-1} {\Lambda}^{(l)}_{t,{r_l(t)}}.\] Therefore, \[\begin{align} \label{eq:stepwise95exclusion95bound} &\mathopen{}\mathclose{\left\|\ket{\phi_T^{(l-1)}} - \ket{\phi_T^{(l)}}}\right\| \\ \leq& \begin{cases} T\cdot \mathopen{}\mathclose{\left(2n\Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}+2n\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}}\right), &\text{if l=1 using \ref{prop:p95base95bound}}, \notag \\ T \cdot \frac{1}{n},&\text{if l\in \mathbb{N}_{\geq 2} using \ref{prop:p95lpaths95bound}}. \end{cases} \end{align}\tag{62}\]
We can bound \(\boldsymbol{\square}_T'\) by first showing that it satisfies a recurrence in the next lemma and then solving it in the following corollary.
Lemma 16 (\(k\)-cycle progress recurrence). For all \(t\in \mathbb{Z}_{[0,T]}\), \[\label{eq:ct95recurrence} \boldsymbol{\square}'_{t+1} \leq \boldsymbol{\square}'_{t} + 4 \sqrt{\frac{r_{k-1}(t)}{N}},\tag{63}\] and \(\boldsymbol{\square}_0' = 0\).
Solving this recurrence gives
Corollary 6 (\(k\)-cycle progress). We have \[\boldsymbol{\square}'_{T} \leq O\Bigl(\Delta^k\cdot \Bigl(\frac{T}{n^{3/4-1/(2^{k+2}-4)}} \Bigr)^{2-2/2^k} + \Delta^{k/2}\cdot T\frac{\sqrt{\log n}}{n}\Bigr).\]
Proof. From 16, we obtain \[\label{eq:cycleprogress95sum95bound} \boldsymbol{\square}'_T \leq 4 \sum_{t=0}^T \sqrt{\frac{r_{k-1}(t)}{N}}.\tag{64}\] We now recall the definition from 51 and 50 that \[r_{k-1}(t) \mathrel{\vcenter{:}}= \max\mathopen{}\mathclose{\left\{\biggl\lceil \Bigl(\frac{ct}{\sqrt{n}}\Bigr)^{2-4/2^{k-1}} (t+1)^{2/2^{k-1}}\biggr\rceil, \ceil{\log n}}\right\}\cdot((k-1)\Delta^{k-2}),\] where \(c \mathrel{\vcenter{:}}= 32e \cdot k\Delta^{k/2}\), and so \[\label{eq:r95123k-112595bound} r_{k-1}(t) \leq O\Bigl(\bigl(\Delta^{k} \cdot t^{2-4/2^k}/ n^{1-4/2^k}+\log(n)\bigr)\cdot \Delta^k\Bigr).\tag{65}\]
Therefore, \[\boldsymbol{\square}'_T \leq O\Bigl( \Delta^k\cdot \frac{T^{2-2/2^k}}{n^{3/2-2/2^k}} + \Delta^{k/2}\cdot T\frac{\sqrt{\log n}}{n}\Bigr) = O\Bigl(\Delta^k\cdot \Bigl(\frac{T}{n^{3/4-1/(2^{k+2}-4)}} \Bigr)^{2-2/2^k} + \Delta^{k/2}\cdot T\frac{\sqrt{\log n}}{n}\Bigr),\] where the equality uses \((3/4-1/(2^{k+2}-4))(2-2/2^k) = 3/2 - 2/2^k\). ◻
Proof of 16. The boundary condition \(\boldsymbol{\square}_0'=0\) in 63 is trivial. To prove the recurrence, observe that \[\begin{align} \boldsymbol{\square}_{t+1}' &= \mathopen{}\mathclose{\left\|\Pi^{\square} \ket{\phi_{t+1}^{(k-1)}}}\right\| &&\text{definition \ref{eq:def95cycleprogress}} \notag \\ &= \mathopen{}\mathclose{\left\|\Pi^{\square} U_{t+1} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}- \Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\ket{\phi_t^{(k-1)}}}\right\| &&\text{\ref{eq:phi95i94l95properties}} \notag \\ &=\mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}- \Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\ket{\phi_t^{(k-1)}}}\right\| &&\text{\Pi^{\square}, U_{t+1} commute} \notag \\ &\leq \mathopen{}\mathclose{\left\|\Pi^{\square} \ket{\phi_t^{(k-1)}}}\right\| + \mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}- \Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}}\right\| &&\text{triangle inequality} \notag \\ &= \boldsymbol{\square}_t' + \mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\bigl(\mathbb{I}- \Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}}\right\| &&\text{definition \ref{eq:def95cycleprogress}}\label{eq:cycle95recurrence95terms} \end{align}\tag{66}\]
Abbreviate \[\ket{\rho} \mathrel{\vcenter{:}}= \bigl(\mathbb{I}- \Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}.\] Then, we can write the second term in 66 as \[\mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\ket{\rho}}\right\| \leq \sum_{y\in [N]\cup \{\bot\}} \mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\Pi_y \ket{\rho}}\right\|,\] using \(\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}|0\rangle\langle 0|_P \ket{\rho} = 0\) because \(\ket{\rho}\) has recorded no \(k\)-cycle and \(\mathop{\mathrm{\mathcal{R}}}|0\rangle\langle 0|_P = |0\rangle\langle 0|_P\).
We will show \[\label{eq:cycle95progress95bound} \mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\Pi_{\bot}\ket{\rho}}\right\| \leq \sqrt{\frac{r_{k-1}(t)}{N}} \quad \text{and} \quad \sum_{y\in [N]}\mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\Pi_y \ket{\rho}}\right\| \leq 3\sqrt{\frac{r_{k-1}(t)}{N}}.\tag{67}\]
When \(y=\bot\), consider each basis state \(\ket{i,u,w}\ket{x}\) in the support of \[\Pi_\bot \bigl(\mathbb{I}- \Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}.\] Due to \(\Pi_\bot\), we have \(x_i = \bot\) and \(u\neq 0\), so 1 states \[\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x} = \ket{i,u,w}\biggl(\sum_{y\in [N]}\frac{\omega_N^{u y}}{\sqrt{N}}\ket{y}_{I_i}\biggr)\otimes\bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}.\] Since \(\ket{i,u,w}\ket{x}\) is also in the support of \((\mathbb{I}-\Pi^{(k-1)}_{\mathrm{Bad},t})\), \(x\) records at most \(r_{k-1}(t)\) length-\((k-1)\) paths. Due to \(\bigl(\mathbb{I}-\Pi^{\square}\bigr)\), \(x\) does not record a length-\(k\) cycle. Therefore, in order for \(\ket{y}_{I_i} \otimes \bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}\) to record a length-\(k\) cycle, edge \(y\) must connect the two ends of a length-\((k-1)\) path. The number of such \(y\)s is at most \(r_{k-1}(t)\). Therefore, \[\mathopen{}\mathclose{\left\|\Pi^{\square}\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x}}\right\|\leq\sqrt{\frac{r_{k-1}(t)}{N}}.\] Since any two distinct basis states in the support of \(\Pi_\bot \bigl(\mathbb{I}- \Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}\) remain orthogonal after \(\Pi^{\square}\mathop{\mathrm{\mathcal{R}}}\) is applied, we have \[\begin{align} \mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\Pi_{\bot}\ket{\rho}}\right\| &= \mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\Pi_{\bot}\bigl(\mathbb{I}-\Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}}\right\| \leq\sqrt{\frac{r_{k-1}(t)}{N}}. \end{align}\]
When \(y\in [N]\), consider each basis state \(\ket{i,u,w}\ket{x}\) in the support of \[\Pi_y \bigl(\mathbb{I}- \Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}.\] Due to \(\Pi_y\), we have \(x_i = y\) and \(u\neq 0\), so 1 states \[\begin{align} \mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x} =\ket{i,u,w}&\biggl(\frac{\omega^{u y}_N}{\sqrt{N}}\ket{\bot}_{I_i}+\frac{1+\omega^{u y}_N(N-2)}{N}\ket{y}_{I_i}\\ &\qquad\qquad+\sum_{y'\in [N]\backslash\{y\}}\frac{1-\omega^{u y'}_N-\omega^{u y}_N}{N}\ket{y'}_{I_i}\biggr)\otimes\bigotimes_{j\neq i}\ket{x_{j}}_{I_{j}}. \end{align}\] Applying similar reasoning as in the proof of the first bound in 67 , we deduce \[\mathopen{}\mathclose{\left\|\Pi^{\square}\mathop{\mathrm{\mathcal{R}}}\ket{i,u,w}\ket{x}}\right\|\leq 3\frac{\sqrt{r_{k-1}(t)}}{N}.\] Since any two distinct basis states in the support of \(\Pi_y \bigl(\mathbb{I}- \Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(\mathbb{I}-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}\) remain orthogonal after \(\Pi^{\square}\mathop{\mathrm{\mathcal{R}}}\) is applied, we have \[\mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\Pi_{y}\bigl(\mathbb{I}-\Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(1-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}}\right\| \leq 3\frac{\sqrt{r_{k-1}(t)}}{N}\mathopen{}\mathclose{\left\|\Pi_{y}\bigl(\mathbb{I}-\Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(1-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}}\right\|.\] Therefore, the Cauchy-Schwarz inequality gives \[\begin{align} &\sum_{y\in [N]} \mathopen{}\mathclose{\left\|\Pi^{\square} \mathop{\mathrm{\mathcal{R}}}\Pi_{y}\bigl(\mathbb{I}-\Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(1-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}}\right\| \nonumber\\ &\qquad \le 3\sqrt{\frac{r_{k-1}(t)}{N}}\sqrt{\sum_{y\in [N]}\mathopen{}\mathclose{\left\|\Pi_{y}\bigl(\mathbb{I}-\Pi^{(k-1)}_{\mathrm{Bad},t}\bigr)\bigl(1-\Pi^{\square}\bigr)\ket{\phi_t^{(k-1)}}}\right\|^2} \leq 3\sqrt{\frac{r_{k-1}(t)}{N}}.\qedhere \end{align}\] ◻
Combining the previous two lemmas gives:
Proposition 36 (Hardness of recording a \(k\)-cycle). For all sufficiently large \(n\in \mathbb{N}\), \[\begin{align} \boldsymbol{\square}_T \leq& O\Bigl(\Delta^k \Bigl(\frac{T}{n^{3/4-1/(2^{k+2}-4)}} \Bigr)^{2-2/2^k} + \Delta^{k/2}T\frac{\sqrt{\log n}}{n}\\ &\qquad\qquad+ Tn\Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}+Tn\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}\Bigr). \end{align}\]
We finally bound the probability of the quantum query algorithm succeeding even if it does not record a \(k\)-cycle. Let \(\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\) denote the projector onto basis states \(\ket{i,u,w}\ket{x}\) such that \(w\) contains an output substring (i.e., a substring located at some fixed output register) of the form \((a_1,\dots,a_k,b_1,\dots,b_k) \in [m]^k \times \binom{[n]}{2}^k\) where the \(a_i\)s are distinct, the \(b_i\)s form a \(k\)-cycle, and \(x_{a_i} = b_i\) for all \(i\).
Lemma 17 (Hardness of guessing a \(k\)-cycle). Suppose \(N\geq k\). Then, for every state \(\ket{\phi}\), \(\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathbb{I}- \Pi^{\square}) \ket{\phi}}\right\| \leq O(\frac{1}{n})\).
With the above lemma, 33 becomes a simple corollary: we have \[\begin{align} \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\ket{\psi_T}}\right\|=& \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}\ket{\phi_T}}\right\| \notag \\ \leq& \mathopen{}\mathclose{\left\|\Pi^\square \ket{\phi_T}}\right\| + \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^\square)\ket{\phi_T}}\right\| \notag \\ \leq& O\Bigl(\Delta^k \Bigl(\frac{T}{n^{3/4-1/(2^{k+2}-4)}} \Bigr)^{2-2/2^k} + \Delta^{k/2}T\frac{\sqrt{\log n}}{n} + Tn\Bigl(\frac{2em}{n\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}\\ &\qquad\qquad+Tn\mathopen{}\mathclose{\left(\frac{2em}{n\Delta}}\right)^{\Delta}\Bigl(\frac{emn}{2\ceil{\log(n)}}\Bigr)^{\ceil{\log(n)}}\Bigr), \end{align}\] where, in the second inequality, we used 36 to bound \(\Pi^\square \ket{\phi_T}\) and 17 to bound \(\mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^\square)\ket{\phi_T}}\right\|\), and observed that \(\Delta^{k/2}\cdot T\frac{\sqrt{\log n}}{n}\geq \frac{1}{n}\) for \(T,\Delta\in \mathbb{N}\) and \(n\geq 2\).
Proof of 17. For \(\alpha,\beta\in \mathbb{Z}_{\geq 0}\) with \(\alpha+\beta\leq k\), we define the projector \(P_{\alpha,\beta}\) to be onto basis states \(\ket{i,u,w}\ket{x}\), where
\(w\) contains the output substring \((a_1,\dots,a_k,b_1,\dots,b_k) \in [m]^k \times \binom{[n]}{2}^k\) where the \(a_i\)s are distinct and the \(b_i\)s form a \(k\)-cycle;
there are exactly \(\alpha\) indices \(i\in [k]\) such that \(x_{a_i} = \bot\);
there are exactly \(\beta\) indices \(i \in [k]\) such that \(x_{a_i} \neq \bot\) and \(x_{a_i} \neq b_i\).
Observe that if \(\ket{i,u,w}\ket{x}\) is in the support of \(\mathop{\mathrm{\mathbb{I}}}-\Pi^\square\), then \(P_{0,0} \ket{i,u,w}{\ket{x}} = 0\). This is because if \(\ket{i,u,w}\ket{x}\) is in the support of \(P_{0,0}\), then \(x_{a_i} = b_i\) for all \(i\) and the \(b_i\)s form a \(k\)-cycle, which contradicts the assumption.
For a state \(\ket{i,u,w}\ket{x}\) in the support of \(P_{k,l}\), we have \[\label{eq:succ95single95basis95kl-cycle} \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}} \mathop{\mathrm{\mathcal{T}}}\ket{i,u,w}\ket{x}}\right\| \leq (1/\sqrt{N})^\alpha(1/N)^\beta,\tag{68}\] using the definition of \(\mathop{\mathrm{\mathcal{T}}}\).
For \(\ket{i,u,w}\ket{x}\) in the support of \(P_{\alpha,\beta}\), we write \(w_{a}\mathrel{\vcenter{:}}= \{a_1,\dots,a_k\}\) for the set containing the first \(k\) elements of the output substring. Observe that \(\ket{i,u,w}\ket{x}\) and \(\ket{i',u',w'}\ket{x'}\) remain orthogonal after applying \(\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}\) unless \(i=i',u=u',w=w'\) and \(x_s = x'_s\) for all \(s\in [m]-\{a_1,\dots,a_k\}\).
Therefore, for a state \(\ket{\chi} \mathrel{\vcenter{:}}= \sum_{i,u,w,x}c_{i,u,w,x} \ket{i,u,w}\ket{x}\) in the support of \(P_{\alpha,\beta}\), we have \[\begin{align} \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}\ket{\chi}}\right\|^2 &= \sum_{i,u,w,(x_{a'})_{a'\notin w_a}}\biggl\|\sum_{(x_{a'})_{a'\in w_a}} c_{i,u,w,x} \Pi_{\mathop{\mathrm{\mathrm{succ}}}} \mathop{\mathrm{\mathcal{T}}}\ket{i,u,w}\ket{x}\biggr\|^2 \notag \\ &\leq \sum_{i,u,w,(x_{a'})_{a'\notin w_a}}\Bigl(\sum_{(x_{a'})_{a'\in w_a}} \mathopen{}\mathclose{\left|c_{i,u,w,x}}\right|^2 \Bigr)\Bigl(\sum_{(x_{a'})_{a'\in w_a}}\mathop{\mathrm{\mathbb{1}}}[c_{i,u,w,x}\neq 0]\cdot \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}} \mathop{\mathrm{\mathcal{T}}}\ket{i,u,w}\ket{x}}\right\|^2\Bigr) \notag \\ &\leq \binom{k}{\alpha,\beta,k-(\alpha+\beta)}(N-1)^\beta \cdot \Bigl(\frac{1}{N}\Bigr)^\alpha\Bigl(\frac{1}{N^2}\Bigr)^\beta \mathopen{}\mathclose{\left\|\ket{\chi}}\right\|^2 \leq \frac{1}{\alpha!\beta!}\Bigl(\frac{k}{N}\Bigr)^{\alpha+\beta}\mathopen{}\mathclose{\left\|\ket{\chi}}\right\|^2,\label{eq:succ95ab} \end{align}\tag{69}\] where the first inequality is Cauchy-Schwarz and the second inequality is 68 .
Finally, write \(P\) for the projector onto basis states \(\ket{i,u,w}\ket{x}\) not satisfying the first condition defining \(P_{\alpha,\beta}\) so that \(\mathop{\mathrm{\mathbb{I}}}= P + \sum_{\alpha,\beta\in \mathbb{Z}_{\geq 0}\colon \alpha+\beta \leq k}P_{\alpha,\beta}\). Therefore \[\begin{align} \mathopen{}\mathclose{\left\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^\square)\ket{\phi}}\right\|^2 &= \biggl\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^{\square})\Bigl(P + \sum_{\alpha,\beta\in \mathbb{Z}_{\geq 0}\colon \alpha+\beta \leq k} P_{\alpha,\beta}\Bigr)\ket{\phi}\biggr\|^2 \notag \\ &=\biggl\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}(\mathop{\mathrm{\mathbb{I}}}-\Pi^{\square})\Bigl(\sum_{\alpha,\beta\in \mathbb{Z}_{\geq 0}\colon 0< \alpha+\beta \leq k} P_{\alpha,\beta}\Bigr)\ket{\phi}\biggr\|^2 \notag \\ &= \biggl\|\Pi_{\mathop{\mathrm{\mathrm{succ}}}}\mathop{\mathrm{\mathcal{T}}}\Bigl(\sum_{\alpha,\beta\in \mathbb{Z}_{\geq 0}\colon 1\leq \alpha+\beta \leq k} P_{k,l}\Bigr) (\mathop{\mathrm{\mathbb{I}}}-\Pi^{\square})\ket{\phi}\biggr\|^2 \notag \\ &\leq \frac{k(k+3)}{2}\cdot \frac{k}{N} \leq O\Bigl(\frac{1}{N}\Bigr),\label{eq:guessing95prob-cycle} \end{align}\tag{70}\] where the second equality uses \(\Pi_{\mathop{\mathrm{\mathrm{succ}}}}P = 0\) and \((\mathop{\mathrm{\mathbb{I}}}-\Pi^{\square}) P_{0,0} = 0\) as observed previously, and the second-to-last inequality uses 69 , the restriction on the sum of \(P_{\alpha,\beta}\)s to \(1 \leq \alpha+\beta\), and \(N\geq k\).
The lemma follows from 70 after taking square roots on both sides and recalling \(N = \binom{n}{2}\). ◻
In this section, we prove the following theorem.
Theorem 37. Let \(k\in \mathbb{N}\). For all \(m,d \in \mathbb{N}\), \(Q(k\mathsf{\text{-}CYCLE}_{m,d}) = O((2d)^{(k^2+k-6)/4}2^{2dk}m^{3/4-1/(2^{k+2}-4))})\).
To prove 37, when \(d\geq \log_2(m)\), the trivial bound \(Q(k\mathsf{\text{-}CYCLE}_{m,d})\leq m\) applies, ensuring 37 is satisfied. When \(d\leq \log_2(m)\), we employ the learning graph method to confirm the validity of 37.
Corollary 7. For all \(m\in \mathbb{N}\), \(d\leq O(\log(m)/\log\log(m))\), and \(k\in O(1)\), \(Q(k\mathsf{\text{-}CYCLE}_{m,d}) = O(m^{3/4-1/(2^{k+2}-4) + o(1)})\). In view of 41, if \(n\geq \Omega(m)\) there exists a quantum query algorithm using \(O(m^{3/4-1/(2^{k+2}-4) + o(1)})\) queries that finds a triangle in a random sparse graph \(x \leftarrow \binom{[n]}{2}^m\), or decides it does not exist, with success probability \(\geq 1 - o(1)\).
Unlike the triangle-finding variant, where some problem-specific simplifications and improvements naturally emerged, our generic \(k\)-cycle algorithm retains a nearly identical structure to Belovs’s original learning graph algorithm for \(k\)-distinctness [3]. In fact, by simply setting \(d\) equal to \(k\) and replacing occurrences of the notion of “incident to” by “equal to”, our algorithm essentially solves \(k\)-distinctness itself with a complexity of \(O(m^{3/4-1/(2^{k+2}-4)})\).
Although the proof closely resembles those of our triangle-finding algorithm and Belovs’s \(k\)-distinctness algorithm, we give the proof in full for completeness and clarity.
We first describe the construction of the learning graph. For simplicity, we use \(f\) to denote \(k\mathsf{\text{-}CYCLE}_{m,d}\). The vertices of the learning graph are partitioned by \[\dot{\bigcup}_{i\in\mathbb{Z}_{[0,k+1]}}V^{(i)}.\] A vertex \(S^{(i)}\) in \(V^{(i)}\) is (labeled by) an array containing pairwise-disjoint subsets of \([m]\); we refer to entries of \(S^{(i)}\) by \[S^{(i)} = \dot{\bigoplus}_{j=1}^{k}\mathopen{}\mathclose{\left(\dot{\bigoplus}_{d_1,\dots,d_{j-1}\in[2d],\varnothing\neq D\subseteq [2d]}S_j^{(i)}(d_1,\dots,d_{j-1},D)}\right)\in\mathcal{P}([m])^{\sum_{l=1}^{k}(2d)^{l-1}(2^{2d}-1)},\] where \(\oplus\) means array concatenation, \(\dot{\oplus}\) means the subsets being concatenated are pairwise disjoint, and \(\mathcal{P}([m])\) denotes the power set of \([m]\).
We further impose conditions on the sizes of these sets using some \(r_1,\dots,r_{k} \in \mathbb{N}\) that will be chosen later, at the end of 6.2.4. To describe these conditions, it is convenient to write \(\mu(A)\) for the minimum element of a finite non-empty subset \(A \subset \mathbb{Z}\).
Then, for every \(i\geq 1\), we impose that \(V^{(i)}\) can be partitioned by labels consisting of a length-\((i-1)\) sequence of non-empty subsets of \([2d]\), \(D_1,D_2,\dots,D_{i-1}\), such that \(V^{(i)}(D_1,\dots,D_{i-1})\) consists of all vertices \(S^{(i)}\) such that the size of \(S^{(i)}_j(\cdot)\) satisfies \[\mathopen{}\mathclose{\left|S^{(i)}_j(d_1,\dots,d_{j-1},D)}\right| = \begin{cases} r_j+1, & j < i, d_1 = \mu(D_1),\dots,d_{j-1}=\mu(D_{j-1}), D = D_j,\\ r_j, & \text{otherwise}. \end{cases}\]
For each vertex \(R\) in the learning graph, define \[\bigcup R_i\mathrel{\vcenter{:}}= \bigcup_{d_1,\dots,d_{i-1}\in[2d],\varnothing\neq D\subseteq [2d]} R_i(d_1,\dots,d_{i-1},D), \quad\text{and}\quad \bigcup R\mathrel{\vcenter{:}}= \bigcup_{i\in[k]}\mathopen{}\mathclose{\left(\bigcup R_i}\right).\] We refer to indices contained in \(\bigcup R_i\) and \(\bigcup R\) as having been loaded in \(R_i\) and \(R\), respectively. If there is an arc from vertex \(R\) to vertex \(S\) in the learning graph, by the construction in the following paragraphs, it must satisfy \(\bigcup S = \bigcup R \cup \{j\}\). We denote the arc as \(A^{R,S}_j\), and accordingly, we say \(A^{R,S}_j\) is associated with the loading of \(j\).
There exists a unique vertex \(R^{(0)}\in V^{(0)}\) such that \(\bigcup R^{(0)} = \varnothing\). We refer to this vertex as the source, denoted by \(\varnothing\). Each vertex \(R^{(1)}\in V^{(1)}\) loads exactly \[r \mathrel{\vcenter{:}}= \sum_{i=1}^{k}r_i(2d)^{i-1}(2^{2d}-1)\] indices. We fix an arbitrary ordering \(t_1,\dots, t_r\) of indices in \(\bigcup R^{(1)}\) such that all indices in \(\bigcup R^{(1)}_i\) precede those in \(\bigcup R^{(1)}_j\) if \(i<j\). There exists a length \(r\) path from the source \(\varnothing\) to \(R^{(1)}\), with all intermediate vertices lying in \(V^{(0)}\). Along this path, the element \(t_i\) is loaded on the \(i\)-th arc for \(i\in[r]\) in stage I, and specifically, if \(t_i\in \bigcup R_s^{(1)}\), it is loaded in stage I.\(s\). All such paths are disjoint except at the source \(\varnothing\). Therefore, there are \(r\bigl|V^{(1)}\bigr|\) arcs in stage I.
In stage II.\(s\) for \(s\in[k]\), for each \(R^{(s)}\in V^{(s)}(D_1,\dots,D_{s-1})\), \(j\not\in\bigcup R^{(s)}\) and \(\varnothing\neq D_s\subseteq[2d]\), there is an arc loading \(j\), denoted \(A^{R^{(s)}, R^{(s+1)}}_j\), from \(R^{(s)}\) to \(R^{(s+1)} \in V^{(s+1)}(D_1,\dots,D_s)\) defined by \[\begin{cases} R^{(s+1)}_s(\mu(D_1),\dots,\mu(D_{s-1}),D_s) = R^{(s)}_s(\mu(D_1),\dots,\mu(D_{s-1}),D_s)\cup\{j\},\\ R^{(s+1)}_i(d_1,\dots,d_{i-1},D) = R^{(s)}_i(d_1,\dots,d_{i-1},D) \quad\text{if }(i,d_1,\dots,d_{i-1},D)\neq (s,\mu(D_1),\dots,\mu(D_{s-1}),D_s). \end{cases}\]
For every \(x\in f^{-1}(1)\), let \(\mathcal{C}(x) = \{a_1, a_2, \dots, a_k\}\subseteq[m]\) be a specific certificate for \(x\) such that \(x_{a_1}, \dots, x_{a_k}\) form a \(k\)-cycle, and \(x_{a_i}\) is incident to \(x_{a_{i+1}}\) for all \(i\in[k-1]\).
We say \(R^{(1)}\in V^{(1)}\) is consistent with \(x\in f^{-1}(1)\) if edges indexed by \(\mathcal{C}(x)\) are vertex disjoint from edges indexed by \(\bigcup R^{(1)}\). Let \(n_x\) be the number of \(R^{(1)}\in V^{(1)}\) that are consistent with \(x\), and define \[q\mathrel{\vcenter{:}}= \Bigl(\min_{x\in f^{-1}(1)}\{n_x\}\Bigr)^{-1}.\] so that for all \(x\in f^{-1}(1)\), there exist at least \(q^{-1}\) vertices in \(V^{(1)}\) that are consistent with \(x\). By 27, when \(kdr\leq o(m)\) — a condition satisfied since we only need to consider \(k\in O(1)\), \(d\in\log_2(m)\), and use the \(r\) specified in 6.2.4 — it follows that \(q^{-1}\geq\Omega(\bigl|V^{(1)}\bigr|)\).
Let \(\mathrm{Cst}(x)\) denote a fixed but arbitrary set of \(q^{-1}\) vertices \(R^{(1)}\in V^{(1)}\) that are consistent with \(x\). For each \(R^{(1)}\in \mathrm{Cst}(x)\), \(\mathrm{Act}(x,R^{(1)})\) is a set of active arcs consisting of the following arcs:
In stage I, all arcs along the unique shortest length \(r\) path from source \(\varnothing\) to \(R^{(1)}\).
In stage II.\(s\), we define recursively so that if \(R^{(s)}\in V^{(s)}\) has an incoming arc from \(\mathrm{Act}(x, R^{(1)})\), all arcs \(A_{a_s}^{R^{(s)},R^{(s+1)}}\) in the learning graph such that \(R^{(s+1)} \in V^{(s+1)}\) are in \(\mathrm{Act}(x, R^{(1)})\).
Lastly, the set of all active arcs of \(x\) is defined by \[\mathrm{Act}(x)\mathrel{\vcenter{:}}= \dot{\bigcup}_{R^{(1)}\in \mathrm{Cst}(x)}\mathrm{Act}(x,R^{(1)}).\]
For every vertex \(R\) in the learning graph, an assignment on \(R\) refers to a function \(\alpha_R: \bigcup R\to \binom{[n]}{2}\cup\{*\}\) such that:
for all \(j\in \bigcup R_1\), \[\alpha_R(j)\neq *;\]
for all \(j \in R_i(d_1,\dots,d_{i-1},D)\) such that \(i>1\), define \[N(R, d_1,\dots,d_{i-1})\mathrel{\vcenter{:}}= \bigcup_{d_{i-1}\in D'\subseteq[2d]}R_{i-1}(d_1, \dots, d_{i-2}, D'),\] then \(\alpha_R(j)\) must satisfy \[\alpha_R(j)\in\{*\}\cup \Bigl\{e\in \scalebox{1.25}{\binom{[n]}{2}} \Bigm| \exists k\in N(R, d_1,\dots,d_{i-1})\text{ s.t. e is incident to \alpha_R(k)} \Bigr\}.\] Note that the special symbol \(*\) is not incident to any edge.
We say an input \(z\in \binom{[n]}{2}^m\) satisfies assignment \(\alpha_{R}\) if, for all \(t\in \bigcup R\), \[\label{eq:alpha95def95for95k} \alpha_{R}(t) = \begin{cases} z_t, & \text{if t \in \bigcup R_1}, \\[1ex] z_t, & \begin{align}[t] &\text{if i>1, t \in R_i(d_1,\dots,d_{i-1},D) and}\\ &\text{\exists k\in N(R,d_1,\dots,d_{i-1}) s.t. z_t is incident to \alpha_R(k)}, \end{align}\\[1ex] *, &\text{otherwise}. \end{cases}\tag{71}\] For each vertex \(R\) in the learning graph, we write \(\alpha_R^x\) for the unique assignment on \(R\) that \(x\) satisfies. We say arc \(A^{R,S}_j\) uncovers \(j\) if \(\alpha_S^x(j)\neq *\). We say inputs \(x,y\in \binom{[n]}{2}^m\) agree on \(R\) if they satisfy \(\alpha_R^x = \alpha_R^y\); we also say they agree on a subset of \(\bigcup R\) if the restriction of \(\alpha_R^x\) and \(\alpha_R^y\) to that subset equal.
Define \[X_j^{R,S}\mathrel{\vcenter{:}}= \sum_{\alpha_R} Y_{\alpha_R},\] where the summation is over all assignments \(\alpha_R\) on \(R\).
For each arc \(A_j^{R,S}\) in stage I.1, define \(Y_{\alpha_R}\mathrel{\vcenter{:}}= q\psi_{\alpha_R}\psi_{\alpha_R}^\dagger\), where \(\psi_{\alpha_R}\) is a real vector indexed by \(\binom{[n]}{2}^m\) and defined entry-wise by \[\psi_{\alpha_R}[z] \mathrel{\vcenter{:}}= \begin{cases} 1, & \text{if f(z)=1, z satisfies \alpha_R, and A^{R,S}_j\in \mathrm{Act}(z)},\\ 1, & \text{if f(z)=0 and z satisfies \alpha_R},\\ 0,&\text{otherwise}. \end{cases}\] With the above definition, we see that \(X_j^{R,S}\) consists of blocks of the form: \[\label{X95block95form95I46195for95k} \renewcommand{\arraystretch}{1.25} \begin{array}{c|c|c} & x & y \\ \hline x & q & q \\ \hline y & q & q \end{array}\tag{72}\] where \(x\in f^{-1}(1)\), \(y\in f^{-1}(0)\), \(A^{R,S}_j\in \mathrm{Act}(x)\), and both \(x\) and \(y\) agree on \(R\).
For arcs \(A_j^{R,S}\) in stage I.\(s\) where \(s>1\), define \(Y_{\alpha_R}\mathrel{\vcenter{:}}= q(\psi_{\alpha_R}\psi_{\alpha_R}^\dagger+\phi_{\alpha_R}\phi_{\alpha_R}^\dagger)\) where \(\psi_{\alpha_R}\) and \(\phi_{\alpha_R}\) are real vectors indexed by \(\binom{[n]}{2}^m\) and defined entry-wise by \[\psi_{\alpha_R}[z] \mathrel{\vcenter{:}}= \begin{cases} 1/\sqrt{w_1}, & \text{if f(z)=1, \alpha_S^z(j)\neq*, z satisfies \alpha_R, and A^{R,S}_j\in \mathrm{Act}(z)},\\ \sqrt{w_1}, & \text{if f(z)=0, and z satisfies \alpha_R},\\ 0,&\text{otherwise;} \end{cases}\] and \[\phi_{\alpha_R}[z] \mathrel{\vcenter{:}}= \begin{cases} 1/\sqrt{w_0}, & \text{if f(z)=1, \alpha_S^z(j)=*, z satisfies \alpha_R, and A^{R,S}_j\in \mathrm{Act}(z)},\\ \sqrt{w_0}, & \text{if f(z)=0, \alpha_S^z(j)\neq*, and z satisfies \alpha_R},\\ 0, & \text{otherwise.} \end{cases}\] Here, \(w_0\) and \(w_1\) are positive real numbers that will be specified later. With the above definition, we see that \(X_j^{R,S}\) consists of blocks of the form: \[\label{X95block95form95I46295for95k} \begin{array}{l|c|c|c|c} & x: x_j =\alpha_S^x(j)\neq * & x: \alpha_S^x(j)= * & y: y_j =\alpha_S^y(j)\neq * & y: \alpha_S^y(j)= * \\ \hline x: x_j =\alpha_S^x(j)\neq * & q/w_1 & 0 & q & q \\ \hline x: \alpha_S^x(j)= * & 0 & q/w_0 & q & 0 \\ \hline y: y_j =\alpha_S^y(j)\neq * & q & q & q(w_0 + w_1) & qw_1 \\ \hline y: \alpha_S^y(j)= * & q & 0 & qw_1 & qw_1 \\ \end{array}\tag{73}\] where \(x\in f^{-1}(1)\), \(y\in f^{-1}(0)\), \(A^{R,S}_j\in \mathrm{Act}(x)\), and both \(x\) and \(y\) agree on \(R\).
For arcs \(A_j^{R,S}\) in stage II.\(s\) where \(s\in[k]\), suppose \(R\in V^{(s)}(D_1,\dots,D_{s-1})\) and \(S\in V^{(s+1)}(D_1,\dots, D_s)\), define \(Y_{\alpha_R}\mathrel{\vcenter{:}}= q\psi_{\alpha_R}\psi_{\alpha_R}^\dagger\) where \[\psi_{\alpha_R}[z] \mathrel{\vcenter{:}}= \begin{cases} 1/\sqrt{w_2},& \text{if f(z)=1, z satisfies \alpha_R, and A_j^{R,S}\in \mathrm{Act}(z)},\\ (-1)^{s+\sum_{i=1}^{s}\mathopen{}\mathclose{\left|D_i}\right|}\sqrt{w_2}, & \text{if f(z)=0, and z satisfies \alpha_R},\\ 0,&\text{otherwise.} \end{cases}\] \(X_j^{R,S}\) consists of blocks of the form: \[\label{X95block95form95II95for95k} \renewcommand{\arraystretch}{1.25} \begin{array}{c|c|c} & x & y \\ \hline x & q/w_2 & (-1)^{s+\sum_{i=1}^{s}\mathopen{}\mathclose{\left|D_i}\right|}q \\ \hline y & (-1)^{s+\sum_{i=1}^{s}\mathopen{}\mathclose{\left|D_i}\right|}q & qw_2 \end{array}\tag{74}\] where \(x\in f^{-1}(1)\), \(y\in f^{-1}(0)\), \(A^{R,S}_j\in \mathrm{Act}(x)\), and both \(x\) and \(y\) agree on \(R\).
Assume constant \(k\in \mathbb{N}_{\geq 3}\), we show \(Q(k\mathsf{\text{-}CYCLE}_{m,d}) \leq O((2d)^{(k^2+k-6)/4}\, 2^{2dk} \, m^{3/4-1/(2^{k+2}-4)})\) by computing 39 . Furthermore, if \(d\leq O(\log(m)/\log\log(m))\), we have \(Q(k\mathsf{\text{-}CYCLE}_{m,d}) \leq O(m^{3/4-1/(2^{k+2}-4)+o(1)})\).
For stage I.1, there are \(r_1(2^{2d}-1)\bigl|V^{(1)}\bigr|\) arcs in this stage. By 72 , each of them contributes \(q\) to the complexity, so the complexity of this stage is \(r_1(2^{2d}-1)\bigl|V^{(1)}\bigr|q = O(2^{2d}r_1)\).
For stage I.\(s\) with \(s>1\), there are \(r_s(2d)^{s-1}(2^{2d}-1)\bigl|V^{(1)}\bigr|\) arcs in this stage. For each input \(z\), we need to bound the number of arcs that can uncover an element, so we get a refined bound on the contribution from 73 . Suppose such an arc in this stage is on the shortest length-\(r\) path from source \(\varnothing\) to \(R^{(1)}\in V^{(1)}\), and is uncovering \(b_s\) in \(\bigcup R_s^{(1)}\), then, there must exist a length-\(s\) sequence \((z_{b_1}, z_{b_2}, \dots, z_{b_s})\) such that \(b_i\in \bigcup R^{(1)}_i\) and \(z_{b_i}\) is incident to \(z_{b_{i+1}}\) for all \(i\in[s-1]\). The number of such sequences \((b_1,\dots,b_s)\) is at most \(m(2d)^{s-1}\), and the number of choices of \(R^{(1)}\) loads \(b_i\) in stage I.\(i\) for all \(i\in[s]\) is upper bounded by \[\begin{align} &(2d)^{s(s-1)/2}(2^{2d}-1)^s\binom{m-s}{r_1-1,\underbrace{r_1,\cdots,r_1}_{(2^{2d}-1)-1},r_2-1,\underbrace{r_2,\cdots,r_2}_{(2d)(2^{2d}-1)-1},\dots, r_s-1,\underbrace{r_s,\cdots,r_s}_{(2d)^{s-1}(2^{2d}-1)-1}}\\ =& O\Bigl(\frac{r_1r_2\cdots r_s(2d)^{\frac{s(s-1)}{2}} 2^{2ds}}{m^s}\bigl|V^{(1)}\bigr|\Bigr). \end{align}\] Therefore, for a negative input, by 73 , stage I.\(s\)’s contribution to the complexity is \[\begin{align} &O\Bigl(qw_0(m(2d)^{s-1})\Bigl(\frac{r_1\cdots r_s(2d)^{s(s-1)/2} 2^{2ds}}{m^s}\bigl|V^{(1)}\bigr|\Bigr)+qw_1\Bigl(r_s(2d)^{s-1}(2^{2d}-1)\bigl|V^{(1)}\bigr|\Bigr)\Bigr)\\ =&O\Bigl(\frac{r_1\cdots r_s(2d)^{(s^2+s-2)/2}2^{2ds}}{m^{s-1}}w_0+r_s(2d)^{s-1}2^{2d}w_1\Bigr); \end{align}\] and for a positive input, by 73 , stage I.\(s\)’s contribution to the complexity is \[\begin{align} &O\Bigl(\frac{q}{w_1}(m(2d)^{s-1})\Bigl(\frac{r_1\cdots r_s(2d)^{s(s-1)/2} 2^{2ds}}{m^s}\bigl|V^{(1)}\bigr|\Bigr)+\frac{q}{w_0}\Bigl(r_s(2d)^{s-1}(2^{2d}-1)\bigl|V^{(1)}\bigr|\Bigr)\Bigr)\\ =&O\Bigl(\frac{r_1\cdots r_s(2d)^{(s^2+s-2)/2}2^{2ds}}{m^{s-1}w_1}+\frac{r_s(2d)^{s-1}2^{2d}}{w_0}\Bigr). \end{align}\] If we set \(w_0=((2d)^{s(s-1)/4}2^{d(s-1)})^{-1}\sqrt{\frac{m^{s-1}}{r_1\cdots r_{s-1}}}\), and \(w_1 = 1/w_0\), the total contribution to the complexity is \[O\Bigl((2d)^{(s^2+3s-4)/4}2^{d(s+1)}r_s\sqrt{\frac{r_1\cdots r_{s-1}}{m^{s-1}}}\Bigr).\]
For stage II.\(s\) when \(s\in[k]\), each vertex in \(V^{(s)}\) has \((m-r-s+1)(2^{2d}-1)\) outgoing arcs, and if \(s>1\), each vertex in \(V^{(s)}\) has \(r_{s-1}+1\) incoming arcs. Therefore, the total number of arcs on stage II.\(s\) is \[\frac{\prod_{i=1}^s(m-r-i+1)(2^{2d}-1)}{\prod_{j=2}^{s}(r_{j-1}+1)}\bigl|V^{(1)}\bigr|\leq O\Bigl(\frac{m^s2^{2ds}\bigl|V^{(1)}\bigr|}{r_1\cdots r_{s-1}}\Bigr).\] As we will see later, \(r_i\in o(m)\) for all \(i\in[k]\), so the total number of arcs in stage II is upper bounded by \(O(m^k2^{2dk}\bigl|V^{(1)}\bigr|/(r_1\cdots r_{k-1}))\). Among them, if a vertex in \(V^{(s)}\) has an incoming active arc, that vertex has \(2^{2d}-1\) outgoing active arcs. Therefore, there are at most \(q^{-1}\sum_{i=1}^k(2^{2d}-1)^i = O(2^{2dk}q^{-1})\) active arcs in stage II in total. For every negative input, by 74 , each arc contributes \(qw_2\) to the complexity, so the total contribution is \[O\Bigl(\frac{m^k2^{2dk}\bigl|V^{(1)}\bigr|}{r_1\cdots r_{k-1}}qw_2\Bigr) = O\Bigl(2^{2dk}\frac{m^kw_2}{r_1\cdots r_{k-1}}\Bigr).\] For every positive input, by 74 , each active arc contributes \(q/w_2\) to the complexity, so the total contribution is upper bounded by \[O(2^{2dk}q^{-1}) \frac{q}{w_2} \leq O(2^{2dk}/w_2).\] To balance the contribution from negative inputs and positive inputs, we can set \(w_2=\sqrt{\frac{r_1\cdots r_{k-1}}{m^k}}\) so that the total contribution in stage II is \[O\biggl(2^{2dk}\sqrt{\frac{m^k}{r_1\cdots r_{k-1}}}\, \biggr).\]
The total complexity of all stages is \[O\biggl(2^{2d}r_1 + \Bigl(\sum_{i=2}^k (2d)^{(i^2+3i-4)/4} \, 2^{d(i+1)}r_i\sqrt{\frac{r_1\cdots r_{i-1}}{m^{i-1}}}\Bigr) + 2^{2dk}\sqrt{\frac{m^k}{r_1\cdots r_{k-1}}}\, \biggr).\] To (approximately) balance the summands, we set \(r_i = \ceil{m^{1-1/2^{i+1}-1/(2^{i+1}(2^k-1))}}\) for all \(i\in[k-1]\) and \(r_k=0\). The above equation leads to a complexity of \(O((2d)^{(k^2+k-6)/4}\, 2^{2dk} \, m^{3/4-1/(2^{k+2}-4)})\).
Fix two inputs \(x\in f^{-1}(1)\) and \(y\in f^{-1}(0)\), to prove 40 holds, it is equivalent to show \[\sum_{A_j^{R,S} \in \mathrm{Act}(x) \colon x_j \neq y_j} X_j^{R,S}[x,y] = 1.\] Since \(\mathrm{Act}(x)= \dot{\bigcup}_{R^{(1)}\in \mathrm{Cst}(x)}\mathrm{Act}(x,R^{(1)})\), it suffices to prove that for all \(R^{(1)}\in \mathrm{Cst}(x)\), \[\label{eq:feasibility95for95k} \sum_{A_j^{R,S} \in \mathrm{Act}(x,R^{(1)}) \colon x_j \neq y_j} X_j^{R,S}[x,y] = \frac{1}{\mathopen{}\mathclose{\left|\mathrm{Cst}(x)}\right|} = q,\tag{75}\]
Recall \(\mathcal{C}(x) = \{a_1,\dots, a_k\}\) is a specific certificate for \(x\) that we chose. Let \(t_1, t_2,\cdots,t_r\in[m]\) be the elements in \(\bigcup R^{(1)}\) given in the order in which they are loaded in \(R^{(1)}\). For \(i\in\mathbb{Z}_{[0,r]}\), let \(T_i\) be the vertex that has loaded \(i\) elements on the unique shortest length-\(r\) path from source \(\varnothing\) to \(R^{(1)}\) (\(\mathopen{}\mathclose{\left|\bigcup T_i}\right| = i\), \(T_0 = \varnothing\) and \(T_r= R^{(1)}\)), so that arcs from \(\varnothing\) to \(R^{(1)}\) is in the form of \(A_{t_i}^{T_{i-1},T_i}\in \mathrm{Act}(x, R^{(1)})\).
We perform the following case analysis depending on whether \(x\) and \(y\) agree on \(R^{(1)}\).
If \(x\) and \(y\) disagree on \(R^{(1)}\), there exists \(i^* \in [r]\) such that \(x\) and \(y\) disagree on \(T_i\) if and only if \(i\geq i^*\). This follows from the fact that, for each arc \(A_j^{R,S}\) in stage I, the following holds by 71 : \[\forall l\in \bigcup R, \alpha_S^x(l) = \alpha_R^x(l) \text{ and } \alpha_S^y(l) = \alpha_R^y(l),\] so if \(x\) and \(y\) disagree on \(R\), then they disagree on \(S\).
We show that \(X_{t_{i^*}}^{T_{i^*-1}, T_{i^*}}[x,y] = q\), and for each \(A_j^{R,S}\in \mathrm{Act}(x,R^{(1)})\backslash\{A_{t_{i^*}}^{T_{i^*-1}, T_{i^*}}\}\), either \(x_j = y_j\) or \(X_j^{R,S}[x,y] = 0\).
When we load \(t_{i^*}\) into \(T_{i^*-1}\), \(x\) and \(y\) agree on \(T_{i^*-1}\) but not \(T_{i^*}\). Since \(x\) and \(y\) agree on \(T_{i^*-1}\), for all \(i\in \bigcup T_{i^*-1}\), we have \[\alpha_{T_{i^*}}^x(i) = \alpha_{T_{i^*-1}}^x(i) = \alpha_{T_{i^*-1}}^y(i) = \alpha_{T_{i^*}}^y(i),\] so we must have \(\alpha_{T_{i^*}}^x(t_{i^*}) \neq \alpha_{T_{i^*}}^y(t_{i^*})\) as \(x\) and \(y\) disagree on \(T_{i^*}\). Therefore, \(x_{t_{i^*}} \neq y_{t_{i^*}}\) as otherwise \(\alpha_{T_{i^*}}^x(t_{i^*}) = \alpha_{T_{i^*}}^y(t_{i^*})\). Hence, the term \(X_{t_{i^*}}^{T_{i^*-1}, T_{i^*}}[x,y]\) is included in the summation in 75 . Depending on which stage \(A_{t_{i^*}}^{T_{i^*-1}, T_{i^*}}\) is in, either by 72 or by 73 , \[X_{t_{i^*}}^{T_{i^*-1}, T_{i^*}}[x,y] = q,\]
When we load \(t_i\) into \(T_{i-1}\) such that \(i\in[i^*-1]\), \(x\) and \(y\) agree on both \(T_{i-1}\) and \(T_{i}\). Then, either \(x_{t_i} = \alpha_{T_i}^x(t_i) = \alpha_{T_i}^y(t_i) = y_{t_i} \neq *\), or \(\alpha_{T_i}^x(t_i) = \alpha_{T_i}^y(t_i) = *\) so that by 73 , \(X^{T_{i-1},T_i}_{t_i}[x,y] = 0\). Therefore, arc \(A_{t_{i}}^{T_{i-1}, T_{i}}\) does not contribute to 75 .
Every other arc \(A^{R,S}_j\in \mathrm{Act}(x,R^{(1)})\) is either in stage I and of the form \(A_{t_i}^{T_{i-1},T_i}\) for some \(i>i^*\), \(i\in[r]\), or the arc is in stage II. If the arc is in stage I, then \(x\) and \(y\) disagree on \(R\). Depending on which stage \(A_{t_{i}}^{T_{i-1}, T_{i}}\) is in, either by 72 or by 73 , \(X_j^{R,S}[x,y]=0\).
If \(A^{R,S}_j\) is in stage II, it suffices to show that if \(x\) and \(y\) disagree on \(R\), then they also disagree on \(S\). If this holds, a short induction establishes that \(x\) and \(y\) disagree on \(R\) for all \(A^{R,S}_j\in \mathrm{Act}(x, R^{(1)})\) in stage II. By 74 , it then follows that \(X_j^{R,S}[x,y]=0\).
By the definition of consistency, after loading \(j\in\mathcal{C}(x)\), \[\forall i\in \bigcup R, \alpha_S^x(i) = \alpha_R^x(i).\] If \(x\) and \(y\) agree on \(S\), we must have \[\label{eq:feasibility95contradiciton95agree95on95S95for95k} \forall i\in \bigcup R, \alpha_S^y(i) = \alpha_S^x(i) = \alpha_R^x(i).\tag{76}\] However, there exists \(l\in\bigcup R\) such that \(\alpha_R^y(l) \neq \alpha_R^x(l) = \alpha_S^y(l)\) because \(x\) and \(y\) disagree on \(R\). Since \(\{\alpha_R^y(l),\alpha_S^y(l)\} \subseteq \{*, y_l\}\), if 76 holds, it follows that \(\alpha_R^y(l) = *\) and \(y_l = \alpha_S^y(l) = \alpha_S^x(l) = x_l\). Furthermore, one such \(l\) must satisfy \(l\in \bigcup S_{i+1}\) and \(j\in \bigcup S_i\) for some \(i\in[k-1]\), implying \(j=a_i\), and \(y_l = x_l\) is incident to \(y_{a_i} = x_{a_i}\). This contradicts the definition of consistency. Therefore, \(x\) and \(y\) must disagree on \(S\).
If \(x\) and \(y\) agree on \(R^{(1)}\), we first show the contribution from arcs in \(\mathrm{Act}(x,R^{(1)})\) in stage I to 75 is 0. For each \(i\in[r]\), when we load \(t_i\) into \(T_{i-1}\), \(x\) and \(y\) agree on both \(T_{i-1}\) and \(T_{i}\). An identical argument as in a previous case when \(i\in[i^*-1]\) shows arc \(A_{t_{i}}^{T_{i-1}, T_{i}}\) does not contribute to 75 .
For stage II, let \(l\) be the smallest number in \([l]\) that \(x_{a_l} \neq y_{a_l}\). Such \(l\) must exist because \(y\) is a negative instance. For active arcs in stage II.\(l'\) such that \(l' < l\), those arcs are loading \(a_{l'}\) but \(x_{a_{l'}}=y_{a_{l'}}\), so those arcs’ \(X\) are not included in the summation in 75 .
For arcs in stage II.\(l'\) such that \(l' > l\), \(x\) and \(y\) disagree on the vertices before loading \(a_{l'}\). This is because \(a_{l}\) gets uncovered in \(x\), so \(y_{a_{l}}\) must be equal to \(x_{a_l}\) for \(x\) and \(y\) to agree, which leads a contradiction. Then, by 74 , those active arcs’ contribution to 75 is also 0.
Next, we show the contribution from arcs in \(\mathrm{Act}(x,R^{(1)})\) in stage II.\(l\) to 75 is exactly \(q\). For each \(s\in[l]\) and sequence \((D_1, \dots, D_{s-1})\), there exists exactly one vertex \(T^{(s)}\in V^{(s)}(D_1,\dots, D_{s-1})\) such that \(\bigcup T^{(s)} = \bigcup R^{(1)}\cup\{a_1,\dots,a_{s-1}\}\).
Let \(B(s, D_1,\dots, D_{s-1})\) be the set of vertices in \(V^{(l)}\) reachable from \(T^{(s)}\) by arcs in \(\mathrm{Act}(x, R^{(1)})\). There is a bijection between vertices in \(B(s, D_1,\dots, D_{s-1})\) and choices \((D_s, \dots, D_{l-1})\); explicitly, each \(R\in B(s, D_1,\dots, D_{s-1})\) corresponds uniquely to a single choice of \((D_s, \dots, D_{l-1})\), satisfying \(R\in V^{(l)}(D_1,\dots, D_{l-1})\). Define the contribution from \(T^{(s)}\) to 75 as \[C(T^{(s)}) \mathrel{\vcenter{:}}= \sum_{R\in B(s, D_1,\dots, D_{s-1}), A_{a_l}^{R,S}\in\mathrm{Act}(x, R^{(1)})}X_{a_l}^{R,S}[x,y].\] Then, our goal becomes showing \(C(R^{(1)}) = q\), and we do this by induction on \(s\) from \(l\) down to 1, and showing \[C(T^{(s)}) = \begin{cases} (-1)^{1+s+\sum_{i=1}^{s-1}\mathopen{}\mathclose{\left|D_i}\right|}q & \text{if x and y agree on T^{(s)},}\\ 0 & \text{if x and y disagree on T^{(s)}.} \end{cases}\]
If \(s=l\), \(T^{(s)}\) vertex has \(2^{2d}-1\) outgoing active arcs in \(\mathrm{Act}(x, R^{(1)})\), one for each \(\varnothing\neq D_l\subseteq [2d]\), to vertex \(T^{(l+1)}\in V^{(l+1)}(D_1,\dots,D_{l-1},D_l)\). If \(x\) and \(y\) disagree on \(T^{(s)}\), all these arcs’ contribution to 75 is 0 by 74 . If \(x\) and \(y\) agree on \(T^{(s)}\), since \(x_{a_l}\neq y_{a_l}\), all these outgoing active arcs’ contribution are included in 75 . By 74 , the total contribution from these arcs to 75 is \[\sum_{\varnothing\neq D_l\subseteq [2d]}(-1)^{l+\sum_{i=1}^l\mathopen{}\mathclose{\left|D_i}\right|}q = (-1)^{1+l+\sum_{i=1}^{l-1}\mathopen{}\mathclose{\left|D_i}\right|}q.\] This proves the base case.
When \(s<l\), for each \(\varnothing\neq D_s\subseteq [2d]\), there exists a vertex in \(T^{(s+1)}(D_s)\in V^{(s+1)}(D_1,\dots,D_s)\) such that \(A_{a_s}^{T^{(s)}, T^{(s+1)}(D_s)}\in\mathrm{Act}(x, R^{(1)})\). Notice \[B(s,D_1,\dots, D_{s-1}) = \dot{\bigcup_{\varnothing\neq D_s\subseteq[2d]}} B(s+1,D_1,\dots, D_s),\] so \[C(T^{(s)}) = \sum_{\varnothing\neq D_s\subseteq[2d]} C(T^{(s+1)}(D_s)).\]
If \(x\) and \(y\) disagree on \(T^{(s)}\), since we are in stage II, as proved in a previous part, \(x\) and \(y\) disagree on \(T^{(s+1)}(D_s)\) for all \(\varnothing\neq D_s \subseteq[2d]\). Assuming the induction hypothesis, we have \(C(T^{(s)}) = 0\).
If \(x\) and \(y\) agree on \(T^{(s)}\), although \(x_{a_s} = y_{a_s}\), \(x\) and \(y\) may not agree on \(T^{(s+1)}(D_s)\) due to what are known as faults. We say that an index \(j\in \bigcup R^{(1)}_{s+1}\) is faulty if \(y_j\) is incident to \(y_{a_s}\). Let \(I\) denote the set of all \(i\in[2d]\) such that \[\bigcup_{\varnothing\neq D\subseteq[2d]} T^{(s)}_{s+1}(\mu(D_1),\dots,\mu(D_{s-1}), i, D),\] does not contain a faulty index. By the definitions of assignment and consistency, and the assumption that \(x\) and \(y\) agree on \(T^{(s)}\), since \(x_{a_s} = y_{a_s}\), \(x\) and \(y\) agree on \(T^{(s+1)}(D_s)\) if and only if \(\varnothing\neq D_s\subseteq I\). There are at most \(2(d-1)\) faulty indices since the graph has a max degree of \(d\), so at most \(2(d-1)\) other edges in \(y\) can be incident to \(y_{a_s}\) — a necessary condition for causing a fault. Therefore, \(\mathopen{}\mathclose{\left|I}\right| \geq 2d-2(d-1) > 0\). By the induction hypothesis, \[\begin{align} C(T^{(s)}) =& \sum_{\varnothing\neq D_s\subseteq I} C(T^{(s+1)}(D_s)) \notag \\ =& \sum_{\varnothing\neq D_s\subseteq I}(-1)^{1+(s+1)+\sum_{i=1}^{s}\mathopen{}\mathclose{\left|D_i}\right|}q = (-1)^{1+s+\sum_{i=1}^{s-1}\mathopen{}\mathclose{\left|D_i}\right|}q. \end{align}\]
The above proof completes the induction and shows that \(C(R^{(1)})\), the contribution from arcs in \(\mathrm{Act}(x,R^{(1)})\) in stage II.\(l\) to 75 , is exactly \(q\).
In this subsection, we show that the next conjecture suffices to lift our nearly tight lower bound for \(k\)-cycle finding in the low maximum degree regime to a nearly tight lower bound for \(k\)-distinctness.
Conjecture 38. Let \(m,n,b\in \mathbb{N}\) be such that \(b=\ceil{\log(n)}\) and \(n\) is divisible by \(b\). Let \(k\in \mathbb{N}_{\geq 3}\) and \(k\mathsf{\text{-}CYCLE}\colon \binom{[n]}{2}^m \to \{0,1\}\) denote the \(k\)-cycle function. Let \(U\subseteq \binom{[n]}{2}^m\) consist of all \(x\in \binom{[n]}{2}^m\) such that \(x\) does not contain repeated edges.
Let \(D\subseteq U\) consist of all \(x\in U\) such that there exists a partition of the vertex set \([n]\) into \(n/b\) parts of size \(b\) each such that every edge in \(x\) connects two vertices within* the same part.*
Let \(\mathcal{P}\) be a partition of the vertex set \([n]\) into \(n/b\) parts of size \(b\) each, and let \(D[\mathcal{P}]\) consist of all \(x\in D\) such that every edge in \(x\) connects two vertices within the same part of \(\mathcal{P}\).
Then the following relationship holds between \(k\mathsf{\text{-}CYCLE}\) restricted to domain \(D\) and \(D[\mathcal{P}]\): \[Q(k\mathsf{\text{-}CYCLE}|_{D}) \leq O(Q(k\mathsf{\text{-}CYCLE}|_{D[\mathcal{P}]})).\]
By definition, \(D\) is the union of \(D[\mathcal{P}]\) over all partitions \(\mathcal{P}\). Therefore, the reverse inequality, \(Q(k\mathsf{\text{-}CYCLE}|_{D[\mathcal{P}]}) \leq Q(k\mathsf{\text{-}CYCLE}|_{D})\), trivially holds. Why is the conjecture plausible? Intuitively, in \(k\mathsf{\text{-}CYCLE}|_{D}\) we are computing \(k\mathsf{\text{-}CYCLE}\) without access to the partition of the input graph, while in \(k\mathsf{\text{-}CYCLE}|_{D[\mathcal{P}]}\) we are given this extra information. However, the symmetries of the \(k\mathsf{\text{-}CYCLE}\) problem appear to make this extra information hard to exploit. This is somewhat reminiscent of the fact that increasing the alphabet size of a highly symmetric function does not increase its approximate degree (a measure of complexity) as established by Ambainis in [52]. Indeed, the conjecture may also hold for functions other than \(k\mathsf{\text{-}CYCLE}\), in particular, functions satisfying graph symmetries.
We now prove that the conjecture implies a tight lower bound for \(k\)-distinctness. The idea is that (i) \(k\mathsf{\text{-}CYCLE}|_{D[\mathcal{P}]}\) is \(k\)-distinctness in disguise and (ii) our lower bound for \(k\)-cycle in fact also holds for \(k\mathsf{\text{-}CYCLE}|_{D}\). The next two lemmas show (i) and (ii) respectively.
Lemma 18. Let \(k,b,m, D[\mathcal{P}]\) and \(k\mathsf{\text{-}CYCLE}\) be as defined in 38. Then \(Q(k\mathsf{\text{-}CYCLE}|_{D[\mathcal{P}]}) \leq O(Q(\mathop{\mathrm{\mathrm{OR}}}_{b^k} \circ k\mathsf{\text{-}DIST}_{m})) \leq O(\sqrt{b^k}\cdot Q(k\mathsf{\text{-}DIST}_m))\).
Proof. The second inequality follows from well-known composition theorems for quantum query complexity [18] so we focus on proving the first.
Given an input \(x \in D[\mathcal{P}]\) of length \(m\), we proceed to construct \(b^k\) many length-\(m\) inputs to \(k\mathsf{\text{-}DIST}_m\), denoted \(y^{(1)},\dots,y^{(b^k)}\), such that \(k\mathsf{\text{-}DIST}_m(y^{(j)})=1\) for some \(j \in [b^k]\) if and only if \(k\mathsf{\text{-}CYCLE}(x) = 1\).
Let \(P_1, P_2, \dots, P_{n/b}\) be an arbitrary but fixed enumeration of the parts in \(\mathcal{P}\). For each \(\ell \in [n/b]\), let \(P_\ell^{k} \mathrel{\vcenter{:}}= \{(v_1, v_2, \dots, v_k, v_1):v_1,v_2,\dots,v_k \in P_\ell\}\). For each \(j \in [b^k]\), let \(P_\ell^{k}[j]\) denote the \(j\)th element of \(P_\ell^{k}\) under an arbitrary but fixed enumeration. For an edge \(\{u,v\}\in \binom{[n]}{2}\), we write \(\{u,v\} \in_{\text{adj}} P_\ell^{k}[j]\) if vertices \(u\) and \(v\) are consecutive elements in \(P_\ell^{k}[j]\). For \(j \in [b^k]\) and \(i \in [n/b]\), let \(y^{(j)}_i\) be \(P_\ell^{k}[j]\) if \(x_i \in_{\text{adj}} P_\ell^{k}[j]\) for some \(\ell \in [n/b]\), and \(x_i\) otherwise. (To be clear, \(P_\ell^{k}[j]\) is a tuple, so it can never equal an edge like \(x_i\), which is a set.) Since \(\mathcal{P}\) is given, querying \(y_i^{(j)}\) only requires querying \(x_i\) for all \(i \in [n/b]\) and \(j \in [b^k]\).
We see \(k\mathsf{\text{-}DIST}_m(y^{(j)})=1\) for some \(j \in [b^k]\) implies \(k\mathsf{\text{-}CYCLE}(x) = 1\) as follows. Since \(y^{(j)}\) is a positive instance of \(k\mathsf{\text{-}DIST}_m\), there exists \(\ell \in [n/b]\) such that \(P_\ell^{k}[j]\) appears (at least) \(k\) times, which means that there exist indices \(i_1, \dots, i_k\) such that edges \(x_{i_1}, \dots, x_{i_k} \in_{\text{adj}} P_\ell^{k}[j]\). Let \(v_1, \dots, v_k\) be such that \(P_\ell^{k}[j] = (v_1, v_2, \dots, v_k, v_1)\). Since there are no repeated edges in \(x\in D[\mathcal{P}]\) by the definition of \(D[\mathcal{P}]\), the set of edges \(\{x_{i_1}, \dots, x_{i_k}\}\) must be the same as \(\{\{v_1, v_2\}, \{v_2, v_3\}, \dots, \{v_{k-1}, v_k\}, \{v_k, v_1\}\}\) by the definition of \(\in_{\text{adj}}\). Hence \(x\) is a positive instance of \(k\mathsf{\text{-}CYCLE}\).
We see \(k\mathsf{\text{-}CYCLE}(x) = 1\) implies \(k\mathsf{\text{-}DIST}_m(y^{(j)})=1\) for some \(j \in [b^k]\) as follows. Since \(x\) is a positive instance of \(k\mathsf{\text{-}CYCLE}\), there exist vertices \(v_1, v_2, \dots, v_k\) such that \(x\) contains the edges \(\{v_1, v_2\}, \{v_2, v_3\}, \dots, \{v_{k-1}, v_k\}, \{v_k, v_1\}\). Since \(x \in D[\mathcal{P}]\), the vertices \(v_1, v_2, \dots, v_k\) must be in \(P_\ell\) for some \(\ell \in [n/b]\). Therefore, there exists \(j \in [b^k]\) such that \(P_\ell^k[j]\) is \((v_1, v_2, \dots, v_k, v_1)\). It follows that \(\{v_1, v_2\}, \{v_2, v_3\}, \dots, \{v_{k-1}, v_k\}, \{v_k, v_1\} \in_{\text{adj}} P_\ell^k[j]\), which implies that \(P_\ell^k[j]\) appears \(k\) times in \(y^{(j)}\). Hence \(y^{(j)}\) is a positive instance of \(k\mathsf{\text{-}DIST}_m\). ◻
Proving the next lemma requires some more basic facts about random graphs, which we collect here. The proof of this fact is given in 7.
Fact 39. Let \(n,m,b\in \mathbb{N}\) be such \(b=\ceil{\log(n)}\) and \(n\) is divisible by \(b\). Let \(k\in \mathbb{N}_{\geq 3}\). Suppose \(m = \Theta(n/b)\) and \(x\leftarrow \binom{[n]}{2}^m\), then:
with probability at least \(\Omega(1/\log^k(n))\), \(x\) contains a \(k\)-cycle;
with probability at least \(1 - o(1/\log^{k}(n))\), there exists a partition of the vertex set \([n]\) into \(n/b\) sets of size \(b\) each such that every edge in \(x\) connects two vertices within* the same part;*
with probability at least \(1 - o(1/\log^k(n))\), there are fewer than \(k\) edges in \(x\) whose deletion leaves \(x\) not containing any repeated edges.
In particular, the probability that all three events above occur together is at least \(\Omega(1/\log^k(n))\).
We remark that for the second and third items, we can in fact lower bound the probabilities by quantities considerably larger than \(1 - o(1/\log^k(n))\), as will be clear from the proof, but the results as stated suffice for our purpose of proving the next lemma.
Lemma 19. Let \(k,m,n,b,D\) and \(k\mathsf{\text{-}CYCLE}\) be as defined in 38. Suppose \(n\) is such that \(m = \Theta(n/b)\). Then \(Q(k\mathsf{\text{-}CYCLE}|_{D}) \geq \widetilde{\Omega}(m^{3/4-1/(2^{k+2}-4)})\).
Proof. Assume for contradiction that \(Q(k\mathsf{\text{-}CYCLE}|_{D}) \leq o(m^{3/4-1/(2^{k+2}-4)}/\log^c(m))\) for some constant \(c\) that will be set later.
Consider \(x\leftarrow \binom{[n]}{2}^m\). By 39, with probability at least \(\Omega(1/\log^k(n))\), all three events —- (i), (ii), and (iii) — described in 39 happen together. Suppose we are in this “good” scenario for the rest of this paragraph except during the last sentence. Since (iii) holds, we can use the element distinctness algorithm \(k\) times to preprocess the input \(x\) to remove all of its repeated edges at a cost of \(O(k m^{2/3})\), which is \(O(m^{2/3})\) since \(k\) is constant. This preprocessing, together with the assumption that (ii) holds, means that \(x\) is now in \(D\), the domain of \(k\mathsf{\text{-}CYCLE}|_{D}\). Therefore, using our assumption at the start of the proof together with the search-to-decision reduction (see preliminaries section), we can find the \(k\)-cycle with constant probability using \(o(m^{3/4-1/(2^{k+2}-4)}/\log^{c-2}(m)) + O(m^{2/3})\) queries, which can be simply written as \(o(m^{3/4-1/(2^{k+2}-4)}/\log^{c-2}(m))\) since \(2/3<3/4-1/(2^{k+2}-4)\) for all \(k\geq 3\). Since the good scenario occurs with probability at least \(\Omega(1/\log^k(n))\), this means we have constructed a quantum algorithm \(\mathop{\mathrm{\mathcal{A}}}\) using \(o(m^{3/4-1/(2^{k+2}-4)}/\log^{c-2}(m))\) queries that finds a \(k\)-cycle in \(x\) with probability at least \(\Omega(1/\log^k(n))\), where the probability is over the randomness in \(\mathop{\mathrm{\mathcal{A}}}\) and the distribution \(x\leftarrow \binom{[n]}{2}^m\).
We will now reach a contradiction by using our lower bound theorem for \(k\)-cycle finding, 33. To apply 33, we set the \(\Delta\) in its statement to \(\log(n)\), and choose \(c\) satisfying \((c-2)(2-2/2^k)-k\geq k+1\). Since \(\mathop{\mathrm{\mathcal{A}}}\) uses only \(o(m^{3/4-1/(2^{k+2}-4)}/\log^{c-2}(m))\) queries, the theorem shows that the probability of \(\mathop{\mathrm{\mathcal{A}}}\) finding a \(k\)-cycle is at most \(O(1/\log^{k+1}(n))\). Again, the probability is over the randomness in \(\mathop{\mathrm{\mathcal{A}}}\) and the distribution \(x\leftarrow \binom{[n]}{2}^m\).
The last two paragraphs give \(\Omega(1/\log^k(n)) \leq O(1/\log^{k+1}(n))\), which is the desired contradiction. ◻
Proposition 40. Assuming 38, \(Q(k\mathsf{\text{-}DIST}_m) \geq \widetilde{\Omega}(m^{3/4-1/(2^{k+2}-4)})\).
Proof. Let \(n\in \mathbb{N}\) be such that \(n\) is divisible by \(b\mathrel{\vcenter{:}}= \ceil{\log(n)}\) and \(m = \Theta(n/b)\). (A simple argument shows such \(n\) exists for any given \(m\).) Let \(k\in \mathbb{N}_{\geq 3}\) and \(k\mathsf{\text{-}CYCLE}\colon \binom{[n]}{2}^m \to \{0,1\}\) denote the \(k\)-cycle function. Let \(D\) and \(\mathcal{P}\) be as defined in 38.
Then, we have \[\begin{align} \widetilde{\Omega}(m^{3/4-1/(2^{k+2}-4)}) \leq&~ Q(k\mathsf{\text{-}CYCLE}|_{\mathop{\mathrm{\mathcal{D}}}}) &&\text{\ref{eq:conjecture95lemma2}} \\ \leq&~O(Q(k\mathsf{\text{-}CYCLE}|_{\mathop{\mathrm{\mathcal{D}}}[\mathcal{P}]})) &&\text{\ref{conj:graph95property95partition}} \\ \leq&~ O(\sqrt{b^k}\cdot Q(k\mathsf{\text{-}DIST}_m) \leq \widetilde{O}(Q(k\mathsf{\text{-}DIST}_m)), &&\text{\ref{eq:conjecture95lemma1}} \end{align}\] which establishes the proposition. ◻
We thank François Le Gall for suggesting the study of quantum algorithms in the edge list model. We thank Yassine Hamoudi for helpful discussions on [2] and for simplifying our original proof of the Mirroring Lemma (5) in the binary-alphabet case. We thank anonymous reviewers for identifying errors in the Mirroring Lemma in submitted versions of this paper; these have been corrected in the current version.
Amin Shiraz Gilani is supported by the U.S. Department of Energy ASCR Quantum Testbed Pathfinder program (awards DE-SC0019040 and DE-SC0024220) and the U.S. Department of Energy, Office of Science, Accelerated Research in Quantum Computing, Fundamental Algorithmic Research toward Quantum Utility (FAR-Qu) program. Daochen Wang is supported by NSERC Grants CRC-2023-00039, RGPIN-2024-06493, and DGECR-2024-00113. Xingyu Zhou is supported by NSERC Grant RGPIN-2024-06493.
For completeness, we prove facts on random graphs used in the main body in this appendix.
Fact 41 (Sparse random graphs). Let \(x\leftarrow \binom{[n]}{2}^m\).
(Low max degree) For \(m \leq O(n)\), \[\Pr[\mathop{\mathrm{\mathrm{maxdeg}}}(x) \leq 2\log (n) /\log\log (n))] \geq 1-o(1).\]
(Existence of a \(k\)-cycle) For \(m \geq \Omega(n)\), \[\Pr[x \mathrm{ contains a k-cycle}] \geq \Omega(1).\]
(Existence of a \(k\)-cycle) For \(m \leq o(n)\), \[\Pr[x \mathrm{ contains a k-cycle}] \geq \Omega((m/n)^k).\]
In particular, the first two items imply that, for \(m = \Theta(n)\), \[\Pr[\mathop{\mathrm{\mathrm{maxdeg}}}(x) \leq 2\log(n) /\log\log(n) \mathrm{ and x contains a triangle}] \geq \Omega(1).\]
Proof. [enu:random-graph-maxdeg-restated] follows from the Chernoff bound followed by the union bound, like in a textbook analysis of the maximum load in a balls-into-bins experiment [44]. We give the details for completeness.
Let \(d\geq 0\). For a fixed vertex \(v\in [n]\), the Chernoff bound (4) shows that \[\Pr[\text{degree of v in x is at least d}] \leq \Bigl (\frac{e}{d}\cdot \frac{2m}{n}\Bigr)^d.\] Therefore, taking the union bound over all \(v\in [n]\), and then using \(m\leq O(n)\), gives \[\Pr[\mathop{\mathrm{\mathrm{maxdeg}}}(x) \geq d] \leq n \, \Bigl(\frac{e}{d}\cdot \frac{2m}{n}\Bigr)^d \leq n \, \Bigl(\frac{C}{d} \Bigr)^d\] for some constant \(C>0\).
Now, \(n\) can be expressed as \(\log(n)^{\log(n)/\log\log(n)}\), so \[\Pr[\mathop{\mathrm{\mathrm{maxdeg}}}(x) \geq 2\log(n)/\log\log n] \leq \Bigl(\frac{C\sqrt{\log(n)} \cdot \log\log(n)}{2\log(n)} \Bigr)^{2\log(n)/\log\log(n)} < o(1),\] from which the result follows.
[enu:random-graph-triangle-restated] [enu:random-graph-triangle-sparse] can be shown using the second-moment method as follows. The proofs for both are the same until after 79 .
Consider the random variable \[X \mathrel{\vcenter{:}}= \sum_{0\leq i_1<\dots< i_k\leq m} \mathop{\mathrm{\mathbb{1}}}[x_{i_1},\dots x_{i_k} \text{ forms a \emph{sequential} k-cycle}],\] where the word “sequential” imposes the extra condition that for every \(l\in \{1,\dots,k-1\}\), the edges \(x_{i_1},\dots,x_{i_l}\) form a length-\(l\) path. Clearly, it suffices to prove the claimed lower bounds on \(\Pr[X>0]\). We restrict attention to sequential \(k\)-cycles as that makes \(\mathop{\mathrm{\mathrm{E}}}[X]\) and \(\mathop{\mathrm{\mathrm{E}}}[X^2]\) easier to analyze.
We have \[\label{eq:cycle95expectation} \mathop{\mathrm{\mathrm{E}}}[X] =\binom{m}{k}\frac{N\cdot2(n-2)\cdots 2(n-k+1)}{N^k},\tag{77}\] which gives \(\mathop{\mathrm{\mathrm{E}}}[X] = \Theta((m/n)^k)\), and \[\begin{align} &\mathop{\mathrm{\mathrm{E}}}[X^2] \\ =& \mathop{\mathrm{\mathrm{E}}}[X] + \sum_{l=0}^{k-1}\sum_{\substack{i_1,\dots, i_k, j_1,\dots,j_k \in [m]\colon\\ \;\mathopen{}\mathclose{\left|\{i_1,\dots,i_k\}\cap\{j_1,\dots,j_k\}}\right|=l}} \Pr[\text{x_{i_1},\dots, x_{i_k} and x_{j_1},\dots, x_{j_k} both form a k-cycle}] \notag \\ =& \mathop{\mathrm{\mathrm{E}}}[X] + \binom{m}{k}\binom{m-k}{k}\Bigl(\frac{N\cdot2(n-2)\cdots 2(n-k+1)}{N^k}\Bigr)^2 \notag \\ &\;+\sum_{l=1}^{k-1}\binom{m}{l}\binom{m-l}{k-l}\binom{m-k}{k-l}\cdot \frac{N\cdot2(n-2)\cdots 2(n-k+1)}{N^k} \cdot \frac{2(n-l+1)\cdots 2(n-k+3)}{N^{k-l}} \notag \\ \leq&\mathop{\mathrm{\mathrm{E}}}[X] + \mathop{\mathrm{\mathrm{E}}}[X]^2 \notag \\ &\;+\sum_{l=1}^{k-1}\binom{m}{l}\binom{m-l}{k-l}\binom{m-k}{k-l}\cdot \frac{N\cdot2(n-2)\cdots 2(n-k+1)}{N^k} \cdot \frac{2(n-l+1)\cdots 2(n-k+3)}{N^{k-l}}, \label{eq:expect95Xsquare95initial} \end{align}\tag{78}\] where the term \((2(n-l+1)\cdots 2(n-k+3))\) is taken to mean \(1\) when \(l = k-1\).
Continuing 78 gives \[\label{eq:expect95Xsquare95intermediate} \mathop{\mathrm{\mathrm{E}}}[X^2] \leq \mathop{\mathrm{\mathrm{E}}}[X] + \mathop{\mathrm{\mathrm{E}}}[X]^2 + \frac{1}{n^2}\cdot O\Bigl(\sum_{l=1}^{k-2}\Bigl(\frac{m}{n}\Bigr)^{2k-l}\Bigr) + \frac{1}{n}\cdot O\Bigl(\Bigl(\frac{m}{n}\Bigr)^{k+1}\Bigr)\Bigr).\tag{79}\]
To prove [enu:random-graph-triangle-restated], which is for \(m\geq \Omega(n)\), we may first wlog assume \(m=\Theta(n)\) since the probability we are lower bounding increases with \(m\). Therefore, \(\mathop{\mathrm{\mathrm{E}}}[X] = \Theta(1)\) and the second-moment method gives \[\Pr[X > 0] \geq \mathop{\mathrm{\mathrm{E}}}[X]^2/\mathop{\mathrm{\mathrm{E}}}[X^2] \geq \mathop{\mathrm{\mathrm{E}}}[X]^2/(\mathop{\mathrm{\mathrm{E}}}[X] + \mathop{\mathrm{\mathrm{E}}}[X]^2 +\Theta(1/n)) \geq \Omega(1),\]
To prove [enu:random-graph-triangle-sparse], which is for \(m\leq o(n)\), we first observe that since \(\mathop{\mathrm{\mathrm{E}}}[X] = \Theta((m/n)^k)\), 79 gives \[\mathop{\mathrm{\mathrm{E}}}[X^2] \leq \mathop{\mathrm{\mathrm{E}}}[X](1+O(1/n)) + \mathop{\mathrm{\mathrm{E}}}[X]^2.\] Therefore, the second-moment method gives \[\begin{align} \Pr[X > 0] \geq \mathop{\mathrm{\mathrm{E}}}[X]^2/\mathop{\mathrm{\mathrm{E}}}[X^2] \geq&~ 1 - \Bigl(1 + \frac{\mathop{\mathrm{\mathrm{E}}}[X]}{(1+O(1/n))}\Bigr)^{-1} \\ \geq&~ \frac{1}{2}\frac{\mathop{\mathrm{\mathrm{E}}}[X]}{(1+O(1/n))}\geq \frac{1}{4}\mathop{\mathrm{\mathrm{E}}}[X] \geq \Omega((m/n)^k), \end{align}\] where the third inequality uses \((1+x)^{-1} \leq 1-x/2\) for \(x\in [0,1]\) which applies as \(\mathop{\mathrm{\mathrm{E}}}[X] \leq o(1)\).
◻
Fact 42. Let \(n,m,b\in \mathbb{N}\) be such \(b=\ceil{\log(n)}\) and \(n\) is divisible by \(b\). Let \(k\in \mathbb{N}_{\geq 3}\). Suppose \(m = \Theta(n/b)\) and \(x\leftarrow \binom{[n]}{2}^m\), then:
with probability at least \(\Omega(1/\log^k(n))\), \(x\) contains a \(k\)-cycle;
with probability at least \(1 - o(1/\log^{k}(n))\), there exists a partition of the vertex set \([n]\) into \(n/b\) sets of size \(b\) each such that every edge in \(x\) connects two vertices within* the same part;*
with probability at least \(1 - o(1/\log^k(n))\), there are fewer than \(k\) edges in \(x\) whose deletion leaves \(x\) not containing any repeated edges.
In particular, the probability that all three events above occur together is at least \(\Omega(1/\log^k(n))\).
Proof. The “in particular” part follows immediately from the three items of the fact. We prove each item as follows. We assume \(\log(n)\) is a positive integer for notational convenience.
[enu:sublinear-kcycle] This follows from the third item of 41.
[enu:sublinear-partition] We consider the Erdős–Rényi \(G_{n,p}\) model, where \(p=C(n\log n)^{-1}\) for some suitably large constant \(C>0\). This suffices because for large \(C\), by concentration, the probability that the number of edges in \(x\leftarrow G_{n,p}\) is fewer than \(m\) is at most \(\exp(- \Theta(n/\log n))\), which is exponentially small. The partition property the statement is looking for is a monotone property, the smaller the number of edges the easier the property is satisfied.24
For a graph \(x\leftarrow G_{n,p}\), let \(\chi(x)\) denote the largest connected component in \(x\). It is well known for sparse (sublinear in our case) random graphs that there are no giant connected components. For us, it suffices to show the following bound \[\begin{align} \label{eq:sublinear-chi-bound} \Pr_{x\leftarrow G_{n,p}} [\chi(x) \ge \log n] \le O((\log n) ^{-\log n}), \end{align}\tag{80}\] which is easy to see as follows. Suppose that \(\chi(x)=s\), then for some subset of \(s\) vertices, there are at least \((s-1)\) edges, the probability of which is bounded by \[\Pr_{x\leftarrow G_{n,p}}[\chi(x)\ge s] \leq \binom{n}{s} \binom{s(s-1)/2}{ s-1 } p^{s-1}\leq \Bigl(\frac{en}{s}\Bigr)^s \cdot \Bigl(\frac{es}{2}\Bigr)^{s-1} \cdot \Bigl( \frac{C}{n\log n}\Bigr) ^{s-1} \leq \frac{en}{s}\cdot\Bigl(\frac{Ce^2}{2\log n}\Bigr)^{s-1}.\] Setting \(s=\log n\), we obtain 80 .
As long as \(\chi(x)\le \log n\), there always is a partition with the required property. To obtain such a partition, for each connected component with more than one edge, we take some isolated vertices and group them into a part of size \(\log n\). Since there are only \(m\) edges, in the worst case, there are at most \(m\) nontrivial connected components each demanding \(\log(n) -2\) single vertices to become a part of size \(\log n\). In total, we need at most \(m (\log(n)- 2) = n-2m\) isolated vertices. Since we always have at least \(n-2m\) isolated vertices, this concludes the proof.
[enu:sublinear-dup] We bound the probability of there being a \(3\)-collision in \(x\) by \[\begin{align} \Pr[\exists \text{ distinct } &i_1, i_2, i_3~ \text{s.t.}~ x_{i_1} = x_{i_2} = x_{i_3}] \notag \\ &\leq \sum_{\text{distinct } i_1,i_2,i_3 \in [m]} \Pr[x_{i_1} = x_{i_2} = x_{i_3}] = \textstyle{\binom{m}{3}}/\textstyle{\binom{n}{2}^2} = O(1/n). \end{align}\] Therefore, with probability \(1 - O(1/n)\), there are no \(3\)-collisions in \(x\).
Now, we compute the probability of there being (at least) \(k\) \(2\)-collisions in \(x\): \[\begin{align} \Pr[\exists ~&\text{distinct }i_1, j_1, \dots, i_k,j_k: x_{i_1} = x_{j_1}, \dots, x_{i_k}=x_{j_k}] \notag \\ &= \prod_{\ell \in [k]} \Pr\bigl[\exists \text{ distinct }i_\ell, j_\ell \not \in \{i_1,j_1, \dots, i_{\ell-1}, j_{\ell-1}\} \text{ s.t. } x_{i_\ell} = x_{j_\ell} \notag\\ &\qquad\qquad\qquad\qquad \bigm| \exists \text{ distinct }i_1, j_1, \dots, i_{\ell-1},j_{\ell-1} \text{ s.t. } x_{i_1} = x_{j_1}, \dots, x_{i_{\ell-1}}=x_{j_{\ell-1}}\bigr] \notag\\ &\leq \prod_{\ell \in [k]} \sum_{\substack{\text{ distinct }i_\ell, j_\ell\\ \not \in \{i_1,j_1, \dots, i_{\ell-1}, j_{\ell-1}\}}} \Pr[x_{i_\ell} = x_{j_\ell}] = \Bigl(\textstyle{\binom{n/\log(n) - 2(\ell-1)}{2} \binom{n}{2}^{-1}}\Bigr)^{k} \leq O\bigl(1/\log^{2k}(n)\bigr). \end{align}\] Therefore, with probability at least \(1 - O(1/\log^{2k}(n))\), there are fewer than \(k\) \(2\)-collisions in \(x\).
It follows that with probability at least \(1 - O(1/\log^{2k}(n))\), there are fewer than \(k\) elements in \(x\) whose deletion leaves \(x\) with no repeated edges. ◻
University of Maryland. asgilani@umd.edu↩︎
University of British Columbia. wdaochen@gmail.com↩︎
The Pennsylvania State University. pei.wu@psu.edu↩︎
University of British Columbia. zxingyu@cs.ubc.ca↩︎
In general, for integers \(b\geq a \geq 1\), \(\Sigma\) a finite non-empty set, and a string \(x\in \Sigma^b\): a length-\(a\) subsequence of \(x\) is a string of the form \(x_{i_1}x_{i_2}\dots x_{i_a}\) for some integers \(1\leq i_1<i_2<\dots<i_a \leq b\).↩︎
We use the notation \(\widetilde{O},\widetilde{\Omega},\widetilde{\Theta}\) to denote big-\(O\),\(\Omega\), and \(\Theta\) up to poly-logarithmic factors.↩︎
We assume \(d\) is known in advance. This is for simplicity in presentation: by using approximate counting to estimate \(d\), it can be seen that the bound holds even if \(d\) is not known in advance. The same comment applies to \(\mathop{\mathrm{\mathsf{TriangleVertex}}}\).↩︎
While \(\mathop{\mathrm{\mathsf{Triangle}}}\) is a decision problem, it is essentially equivalent to its search variant via a simple reduction as explained in the preliminaries section. Therefore, we often do not distinguish between the search and decision problems.↩︎
Note that the best known quantum query lower bound for \(k\mathsf{\text{-}DIST}\) for every \(k\geq 4\) (see [25], [26]) is also polynomially far from the upper bound witnessed by Belovs’s learning graph algorithm.↩︎
We may assume \(m/d \in \mathbb{Z}\) without loss of generality. We will not make further remarks like this in the technical overview.↩︎
We chose this name because \(\Sigma\) resembles a rotated M and \(\mathrm{\Sigma MAJ}_n\) is (a restriction of) the composition of two \(\mathrm{MAJ}_n\)s.↩︎
The arguments here are better understood by considering \(n\), which represents the number of vertices in the graph. But recall that 3 concerns the regime \(m=\Theta(n)\), so all results here can also be expressed in terms of \(m\).↩︎
To quantum query lower bound experts: the standard quantum adversary method [36], [37] is not well-suited to performing this type of step-by-step analysis because it gives only weak lower bounds for small success probabilities, and step (ii) needs the progress in step (i) to be inverse-polynomially small to work. If we were forced to redo this analysis using the adversary method, we would have to switch to its multiplicative version, see, e.g., [38]–[40].↩︎
[42] goes much beyond merely interpreting Belovs’s algorithm. However, in this paper, we will only use [42] to aid our explanation of Belovs’s algorithm.↩︎
While these generalized proofs fully generalize those in the case \(k=3\), we encourage the interested reader to read the proofs in the \(k=3\) case first as they contain most of the key ideas and should make the generalized proofs easier to follow.↩︎
As a simple example, \(\mathop{\mathrm{\mathrm{ED}}}_m \colon [s]^m \to \{0,1\}\) when \(s < m\) is the constant \(1\) function by the pigeonhole principle so \(Q(\mathop{\mathrm{\mathrm{ED}}}_m) = 0\); but when \(s\geq m\), \(Q(\mathop{\mathrm{\mathrm{ED}}}_m) = \Theta(m^{2/3})\).↩︎
In general, for integers \(b\geq a \geq 1\), \(\Sigma\) a finite non-empty set, and a string \(x\in \Sigma^b\): a length-\(a\) subsequence of \(x\) is a string of the form \(x_{i_1}x_{i_2}\dots x_{i_a}\) for some integers \(1\leq i_1<i_2<\dots<i_a \leq b\).↩︎
This assumption is without loss of generality under our convention in the preliminaries of what \(Q(\mathop{\mathrm{\mathsf{TriangleEdge}}}_{m,d})\) means when the alphabet size is not specified.↩︎
The \(Q(\mathop{\mathrm{\mathsf{HIDE}}}_m[f]) = \Omega(\sqrt{m/n}\cdot Q(f))\) part of 7 also holds for partial \(f\) (like \(\mathop{\mathrm{\mathrm{ED}}}_d'\)) by the same argument.↩︎
An alternative way to see this is simply that \(\mathrm{\Sigma MAJ}_n\) is the composition of two gapped \(\mathrm{MAJ}_n\) functions, each of which has constant randomized query complexity. Therefore, the randomized query complexity of the composition is also constant using the fact that \(R(f\circ g) = O(R(f)\cdot R(g)\cdot \log(R(f)))\).↩︎
Formally, \(\mathbb{C}^K\) is identified with a tensor product space \(\bigotimes_{i=1}^k\mathbb{C}^{\Sigma_i}\) for some alphabets \(\Sigma_i\) and the output on measuring the string \(w = w_1 \dots w_k\), where \(w_i\in \Sigma_i\), is the substring \(w' \mathrel{\vcenter{:}}= w_1 \dots w_{k'}\) for some \(k'\leq k\).↩︎
For intuition only, if we view each non-\(\bot\) symbol in \(x\) as contributing one unit of “degree”, then this fact is akin to the polynomial method [32]. We remark that (essentially) this fact alone can be used to prove non-trivial lower bounds, see, e.g., [20].↩︎
Suppose basis state \(\ket{i',u',w'}\ket{x'}\) is orthogonal to \(\ket{i,u,w}\ket{x}\). If \((i',u',w')\neq (i,u,w)\), then it is clear that the two states remain orthogonal after applying \(\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\mathop{\mathrm{\mathcal{R}}}\) since the operator can only act non-trivially on the input register. If \((i',u',w') = (i,u,w)\) and \(x_j\neq x'_{j}\) for some \(j\neq i\), then the two states still remain orthogonal since \(\mathop{\mathrm{\mathcal{R}}}\) does not act on the \(I_j\) register and \(\Pi^{ \begin{tikzpicture}[scale=0.1,baseline=(current bounding box.center)] \draw (0,0) -- (1,2) -- (2,0); \end{tikzpicture}}_{[r,\infty)}\) is diagonal in the \(\{\ket{z} \mid z\in ([N]\cup \{\bot\})^m\}\) basis. The case \((i',u',w') = (i,u,w)\) and \(x_i\neq x'_i\) is forbidden by the assumption that the basis states lie in the support of \(\Pi_\perp\). We will later reuse similar arguments without comment.↩︎
More formally, because the underlying distribution of \(G_{n,p}\) is just \(\mathop{\mathrm{\mathrm{E}}}_{m}[G_{n,m}]\) for some distribution on the edge count \(m\).↩︎