## Abstract

Despite intensive research, the physical origin of the speed-up offered by quantum algorithms remains mysterious. No general physical quantity, like, for instance, entanglement, can be singled out as the essential useful resource. Here we report a close connection between the trace speed and the quantum speed-up in Grover’s search algorithm implemented with pure and pseudo-pure states. For a noiseless algorithm, we find a one-to-one correspondence between the quantum speed-up and the polarization of the pseudo-pure state, which can be connected to a wide class of quantum statistical speeds. For time-dependent partial depolarization and for interrupted Grover searches, the speed-up is specifically bounded by the maximal trace speed that occurs during the algorithm operations. Our results quantify the quantum speed-up with a physical resource that is experimentally measurable and related to multipartite entanglement and quantum coherence.

## Introduction

Understanding and quantifying the key resource for the speed-up of quantum computations^{1,2} has been a highly disputed topic over the past few decades^{3}. There has been particular interest in the role played by entanglement^{4,5,6,7,8,9,10,11,12,13}. It is known that exponential speed-up of quantum algorithms implemented with pure states requires multipartite entanglement^{8,9}. However, it was shown that a polynomial advantage can be achieved without entanglement^{14}. Also, it is an open question whether exponential quantum advantage can be reached in mixed-state algorithms in absence of entanglement. In this case, other quantum correlations such as quantum discord have been indicated as possible candidates for computational resources^{3,15}. Furthermore, it was shown that several entanglement measures cannot quantify advantages of many quantum algorithms^{13}. Other possible resources have been considered such as coherence^{16,17,18}, distinguishability^{3}, contextuality^{19}, tree size^{20} and interference^{21}. In short, despite having been the subject of extensive research, understanding the resource of the speed-up in quantum computations, even for a benchmark algorithm such as Grover’s algorithm, is still an open and urgent quest.

Quantum statistical speeds^{22,23,24,25,26} offer a possible approach to quantify useful resources in quantum technology tasks. As a major example, the quantum Fisher information^{25,27}, which is the quantum statistical speed associated with the Bures distance^{25}, was shown to fully characterize metrologically useful entanglement^{28,29,30}, that is, the entanglement necessary for sub-shot-noise phase estimation sensitivities^{31,32}. One might conjecture that different statistical speeds may be useful to characterize the performances of different quantum tasks. Here, we use the trace speed (\({\text {TS}}\)), namely, the statistical speed associated to the trace distance^{1,23}, to quantify the speed-up in Grover’s algorithm^{33} in both absence and presence of dephasing. In particular, we show that in the pseudo-pure model without dephasing, the speed-up is completely determined by the polarization of the pseudo-pure state, which can be linked to a wide class of quantum statistical speeds. For general pseudo-pure dephasing models^{34}, we prove that the maximal \({\text {TS}}\) occuring during the algorithm bounds the speed-up, rendering it a necessary resource for quantum advantage. The \({\text {TS}}\) is an experimentally relevant measure of quantum coherence (asymmetry)^{35,36} and witnesses multipartite entanglement^{26}. To our knowledge, this is the first result for a physical resource in Grover’s algorithm that generalizes to mixed state versions. This can pave the way to a new approach to investigate useful resources in quantum computations.

## Results

### Grover’s algorithm and its cost

Grover’s search algorithm^{33} is one of the most important protocols of quantum computation^{1,2}. It searches an unstructured database of *N* elements for a target \(\omega\). The target is marked in the sense that one is given a test function *f* that vanishes for all elements but \(\omega\). The task is to identify \(\omega\) with as few function calls as possible. In the quantum version of the algorithm, a function call can be used as a measurement or as an application of a corresponding unitary, the so-called oracle unitary. As we will discuss shortly, Grover’s algorithm admits a quadratic advantage to classical search algorithms. To utilize the exponential size of the dimensionality of composite quantum systems^{6}, we encode all different elements *x* of the register into computational basis states of \(n=\log _2 N\) qubits, \(x\in \left\{ 0,1\right\} ^{ n}\). Grover’s algorithm is performed by preparing the system in the register state \(\left| \psi _{\rm {in}} \right\rangle =1/\sqrt{2^n}\sum _x \left| x \right\rangle\), where \(\left| x \right\rangle\) are the computational basis vectors, followed by *k* applications of the Grover unitary \(G=U_d U_\omega\). Here, the oracle unitary \(U_\omega =1-2\left| \omega \right\rangle \left\langle \omega \right|\) represents a function call and the Grover diffusion operator is defined as \(U_d=2\left| \psi _{\rm {in}} \right\rangle \left\langle \psi _{\rm {in}} \right| -1\). After *k* iterations of the Grover unitary, the state of the system is given by^{2}

