Coherence Depletion in Quantum Algorithms

Besides the superior efficiency compared to their classical counterparts, quantum algorithms known so far are basically task-dependent, and scarcely any common features are shared between them. In this work, however, we show that the depletion of quantum coherence turns out to be a common phenomenon in these algorithms. For all the quantum algorithms that we investigated, including Grover’s algorithm, Deutsch–Jozsa algorithm, and Shor’s algorithm, quantum coherence of the system states reduces to the minimum along with the successful execution of the respective processes. Notably, a similar conclusion cannot be drawn using other quantitative measures such as quantum entanglement. Thus, we expect that coherence depletion as a common feature can be useful for devising new quantum algorithms in the future.


I. INTRODUCTION
The emergence of quantum algorithms that are able to solve problems exponentially faster than any classical algorithms is one of the leading incentives for the rapid development of quantum information science over the last three decades.Especially exciting is the new concept of computing that makes use of quantum fundamental principles, coined quantum computing [1].In 1992, the Deutsch-Jozsa (DJ) algorithm [2] was first proposed, which can confirm a given function's type with only one single evaluation, compared to at worst 2 n−1 + 1 (n being the number of two-valued digits) queries by any possible classical algorithms.Moreover, the DJ algorithm is deterministic in the sense that it can always produce the correct answer, which greatly improves the original solution by Deutsch [3] that can only succeed with probability half.Soon, the basic problem of factoring a large integer was offered a new quantum solution, that is, Shor's algorithm [4].The exponentially faster speedup over any classical approaches could be used to break public-key cryptography schemes such as the widely-used Rivest-Shamir-Adleman (RSA) scheme once a quantum computer were built.Then, it is Grover's search algorithm [5] which is used to locate a target item in an unsorted database.For this problem, Grover's algorithm runs only quadratically faster compared to any classical algorithms, but it has been proven to be asymptotically optimal [6].
Coincidentally, all the quantum algorithms mentioned above were proposed in the 1990s.Since the dawn of this century, however, no new quantum algorithms were designed that are comparable in impact with the existing ones.One of the possible reasons lies in the fact that all the quantum algorithms known so far are basically taskdependent, in other words, they share very few common features, if there were any.Along with this line, the series of works by Latorre and coauthors [7][8][9] reported that all known efficient quantum algorithms obey a majorization principle.To be more precise, the time arrow in these algorithms is a majorization arrow, which is conjectured to be a sort of driving force for the respective processes.Besides this one, there are no other general principles being discovered ever since.
In this paper, however, we present a new principle underlining the efficient quantum algorithms in terms of quantum coherence (see Sec. II for a brief review).Specifically, we find that coherence of the system states all reduces to the minimum along with the successful execution of the respective algorithms.In a rough sense, this is a "coherence arrow" in quantum-algorithm design, but with many flexibilities.This principle is similar to the majorization principle, with possible reasons being that both the concepts of coherence and majorization make use of only partial information of the density matrix and both are basis dependent [10,11].However, unlike the descriptive nature of majorization, quantum coherence can be defined quantitatively using various coherence measures.In this aspect, the general principle that we find with coherence is a more versatile tool compared to the majorization principle for quantum-algorithm design.On the other hand, a similar conclusion cannot be drawn using other quantitative measures including quantum entanglement, which may be argued that entanglement is a property of the entire density matrix [12].
Actually, the analysis of quantum algorithms using coherence is not new [13][14][15], but the respective algorithms were considered independently in these works.For instance, in Ref. [13] the author examined the role played by coherence as a resource in the Deutsch-Jozsa and related algorithms, and found that the less of coherence there is, the worse the algorithm will perform.Although from different perspectives, both of Refs.[14,15] reported that the success probability of Grover's algorithm relies on coherence.Nevertheless, the results presented in this paper give a combined view of all the quantum algorithms known so far with coherence.
This paper is organized as follows.In Sec.II, we review briefly the resource theory of quantum coherence, and introduce the commonly-used coherence measures.

