Understanding and quantifying the key resource for the speed-up of quantum computations1,2 has been a highly disputed topic over the past few decades3. There has been particular interest in the role played by entanglement4,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 entanglement8,9. However, it was shown that a polynomial advantage can be achieved without entanglement14. 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 resources3,15. Furthermore, it was shown that several entanglement measures cannot quantify advantages of many quantum algorithms13. Other possible resources have been considered such as coherence16,17,18, distinguishability3, contextuality19, tree size20 and interference21. 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 speeds22,23,24,25,26 offer a possible approach to quantify useful resources in quantum technology tasks. As a major example, the quantum Fisher information25,27, which is the quantum statistical speed associated with the Bures distance25, was shown to fully characterize metrologically useful entanglement28,29,30, that is, the entanglement necessary for sub-shot-noise phase estimation sensitivities31,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 distance1,23, to quantify the speed-up in Grover’s algorithm33 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 models34, 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 entanglement26. 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.


Grover’s algorithm and its cost

Grover’s search algorithm33 is one of the most important protocols of quantum computation1,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 systems6, 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 by2

$$\begin{aligned} \left| \psi _k \right\rangle = \sin [(2k+1)\theta ]\left| \omega \right\rangle +\cos [(2k+1)\theta ]\left| \omega ^\perp \right\rangle , \end{aligned}$$

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 state34. Simply counting the oracle applications is also known as query complexity2, while other complexities such as gate complexity are usually not considered in Grover’s algorithm (see6 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 by34

$$\begin{aligned} C_{\rm {qu}}(k)=\dfrac{k+1}{p_k}. \end{aligned}$$

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 search37. 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 optimal37,38.

Grover’s algorithm can be executed on a single multimode system and, therefore, simply makes use of superposition and constructive interference6,39,40. However, in order to reduce exponential overhead in space, time or energy, one usually considers a system composed of many qubits6,39. In this case, different measures of bipartite and multipartite entanglement have been used to detect entanglement during Grover’s algorithm41,42,43,44,45. Genuine multipartite entanglement was shown to be present already after the first step of the noiseless algorithm41. 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 coherence46,47,48 and quantum discord46 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 state49, 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

$$\begin{aligned} \rho _{\psi ,\epsilon }=\epsilon \left| \psi \right\rangle \left\langle \psi \right| +\dfrac{1-\epsilon }{2^n}{\mathbb {I}}. \end{aligned}$$

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 dominant7. 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 speeds26. 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

$$\begin{aligned} C_{\rm {qu}}(n,{\text {QS}}_{\rm {max}})=K\sqrt{2^n} \frac{{\text {QS}}^{\rm {pure}}_{\rm {max}}}{{\text {QS}}_{\rm {max}}}, \end{aligned}$$

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

$$\begin{aligned} S= \frac{\sqrt{2^n}}{2 K}\frac{{\text {QS}}_{\rm {max}}}{{\text {QS}}^{\rm {pure}}_{\rm {max}}}. \end{aligned}$$

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 H35. That is, the \({\text {TS}}\) quantifies the distinguishability between \(\rho\) and \(\rho (t)=e^{-iHt}\rho e^{iHt}\) for small t. It is defined as1,26,35

$$\begin{aligned} {\text {TS}}(\rho ,H) = \left\Vert \partial _t \rho (t) \big |_{t=0} \right\Vert _1 = \left\Vert \left[ \rho , H \right] \right\Vert _1 , \end{aligned}$$

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 asymmetry35: 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 information23. 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 entangled26,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

$$\begin{aligned} {\text {TS}}^{\rm {pure}}_{\rm {max}}=\sqrt{\dfrac{n(n+1)}{2} } \end{aligned}$$

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\).

Figure 1
figure 1

