Vertices cannot be hidden from quantum spatial search for almost all random graphs

In this paper we show that all nodes can be found optimally for almost all random Erd\H{o}s-R\'enyi ${\mathcal G}(n,p)$ graphs using continuous-time quantum spatial search procedure. This works for both adjacency and Laplacian matrices, though under different conditions. The first one requires $p=\omega(\log^8(n)/n)$, while the seconds requires $p\geq(1+\varepsilon)\log (n)/n$, where $\varepsilon>0$. The proof was made by analyzing the convergence of eigenvectors corresponding to outlying eigenvalues in the $\|\cdot\|_\infty $ norm. At the same time for $p<(1-\varepsilon)\log(n)/n$, the property does not hold for any matrix, due to the connectivity issues. Hence, our derivation concerning Laplacian matrix is tight.

Introduction Quantum walk is a topic of great interest in quantum information theory [1][2][3]. Numerous possible applications were already discovered, including quantum spatial search [1,4], Google algorithm [5][6][7] or quantum transport [8,9]. Throughout this article we consider quantum spatial search procedure, which is an example of an algorithm yielding a result up to quadratically faster than its classical counterpart. Since the very first paper describing it was published [1], plenty of new results have appeared in the literature. This includes the noise resistance [10], efficiency analysis [1,4,[11][12][13], imperfect implementation [14], difference in implementation [15], etc.
Unfortunately, most of the results concern very specific graph classes like complete graphs [1,10] or their simplex [14], and binary trees [13]. Due to some kind of 'symmetry', it was not necessary to make analysis for all vertices separately (as for example in complete graphs or hypercubes), or at least it could be easily fixed (for example by the level in binary trees). The first big step towards the generalization into a large collection of graphs is the work of Chakraborty et al. [4], where Erdős-Rényi random graph model G(n, p) was analyzed (with n, p standing for the number of vertices and probability of an edge being present respectively). The authors have proven that for almost all graphs almost all vertices can be found optimally. Since there are already known examples of graphs for which some vertices are searched in Θ(n 1 2 +a ) time for a > 0 [1,13] (throughout this paper O, o, Ω, ω, Θ, ∼ denote asymptotic relations, see [16]), the result cannot be strengthened into 'all graphs'.
The proof of the main result of Chakraborty et al. in [4] is based on a lemma describing limit behavior of a principal eigenvector |λ 1 of the adjacency matrix. The authors show that for p > log 3 2 (n)/n, if |s = 1 √ n v∈V |v = α|λ 1 + β|λ 1 ⊥ , then almost surely α = 1 − o(1). Since the time needed for quantum spatial search is Θ( 1 | w|λ 1 | ), where w denotes the marked vertex, we have that almost all vertices can be found in optimal time. However, in this case it is not trivial which vertex is chosen, since the Erdős-Rényi graph is not necessarily symmetric. This kind of convergence allows the existence of vertices, which can be found in linear time. As an example consider a vector for k = o(n). We have, s|λ 1 = α = 1 − o(1) and thus a-priori, vector |λ 1 from [4], can be the leading eigenvector of an adjacency matrix. In such a case the argument used by [4] is not tight enough to exclude a possibility that all vertices w ∈ {1, . . . , k} will be found in Ω(n) time, which is actually a random guess complexity. Note that it is even possible that for almost all graphs such vertices exist. Furthermore, many of the applications mentioned in [4] require i|v 1 ≈ j|v 1 for arbitrary i, j. Otherwise, creating Bell states or quantum transport will be at least very difficult.
What is more, due to the laws of quantum mechanics, the measurement time needs to be known since the beginning. This includes not only differences in the complexity, but a constant as well. For example, if for two different nodes v, v we have v|λ 1 = 1 √ n and v |λ 1 = 2 √ n , then different measurement times should be chosen for each.
Both effects mentioned above can be described as hiding nodes in the graphs. Finally, we propose a following research problem: can we actually 'hide' a vertex in a random Erdős-Rényi graph? We have managed to show, that in the case of adjacency matrix, p = ω(log 3 (n)/(n log 2 (log(n))) is a sufficient requirement for all-vertices optimal search. Under further constraint p = ω(log 8 (n)/n) we have common time measurement. Moreover, we went a step further than the authors of [4] and studied also Laplacian matrix, which led us to tighter results. In the case of Laplacian matrix, p > (1+ε) log(n)/n, for constant ε > 0, is sufficient for common time measurement, however in the p = Θ(log(n)/n) case, it may not be true that almost surely the probability 1 of a successful measurement is achieved. If p < (1 − ε) log(n)/n, then a random graph contains almost surely isolated nodes [17], hence it is possible to hide a vertex.
Element-wise optimality for adjacency matrix. Let G = (V, E) be a simple undirected graph with node set V = {1, . . . , n} and edge set E ⊂ V × V . Moreover, let H G be a quantum system spanned by an orthonormal basis {|v : v ∈ V }. Quantum spatial search is based on the Schrödinger differential equation where M G is a matrix corresponding to the graph structure, typically rescaled adjacency matrix A or Laplacian L = D − A, where D is the degree matrix.
In [4], authors have proven that for a random Erdős-Rényi graph in case of an adjacency matrix almost all vertices from almost all graphs can be found optimally. We say some property holds almost surely for all graphs, where the probability of choosing random graph having such is 1 − o(1). The result was based on the following simplified lemma.

Lemma 1 ( [4]).
Let H be a Hamiltonian with eigenvalues λ 1 ≥ · · · ≥ λ n satisfying λ 1 = 1 and |λ i | ≤ c < 1 for all i > 1 with corresponding eigenvectors |λ 1 = |s , |λ 2 , . . . , |λ n and let w denote a marked vertex. For an appropriate choice of r ∈ [− c 1+c , c 1−c ], the starting state |s evolves by the Schrödinger's equation with the Hamiltonian (1 + r)H + |w w| for time t = Θ( √ n) into the state |f satisfying | w|f | 2 ≥ 1−c 1+c + o(1). According to the proof of the lemma, the bound can be derived by choosing r satisfying The assumptions from the Lemma guarantee the existence of r ∈ [ −c 1+c , c 1−c ] satisfying the above equality. Note that the result is constructive for c = o(1), as in this case r = o(1) as well as t = π √ n 2 . Otherwise, a proper determination of r and t is needed.
According to the Lemma, two properties of M G are useful in proving search optimality. Firstly, the matrix should have a single outlying eigenvalue. Secondly, if |λ 1 is the eigenvector corresponding to the outlying eigenvalue, one should have | w|λ 1 | = Θ( 1 √ n ). Note that in the limit n → ∞, norms cease to be equivalent, thus different concepts of closeness of vectors can be chosen. In [4], authors choose 1 − | ψ|φ | for arbitrary vectors |ψ , |φ , which allows to infer that o(n) of nodes can be found in time ω( √ n), see the example given in Eq. (1). In order to make statements concerning all vertices we should study the limit behavior of the principal vector in L ∞ norm · ∞ , which bounds the maximal deviation of coordinates. More precisely, we are interested whether |λ 1 −|s ∞ = o(1) √ n , as this would imply that for an arbitrary marked node w we have w|λ 1 = (1 + o(1)) 1 √ n . The above will give us the bound Θ( 1 | w|λ 1 | ) = Θ( √ n) for the time needed for quantum spatial algorithm to locate vertex w.
Indeed, a convergence of infinity norm was shown by Mitra [18] providing p ≥ log 6 (n)/n. We have managed to weaken the assumptions and thereby strengthen the result. Proposition 1. Suppose A is an adjacency matrix of a random Erdős-Rényi graph G(n, p) with p = ω(log 3 (n)/(n log 2 log n)). Let |λ 1 denote the eigenvector corresponding to the largest eigenvalue of A and let |s = 1 √ n v |v . Then The proof, which follows the concept proposed by Mitra [18], can be found in Section A in Supplementary Materials. This implies that all vertices can be found optimally in Θ( √ n) time for almost all graphs.
To show the common time measurement suppose that the largest eigenvalue of 1 np A satisfies where δ → 0. Then the probability of measuring the searched vertex w in time t can be approximated by [4] P Since |λ 1 tends to |s in the · ∞ norm, the approximation works for all nodes. Hence, when , then all of the vertices can be found in time O( √ n). Nevertheless, δ depends on a chosen graph, and thus the measurement time may differ. In order to ensure that the time and probability of measurement are the same for all marked nodes and almost all graph chosen, one should provide [19], see Section B in Supplementary Materials for a step-by-step derivation, where N (µ, σ) is the normal distribution with mean µ and standard deviation σ. Therefore, one can show that asymptotically almost surely where δ = o( 1 n √ p ). Note that since np = ω(log 8 (n)), we have actually δ = o( 1 √ n log 4 (n) ) in the worst case scenario. This, in turn, allows us to use the simplified version of Eq. (6) for large n. Thus we have that in time t = π 2 √ n, the probability of measurement is optimal, independently on a chosen marked node. Finally, we can conclude our results concerning adjacency matrix with the following theorem. Element-wise optimality for Laplacian matrix. Similar property holds for a Laplacian matrix L. This is a positive semi-definite matrix, where the dimensionality of null-space corresponds to the number of connected components. Based on the results from [20], one can show that for p = ω(log(n)/n) all of the others eigenvalues of L np converge to 1, see Section C in Supplementary Materials. At the same time, the eigenvector corresponding to the null-space is exactly the equal superposition |s = |µ n = 1 √ n v∈V |v . Thus, since for p > (1 + ε) log(n)/n a graph is almost surely connected, the Laplacian matrix takes the form where µ i → 1 almost surely for 1 ≤ i ≤ n − 1. Here µ 1 , . . . , µ n denote eigenvalues of Laplacian matrix with corresponding eigenvectors |µ 1 , . . . , |µ n . Note that since the identity matrix corresponds to global phase change only, which is an unmeasurable parameter, we can equivalently choose Note that the matrix above satisfies the requirements of Lemma 1 from [4], and therefore all of the vertices can be found optimally with probability 1 − o(1). Common time measurement is a direct application of Lemma 1 from [4], since more in-depth proof analysis shows, that under the theorem assumptions, t = π √ n/2 should be chosen for maximizing the success probability.
The situation changes in the case of p = O(log(n)/n). Note that for both adjacency and Laplacian matrices the evolution does not change the probability of measuring isolated vertices. If p < (1 − ε) log(n)/n, then graphs almost surely contain such vertices and hence you actually can hide a vertex in such a graph.
The p ∼ p 0 log(n)/n for a constant p 0 > 1 is a smooth transition case between hiding and non-hiding cases mentioned before. In this case based on the Exercise III.4 from [21], one can show that where W 0 , W −1 are Lambert W functions, see Section D in Supplementary Materials. Here we use the notation f (n) ∼ g(n) ⇐⇒ f (n)−g(n) = o(g(n)) . In this case, the M G = I− 1 np L does not imply that both µ 1 and µ n−1 converge to 1.
Nevertheless, we can still make simple changes in a matrix in order to obtain optimality of the procedure.
ep 0 )) −1 denote constants corresponding to µ 1 and µ n−1 limit behavior. Then I − 2 (a + b) log n L again satisfies Lemma 1 from [4] with c = a−b 2 . According to the Lemma 1, the probability of success after time t = π 2 √ n is bounded from below by The bound converges to 0 when p 0 → 1 + and to 1 when p 0 → ∞, and monotonically changes in (1, ∞), see Fig. 1. Note that this corresponds to the other results. For p 0 < 1 the probability of measuring all vertices is equal to 0 due to the connectivity issues mentioned before. For p 0 → ∞, the situation becomes similar to p = ω(log(n)/n), where non-hiding property was already shown. Note however, that the actual success probability seems to be much higher than the bound, see Fig. 2. Eventually, we conclude all of the results by the following theorems.  Conclusion and discussion. In this work we prove that all vertices can be found optimally with common measurement time (π √ n)/2 for almost all Erdős-Rényi graphs for both adjacency and Laplacian matrices under conditions p = ω(log 8 (n)/n) and p ≥ (1 + ε) log(n)/n respectively. The proof is based on element-wise ergodicity of the eigenvector corresponding to the outlying eigenvalue of adjacency or Laplacian matrix. While under the mentioned constraint adjacency matrix almost surely achieves success probability 1 − o(1), the same probability for Laplacian matrix in the p ∼ p 0 log(n)/n case for some p 0 > 1 can only be bounded from below by some positive constant. At the same time for p < (1 − ε) log(n)/n, the property does not hold anymore, since almost surely there exist isolated vertices which need Ω(n) time to be found.
While our derivation concerning the Laplacian matrix is nearlt complete, since only upper-bound for success probability is missing in the p = Θ(log(n)/n) case, in our opinion it is possible to weaken the condition on p for the adjacency matrix. The first key step would be showing that the largest eigenvalue λ( 1 np A) follows N (1, 1 n 2(1 − p)/p) distribution for p ≥ (1 + ε) log(n)/n. Then, since element-wise convergence of principal vector requires p = ω(log 3 (n)/(n log 2 log n)), the result would be strengthened to the last mentioned constraint. The second step would be the generalization of the mentioned element-wise convergence theorem.
Further interesting generalization of the result would be the analysis of more general random graph models as well. While this proposition has already been stated [4], our results show that in order to prove security of the quantum spatial search, it would be desirable to analyze the limit behavior of the principal vector in the sense of · ∞ norm. for c = max{|λ 2 |, |λ n |} for matrix from Eq. 11 for randomly chosen graph. Black error bars denote the actual success probability. Deviations correspond to the maximal and minimal obtained values. Graphs were chosen according to the G(n, 2 log(n) n ) model, r were derived according to the Eq. 3 and we chose time t = π √ n 2 . 30 graphs were chosen for each size. One can see that the bound for randomly chosen graph oscillates around the limit value, nonetheless the true success probability is much higher than the bound.