arXiv:1808.02222v1 [quant-ph] 7 Aug 2018
Then we start with the investigation of Grover's algorithm in Sec.III, where the evolution of quantum coherence is thoroughly analyzed.Next, we move on to the Deutsch-Jozsa algorithm in Sec.IV and Shor's algorithm in Sec.V.In Sec.VI, the consequences of coherence played in quantum-algorithm design are discussed, along with a comparison with other quantitative measures such as quantum entanglement.We close with a short conclusion in Sec.VII.
Along with the rapid development of quantum information science, an alternative way of assessing quantum phenomena as resources has appeared.Consequently, many tasks that are not previously possible within the realm of classical physics may be now exploited with the new approach.This resource-driven viewpoint has motivated the development of a quantitative theory that captures the resource character of physical properties in a mathematically rigorous manner.The formulation of such resource theories was initially pursued with the quantitative theory of entanglement [16,17], but has since spread to encompass many other operational settings, including quantum coherence [18][19][20]; see Ref. [21] for a recent review.
Resource theory provides a unified framework for studying resource quantification and manipulations under restricted operations that are deemed free.For coherence, we are restricted to incoherent operations, so only incoherent states are free.Recall that a state is incoherent if it is diagonal in the reference basis.Recently, it has been demonstrated that coherence can be converted to other quantum resources, such as entanglement and discord by certain operations [22][23][24].However, compared to entanglement and discord, evidences show that coherence may be a potentially more fundamental quantum resource [25].To quantify coherence, a rigorous framework has been proposed by Baumgratz et al. in Ref. [26].In this work, we will focus on the two most commonly-used coherence measures, namely, the relative entropy of coherence and the l 1 -norm of coherence.
The relative entropy of coherence [26] is defined as where S(ρ) = −tr(ρ log 2 ρ) is the von Neumann entropy and ρ diag = i ρ ii |i i| denotes the state obtained from ρ by deleting all the off-diagonal elements.For pure states, the von Neumann entropy is 0, so the relative entropy can be simplified to The l 1 -norm of coherence [26] is defined intuitively as which comes from the fact that coherence is tied to the off-diagonal elements of the states.Recently, it is demonstrated by Zhu et al. [27] that the l 1 -norm of coherence is the analog of negativity in entanglement theory and sum negativity in the resource theory of magic-state quantum computation.It is worth mentioning that both the relative entropy and the l 1 -norm are proper measures of quantum coherence.

III. GROVER'S ALGORITHM
We start with Grover's algorithm [5], which is a quantum search algorithm that runs quadratically faster than any equivalent classical algorithms.Given an unsorted database with N items, this algorithm is able to find the target item using only O( √ N ) steps, compared to at least O(N ) steps required by any classical schemes.
Although not offering an exponential speedup, Grover's algorithm has been proven to be asymptotically optimal for the search problem [6].For convenience, we assume N = 2 n such that the N entries in the database can be supplied by n qubits.Let f (x) be a function that takes in index x = 0, 1, . . ., N − 1, and outputs f (x) = 1 if x is a solution to the search problem, and f (x) = 0 otherwise.
Grover's algorithm begins with the initialized equal superposition state, which has the maximal coherence Suppose there are exactly M solutions in the database with 1 ≤ M ≤ N , we can reexpress |ψ (0) as where |α represents the group of states that are not solutions to the search problem (marked by x n below), while |β represents those that are solutions (marked by x s ).Explicitly, we have Then, a subroutine known as the Grover iteration is applied to |ψ (0) repeatedly.The Grover iteration consists of two basic operations G = DO, i.e., l 1 being the l1-norm of coherence in Eq. (13b).The plots show the results with M = 1, 2, 4 and 16 solutions respectively.The minimal values indicate that an solution is found.As we can see, with the number of possible solutions increased, not only the number of Grover iterations needed decreases, but also the minimal value of coherence increases accordingly.See text and Fig. 2 for more details.
where O is an oracle (a black-box operation), and D is the Grover diffusion operator.After k iterations of applying G, the state becomes where It is not difficult to see that, with high probabilities, a solution to the search problem can be obtained by having such that Note that the oracle O only marks the solution by changing the phase of state |β , i.e., so this operation will not change the coherence.It is the operation D that indeed changes the coherence.In Fig. 1, we plot the values of coherence with respect to the number of Grover iterations k, for the case of n = 10 qubits.Note that in Fig. 1 l1 + 1).As can be seen, a solution to the search problem is found when the coherence first reaches the minimum value, that is, when At this point, the task of Grover's algorithm is actually completed.However, if the Grover iteration is continued, a periodic feature of the coherence appears such that we will get the solution again around 2k * iterations.This observation is repeated as long as the Grover iteration goes on.
Another phenomenon from the plots is as follows: with the number of possible solutions increased, not only the number of Grover iterations needed decreases, but also the minimal value of coherence gets bigger accordingly.This is easy to understand as several answers (M > 1) make up a superposition state of which the coherence is finite; see Fig. 2. To understand it better, let's look at the derivatives of the coherence in Eq. ( 13), which are given by dC By forcing the derivatives to be zero, we get four different cases: 1. cos 2k+1 2 θ = 0 corresponds to the minimal values in Fig. 1, namely the solution state |β .