where \(\theta =\arcsin (1/\sqrt{2^n})\) and \(\left| \omega ^\perp \right\rangle =1/\sqrt{2^n-1}\sum _{x\ne \omega }\left| x \right\rangle\) is the projection of the initial state on the subspace orthogonal to \(\left| \omega \right\rangle\). This yields a probability \(p_k\) of finding the target state as \(p_k=\sin ^2 [(2k+1)\theta ]\). After \(k_{\rm {Gr}}\approx (\pi /4) \sqrt{2^n}\) iterations one finds the target state \(\left| \omega \right\rangle\) with probability \(p_{k_{\rm {Gr}}}=1-{\mathcal {O}}(1/2^n)\)^{2}.

One defines the cost *C* for a general search algorithm as the average number of applications of the test function *f* (or its corresponding oracle unitary) required to find the target state^{34}. Simply counting the oracle applications is also known as query complexity^{2}, while other complexities such as gate complexity are usually not considered in Grover’s algorithm (see^{6} for a discussion).

In the classical search algorithm, the query application can be thought of as opening one of \(2^n\) boxes, where each box represents one state of the register. For an unstructured search algorithm, i.e., in each iteration one randomly opens one of the \(2^n\) boxes, the average number of steps needed to find the target state is given by \(C_{\rm {cl}}=2^n\). If one remembers the outcome of all previous searches, the cost can be reduced to \(C_{\rm {cl}}=2^{n}/2+{\mathcal {O}}(1)\)^{34}. Note that \(C_{\rm {cl}}\) for both structured and unstructured searches scales with \(2^n\).

In a quantum search algorithm, one uses *k* oracle unitaries and a final oracle measurement yielding the target with probability \(p_k\), such that the cost is given by^{34}

Hence, the optimal cost is obtained by minimizing \(C_{\rm {qu}}(k)\) over the number of oracle applications, \(C_{\rm {qu}}=\min _k(k+1)/(p_k)\). Let us emphasize that this definition of the cost does not distinguish between applying the oracle as a unitary or as a measurement observable.

In Grover’s algorithm, the cost function Eq. (2) is not necessarily minimal for the highest success probability \(p_k\) of one single search^{37}. However, the optimal number of steps \({\tilde{k}}_{\rm {Gr}}\) and the optimal cost \(C_{\rm {qu}}\) for large *n* still scales as \({\tilde{k}}_{\rm {Gr}}= r \sqrt{2^n}\) and \(C_{\rm {qu}}=K \sqrt{2^n}\), where *r* is the solution of \(\tan (2r)=4r\) and \(K=r/\sin ^2(2r)\), yielding the quadratic speed-up over \(C_{\rm {cl}}\). It was shown that this speed-up is optimal^{37,38}.

Grover’s algorithm can be executed on a single multimode system and, therefore, simply makes use of superposition and constructive interference^{6,39,40}. However, in order to reduce exponential overhead in space, time or energy, one usually considers a system composed of many qubits^{6,39}. In this case, different measures of bipartite and multipartite entanglement have been used to detect entanglement during Grover’s algorithm^{41,42,43,44,45}. Genuine multipartite entanglement was shown to be present already after the first step of the noiseless algorithm^{41}. However, the quantitative relationship between these measures and speed-up was not resolved. In particular, the methods could not be easily applied to any mixed state generalization of Grover’s algorithm. Quantum coherence^{46,47,48} and quantum discord^{46} have been considered as resources in the noiseless algorithm as well.

### Quantifying speed-up in the unitary algorithm

In this section, we quantify the speed-up in a mixed-state generalization of Grover’s algorithm with quantum statistical speeds. We consider Grover’s algorithm with the register initialized in a pseudo-pure state^{49}, while the algorithm is still implemented with unitary operations. For a pure *n*-qubit state \(\left| \psi \right\rangle\), the corresponding pseudo-pure state \(\rho _{\psi ,\epsilon }\) with polarization \(\epsilon\) is defined as

Pseudo-pure states represent one of the simplest models for mixed-state quantum computation and play a central role in the partial depolarizing noise model we consider later. We replace the pure initial state \(\left| \psi _{\rm {in}} \right\rangle\) with the pseudo-pure state \(\rho _{\psi _{\rm {in}},\epsilon }\) such that, after *k* Grover iterations, the state of the system is given by \(\rho _k=\epsilon \left| \psi _k \right\rangle \left\langle \psi _k \right| +(1-\epsilon ){\mathbb {I}}/2^n\), with \(\left| \psi _k \right\rangle\) defined in Eq. (1). The probability \(p_k\) of finding the target state after *k* steps is \(p_k=\epsilon \sin ^2 ((2k+1)\theta )+(1-\epsilon )/2^n\). Here we observe that for \(\epsilon ={\mathcal {O}}(1/2^n)\), it becomes more efficient to just measure the state without any iteration because the probability contribution due to the Grover iteration is no longer dominant^{7}. However, if \(\epsilon\) does not decrease exponentially with *n*, one can neglect the second term in \(p_k\). Hence, the minimum of Eq. (2) occurs after the same number of steps as in the pure state algorithm while its minimal value \(C_{\rm {qu}}\) is simply \(C_{\rm {qu}}=C_{\rm {qu,pure}}/\epsilon\), where \(C_{\rm {qu,pure}}\) is the cost of the pure state algorithm.