A Element-wise bound on principal eigenvector
Let G n,p be a random Erdős-Rényi graph, deg(v) be a degree of the vertex v ∈ V and A be its adjacency matrix with eigenvalues λ 1 ≥ λ 2 ≥ . . . ≥ λ n . Let also |λ i be an eigenvector corresponding to the eigenvalue λ i and |s = |v . Proposition 5. For the probability p = ω ln 3 (n)/(n log 2 log n) and some constant c > 0 we have with probability 1 − o(1).
Proof. Using [20], we have with probability 1 − o(1). The first inequality was shown in the proof of Theorem 1 while the second and third inequalities come from Theorem 3 in [20]. Note deg(v) follows a binomial distribution. Using Lindenberg's CLT and the fact that the convergence is uniform one can show that where X is a random variable with standard normal distribution. Let A = λ 1 |λ 1 λ 1 |+ i≥2 λ i |λ i λ i | and |s = α|λ 1 +β|λ ⊥ 1 . Assume that |λ 1 , |λ ⊥ 1 , |λ i are normed vectors and |λ ⊥ 1 = i≥2 γ i |λ i . By the Perron-Frobenius Theorem we can choose a vector |λ 1 such that v|λ 1 ≥ 0 and hence obtain s|λ 1 = α > 0. Thus With probability 1 − o(1), using Eq. (14) we have and thus since β 2 = 1 − α 2 , then Eventually, we receive where the fourth inequality comes from Eq. (15). We know that | deg(v) − np| ≤ 2 n ln(n)p(1 − p) with probability greater than 1 − 1 n 2 . Thus, with probability 1 − 1 n the above is true for all v ∈ V simultaneously. Now, since deg(v) = v|A|1 , we have The lower bound can be estimated as and similarly the upper bound np + 2 n ln(n)p(1 − p) Consequently for all v ∈ V . On the other hand Using Eq. (14,15) we are able to estimate λ i λ 1 by p > 1 n , then Furthermore, under another condition p = ω(log 8 (n)/n) we have in a distribution. This allows us to derive the distribution of the largest eigenvalue of the 1 np A matrix where X → N (0, 1). Hence we have that ). Note, that under the condition p = ω(log 8 (n)/n), the standard deviation tends to 0. This means that the largest eigenvalue actually tends to the Dirac distribution δ x=1 . This gives as a bound for λ 1 ( 1 np A). Note that The probability tends to 1 as long as the argument tends to ∞. In order to achieve this, we need to assume n √ pδ → ∞ as n → ∞. This can be done by choosing δ = o( 1 n √ p ). Eventually, we have asymptotically almost surely Note that for p = o(1) the bound is better than the one used in [4].