cot 2 2k+1
2 θ = cot 2 θ 2 corresponds to the maximal values in Fig. 1.Because of the square in this solution, there are actually two peaks close to each other (not quite visible if the number of solutions M is small).The right peak corresponds to the superposition state |ψ (0) , while the left one corresponds to O|ψ (0) .

cos 2k+1
2 θ = ±1 corresponds to the local minimal values between the two peaks in Fig. 1.Because the distance between these two peaks is exactly 1 and we are considering discrete operations, so this local valley has no physical meaning.4. θ = 0 means that there is no solution, i.e., M = 0.
To summarize, one learns that the reduction of quantum coherence can be used as a general principle for the successful executions of Grover's algorithm.We will see later that the same conclusion can be drawn for other quantum algorithms including the Deutsch-Jozsa algorithm and Shor's algorithm.

IV. DEUTSCH-JOZSA ALGORITHM
Given a function f (x) defined over the variable x = 0, 1, . . ., 2 n − 1 with n being the number of dichotomicvalued digits, the Deutsch-Jozsa (DJ) algorithm [2] aims to confirm whether f (x) is constant for all values of x, or else it is balanced, namely f (x) = 1 for exactly half of all possible x, and 0 for the other half.Although of little practical use, the DJ algorithm is deterministic in the sense that it can always produce the correct answer using only one correspondence, whereas it requires at worst 2 n−1 + 1 queries for any possible classical algorithms.
Same as Grover's algorithm, the DJ algorithm begins by first preparing the equal superposition state of Eq. ( 4), which has the maximal coherence However, unlike Grover's algorithm, no iteration is needed in the DJ algorithm.The next step is an oracle U f : |x → (−1) f (x) |x that transforms the state to which leaves the coherence unchanged.The final step of the DJ algorithm is to apply the Hadamard gate H, such that the state becomes where x • y is the bitwise inner product of x and y.Now, by examining the probability of measuring |0 ⊗n , i.e., x (−1) f (x) /2 n 2 , one gets 1 if f (x) is constant and 0 if it is balanced.Depending on the function type of f (x), the coherence of |ψ (2) can have the following two cases: the coherence of which is C (2) For the second case, the coherence has a range instead of a single value due to the possible different forms of the balanced function.For instance, if f (x) takes values 01010101 • • • (for more than three qubits), then |ψ (2)  is nothing but a basis state with coherence being zero.But, if f (x) takes the sequence such as 01100101 • • • , then |ψ (2) is a superposition of basis states with nonzero coherence.Notably, the coherence cannot take the maximal value as that in Eq. ( 17), because the basis state |0 disappears in |ψ (2) for the balanced case.Therefore, no matter what the function type of f (x) is, we find that the coherence of the system state always decreases once the algorithm stops.Again, coherence reduction can be used as a good signature to signal the success of the DJ algorithm.
V. SHOR'S ALGORITHM/QUANTUM ORDER-FINDING Shor's algorithm [4] is a particular instance of the family of quantum phase-estimation algorithms [28].Informally, Shor's algorithm solves the following problem: given an integer N , find its prime factors.The crucial step in Shor's algorithm is the so-called quantum order-finding (QOF) subroutine which offers the quantum speedup over any classical approaches.For two positive integers x and N , the objective of QOF is to determine the order of x modulo N , which is defined as the least integer r > 0, such that x r = 1(mod N ).
The QOF subroutine begins with t = 2L + 1 + log(2 + 1 2 ) qubits initialized to |0 (the first register) and L qubits initialized to |1 (the second register), where L ≡ log(N ) denotes the closest integer larger than log(N ) and is the error tolerance.Application of the Hadamard gate H on the first register transforms the initial state to which has the maximal coherence on the first t qubits, i.e., Then a black box operation U x,N : |j |k → |j |x j (mod N ) transforms the state to Although the state |ψ (1) looks rather different from |ψ (0) , its coherence (on the first t qubits) does not change, namely

C
(1) Because of the periodic nature of the component |x j (mod N ) , the state |ψ (1) can be approximated as The period of the phase in |ψ (1) can be obtained by applying inverse Fourier transform to the first register, such that where | s/r is a pretty good approximation of the phase s/r.Now, coherence of the state |ψ (2) becomes