In this model, the speed-up of the algorithm is completely determined by the depolarization \(\epsilon\). Therefore, all quantities which can be connected to \(\epsilon\) are quantifiers of the speed-up. In particular, this holds for a general quantum statistical speed \({\text {QS}}\) with the property that for \(\epsilon \gg 1/2^n\), \({\text {QS}}(\rho _{\psi ,\epsilon })=\epsilon {\text {QS}}(\left| \psi \right\rangle \left\langle \psi \right| )\). Note that this property holds for a wide class of quantum statistical speeds, for instance, the generalized quantum Fisher information and the quantum Schatten speeds^{26}. Given the relations \(\epsilon = {\text {QS}}(\rho _{\psi ,\epsilon })/ {\text {QS}}(\left| \psi \right\rangle \left\langle \psi \right| )\) and \(C_{\rm {qu}}=C_{\rm {qu,pure}}/\epsilon =K\sqrt{2^n}/\epsilon\), we directly obtain the dependence of the cost function on the maximal \({\text {QS}}\) as

where \(K=r/\sin ^2(2r)\approx 0.69\) with *r* being the solution of \(\tan (2r)=4r\), and \({\text {QS}}^{\rm {pure}}_{\rm {max}}\) being the maximal \({\text {QS}}\) during the pure-state algorithm. The quantum speed-up \(S=C_{\rm {cl}}/C_{\rm {qu}}\) is thus given in terms of \({\text {QS}}_{\rm {max}}\) as

As we discuss in more detail in the Methods section, for \(\epsilon\) below a critical polarization \(\epsilon _c=K/\sqrt{2^n}\), a classical search becomes advantageous. For \(\epsilon >\epsilon _c\), the above results are valid. Also, for small values of *n*, a rigorous computation of the cost has to be performed.

As an example of a quantum statistical speed that will play an important role in the next section, consider the specific case of the trace speed (\({\text {TS}}\)). The \({\text {TS}}\) is the susceptibility of a quantum state \(\rho\) to unitary displacements generated by a generic Hamiltonian *H*^{35}. That is, the \({\text {TS}}\) quantifies the distinguishability between \(\rho\) and \(\rho (t)=e^{-iHt}\rho e^{iHt}\) for small *t*. It is defined as^{1,26,35}

where \([\cdot ,\cdot ]\) is the commutator and \(\left\Vert \cdot \right\Vert _1\) is the \(l_1\)-norm, defined as \(\left\Vert A \right\Vert _1 = {\text {tr}}\left[ \sqrt{A^\dag A} \right]\) for a generic operator *A*. Since \({\text {TS}}(\rho _{\psi ,\epsilon })=\left\Vert \left[ \rho _{\psi ,\epsilon }, H \right] \right\Vert _1=\left\Vert \epsilon \left[ \left| \psi \right\rangle \left\langle \psi \right| , H \right] +(1-\epsilon )/2^n\left[ {\mathbb {I}} , H \right] \right\Vert _1=\epsilon {\text {TS}}(\left| \psi \right\rangle \left\langle \psi \right| )\), the \({\text {TS}}\) can be used as the \({\text {QS}}\) in Eq. (5).

In general, \({\text {TS}}\) is a measure of coherence, in this case usually referred to as asymmetry^{35}: a state with no coherence with respect to *H*, namely a classical mixture of its eigenstates, will not change under phase displacements, while off-diagonal matrix elements (coherences) of \(\rho\) are responsible for a finite susceptibility to phase displacements. The \({\text {TS}}\) is upper bounded by the quantum Fisher information^{23}. If the system is a composite system of *n* qubits and *H* is the sum of local Hamiltonians \(H_i\), \(H=\sum _{i=1}^n H_i\) with \({\text {spec}}(H_i)=\left\{ -1/2,1/2\right\}\) and \({\text {TS}}(\rho ,H)>\sqrt{nr}\), it follows that \(\rho\) has to be at least \((r+1)\)-partite entangled^{26,29,30}, namely, it cannot be written as a mixture of *r*-producible pure states. A pure state is *r*-producible if it is a tensor product of subsystems with each subsystem containing at most *r* qubits. Since the value of \({\text {TS}}\) depends on the generating Hamiltonian *H*, we consider the optimization over all Hamiltonians of the above form. When the whole evolution is restricted to the completely symmetric subspace, it suffices to perform this optimization over collective spin Hamiltonians, \(H_i={\mathbf {n}}\cdot \varvec{\sigma }^{(i)}/2\), where \({\mathbf {n}}\) is a point on the unit sphere and \(\varvec{\sigma }^{(i)}\) are the Pauli operators for the *i*-th qubit. For pure states \(\left| \psi \right\rangle\), the optimized \({\text {TS}}\) coincides with the square root of the largest eigenvalue of the matrix \(\Gamma _{ij}=4\left( {\text {Re}}[\left\langle J_iJ_j\right\rangle ]-\left\langle J_i\right\rangle \left\langle J_j\right\rangle \right)\)^{29}. Here, \(J_m=\sum _{i=1}^n{\mathbf {e}}_m\cdot \varvec{\sigma } ^{(i)}/2\) is the coherent spin operator in \({\mathbf {e}}_m\)-direction, \(m=x,y,z\), and \(\langle \cdot \rangle\) is the expectation value with respect to the state \(\left| \psi \right\rangle\).