The dependence of the optimized trace speed \({\text {TS}}\) on the iteration step k in the pure state Grover’s algorithm (solid line). The dashed lines indicate thresholds above which \({\text {TS}}\) detects bipartite (\(\sqrt{n}\)), three-partite (\(\sqrt{2n}\)) and (\(n/2+1\))-partite (\(\sqrt{n^2/2}\)) entanglement. Here, \(n=30\), \(k_{\rm {Gr}}\approx (\pi /4)\sqrt{2^n}\).

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-up3,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

$$\begin{aligned} \rho _k=\epsilon (k)\left| \psi _k \right\rangle \left\langle \psi _k \right| +\dfrac{1-\epsilon (k)}{2^n}{\mathbb {I}}, \end{aligned}$$

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 known54. 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}}\).

Figure 2
figure 2

Trace speed during the pseudo-pure version of Grover’s algorithm. Polarizations \(\epsilon (k)\) (orange lines) and trace speeds \({\text {TS}}(k)\) (blue lines) for an initial pseudo-pure state without dephasing (solid), an initial pure state with linearly decaying polarization (dotted) and an initial pure state with exponentially decaying polarization (dash-dotted). Here, \(n=30\), \(\epsilon _{\rm {f}}=0.3\), \(k_{\rm {Gr}}\approx (\pi /4)\sqrt{2^n}\).

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

$$\begin{aligned} S \le \frac{\sqrt{2^n}}{2 K}\frac{{\text {TS}}_{\rm {max}}}{{\text {TS}}^{\rm {pure}}_{\rm {max}}}. \end{aligned}$$

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 system6. 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 energy6. 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 observables1.

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.


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

$$\begin{aligned} \epsilon _c=\frac{K}{\sqrt{2^n}}. \end{aligned}$$

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

$$\begin{aligned} \langle J_x \rangle&= \frac{1}{2}\sum _{i=1}^n\left\langle \psi _k\right| \sigma ^{(i)}_x \left| \psi _k\right\rangle \nonumber \\&= \frac{n}{2}\left\langle \psi _k\right| \sigma ^{(1)}_x \left| \psi _k\right\rangle \nonumber \\&= \frac{n}{2} \cos ^2[(2k+1)\theta ] + {\mathcal {O}}(1/2^n). \end{aligned}$$

Eventually, we obtain

$$\begin{aligned} \Gamma = \begin{pmatrix} n+n(n-1)\cos ^2\theta _k- n^2 \cos ^4\theta _k &{} 0 &{} -n^2 \sin ^2\theta _k\cos ^2\theta _k\\ 0 &{} n &{} 0 \\ -n^2 \sin ^2\theta _k\cos ^2\theta _k &{} 0 &{} n+n(n-1)\sin ^2\theta _k - n^2 \sin ^4\theta _k, \end{pmatrix}+ {\mathcal {O}}(1/2^n), \end{aligned}$$

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

$$\begin{aligned} {\text {TS}}_{\rm {pure}}(k) =\sqrt{\frac{1}{8}n\left( 4+n-f(k)n+\sqrt{8[1+f(k)]+n^2[1-f(k)]^2}\right) } + {\mathcal {O}}(1/2^n). \end{aligned}$$

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

$$\begin{aligned} C_{\rm {qu}}(k)&=\frac{k+1}{\sin ^2 [(2k+1)\theta ]}\frac{{\text {TS}}_{\rm {pure}}(k)}{{\text {TS}}(k)}\nonumber \\&\ge \frac{k+1}{\sin ^2[(2k+1)\theta ]}\frac{{\text {TS}}_{\rm {pure}}(k)}{{\text {TS}}_{\rm {max}}}\nonumber \\&=\frac{a(k)}{{\text {TS}}_{\rm {max}}} \end{aligned}$$

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

$$\begin{aligned} a(k)- b = \frac{n\sqrt{2^n}}{\sqrt{8}\sin ^2(2x)}\left[ K(\cos (4x)-1)+2x\sin 4x\right] . \end{aligned}$$

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\).