Appendix 1: Details for two marked vertices
In this appendix, we employ degenerate perturbation theory [2, 14, 29] to find the critical \(\gamma \)’s and runtimes for search with two marked vertices, of which there are five cases, as summarized in Table 1.
Two marked, case 1, generalized to constant marked vertices
Instead of having just 2 marked vertices in a single complete graph, we generalize the problem to k constant marked vertices. Even with this generalization, the system still evolves in an eight-dimensional subspace, as shown in Fig. 4a, spanned by
In this subspace, the search Hamiltonian (1) is
$$\begin{aligned} H = -\gamma \begin{pmatrix} k-1 + \frac{1}{\gamma } &{} \sqrt{k M_k} &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ \sqrt{k M_k} &{} M_{k1} &{} 0 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 \\ 1 &{} 0 &{} 0 &{} \sqrt{M_k} &{} 0 &{} 0 &{} 0 &{} \sqrt{k-1} \\ 0 &{} 0 &{} \sqrt{M_k} &{} M_{k1} &{} 0 &{} 1 &{} 0 &{} \sqrt{M_k(k-1)} \\ 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} \sqrt{k} &{} \sqrt{M_{k1}} &{} 0 \\ 0 &{} 0 &{} 0 &{} 1 &{} \sqrt{k} &{} k-1 &{} \sqrt{k M_{k1}} &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} \sqrt{M_{k1}} &{} \sqrt{k M_{k1}} &{} M_{k1} &{} 0 \\ 0 &{} 0 &{} \sqrt{k-1} &{} \sqrt{M_k(k-1)} &{} 0 &{} 0 &{} 0 &{} k-1 \\ \end{pmatrix}, \end{aligned}$$
where \(M_k = M-k\) and \(M_{k1} = M - k - 1\).
Using the diagrammatic approach in [29] as a guide, this Hamiltonian can be visualized as a graph with eight vertices, as shown in Fig. 8a. For the first stage of the algorithm, the leading-order Hamiltonian \(H^{(0)}\) can be visualized as shown in Fig. 8b, where we have excluded edges that scale less than \(\sqrt{M}\). From this, the eight eigenvectors of \(H^{(0)}\) are easily seen: two are linear combinations of \({\left| a \right\rangle }\) and \({\left| b \right\rangle }\), three are linear combinations of \({\left| c \right\rangle }\), \({\left| d \right\rangle }\), and \({\left| h \right\rangle }\), and the final three are linear combinations of \({\left| e \right\rangle }\), \({\left| f \right\rangle }\), and \({\left| g \right\rangle }\). They correspond to the eigenvectors of
$$\begin{aligned} H_{ab}^{(0)}&= -\gamma \begin{pmatrix} \frac{1}{\gamma } &{}\quad \sqrt{kM} \\ \sqrt{kM} &{}\quad M \\ \end{pmatrix}, \\ H_{cdh}^{(0)}&= -\gamma \begin{pmatrix} 0 &{}\quad \sqrt{M} &{}\quad 0 \\ \sqrt{M} &{}\quad M &{}\quad \sqrt{M(k-1)} \\ 0 &{}\quad \sqrt{M(k-1)} &{}\quad 0 \\ \end{pmatrix}, \\ H_{efg}^{(0)}&= -\gamma \begin{pmatrix} 0 &{}\quad 0 &{}\quad \sqrt{M} \\ 0 &{}\quad 0 &{}\quad \sqrt{kM} \\ \sqrt{M} &{}\quad \sqrt{kM} &{}\quad M \\ \end{pmatrix}. \end{aligned}$$
Since \({\left| s \right\rangle } \approx {\left| g \right\rangle }\), and we want probability to move toward the marked vertices \({\left| a \right\rangle }\), we want to choose \(\gamma \) so that a linear combination of \({\left| e \right\rangle }, {\left| f \right\rangle }\), and \({\left| g \right\rangle }\) is degenerate with a linear combination of \({\left| a \right\rangle }\) and \({\left| b \right\rangle }\). In particular, the eigenstates that we want to be degenerate are
$$\begin{aligned} u = \frac{2}{\sqrt{M}+\sqrt{4+4 k+M}} {\left| e \right\rangle } + \frac{2 \sqrt{k M}}{\sqrt{M} \left( \sqrt{M}+\sqrt{4+4 k+M}\right) } {\left| f \right\rangle } + {\left| g \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_u = \frac{-\gamma }{2} \left( M +\sqrt{M} \sqrt{4+4 k+M} \right) \end{aligned}$$
and
$$\begin{aligned} v = \frac{1-M \gamma +\sqrt{1-2 M \gamma +4 k M \gamma ^2+M^2 \gamma ^2}}{2 \sqrt{k M} \gamma } {\left| a \right\rangle } + {\left| b \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_v = \frac{1}{2} \left( -1-M \gamma -\sqrt{1-2 M \gamma +4 k M \gamma ^2+M^2 \gamma ^2}\right) . \end{aligned}$$
Written this way, u and v are unnormalized, whereas \({\left| u \right\rangle }\) and \({\left| v \right\rangle }\) are their normalized versions. These eigenstates are degenerate when \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _{c1} = \frac{-M+\sqrt{M} \sqrt{4+4 k+M}}{2 M} \approx \frac{1+k}{M}. \end{aligned}$$
The perturbation \(H^{(1)}\), which restores terms of constant weight, causes certain linear combinations
$$\begin{aligned} \alpha _u {\left| u \right\rangle } + \alpha _v {\left| v \right\rangle } \end{aligned}$$
of these states to be eigenstates of \(H^{(0)} + H^{(1)}\) [2, 14]. The coefficients \(\alpha _u\) and \(\alpha _v\) can be found by solving
$$\begin{aligned} \begin{pmatrix} H_{uu} &{}\quad H_{uv} \\ H_{vu} &{}\quad H_{vv} \\ \end{pmatrix} \begin{pmatrix} \alpha _u \\ \alpha _v \\ \end{pmatrix} = E \begin{pmatrix} \alpha _u \\ \alpha _v \\ \end{pmatrix}, \end{aligned}$$
where \(H_{uv} = \langle u | H^{(0)} + H^{(1)} | v \rangle \), etc. Solving this, the perturbed eigenvectors for large N with their corresponding eigenvalues are
$$\begin{aligned} \frac{1}{\sqrt{2}} \left( {\left| u \right\rangle } + {\left| v \right\rangle } \right) , \quad E = -(k+1) + \frac{k^2+2k+1}{M} - \frac{k+1}{M^{3/2}} \\ \frac{1}{\sqrt{2}} \left( {\left| u \right\rangle } - {\left| v \right\rangle } \right) , \quad E = -(k+1) + \frac{k^2+2k+1}{M} + \frac{k+1}{M^{3/2}} \end{aligned}$$
Since \({\left| u \right\rangle } \approx {\left| g \right\rangle }\) and \({\left| v \right\rangle } \approx {\left| b \right\rangle }\) for large N, the system evolves from \({\left| s \right\rangle } \approx {\left| g \right\rangle }\) to \({\left| b \right\rangle }\) in time \(\pi /\Delta E\), which is
$$\begin{aligned} t_1 = \frac{\pi M^{3/2}}{2(k+1)}. \end{aligned}$$
Diagrammatically, the perturbation \(H^{(1)}\) restores edges of constant weight in Fig. 8b, and probability flows between \({\left| g \right\rangle }\) and \({\left| b \right\rangle }\) since they are the most dominant terms.
Using the approach of Sect. VI of [28], if \(\gamma \) is within \(\epsilon \) of its critical value of \(\gamma _{c1} \approx (1+k)/M\), then the eigenvalues of \({\left| u \right\rangle }\) and \({\left| v \right\rangle }\) now include leading-order (in \(\epsilon \)) terms \(-\epsilon M\). In the perturbative calculation, this introduces terms scaling as \(\epsilon M\) due to \(H_{uu}\) and \(H_{vv}\), so for this to not influence the energy gap \(\varTheta (1/M^{3/2})\), we must have \(\epsilon M = o(1/M^{3/2})\), or \(\epsilon = o(1/M^{5/2})\). Thus for the first stage of the algorithm to asymptotically evolve from \({\left| s \right\rangle }\) to \({\left| b \right\rangle }\), we require \(\gamma = \gamma _{c1} + o(1/M^{5/2})\). Note if we relax this to evolve to \({\left| b \right\rangle }\) with constant probability, then \(\gamma = \gamma _{c1} + O(1/M^{5/2})\) suffices.
For the second stage of the algorithm, we take the leading-order Hamiltonian \(H^{(0)}\) to only include edges of weight \(\varTheta (M)\), and its diagram is shown in Fig. 8c. From this, the eight eigenvectors of \(H^{(0)}\) are simply the basis vectors \({\left| a \right\rangle }\), \({\left| b \right\rangle }\), ..., \({\left| h \right\rangle }\) with corresponding eigenvalues \(-1\), \(-\gamma M\), ..., 0. When \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _{c2} = \frac{1}{M}, \end{aligned}$$
the eigenstates \({\left| a \right\rangle }\), \({\left| b \right\rangle }\), \({\left| d \right\rangle }\), and \({\left| g \right\rangle }\) of \(H^{(0)}\) are degenerate with eigenvalue \(-1\). Then the perturbation \(H^{(1)}\), which restores terms \(\varTheta (\sqrt{M})\), causes certain linear combinations
$$\begin{aligned} \alpha _a {\left| a \right\rangle } + \alpha _b {\left| b \right\rangle } + \alpha _d {\left| d \right\rangle } + \alpha _g {\left| g \right\rangle } \end{aligned}$$
of these states to be eigenstates of \(H^{(0)} + H^{(1)}\). The coefficients \(\alpha _a\), \(\alpha _b\), \(\alpha _d\), and \(\alpha _g\) can be found by solving
$$\begin{aligned} \begin{pmatrix} H_{aa} &{}\quad H_{ab} &{}\quad H_{ad} &{}\quad H_{ag} \\ H_{ba} &{}\quad H_{bb} &{}\quad H_{bd} &{}\quad H_{bg} \\ H_{da} &{}\quad H_{db} &{}\quad H_{dd} &{}\quad H_{dg} \\ H_{ga} &{}\quad H_{gb} &{}\quad H_{gd} &{}\quad H_{gg} \\ \end{pmatrix} \begin{pmatrix} \alpha _a \\ \alpha _b \\ \alpha _d \\ \alpha _g \\ \end{pmatrix} = E \begin{pmatrix} \alpha _a \\ \alpha _b \\ \alpha _d \\ \alpha _g \\ \end{pmatrix}, \end{aligned}$$
where \(H_{ab} = \langle a | H^{(0)} + H^{(1)} | b \rangle \), etc. Solving this, the perturbed eigenvectors with their corresponding eigenvalues are
$$\begin{aligned} {\left| \psi _0 \right\rangle }= & {} \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } + {\left| a \right\rangle } ), \quad E_0 = -1 - \sqrt{\frac{k}{M}} \\ {\left| \psi _1 \right\rangle }= & {} {\left| d \right\rangle }, \quad E_1 = -1 \\ {\left| \psi _2 \right\rangle }= & {} {\left| g \right\rangle }, \quad E_2 = -1 \\ {\left| \psi _3 \right\rangle }= & {} \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } - {\left| a \right\rangle } ), \quad E_3 = -1 + \sqrt{\frac{k}{M}} \end{aligned}$$
So the system evolves from \({\left| b \right\rangle }\) to \({\left| a \right\rangle }\) in time \(\pi / \Delta E\):
$$\begin{aligned} t_2 = \frac{\pi }{2} \sqrt{\frac{M}{k}}. \end{aligned}$$
Diagrammatically, the perturbation \(H^{(1)}\) restores edges \(\varTheta (\sqrt{M})\) in Fig. 9c, and probability flows between \({\left| b \right\rangle }\) and \({\left| a \right\rangle }\).
We can again use the method of [28] to find how precisely \(\gamma \) must be chosen to its critical value \(\gamma _{c2} = 1/M\)—a straightforward calculation shows that it must be within \(o(1/M^{3/2})\).
For \(k = 2\) marked vertices, the critical \(\gamma \)’s and runtimes are
$$\begin{aligned} \gamma _{c1} = \frac{3}{M}, \quad t_1 = \frac{\pi M^{3/2}}{6}, \quad \gamma _{c2} = \frac{1}{M}, \quad t_2 = \frac{\pi }{2} \sqrt{\frac{M}{2}}, \end{aligned}$$
all of which are in agreement with Table 1.
Two marked, case 2
As shown in Fig. 4b, the system evolves in a four-dimensional subspace spanned by
where the labels have been chosen this way to match the behavior of the vertices in the first case in Fig. 4a. In this subspace, the search Hamiltonian (1) is
$$\begin{aligned} H = -\gamma \begin{pmatrix} 1 + \frac{1}{\gamma } &{}\quad \sqrt{M-1} &{}\quad 0 &{}\quad 0 \\ \sqrt{M-1} &{}\quad M-2 &{}\quad 1 &{}\quad 0 \\ 0 &{}\quad 1 &{}\quad 1 &{}\quad \sqrt{2(M-2)} \\ 0 &{}\quad 0 &{}\quad \sqrt{2(M-2)} &{}\quad M-2 \\ \end{pmatrix}. \end{aligned}$$
This Hamiltonian can be visualized as shown in Fig. 9a. For the first stage of the algorithm, the leading-order Hamiltonian \(H^{(0)}\) excludes edges that scale less than \(\sqrt{M}\), and it can be visualized as shown in Fig. 9b. The two eigenstates of \(H^{(0)}\) that we want to be degenerate are
$$\begin{aligned} u = -\frac{\sqrt{M}-\sqrt{M+8}}{2 \sqrt{2}} {\left| e \right\rangle } + {\left| g \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_u = \frac{-\gamma }{2} \left( M + \sqrt{M} \sqrt{M+8} \right) \end{aligned}$$
and
$$\begin{aligned} v = -\frac{-1+M \gamma -\sqrt{1-2 M \gamma +4 M \gamma ^2+M^2 \gamma ^2}}{2 \sqrt{M} \gamma } {\left| a \right\rangle } + {\left| b \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_v = \frac{1}{2} \left( -1-M \gamma -\sqrt{1-2 M \gamma +4 M \gamma ^2+M^2 \gamma ^2}\right) . \end{aligned}$$
These are degenerate when \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _{c1} = \frac{-M+\sqrt{M} \sqrt{M+8}}{2 M} = \frac{2}{M} - \frac{4}{M^2} + O(1/M^3). \end{aligned}$$
The perturbation \(H^{(1)}\), which restores terms of constant weight, causes certain linear combinations \(\alpha _u {\left| u \right\rangle } + \alpha _v {\left| v \right\rangle }\) to be eigenstates of \(H^{(0)} + H^{(1)}\). Doing the perturbative calculation to find the coefficients (as in the first case), the perturbed eigenstates for large N are
$$\begin{aligned} \frac{1}{\sqrt{2}} ( {\left| u \right\rangle } + {\left| v \right\rangle } ), \quad E = -2 - \frac{2\sqrt{2}}{M^{3/2}} \\ \frac{1}{\sqrt{2}} ( {\left| u \right\rangle } - {\left| v \right\rangle } ), \quad E = -2 + \frac{2\sqrt{2}}{M^{3/2}}. \end{aligned}$$
Since \({\left| u \right\rangle } \approx {\left| g \right\rangle }\) and \({\left| v \right\rangle } \approx {\left| b \right\rangle }\) for large N, the system evolves from \({\left| s \right\rangle } \approx {\left| g \right\rangle }\) to \({\left| b \right\rangle }\) in time \(\pi / \Delta E\):
$$\begin{aligned} t_1 = \frac{\pi M^{3/2}}{4\sqrt{2}}. \end{aligned}$$
Diagrammatically, the perturbation \(H^{(1)}\) restores edges of constant weight in Fig. 9b, and probability flows between \({\left| g \right\rangle }\) and \({\left| b \right\rangle }\) since they are the most dominant terms.
As in the first case in the precious section, we can use the method of [28] to find how precisely \(\gamma \) must be chosen to its critical value \(\gamma _{c1} = 2/M\)—a straightforward calculation shows that it must be within \(o(1/M^{5/2})\).
For the second stage of the algorithm, we take the leading-order Hamiltonian \(H^{(0)}\) to only include edges of weight \(\varTheta (M)\), and its diagram is shown in Fig. 9c. When \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _{c2} = \frac{1}{M}, \end{aligned}$$
the eigenstates \({\left| a \right\rangle }\), \({\left| b \right\rangle }\), and \({\left| g \right\rangle }\) of \(H^{(0)}\) are triply degenerate. Then the perturbation \(H^{(1)}\), which restores terms \(\varTheta (\sqrt{M})\), causes certain linear combinations \(\alpha _a {\left| a \right\rangle } + \alpha _b {\left| b \right\rangle } + \alpha _g {\left| g \right\rangle }\) of them to be eigenstates of \(H^{(0)} + H^{(1)}\). Doing the perturbative calculation to find the coefficients (as in the first case), the perturbed eigenstates for large N are
$$\begin{aligned} \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } + {\left| a \right\rangle } ), \quad E = -1 - \frac{1}{\sqrt{M}} \\ {\left| g \right\rangle }, \quad E = -1 \\ \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } - {\left| a \right\rangle } ), \quad E = -1 + \frac{1}{\sqrt{M}}. \end{aligned}$$
So the system evolves from \({\left| b \right\rangle }\) to \({\left| a \right\rangle }\) in time \(\pi / \Delta E\):
$$\begin{aligned} t_2 = \frac{\pi \sqrt{M}}{2}. \end{aligned}$$
Diagrammatically, the perturbation \(H^{(1)}\) restores edges \(\varTheta (\sqrt{M})\) in Fig. 9c, and probability flows between \({\left| b \right\rangle }\) and \({\left| a \right\rangle }\).
We can again use the method of [28] to find how precisely \(\gamma \) must be chosen to its critical value \(\gamma _{c2} = 1/M\)—a straightforward calculation shows that it must be within \(o(1/M^{3/2})\).
These \(\gamma _c\)’s and runtimes are in agreement with Table 1.
Two marked, case 3
As shown in Fig. 4c, the system evolves in an eight-dimensional subspace spanned by
Note there are no h type vertices. Instead, there’s a new type, which we call i. In this subspace, the search Hamiltonian (1) is
$$\begin{aligned} H = -\gamma \begin{pmatrix} \frac{1}{\gamma } &{}\quad \sqrt{M_2} &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 \\ \sqrt{M_2} &{}\quad M_3 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad \sqrt{M_2} \\ 1 &{}\quad 0 &{}\quad 1 &{}\quad \sqrt{2M_2} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad \sqrt{2M_2} &{}\quad M_3 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad \sqrt{2} &{}\quad \sqrt{2M_3} &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad \sqrt{2} &{}\quad 0 &{}\quad \sqrt{M_3} &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad \sqrt{2M_3} &{}\quad \sqrt{M_3} &{}\quad M_3 &{}\quad 0 \\ 1 &{}\quad \sqrt{M_2} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 \\ \end{pmatrix}, \end{aligned}$$
where \(M_2 = M-2\) and \(M_3 = M-3\).
This Hamiltonian can be visualized as shown in Fig. 10a. For the first stage of the algorithm, the leading-order Hamiltonian \(H^{(0)}\) excludes edges that scale less than \(\sqrt{M}\), and it can be visualized as shown in Fig. 10b. As with the last two cases, there are two eigenvectors that we want to be degenerate. The first is
$$\begin{aligned} u = \frac{2 \sqrt{2}}{\sqrt{M}+\sqrt{M+12}} {\left| e \right\rangle } + \frac{2}{\sqrt{M}+\sqrt{M+12}} {\left| f \right\rangle } + {\left| g \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_u = \frac{-\gamma }{2} \left( M + \sqrt{M(M+12)} \right) . \end{aligned}$$
The second eigenvector is messy, but can be approximated nicely. The leading-order Hamiltonian corresponding to \({\left| a \right\rangle }\), \({\left| b \right\rangle }\), and \({\left| i \right\rangle }\) is
$$\begin{aligned} H_{a,b,i}^{(0)} = -\gamma \begin{pmatrix} \frac{1}{\gamma } &{}\quad \sqrt{M} &{}\quad 0 \\ \sqrt{M} &{}\quad M &{}\quad \sqrt{M} \\ 0 &{}\quad \sqrt{M} &{}\quad 0 \\ \end{pmatrix}. \end{aligned}$$
The eigenvalues \(\lambda \) of this satisfy the characteristic equation
$$\begin{aligned} -\lambda ^3 - (\gamma M + 1)\lambda ^2 + \gamma M(2\gamma - 1)\lambda + \gamma ^2 M = 0. \end{aligned}$$
When \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _{c1} = \frac{2}{M} - \frac{6}{M^2} + \frac{36}{M^3}, \end{aligned}$$
one of these eigenvalues, which we will call \(E_v\), and \(E_u\) both equal \(-2 - 270/M^3 + O(1/M^4)\), making them approximately degenerate. To find the corresponding eigenvector v, we use the first and third lines of the eigenvalue equation \(H_{a,b,i}^{(0)} v = E_v v\):
$$\begin{aligned} -\gamma \begin{pmatrix} \frac{1}{\gamma } &{}\quad \sqrt{M} &{}\quad 0 \\ \sqrt{M} &{}\quad M &{}\quad \sqrt{M} \\ 0 &{}\quad \sqrt{M} &{}\quad 0 \\ \end{pmatrix} \begin{pmatrix} v_a \\ v_b \\ v_i \end{pmatrix} = E_v \begin{pmatrix} v_a \\ v_b \\ v_i \end{pmatrix}. \end{aligned}$$
This yields
$$\begin{aligned} v = \frac{-\gamma \sqrt{M}}{E_v + 1} {\left| a \right\rangle } + {\left| b \right\rangle } + \frac{-\gamma \sqrt{M}}{E_v} {\left| i \right\rangle }. \end{aligned}$$
The perturbation \(H^{(1)}\), which restores terms of constant weight, causes certain linear combinations \(\alpha _u {\left| u \right\rangle } + \alpha _v {\left| v \right\rangle }\) to be eigenstates of \(H^{(0)} + H^{(1)}\). Doing the perturbative calculation to find the coefficients, the perturbed eigenstates for large N are
$$\begin{aligned} \frac{1}{\sqrt{2}} ( {\left| u \right\rangle } + {\left| v \right\rangle } ), \quad E= & {} -2 - \frac{2\sqrt{2}}{M^{3/2}} \\ \frac{1}{\sqrt{2}} ( {\left| u \right\rangle } - {\left| v \right\rangle } ), \quad E= & {} -2 + \frac{2\sqrt{2}}{M^{3/2}}. \end{aligned}$$
Since \({\left| u \right\rangle } \approx {\left| g \right\rangle }\) and \({\left| v \right\rangle } \approx {\left| b \right\rangle }\) for large N, the system evolves from \({\left| s \right\rangle } \approx {\left| g \right\rangle }\) to \({\left| b \right\rangle }\) in time \(\pi / \Delta E\):
$$\begin{aligned} t_1 = \frac{\pi M^{3/2}}{4\sqrt{2}}. \end{aligned}$$
Diagrammatically, the perturbation \(H^{(1)}\) restores edges of constant weight in Fig. 10b, and probability flows between \({\left| g \right\rangle }\) and \({\left| b \right\rangle }\) since they are the most dominant terms.
We can again use the method of [28] to find how precisely \(\gamma \) must be chosen to its critical value \(\gamma _{c1} = 2/M\)—a straightforward calculation shows that it must be within \(o(1/M^{5/2})\).
The second stage of the algorithm is similar to the previous two cases, where we take the leading-order Hamiltonian \(H^{(0)}\) to only include edges of weight \(\varTheta (M)\). When \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _{c2} = \frac{1}{M}, \end{aligned}$$
then \({\left| a \right\rangle }\) and \({\left| b \right\rangle }\) are degenerate eigenvectors (among others) of \(H^{(0)}\). The perturbation \(H^{(1)}\) restores terms of order \(\varTheta (\sqrt{M})\), which causes probability to flow between \({\left| b \right\rangle }\) and \({\left| a \right\rangle }\). Doing the calculation, we find eigenstates of the perturbed system that are proportional to \({\left| b \right\rangle } \pm {\left| a \right\rangle }\) with eigenvalues \(-1 \mp 1 / \sqrt{M}\), so the system evolves from \({\left| b \right\rangle }\) to \({\left| a \right\rangle }\) in time \(\pi / \Delta E\):
$$\begin{aligned} t_2 = \frac{\pi \sqrt{M}}{2}. \end{aligned}$$
As before, a straightforward calculation using the method of [28] shows that \(\gamma \) must be chosen within \(o(1/M^{3/2})\) of its critical value \(\gamma _{c2} = 1/M\).
These \(\gamma _c\)’s and runtimes are in agreement with Table 1.
Two marked, case 4
As shown in Fig. 4d, the system evolves in an eleven-dimensional subspace spanned by
In this subspace, the search Hamiltonian (1) is
where \(M_3 = M-3\) and \(M_4 = M-4\).
This Hamiltonian can be visualized as shown in Fig. 11a. For the first stage of the algorithm, the leading-order Hamiltonian \(H^{(0)}\) excludes edges that scale less than \(\sqrt{M}\), and it can be visualized as shown in Fig. 11b. As with the last two cases, there are two eigenvectors that we want to be degenerate. The first is
$$\begin{aligned} u = \frac{2\sqrt{2}}{\sqrt{M} + \sqrt{M+16}} {\left| e \right\rangle } + \frac{2\sqrt{2}}{\sqrt{M} + \sqrt{M+16}} {\left| f \right\rangle } + {\left| g \right\rangle }, \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_u = \frac{-\gamma }{2} \left( M + \sqrt{M}\sqrt{M+16} \right) . \end{aligned}$$
The second eigenvector is messy, but can be approximated nicely. The leading-order Hamiltonian corresponding to \({\left| a \right\rangle }\), \({\left| b \right\rangle }\), \({\left| i \right\rangle }\), and \({\left| j \right\rangle }\) is
$$\begin{aligned} H_{a,b,i,j}^{(0)} = -\gamma \begin{pmatrix} \frac{1}{\gamma } &{}\quad \sqrt{M} &{}\quad 0 &{}\quad 0 \\ \sqrt{M} &{}\quad M &{}\quad \sqrt{M} &{}\quad \sqrt{M} \\ 0 &{}\quad \sqrt{M} &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad \sqrt{M} &{}\quad 0 &{}\quad 0 \\ \end{pmatrix}. \end{aligned}$$
The eigenvalues \(\lambda \) of this satisfy the characteristic equation
$$\begin{aligned} \lambda ^4 + (1 + M\gamma )\lambda ^3 + M\gamma (1-3\gamma )\lambda ^2 - 2M\gamma ^2 \lambda = 0. \end{aligned}$$
When \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _{c1} = \frac{2}{M} - \frac{8}{M^2} + \frac{64}{M^3}, \end{aligned}$$
one of these eigenvalues, which we will call \(E_v\), and \(E_u\) both equal \(-2 - 640/M^3 - O(1/M^4)\), making them approximately degenerate. To find the corresponding eigenvector v, we use the eigenvalue equation \(H_{a,b,i,j}^{(0)} v = E_v v\):
$$\begin{aligned} -\gamma \begin{pmatrix} \frac{1}{\gamma } &{}\quad \sqrt{M} &{}\quad 0 &{}\quad 0 \\ \sqrt{M} &{}\quad M &{}\quad \sqrt{M} &{}\quad \sqrt{M} \\ 0 &{}\quad \sqrt{M} &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad \sqrt{M} &{}\quad 0 &{}\quad 0 \\ \end{pmatrix} \begin{pmatrix} v_a \\ v_b \\ v_i \\ v_j \end{pmatrix} = E_v \begin{pmatrix} v_a \\ v_b \\ v_i \\ v_j \end{pmatrix}. \end{aligned}$$
This yields
$$\begin{aligned} v = \frac{-\gamma \sqrt{M}}{1+E} {\left| a \right\rangle } + {\left| b \right\rangle } - \frac{\gamma \sqrt{M}}{E} {\left| i \right\rangle } - \frac{\gamma \sqrt{M}}{E} {\left| j \right\rangle }. \end{aligned}$$
The perturbation \(H^{(1)}\), which restores terms of constant weight, causes certain linear combinations \(\alpha _u {\left| u \right\rangle } + \alpha _v {\left| v \right\rangle }\) to be eigenstates of \(H^{(0)} + H^{(1)}\). Doing the perturbative calculation to find the coefficients, the perturbed eigenstates for large N are
$$\begin{aligned} \frac{1}{\sqrt{2}} ( {\left| u \right\rangle } + {\left| v \right\rangle } ), \quad E = -2 - \frac{2\sqrt{2}}{M^{3/2}} \\ \frac{1}{\sqrt{2}} ( {\left| u \right\rangle } - {\left| v \right\rangle } ), \quad E = -2 + \frac{2\sqrt{2}}{M^{3/2}}. \end{aligned}$$
Since \({\left| u \right\rangle } \approx {\left| g \right\rangle }\) and \({\left| v \right\rangle } \approx {\left| b \right\rangle }\) for large N, the system evolves from \({\left| s \right\rangle } \approx {\left| g \right\rangle }\) to \({\left| b \right\rangle }\) in time \(\pi / \Delta E\):
$$\begin{aligned} t_1 = \frac{\pi M^{3/2}}{4\sqrt{2}}. \end{aligned}$$
Diagrammatically, the perturbation \(H^{(1)}\) restores edges of constant weight in Fig. 11b, and probability flows between \({\left| g \right\rangle }\) and \({\left| b \right\rangle }\) since they are the most dominant terms.
We can again use the method of [28] to find how precisely \(\gamma \) must be chosen to its critical value \(\gamma _{c1} = 2/M\)—a straightforward calculation shows that it must be within \(o(1/M^{5/2})\).
The second stage of the algorithm is similar to the previous three cases, where we take the leading-order Hamiltonian \(H^{(0)}\) to only include edges of weight \(\varTheta (M)\). When \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _{c2} = \frac{1}{M}, \end{aligned}$$
then \({\left| a \right\rangle }\) and \({\left| b \right\rangle }\) are degenerate eigenvectors (among others) of \(H^{(0)}\). The perturbation \(H^{(1)}\) restores terms of order \(\varTheta (\sqrt{M})\), which causes probability to flow between \({\left| b \right\rangle }\) and \({\left| a \right\rangle }\). Doing the calculation, we find eigenstates of the perturbed system that are proportional to \({\left| b \right\rangle } \pm {\left| a \right\rangle }\) with eigenvalues \(-1 \mp 1 / \sqrt{M}\), so the system evolves from \({\left| b \right\rangle }\) to \({\left| a \right\rangle }\) in time \(\pi / \Delta E\):
$$\begin{aligned} t_2 = \frac{\pi \sqrt{M}}{2}. \end{aligned}$$
As before, a straightforward calculation using the method of [28] shows that \(\gamma \) must be chosen within \(o(1/M^{3/2})\) of its critical value \(\gamma _{c2} = 1/M\).
These \(\gamma _c\)’s and runtimes are in agreement with Table 1.
Two marked, case 5
As shown in Fig. 4e, the system evolves in a thirteen-dimensional subspace spanned by
In this subspace, the search Hamiltonian (1) is
where \(M_2 = M-2\) and \(M_3 = M-3\).
This Hamiltonian can be visualized as shown in Fig. 12a. For the first stage of the algorithm, the leading-order Hamiltonian \(H^{(0)}\) excludes edges that scale less than \(\sqrt{M}\), and it can be visualized as shown in Fig. 12b. The initial equal superposition state \({\left| s \right\rangle }\) is approximately \({\left| m \right\rangle }\) for large N, and we want it to evolve to the marked vertices \({\left| a \right\rangle }\) and \({\left| d \right\rangle }\). So we will need leading-order eigenstates that are approximately each of these to be triply degenerate. The first is
$$\begin{aligned} u = \frac{2}{\sqrt{M}+\sqrt{12+M}} ( {\left| e \right\rangle } + {\left| k \right\rangle } + {\left| l \right\rangle } ) + {\left| m \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_u = \frac{-\gamma }{2} \left( M + \sqrt{M(M+12)} \right) . \end{aligned}$$
Note this is the same eigenvalue as \(E_u\) from Case 3. For the other two leading-order eigenstates, Fig. 12b reveals that \(H_{a,b,i}^{(0)}\) and \(H_{c,d,h}^{(0)}\) are identical with \(a \sim d\), \(b \sim h\), and \(i \sim c\), so their corresponding eigenstates are always degenerate. Furthermore, they are identical to \(H_{a,b,i}^{(0)}\) from Fig. 10b from Case 3. So the eigenvectors and eigenvalues carry over:
$$\begin{aligned} v= & {} \frac{-\gamma \sqrt{M}}{E_v + 1} {\left| a \right\rangle } + {\left| b \right\rangle } + \frac{-\gamma \sqrt{M}}{E_v} {\left| i \right\rangle }, \\ w= & {} \frac{-\gamma \sqrt{M}}{E_w + 1} {\left| d \right\rangle } + {\left| h \right\rangle } + \frac{-\gamma \sqrt{M}}{E_w} {\left| c \right\rangle }, \end{aligned}$$
including the critical \(\gamma \)
$$\begin{aligned} \gamma _{c1} = \frac{2}{M} - \frac{6}{M^2} + \frac{36}{M^3}, \end{aligned}$$
at which the eigenvalues \(E_u\), \(E_v\), and \(E_w\) all equal \(-2 - 270/M^3 + O(1/M^4)\), making them approximately degenerate.
With the perturbation \(H^{(1)}\), which restores terms of constant weight, we have the same behavior and runtime
$$\begin{aligned} t_1 = \frac{\pi M^{3/2}}{4\sqrt{2}} \end{aligned}$$
as Case 3, except the system evolves from \({\left| s \right\rangle } \approx {\left| m \right\rangle }\) to \({\left| b \right\rangle } + {\left| h \right\rangle }\). So the probability gets split between the two paths. Diagrammatically, the perturbation \(H^{(1)}\) restores edges of constant weight in Fig. 12b, and probability flows from \({\left| m \right\rangle }\) to \({\left| b \right\rangle }\) and \({\left| h \right\rangle }\) since they are the most dominant terms.
We can again use the method of [28] to find how precisely \(\gamma \) must be chosen to its critical value \(\gamma _{c2} = 1/M\)—a straightforward calculation shows that it must be within \(o(1/M^{5/2})\).
The second stage of the algorithm is similar to the previous cases, where we take the leading-order Hamiltonian \(H^{(0)}\) to only include edges of weight \(\varTheta (M)\). When \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _{c2} = \frac{1}{M}, \end{aligned}$$
then \({\left| a \right\rangle }\) and \({\left| b \right\rangle }\) are degenerate eigenvectors, as are \({\left| d \right\rangle }\) and \({\left| h \right\rangle }\), of \(H^{(0)}\). The perturbation \(H^{(1)}\) restores terms of order \(\varTheta (\sqrt{M})\), which causes probability to flow from \({\left| b \right\rangle }\) to \({\left| a \right\rangle }\) and from \({\left| h \right\rangle }\) to \({\left| d \right\rangle }\). The runtime from Case 3 carries over:
$$\begin{aligned} t_2 = \frac{\pi \sqrt{M}}{2}. \end{aligned}$$
As before, a straightforward calculation using the method of [28] shows that \(\gamma \) must be chosen within \(o(1/M^{3/2})\) of its critical value \(\gamma _{c2} = 1/M\).
These \(\gamma _c\)’s and runtimes are in agreement with Table 1.
Appendix 2: Details for larger examples
In this appendix, we employ degenerate perturbation theory [2, 14, 29] to find the critical \(\gamma \)’s and runtimes for search with a larger number of marked vertices, the results of which are summarized in Table 2.
One marked per complete
As shown in Fig. 6a, the system evolves in a three-dimensional subspace spanned by
$$\begin{aligned} {\left| a \right\rangle }= & {} \frac{1}{\sqrt{M+1}} \sum _{i \in \text {red}} {\left| i \right\rangle }, \\ {\left| b \right\rangle }= & {} \frac{1}{\sqrt{(M+1)(M-2)}} \sum _{i \in \text {blue}} {\left| i \right\rangle }, \\ {\left| c \right\rangle }= & {} \frac{1}{\sqrt{M+1}} \sum _{i \in \text {yellow}} {\left| i \right\rangle }. \end{aligned}$$
In this subspace, the search Hamiltonian (1) is
$$\begin{aligned} H = -\gamma \begin{pmatrix} \frac{1}{\gamma } &{} \sqrt{M-2} &{} 2 \\ \sqrt{M-2} &{} M-2 &{} \sqrt{M-2} \\ 2 &{} \sqrt{M-2} &{} 0 \\ \end{pmatrix}. \end{aligned}$$
This Hamiltonian can be visualized as shown in Fig. 13a. The leading-order Hamiltonian \(H^{(0)}\) excludes edges that scale less than M, and it can be visualized as shown in Fig. 13b. Clearly, the eigenstates of this are \({\left| a \right\rangle }\), \({\left| b \right\rangle }\), and \({\left| c \right\rangle }\) with corresponding eigenvalues \(-1\), \(-\gamma M\), and 0. Since \({\left| s \right\rangle } \approx {\left| b \right\rangle }\), we choose \(\gamma \) so that \({\left| b \right\rangle }\) and \({\left| a \right\rangle }\) are degenerate, i.e.,
$$\begin{aligned} \gamma _c = \frac{1}{M}. \end{aligned}$$
The perturbation \(H^{(1)}\), which restores edges of weight \(\varTheta (\sqrt{M})\), causes certain linear combinations \(\alpha _a {\left| a \right\rangle } + \alpha _b {\left| b \right\rangle }\) to be eigenstates of \(H^{(0)} + H^{(1)}\). The coefficients can be found by solving
$$\begin{aligned} \begin{pmatrix} H_{aa} &{}\quad H_{ab} \\ H_{ba} &{}\quad H_{bb} \\ \end{pmatrix} \begin{pmatrix} \alpha _a \\ \alpha _b \\ \end{pmatrix} = E \begin{pmatrix} \alpha _a \\ \alpha _b \\ \end{pmatrix}, \end{aligned}$$
where \(H_{ab} = \langle a | H^{(0)} + H^{(1)} | b \rangle \), etc. With \(\gamma = \gamma _c\), this yields eigenstates and eigenvalues
$$\begin{aligned} {\left| \psi _0 \right\rangle }= & {} \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } + {\left| a \right\rangle } ), \quad E_0 = -1 - \frac{1}{\sqrt{M}} \\ {\left| \psi _1 \right\rangle }= & {} \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } - {\left| a \right\rangle } ), \quad E_1 = - 1 + \frac{1}{\sqrt{M}}. \end{aligned}$$
So the system evolves from \({\left| s \right\rangle } \approx {\left| b \right\rangle }\) to \({\left| a \right\rangle }\) in time \(\pi /\Delta E\):
$$\begin{aligned} t_* = \frac{\pi \sqrt{M}}{2}. \end{aligned}$$
Using the method Sect. VI of [28], if \(\gamma \) is within \(\epsilon \) of its critical value of \(\gamma _c = 1/M\), then the eigenvalue of \({\left| b \right\rangle }\) is now \(-\gamma M = -1 - \epsilon M\). In the perturbative calculation, this introduces a leading-order (in \(\epsilon \)) term \(\epsilon M\) due to \(H_{bb}\). For this to not influence the energy gap \(\varTheta (1/\sqrt{M})\), we require \(\epsilon M = o(1/\sqrt{M})\), or \(\epsilon = o(1/M^{3/2})\). Thus for the algorithm to asymptotically evolve from \({\left| b \right\rangle }\) to \({\left| a \right\rangle }\), we require \(\gamma = \gamma _c + o(1/M^{3/2})\).
This \(\gamma _c\) and runtime are in agreement with Table 2.
Fully marked complete, plus one
As shown in Fig. 6b, the system evolves in a seven-dimensional subspace spanned by
In this subspace, the search Hamiltonian (1) is
$$\begin{aligned} H = -\gamma \begin{pmatrix} \frac{1}{\gamma } &{} \sqrt{M-1} &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 \\ \sqrt{M-1} &{} M-2+\frac{1}{\gamma } &{} 0 &{} 0 &{} 1 &{} 0 &{} 0 \\ 1 &{} 0 &{} \frac{1}{\gamma } &{} \sqrt{M-1} &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} \sqrt{M-1} &{} M-2 &{} 0 &{} 1 &{} 0 \\ 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 1 &{} \sqrt{M-2} \\ 0 &{} 0 &{} 0 &{} 1 &{} 1 &{} 0 &{} \sqrt{M-2} \\ 0 &{} 0 &{} 0 &{} 0 &{} \sqrt{M-2} &{} \sqrt{M-2} &{} M-2 \\ \end{pmatrix}. \end{aligned}$$
This Hamiltonian can be visualized as shown in Fig. 14a. The leading-order Hamiltonian \(H^{(0)}\) excludes edges that scale less than \(\sqrt{M}\), and it can be visualized as shown in Fig. 14b. The two eigenstates of \(H^{(0)}\) that we want to be degenerate are
$$\begin{aligned} u = \frac{2}{\sqrt{M}+\sqrt{8+M}} {\left| e \right\rangle } + \frac{2}{\sqrt{M}+\sqrt{8+M}} {\left| f \right\rangle } + {\left| g \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_u = \frac{-\gamma }{2} \left( M + \sqrt{M(M+8)} \right) \end{aligned}$$
and
$$\begin{aligned} v = \frac{1}{2} \left( \sqrt{M+4} - \sqrt{M} \right) {\left| a \right\rangle } + {\left| b \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_v = \frac{1}{2} \left( -2-M \gamma -\sqrt{M} \sqrt{M+4} \gamma \right) . \end{aligned}$$
These are degenerate when \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _c = \frac{2}{\sqrt{M} \left( \sqrt{M+8}-\sqrt{M+4}\right) } \approx 1 + \frac{3}{M} + O(1/M^2). \end{aligned}$$
The perturbation \(H^{(1)}\), which restores terms of constant weight, causes certain linear combinations \(\alpha _u {\left| u \right\rangle } + \alpha _v {\left| v \right\rangle }\) to be eigenstates of \(H^{(0)} + H^{(1)}\). Doing the perturbative calculation to find the coefficients, the perturbed eigenstates for large N are
$$\begin{aligned} \frac{1}{\sqrt{2}} \left( {\left| u \right\rangle } + {\left| v \right\rangle } \right) , \quad E = -3 - \frac{1}{\sqrt{M}} \end{aligned}$$
$$\begin{aligned} \frac{1}{\sqrt{2}} \left( {\left| u \right\rangle } - {\left| v \right\rangle } \right) , \quad E = -3 + \frac{1}{\sqrt{M}} \end{aligned}$$
Since \({\left| u \right\rangle } \approx {\left| g \right\rangle }\) and \({\left| v \right\rangle }\approx {\left| b \right\rangle }\) for large N, the system evolves from \({\left| s \right\rangle } \approx {\left| g \right\rangle }\) to \({\left| b \right\rangle }\), which is marked, in time \(\pi / \Delta E\):
$$\begin{aligned} t_* = \frac{\pi \sqrt{M}}{2}. \end{aligned}$$
We can again use the method of [28] to find how precisely \(\gamma \) must be chosen to its critical value \(\gamma _{c} = 1 + 3/M\)—a straightforward calculation shows that it must be within \(o(1/M^{3/2})\).
This \(\gamma _c\) and runtime are in agreement with Table 2.
Two marked per complete graph, case 1
As shown in Fig. 7a, the system evolves in a two-dimensional subspace spanned by
$$\begin{aligned} {\left| a \right\rangle }= & {} \frac{1}{\sqrt{2(M+1)}} \sum _{i \in \text {red}} {\left| i \right\rangle }, \\ {\left| b \right\rangle }= & {} \frac{1}{\sqrt{(M+1)(M-2)}} \sum _{i \in \text {blue}} {\left| i \right\rangle }. \end{aligned}$$
In this subspace, the search Hamiltonian (1) is
$$\begin{aligned} H = -\gamma \begin{pmatrix} 2 + \frac{1}{\gamma } &{} \sqrt{2(M-2)} \\ \sqrt{2(M-2)} &{} M-2 \\ \end{pmatrix}. \end{aligned}$$
We can find the eigenvectors and eigenvalues of this directly without perturbation theory. They are
$$\begin{aligned} \psi _0 = \frac{1+4 \gamma -M \gamma -\sqrt{1+8 \gamma -2 M \gamma +M^2 \gamma ^2}}{2 \sqrt{2} \sqrt{M-2} \gamma } {\left| a \right\rangle } + {\left| b \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_0 = \frac{1}{2} \left( -1-M \gamma +\sqrt{1+8 \gamma -2 M \gamma +M^2 \gamma ^2}\right) \end{aligned}$$
and
$$\begin{aligned} \psi _1 = \frac{1+4 \gamma -M \gamma +\sqrt{1+8 \gamma -2 M \gamma +M^2 \gamma ^2}}{2 \sqrt{2} \sqrt{M-2} \gamma } {\left| a \right\rangle } + {\left| b \right\rangle } \end{aligned}$$
with corresponding eigenvalue
$$\begin{aligned} E_1 = \frac{1}{2} \left( -1-M \gamma -\sqrt{1+8 \gamma -2 M \gamma +M^2 \gamma ^2}\right) . \end{aligned}$$
When \(\gamma \) takes its critical value of
$$\begin{aligned} \gamma _c = \frac{1}{M}, \end{aligned}$$
these become for large N
$$\begin{aligned} {\left| \psi _0 \right\rangle } = \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } + {\left| a \right\rangle } ), \quad E_0 = -1 - \sqrt{\frac{2}{M}} \end{aligned}$$
$$\begin{aligned} {\left| \psi _1 \right\rangle } = \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } - {\left| a \right\rangle } ), \quad E_1 = -1 + \sqrt{\frac{2}{M}} \end{aligned}$$
So the system evolves from \({\left| s \right\rangle } \approx {\left| b \right\rangle }\) to \({\left| a \right\rangle }\) in time \(\pi / \Delta E\):
$$\begin{aligned} t_* = \frac{\pi \sqrt{M}}{2 \sqrt{2}}. \end{aligned}$$
An explicit calculation as in [13] shows that \(\gamma \) must be chosen within \(o(1/M^{3/2})\) of its critical value \(\gamma _c = 1/M\) for this evolution to occur asymptotically.
This \(\gamma _c\) and runtime are in agreement with Table 2.
Two marked per complete graph, case 2
As shown in Fig. 7b, the system evolves in a three-dimensional subspace spanned by
$$\begin{aligned} {\left| a \right\rangle }&= \frac{1}{\sqrt{2(M+1)}} \sum _{i \in \text {red}} {\left| i \right\rangle } \\ {\left| b \right\rangle }&= \frac{1}{\sqrt{(M-4)(M+1)}} \sum _{i \in \text {blue}} {\left| i \right\rangle } \\ {\left| c \right\rangle }&= \frac{1}{\sqrt{2(M+1)}} \sum _{i \in \text {yellow}} {\left| i \right\rangle } \end{aligned}$$
In this subspace, the search Hamiltonian (1) is
$$\begin{aligned} H = -\gamma \begin{pmatrix} 1 + \frac{1}{\gamma } &{}\quad \sqrt{2(M-4)} &{}\quad 3 \\ \sqrt{2(M-4)} &{}\quad M-4 &{}\quad \sqrt{2(M-4)} \\ 3 &{}\quad \sqrt{2(M-4)} &{}\quad 1 \\ \end{pmatrix}. \end{aligned}$$
This Hamiltonian can be visualized as shown in Fig. 15a. The leading-order Hamiltonian \(H^{(0)}\) excludes edges that scale less than M, and it can be visualized as shown in Fig. 15b. Clearly, the eigenstates of this are \({\left| a \right\rangle }\), \({\left| b \right\rangle }\), and \({\left| c \right\rangle }\) with corresponding eigenvalues \(-1\), \(-\gamma M\), and 0. Since \({\left| s \right\rangle } \approx {\left| b \right\rangle }\), we choose \(\gamma \) so that \({\left| b \right\rangle }\) and \({\left| a \right\rangle }\) are degenerate, i.e.,
$$\begin{aligned} \gamma _c = \frac{1}{M} \end{aligned}$$
The perturbation \(H^{(1)}\), which restores edges of weight \(\varTheta (\sqrt{M})\), causes certain linear combinations \(\alpha _a {\left| a \right\rangle } + \alpha _b {\left| b \right\rangle }\) to be eigenstates of \(H^{(0)} + H^{(1)}\). The coefficients can be found in the usual way, and they yield perturbed eigenstates
$$\begin{aligned} {\left| \psi _0 \right\rangle }= & {} \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } + {\left| a \right\rangle } ), \quad E_0 = -1 - \sqrt{\frac{2}{M}}\\ {\left| \psi _1 \right\rangle }= & {} \frac{1}{\sqrt{2}} ( {\left| b \right\rangle } - {\left| a \right\rangle } ), \quad E_1 = -1 + \sqrt{\frac{2}{M}}. \end{aligned}$$
So the system evolves from \({\left| s \right\rangle } \approx {\left| b \right\rangle }\) to \({\left| a \right\rangle }\) in time \(\pi / \Delta E\):
$$\begin{aligned} t_* = \frac{\pi }{2} \sqrt{\frac{M}{2}}. \end{aligned}$$
We can again use the method of [28] to find how precisely \(\gamma \) must be chosen to its critical value \(\gamma _{c} = 1/M\)—a straightforward calculation shows that it must be within \(o(1/M^{3/2})\).
This \(\gamma _c\) and runtime are in agreement with Table 2.