Let us first discuss the \({\text {TS}}\) for the standard version of Grover’s algorithm implemented with pure states and unitary evolution, as introduced above. Without loss of generality, we consider \(\left| \omega \right\rangle =\left| 0 \right\rangle ^{\otimes n}\). This choice corresponds merely to a relabeling of the computational basis vectors of each qubit. Importantly, by this relabeling, the dynamics of the Grover search, as well as the optimized \({\text {TS}}\) of the state during the evolution, are not altered, while the calculation of \({\text {TS}}\) is highly facilitated. Since \(\left| \psi _{\rm {in}} \right\rangle\) and \(\left| 0 \right\rangle ^{\otimes n}\) are elements of the completely symmetric subspace and *G* commutes with all permutations of the qubits, the complete evolution is restricted to the symmetric subspace, facilitating the computation of \({\text {TS}}\). By neglecting terms in \({\mathcal {O}}(1/2^n)\), one can exactly compute the largest eigenvalue of \(\Gamma _{ij}\) at any step *k*, yielding the optimized \({\text {TS}}\), see Methods for details. In Fig. 1, we show the optimized \({\text {TS}}(k)\) for \(n=30\) qubits. The initially separable state \(\left| \psi _{\rm {in}} \right\rangle\) evolves into a multipartite entangled state already after the first oracle operation. Multipartite entanglement further increases until reaching a maximal value of

which occurs at \(k=k_{\rm {Gr}}/2\). This detects \((n/2+1)\)-partite entanglement during the pure state Grover algorithm. For \(k>k_{\rm {Gr}}/2\), multipartite entanglement detected by the \({\text {TS}}\) decreases until the algorithm reaches the separable target state \(\left| \omega \right\rangle\).

Since \({\text {TS}}(\rho _{\psi ,\epsilon },H)=\epsilon {\text {TS}} (\left| \psi \right\rangle \left\langle \psi \right| ,H)\), the maximal \({\text {TS}}\) during the Grover algorithm using a pseudo-pure initial state with polarization \(\epsilon\) is \({\text {TS}}_{\rm {max}}=\epsilon \sqrt{n(n+1)/2}\). Hence, \({\text {TS}}\) witnesses \(\epsilon (n+1)/2\)-partite entanglement. Note that for \(\epsilon <2/(n+1)\), \({\text {TS}}\) does not detect entanglement anymore. It was already observed that for polarizations \(\epsilon >1/2^{n/2}\) the algorithm still offers a speed-up^{3,50,51}, indicating that entanglement detected by \({\text {TS}}\) is not necessary for quantum speed-up.

### Trace speed and the algorithm under partial depolarization

The results of pseudo-pure initial states can be generalized to search dynamics subject to time-dependent partial depolarization (see Refs.^{52,53} for earlier investigations). In this case, the state after *k* steps of the algorithm is given by

where the now time-dependent decreasing polarization \(\epsilon (k)\) represents both initial impurity and partial depolarization during the algorithm. The depolarization channel is a widely used noise model whenever the exact form of the noise is not known^{54}. As a worst case noise scenario, the knowledge of the state is completely erased with some probability. As can be seen in Fig. 2, different polarization functions \(\epsilon (k)\) with the same final polarization \(\epsilon _{\rm {f}}\) can lead to different maximal \({\text {QS}}\) during the iteration. While the one-to-one correspondence between the \({\text {QS}}\) and the speed-up is generally lost, as shown below, we can still bound the speed-up using the \({\text {TS}}\).