C
(2) which are functions of the solution r.Finally, by measuring the first t qubits, the solution r is obtained by applying the continued fractions algorithm [1].Once again, we find that coherence of the system state reduces to the minimum by the end of the QOF subroutine, in turn also in Shor's algorithm.

VI. DISCUSSION
For all the quantum algorithms that we have explored including Grover's algorithm, DJ algorithm and Shor's algorithm, we find that quantum coherence plays a consistent role for signaling the completion of all processes.To be more precise, upon successful executions of these algorithms, coherence of the respective systems all reduces to the minimum compared to the initial values.It is thus reasonable to conjecture that coherence reduction can be used as a general principle for quantum-algorithm design.Therefore, besides the majorization principle reported in Refs.[7][8][9], we find yet another general principle for quantum algorithms.However, unlike the descriptive nature of majorization, quantum coherence can be defined quantitatively using various coherence measures.In this aspect, the general principle that we find with coherence is a more versatile tool compared to the majorization principle for quantum-algorithm design.
Specifically, all the three quantum algorithms begin with the equal superposition state which has the maximal coherence.Then, an oracle is applied, which leaves the coherence unchanged.The final step can be seen as an adjustment for the system states, that is, diffusion operation for Grover's algorithm, Hadamard operation for DJ algorithm, and quantum inverse Fourier transform for Shor's algorithm.It is this final step of operation that indeed reduces the coherence.As a guide for future quantum-algorithm design, the coherence-reduction operation is suggested to be an indispensable requirement for the relevant processes, without which the quantum algorithm cannot be efficient nor even successful.
Then, it is natural to ask whether other quantitative measures such as entanglement may play a similar role as coherence in quantum algorithms.Unfortunately, the answer is negative.Our calculation and also many previous works show that a general principle cannot be drawn using entanglement.For instance, in Refs.[29][30][31] the authors analyzed thoroughly the entanglement properties in Shor's algorithm, and found that entanglement may vary with different entanglement measures.Then, similar conclusions were reported in Refs.[32][33][34][35] for the DJ algorithm.One of the possible reasons for the failure of using entanglement as a signature is due to the differences in definitions of entanglement and coherence (also majorization).Quantum entanglement describes the property of the entire density matrix [12], while coherence and majorization capture only partial information of the density matrix.Moreover, both the concepts of coherence and majorization are basis dependent [10,11].
No doubt that entanglement is a key (but not really sufficient [17]) resource for the quantum speedup in all these algorithms, it cannot be used as a general principle for quantum-algorithm design.Actually, it is an NPhard problem [36,37] to even detect entanglement if the system size is large, let alone to quantify it.For multipartite quantum systems, entanglement can be classified into different forms depending on how the subsystems are distributed.This complexity further makes any possible entanglement measures hard to compute.Therefore, although essential for the quantum speedup, entanglement is not a good signature to use for quantum algorithms as compared to coherence.Moreover, this fact also serves as an additional evidence that coherence may be a potentially more fundamental quantum resource than entanglement and discord, as initially argued in Ref. [25].

VII. CONCLUSION
The scarceness of efficient quantum algorithms suggests that maybe some basic principles are missing for quantum-algorithm design.In this paper, we have explored the possibility of considering the reduction of quantum coherence as a simple yet general principle for quantum-algorithm design.For all the three quantum algorithms that we investigated including Grover's algorithm, Deutsch-Jozsa algorithm and Shor's algorithm, quantum coherence of the system states all reduces to the minimum along with the successful execution of the respective algorithms.However, a similar principle cannot be drawn using other quantitative measures such as quantum entanglement.Thus, besides the fundamental interests in resource theory, this special feature of quantum coherence is expected to be useful for devising new quantum algorithms in future.

FIG. 1 .
FIG. 1.In the case of n = 10 qubits, we plot the values of coherence with respect to the number of Grover iterations k: (a) the relative entropy of coherence C (k) r in Eq. (13a); (b) C Grover iterations, where the symbol • denotes the closest integer to the rational number inside.Next, we calculate the quantum coherence of state |ψ (k) , FIG. 2. Minimal coherence of the system state with respect to logarithm of the number of solutions log 2 M .As we can see, with the number of solutions M increased, the minimal value of coherence gets bigger which clearly indicates a superposition state consisting of more terms.