C Laplacian matrix spectrum
Algebraic connectivity satisfies µ n−1 = np+O( √ np log n) for p = ω(log(n)/n). Similarly we conclude from results of Bryc et al. [22], that µ 1 ∼ np. Theorem 6. Let L n be a Laplacian matrix of random Erdős-Rényi graph G(n, p), where p = ω( log n n ). Then µ 1 = µ(L) ∼ np. Proof. By Theorem 1.5 from [22], ifL is a symmetric matrix whose offdiagonal elements have two-points distribution with mean 0 and variance p(1 − p) andL ii = j =iL ij . Then Note that in the following version p may depend on n. Hence, we can extend the Corollary 1.6 from the same paper. Let L n =L n + Y n , where Y n is a deterministic matrix with −p on offdiagonal and (n − 1)p on diagonal. Note that Y n is an expectation of a random Erdős-Rényi Laplacian matrix. Y n has a single 0 eigenvalue and all of the others take the form np. By this we have µ(Y n ) = Y n = np. Then we have where the limit comes from the Eq. (41), assuming p = ω(log n/n). Finally µ(Ln) np → 1.

D The largest eigenvalue of Laplacian matrix near the connectivity treshold
Suppose G is a random graph chosen according to G(n, p 0 log(n) n ) distribution, for p 0 > 1 being a constant. It can be shown, that and see [21], Exercise III.4. Here δ and ∆ denote respectively minimal and maximal degree of the graph. In [23] authors have shown that providing we have where µ n−1 is the second smallest eigenvalue of the Laplacian matrix. In fact, similar behavior can be stated for the largest eigenvalue, i.e. if we have While we plan to prove the statement above, it is possible that the RHS can be reduced to O( √ np) by following the proof in [23]. Nonetheless, we are satisfied with the mentioned result. The proof is very similar to the proof of Lemma 3.4 in [23]. Furthermore, note, that the theorem holds for p 0 > 0.
Proof. Note, that since the eigenvector corresponding to 0 eigenvalue is the equal superposition, we have  [24]. Similarly one can show µ 1 ≥ ∆, which can be done by taking maximum over canonical vectors. After combining those bounds and ∆ ∼ cnp, we obtain the result.