For a partial depolarization during the algorithm it turns out that, in general, it is optimal to stop the iterations and perform the final measurement already at earlier steps \(k_{\rm {int}}<{\tilde{k}}_{\rm {Gr}}\)^{52}. We divide the examination into the cases \(k_{\rm {int}}\le k_{\rm {Gr}}/2\) and \(k_{\rm {int}}\ge k_{\rm {Gr}}/2\), that is, whether we interrupt the iteration before or after the pure state algorithm would have already reached its maximal \({\text {TS}}\), see Fig. 1. In the case \(k_{\rm {int}}\ge k_{\rm {Gr}}/2\), the cost can be bounded by \(C_{\rm {qu}}\ge K \sqrt{2^n}/\epsilon (k_{\rm {int}})\). This is because if one could completely stop the dephasing from this point, one could reduce the cost until reaching the optimal value of \(K \sqrt{2^n}/\epsilon (k_{\rm {int}})\), see Eq. (4). Since \(k_{\rm {int}}\ge k_{\rm {Gr}}/2\), we have \(\epsilon (k_{\rm {int}})\le \epsilon (k_{\rm {Gr}}/2)\) and \({\text {TS}}(k_{\rm {Gr}}/2)\le {\text {TS}}_{\rm {max}}\) (\({\text {TS}}_{\rm {max}}\) is the maximal \({\text {TS}}\) before the interruption). Finally, using \(\epsilon (k_{\rm {Gr}}/2)={\text {TS}}(k_{\rm {Gr}}/2)/{\text {TS}}^{\rm {pure}}_{\rm {max}}\), one can then bound \(C_{\rm {qu}}\ge K \sqrt{2^n}/\epsilon (k_{\rm {Gr}}/2) \ge (K \sqrt{2^n} {\text {TS}}_{\rm {max}}^{\rm {pure}})/({\rm {TS}}_{\rm {max}})\), yielding the following bound

The case \(k_{\rm {int}}\le k_{\rm {Gr}}/2\) corresponding to strong dephasing becomes more technical since, in the early regime, the maximal \({\text {TS}}\) is not simply bounded by \(\epsilon (k){\text {TS}}^{\rm {pure}}_{\rm {max}}\). However, as we show in Methods, by using the explicit form of the \({\text {TS}}\), the bound Eq. (9) still holds. At this point, the \({\text {TS}}\) stands out from other quantum statistical speeds. For instance, the bound does not hold when using the quantum Fisher information as \({\text {QS}}\). These results for the case of an interruption of the iteration due to minimization of the cost can also be applied to the case of a general interruption of the iteration. Stopping the algorithm at any time will yield an average speed-up which is always bounded by the maximal \({\text {TS}}\) occurring before the interruption.

## Discussion and conclusions

To summarize, we showed that both in the pure state version of the Grover search algorithm and a general pseudo-pure generalization, the trace speed (\({\text {TS}}\)) can be used to quantify and bound the possible speed-up over a classical search. These results offer an unprecedented connection between the speed-up in Grover’s algorithm and a physical resource beyond the case of ideal, noiseless quantum algorithms. The \({\text {TS}}\) relates the computational speed of Grover’s algorithm to both multipartite entanglement and quantum coherence. It should be noticed that the relation with multipartite entanglement depends on the *n*-qubit implementation that we have considered, while the algorithm can also be implemented with a single \(2^n\)-level system^{6}. Indeed, as mentioned above, the operating principle of the algorithm and the number of queries used (which determines the cost) do not depend on which implementation we use. Therefore, multipartite entanglement cannot be considered as the key resource for the quantum speed-up. We thus argue that the correct interpretation of our result is the evidence that the resource for speed up in query complexity is quantum coherence as captured by the \({\text {TS}}\). However, multipartite entanglement is crucial to reduce other costs such as space or energy^{6}. We point out that the interpretation of the \({\text {TS}}\) as quantum coherence holds for any implementation of the algorithm.

The role of quantum coherence during the noiseless Grover’s algorithm has already been investigated in Refs.^{46,47}. These works found a one-to-one correspondence between the \(l_1\)-norm of coherence which is decreasing during the algorithm and the increasing success probability. Both approaches have not been generalized to mixed state versions of the algorithm. In our case, a different measure of coherence, namely the \({\text {TS}}\), is connected to the average cost of the algorithm. It reaches its maximal value during the algorithm and offers a physical resource also for pseudo-pure generalizations. In Refs.^{46,47}, the \(l_1\)-norm of coherence and the relative entropy of coherence are used which detect different states as highly coherent as \({\text {TS}}\) would. For instance, while the \(l_1\)-norm detects the initial state \(\left| \psi _{\rm {in}} \right\rangle =1/\sqrt{2^n}\sum _x \left| x \right\rangle\) as maximally coherent, \({\text {TS}}\) would detect \((\left| 0 \right\rangle ^{\otimes n}+\left| 1 \right\rangle ^{\otimes n})/\sqrt{2}\) as maximally coherent. For a discussion of these so-called speakable and unspeakable coherence, see for instance Ref.^{55}.

Finally, we emphasize that the \({\text {TS}}\) can be measured or efficiently bounded experimentally. Following Refs.^{56,57}, one measures the Kolmogorov distance between the probability distribution of \(\rho (0)\) and \(\rho (t)\), for a given measurement observable. A quadratic series expansion of the Kolmogorov distance for sufficiently small *t* yields the Kolmogorov speed which is a lower bound to the TS and depends on the considered measurement observable. The TS is obtained by maximizing the Kolomogorov speed over all possible observables^{1}.

To conclude, the analysis of the \({\text {TS}}\) might inspire further investigations of the still unanswered search for the origins and quantification of quantum advantage. In particular, one could check the importance of the \({\text {TS}}\) and other quantum statistical speeds for other oracle-based quantum algorithms such as, e.g., the Deutsch-Jozsa algorithm or Simon’s algorithm, or general quantum technology tasks. Also, whether or not the \({\text {TS}}\) is a necessary resource in different noisy variations of Grover’s algorithm, merits further investigation. More general dephasing models or unitary noise could be considered that render the analysis more cumbersome. Overall, our results suggest that quantum statistical speeds can be used to recognize useful properties of quantum states for different quantum technology tasks.

## Methods

### Cost dependence for small polarizations

As discussed in the main text, for initial polarizations \(\epsilon \sim 1/2^{n}\), a classical search is less costly than performing the Grover iterations. Here, we discuss the behavior of the cost in this regime. We observe numerically that for polarizations \(\epsilon\) above a critical value \(\epsilon _c\), the minimum of the cost Eq. (2) is always obtained after \({\tilde{k}}_{\rm {Gr}}= r \sqrt{2^n}\) iteration steps, where the cost is given by \(C_{\rm {qu}}=K\sqrt{2^n}/\epsilon\) (\(K\approx 0.69\), see main text). For \(\epsilon <\epsilon _c\), the cost is minimized for \(k=0\) iterations, that is, performing a classical search with \(C_{\rm {qu}}=2^n\). The exact value of \(\epsilon _c\) is given by the equality of the costs, \(K\sqrt{2^n}/\epsilon =2^n\), yielding

Note that for small *n*, the minimization of the cost has to be performed on a discrete grid. Therefore, a case study for each *n* has to be performed.

### Optimized trace speed during the pure-state algorithm

Here, we describe the derivation of the analytical formula for the optimized trace speed during the algorithm. Since the evolution of the algorithm is restricted to the symmetric subspace, the optimized trace speed \({\text {TS}}\) during the algorithm is given by the square root of the largest eigenvalue of \(\Gamma _{ij}=4\left( {\text {Re}}[\left\langle J_iJ_j\right\rangle ]-\left\langle J_i\right\rangle \left\langle J_j\right\rangle \right)\)^{29}, where the expectation value \(\langle \cdot \rangle\) is computed with respect to the state state \(\left| \psi _k \right\rangle = \sin [(2k+1)\theta ]\left| \omega \right\rangle +\cos [(2k+1)\theta ]\left| \omega ^\perp \right\rangle\), cf. Eq. (1). The computation is straightforward, for instance, for \(J_x =\sum _{i=1}^n\sigma ^{(i)}_x/2\), one finds that

Eventually, we obtain

where we defined \(\theta _k = (2k+1)\theta\). Taking the square root of the largest eigenvalue and neglecting terms of order \({\mathcal {O}}(1/2^n)\), we find the optimized \({\text {TS}}\) after the *k*-th step of the pure-state algorithm as

with \(f(k)=\cos [4(2k+1)\theta ]\).

### Partial depolarization

Here, we discuss the case of an interruption of the search algorithm at an early step \(k\le k_{\rm {Gr}}/2\), i.e., at a step where the pure state algorithm would not have reached its maximal \({\text {TS}}\) yet. The cost for stopping the algorithm at step *k* is given by \(C_{\rm {qu}}(k)=(k+1)/(\epsilon (k)\sin ^2((2k+1)\theta ))\), see Eq. (1) in the main text. The \({\text {TS}}\) at step *k* still fulfills \({\text {TS}}(k)=\epsilon (k){\text {TS}}_{\rm {pure}}(k)\), where \({\text {TS}}_{\rm {pure}}(k)\) is the \({\text {TS}}\) in the pure state algorithm, see Fig. 1 in the main text. Therefore, we have

where \({\text {TS}}_{\rm {max}}\) is the maximal \({\text {TS}}\) until the interruption step *k* and we regrouped all other factors into *a*(*k*). To further examine this expression, we use the exact form of the pure state \({\text {TS}}\), \({\text {TS}}_{\rm {pure}}(k)\), cf. Eq. (13). We can then compare the factor *a*(*k*) with the factor \(b=K\sqrt{2^n}\sqrt{n(n+1)/2}\) from the current bound, Eq. (9) in the main text. By writing \(x=k/\sqrt{2^n}\), one finds for large *n*

For \(0\le x\le \pi /8\) (\(0\le k\le \pi /8 \sqrt{2^n} = k_{\rm {Gr}}/2\)) and using \(K\approx 0.69\), one finds that \(a(k)-b>0\). Therefore, the bound of Eq. (9) still holds for the regime \(k\le k_{\rm {Gr}}/2\).

## References

Nielsen, M. A. & Chuang, I.

*Quantum Computation and Quantum Information*(Cambridge University Press, Cambridge, 2000).Kaye, P.

*et al.**An Introduction to Quantum Computing*(Oxford University Press, Oxford, 2007).Vedral, V. The elusive source of quantum speedup.

*Found. Phys.***40**, 1141–1154 (2010).Jozsa, R. Entanglement and quantum computation. Preprint at http arXiv:9707034 (1997).

Ekert, A. & Jozsa, R. Quantum algorithms: Entanglement-enhanced information processing.

*Phil. Trans. R. Soc. Lond. A***356**, 1769–1782 (1998).Lloyd, S. Quantum search without entanglement.

*Phys. Rev. A***61**, 010301(R) (1999).Linden, N. & Popescu, S. Good dynamics versus bad kinematics: Is entanglement needed for quantum computation?.

*Phys. Rev. Lett.***87**, 047901 (2001).Jozsa, R. & Linden, N. On the role of entanglement in quantum-computational speed-up.

*Proc. Roy. Soc. A***459**, 2011–2032 (2003).Vidal, G. Efficient classical simulation of slightly entangled quantum computations.

*Phys. Rev. Lett.***91**, 147902 (2003).Biham, E., Brassard, G., Kenigsberg, D. & Mor, T. Quantum computing without entanglement.

*Theor. Comp. Sci.***320**, 15–33 (2004).Kenigsberg, D., Mor, T. & Ratsaby, G. Quantum advantage without entanglement.

*Quantum Inf. Comp.***6**, 606–615 (2006).Horodecki, R., Horodecki, P., Horodecki, M. & Horodecki, K. Quantum entanglement.

*Rev. Mod. Phys.***81**, 865–942 (2009).Van den Nest, M. Universal quantum computation with little entanglement.

*Phys. Rev. Lett.***110**, 060504 (2013).Bernstein, E. & Vazirani, U. Quantum complexity theory.

*SIAM J. Comp.***26**, 1411–1473 (1997).Datta, A., Shaji, A. & Caves, C. M. Quantum discord and the power of one qubit.

*Phys. Rev. Lett.***100**, 050502 (2008).Hillery, M. Coherence as a resource in decision problems: The deutsch-jozsa algorithm and a variation.

*Phys. Rev. A***93**, 012111 (2016).Ma, J., Yadin, B., Girolami, D., Vedral, V. & Gu, M. Converting coherence to quantum correlations.

*Phys. Rev. Lett.***116**, 160407 (2016).Matera, J. M., Egloff, D., Killoran, N. & Plenio, M. B. Coherent control of quantum systems as a resource theory.

*Quantum Sci. Technol.***1**, 01LT01 (2016).Howard, M., Wallman, J., Veitch, V. & Emerson, J. Contextuality supplies the magic for quantum computation.

*Nature***510**, 351–355 (2014).Cai, Y., Le, H. N. & Scarani, V. State complexity and quantum computation.

*Ann. Phys.***527**, 684–700 (2015).Stahlke, D. Quantum interference as a resource for quantum speedup.

*Phys. Rev. A***90**, 022302 (2014).Wootters, W. K. Statistical distance and hilbert space.

*Phys. Rev. D***23**, 357–362 (1981).Petz, D. Monotone metrics on matrix spaces.

*Linear Algebra Appl.***244**, 81–96 (1996).Spehner, D. Quantum correlations and distinguishability of quantum states.

*J. Math. Phys.***55**, 075211 (2014).Braunstein, S. L. & Caves, C. M. Statistical distance and the geometry of quantum states.

*Phys. Rev. Lett.***72**, 3439–3443 (1994).Gessner, M. & Smerzi, A. Statistical speed of quantum states: Generalized quantum fisher information and schatten speed.

*Phys. Rev. A***97**, 022109 (2018).Helstrom, C. W.

*Quantum Detection and Estimation Theory*(Academic Press, New York, 1976).Pezzé, L. & Smerzi, A. Entanglement, nonlinear dynamics, and the heisenberg limit.

*Phys. Rev. Lett.***102**, 100401 (2009).Hyllus, P.

*et al.*Fisher information and multiparticle entanglement.*Phys. Rev. A***85**, 022321 (2012).Tóth, G. Multipartite entanglement and high-precision metrology.

*Phys. Rev. A***85**, 022322 (2012).Pezzè, L., Smerzi, A., Oberthaler, M. K., Schmied, R. & Treutlein, P. Quantum metrology with nonclassical states of atomic ensembles.

*Rev. Mod. Phys.***90**, 035005 (2016).Tóth, G. & Apellaniz, I. Quantum metrology from a quantum information science perspective.

*J. Phys. A***47**, 424006 (2014).Grover, L. K. Quantum mechanics helps in searching for a needle in a haystack.

*Phys. Rev. Lett.***79**, 325 (1997).Braunstein, S. L. & Pati, A. K. Speed-up and entanglement in quantum searching.

*Quantum Inform. Comput.***2**, 399 (2002).Marvian, I. & Spekkens, R. W. Extending noether’s theorem by quantifying the asymmetry of quantum states.

*Nat. Commun.***5**, 3821 (2014).Streltsov, A., Adesso, G. & Plenio, M. B. Colloquium: Quantum coherence as a resource.

*Rev. Mod. Phys.***89**, 041003 (2017).Zalka, C. Grover’s quantum searching algorithm is optimal.

*Phys. Rev. A***60**, 2746–2751 (1999).Bennett, C. H., Bernstein, E., Brassard, G. & Vazirani, U. Strengths and weaknesses of quantum computing.

*SIAM J. Comp.***26**, 1510–1523 (1997).Caves, C. M., Deutsch, I. H. & Blume-Kohout, R. Physical-resource requirements and the power of quantum computation.

*J. Opt. B: Quantum Semiclass. Opt.***6**, S801–S806 (2004).Bhattacharya, N., van Linden van den Heuvell, H. B. & Spreeuw, R. J. C. Implementation of quantum search algorithm using classical fourier optics.

*Phys. Rev. Lett.***88**, 137901 (2002).Bruß, D. & Macchiavello, C. Multipartite entanglement in quantum algorithms.

*Phys. Rev. A***83**, 052313 (2011).Meyer, D. A. & Wallach, N. R. Global entanglement in multiparticle systems.

*J. Math. Phys.***43**, 4273–4278 (2002).Fang, Y.

*et al.*Entanglement in the grover search algorithm.*Phys. Lett. A***345**, 265–272 (2005).Rungta, P. The quadratic speedup in grovers search algorithm from the entanglement perspective.

*Phys. Lett. A***373**, 2652–2659 (2009).Rossi, M., Bruß, D. & Macchiavello, C. Scale invariance of entanglement dynamics in grovers quantum search algorithm.

*Phys. Rev. A***87**, 022331 (2013).Shi, H.-L.

*et al.*Coherence depletion in the grover quantum search algorithm.*Phys. Rev. A***95**, 032307 (2017).Anand, N. & Pati, A. K. Coherence and entanglement monogamy in the discrete analogue of analog grover search. Preprint at arXiv:1611.04542 (2016).

Pan, M. & Qiu, D. Operator coherence dynamics in grovers quantum search algorithm.

*Phys. Rev. A***100**, 012349 (2019).Gory, D. G., Fahmy, A. F. & Havel, T. F. Ensemble quantum computing by nuclear magnetic resonance spectroscopy.

*Proc. Natl. Acad. Sci. USA***94**, 1634 (1997).Biham, E. & Kenigsberg, D. Grovers quantum search algorithm for an arbitrary initial mixed state.

*Phys. Rev. A***66**, 062301 (2002).Kay, A. Degree of quantum correlation required to speed up a computation.

*Phys. Rev. A***92**, 062329 (2015).Cohn, I., De Oliveira, A. L. F., Buksman, E. & De Lacalle, J. G. L. Grover’s search with local and total depolarizing channel errors: Complexity analysis.

*Int. J. Quantum Inf.***14**, 1650009 (2016).Vrana, P., Reeb, D., Reitzner, D. & Wolf, M. M. Fault-ignorant quantum search.

*New J. Phys.***16**, 073033 (2014).Wilde, M. M.

*Quantum Information Theory*(Cambridge University Press, Cambridge, 2013).Marvian, I. & Spekkens, R. W. How to quantify coherence: Distinguishing speakable and unspeakable notions.

*Phys. Rev. A***94**, 052324 (2016).Strobel, H.

*et al.*Fisher information and entanglement of non-Gaussian spin states.*Science***345**, 424–427 (2014).Pezzè, L., Li, Y., Li, W. & Smerzi, A. Witnessing entanglement without entanglement witness operators.

*Proc. Natl. Acad. Sci. USA***113**, 11459–11464 (2016).

## Acknowledgements

The authors acknowledge financial support from the European Union’s Horizon 2020 research and innovation programme—Qombs Project, FET Flagship on Quantum Technologies Grant no. 820419.

## Author information

### Authors and Affiliations

### Contributions

V.G., L.P. and A.S. all contributed equally to this work.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Additional information

### Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Gebhart, V., Pezzè, L. & Smerzi, A. Quantifying computational advantage of Grover’s algorithm with the trace speed.
*Sci Rep* **11**, 1288 (2021). https://doi.org/10.1038/s41598-020-80153-z

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41598-020-80153-z

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.