arXiv Vanity renders academic papers from arXiv as responsive web pages so you don’t have to squint at a PDF. Read this paper on arXiv.org.

# [

[ Clarendon Laboratory, Department of Physics, University of Oxford,
Parks Road, Oxford OX1 3PU, U.K.
Department of Computer Science, University of Calgary
I.S.I. Foundation, Villa Gualino, Viale Settimio Severo 65, 1033 Torino, Italy.
Mathematical Institute, University of Oxford, 24-29 St. Giles’, Oxford OX1 3LB, U.K.
###### Abstract

Quantum computers use the quantum interference of different computational paths to enhance correct outcomes and suppress erroneous outcomes of computations. A common pattern underpinning quantum algorithms can be identified when quantum computation is viewed as multi-particle interference. We use this approach to review (and improve) some of the existing quantum algorithms and to show how they are related to different instances of quantum phase estimation. We provide an explicit algorithm for generating any prescribed interference pattern with an arbitrary precision.

Quantum Algorithms Revisited]Quantum Algorithms Revisited

R. Cleve, A. Ekert, C. Macchiavello and M. Mosca] R. Cleve, A. Ekert, C. Macchiavello and M. Mosca

## 1 Introduction

Quantum computation is based on two quantum phenomena: quantum interference and quantum entanglement. Entanglement allows one to encode data into non-trivial multi-particle superpositions of some preselected basis states, and quantum interference, which is a dynamical process, allows one to evolve initial quantum states (inputs) into final states (outputs) modifying intermediate multi-particle superpositions in some prescribed way. Multi-particle quantum interference, unlike single particle interference, does not have any classical analogue and can be viewed as an inherently quantum process.

It is natural to think of quantum computations as multi-particle processes (just as classical computations are processes involving several “particles” or bits). It turns out that viewing quantum computation as multi-particle interferometry leads to a simple and a unifying picture of known quantum algorithms. In this language quantum computers are basically multi-particle interferometers with phase shifts that result from operations of some quantum logic gates. To illustrate this point, consider, for example, a Mach-Zehnder interferometer (Fig. 1a).

A particle, say a photon, impinges on a half-silvered mirror, and, with some probability amplitudes, propagates via two different paths to another half-silvered mirror which directs the particle to one of the two detectors. Along each path between the two half-silvered mirrors, is a phase shifter. If the lower path is labelled as state and the upper one as state then the state of the particle in between the half-silvered mirrors and after passing through the phase shifters is a superposition of the type , where and are the settings of the two phase shifters. This is illustrated in Fig. 1a. The phase shifters in the two paths can be tuned to effect any prescribed relative phase shift and to direct the particle with probabilities and respectively to detectors “0” and “1”. The second half-silvered mirror effectively erases all information about the path taken by the particle (path or path ) which is essential for observing quantum interference in the experiment. Figure 1: (a) Scheme of a Mach-Zehnder interferometer with two phase shifters. The interference pattern depends on the difference between the phase shifts in different arms of the interferometer. (b) The corresponding quantum network representation.

Let us now rephrase the experiment in terms of quantum logic gates. We identify the half-silvered mirrors with the single qubit Hadamard transform (), defined as

 |0⟩ H⟶1√2(|0⟩+|1⟩) |1⟩ H⟶1√2(|0⟩−|1⟩). (1)

The Hadamard transform is a special case of the more general Fourier transform, which we shall consider in Sect. 4.

We view the phase shifter as a single qubit gate. The resulting network corresponding to the Mach-Zehnder interferometer is shown in Fig. 1b. The phase shift can be “computed” with the help of an auxiliary qubit (or a set of qubits) in a prescribed state and some controlled- transformation where (see Fig. 2). Here the controlled- means that the form of depends on the logical value of the control qubit, for example we can apply the identity transformation to the auxiliary qubits (i.e. do nothing) when the control qubit is in state and apply a prescribed when the control qubit is in state . The controlled- operation must be followed by a transformation which brings all computational paths together, like the second half-silvered mirror in the Mach-Zehnder interferometer. This last step is essential to enable the interference of different computational paths to occur—for example, by applying a Hadamard transform. In our example, we can obtain the following sequence of transformations on the two qubits

 |0⟩|u⟩H⟶1√2(|0⟩+|1⟩)|u⟩ c−U⟶ 1√2(|0⟩+eiϕ|1⟩)|u⟩ (2) H⟶ (cosϕ2|0⟩−isinϕ2|1⟩)eiϕ2|u⟩. Figure 2: Network representation for the phase shift transformation of Eq. (2). Here x is a label for the state of the first qubit.

We note that the state of the auxiliary register , being an eigenstate of , is not altered along this network, but its eigenvalue is “kicked back” in front of the component in the first qubit. The sequence (2) is the exact simulation of the Mach-Zehnder interferometer and, as we will illustrate in the following sections, the kernel of quantum algorithms.

The rest of the paper is organised as follows. In the next section we discuss Deutsch’s problem (1985) which shows how differentiation between interference patterns (different phase-shifts) can lead to the formulation of computational problems. Then, in Sect. 3, we review, in a unified way, generalisations of Deutsch’s problem, and propose further ones. In Sect. 4 we discuss an alternative and convenient way to view the quantum Fourier transform. In Sect. 5 we propose an efficient method for phase estimation based on the quantum Fourier transform. In order to illustrate how some of the existing algorithms can be reformulated in terms of the multi-particle interferometry and the phase estimation problem, in Sect. 6 we rephrase Shor’s order-finding algorithm (used to factor) using the phase estimation approach. Finally, in Sect. 7 we present a universal construction which generates any desired interference pattern with arbitrary accuracy. We summarise the conclusions in Sect. 8.

## 2 Deutsch’s Problem

Since quantum phases in the interferometers can be introduced by some controlled- operations, it is natural to ask whether effecting these operations can be described as an interesting computational problem. In this section, we illustrate how interference patterns lead to computational problems that are well-suited to quantum computations, by presenting the first such problem that was proposed by David Deutsch (1985).

To begin with, suppose that the phase shifter in the Mach-Zehnder interferometer is set either to or to . Can we tell the difference? Of course we can. In fact, a single instance of the experiment determines the difference: for the particle always ends up in the detector “0” and for always in the detector “1”. Deutsch’s problem is related to this effect.

Consider the Boolean functions that map to . There are exactly four such functions: two constant functions ( and ) and two “balanced” functions ( and ). Informally, in Deutsch’s problem, one is allowed to evaluate the function only once and required to deduce from the result whether is constant or balanced (in other words, whether the binary numbers and are the same or different). Note that we are not asked for the particular values and but for a global property of . Classical intuition tells us that to determine this global property of , we have to evaluate both and anyway, which involves evaluating twice. We shall see that this is not so in the setting of quantum information, where we can solve Deutsch’s problem with a single function evaluation, by employing an algorithm that has the same mathematical structure as the Mach-Zehnder interferometer.

Let us formally define the operation of “evaluating” in terms of the -controlled-NOT operation on two bits: the first contains the input value and the second contains the output value. If the second bit is initialised to , the -controlled-NOT maps to . This is clearly just a formalization of the operation of computing . In order to make the operation reversible, the mapping is defined for all initial settings of the two bits, taking to . Note that this operation is similar to the controlled-NOT (see, for example, Barenco et al. (1995)), except that the second bit is negated when , rather than when .

If one is only allowed to perform classically the -controlled-NOT operation once, on any input from , then it is impossible to distinguish between balanced and constant functions in the following sense. Whatever the outcome, both possibilities (balanced and constant) remain for . However, if quantum mechanical superpositions are allowed then a single evaluation of the -controlled-NOT suffices to classify . Our quantum algorithm that accomplishes this is best represented as the quantum network shown in Fig. 3b,

where the middle operation is the -controlled-NOT, whose semantics in quantum mechanical notation are

 |x⟩|y⟩f−c−N⟶|x⟩|y⊕f(x)⟩. (3)

The initial state of the qubits in the quantum network is (apart from a normalization factor, which will be omitted in the following). After the first Hadamard transform, the state of the two qubits has the form . To determine the effect of the -controlled-NOT on this state, first note that, for each ,

 (4)

Therefore, the state after the -controlled-NOT is

 ((−1)f(0)|0⟩+(−1)f(1)|1⟩)(|0⟩−|1⟩). (5)

That is, for each , the term acquires a phase factor of , which corresponds to the eigenvalue of the state of the auxiliary qubit under the action of the operator that sends to .

This state can also be written as

 (6)

which, after applying the second Hadamard transform, becomes

 (−1)f(0)|f(0)⊕f(1)⟩. (7)

Therefore, the first qubit is finally in state if the function is constant and in state if the function is balanced, and a measurement of this qubit distinguishes these cases with certainty.

This algorithm is an improved version of the first quantum algorithm for this problem proposed by Deutsch (1985), which accomplishes the following. There are three possible outcomes: “balanced”, “constant”, and “inconclusive”. For any , the algorithm has the property that: with probability , it outputs “balanced” or “constant” (correctly corresponding to ); and, with probability , it outputs “inconclusive” (in which case no information is determined about ). This is a task that no classical computation can accomplish (with a single evaluation of the -controlled-NOT gate). In comparison, our algorithm can be described as always producing the output “balanced” or “constant” (correctly). Alain Tapp (1997) independently discovered an algorithm for Deutsch’s problem that is similar to ours.

Deutsch’s result laid the foundation for the new field of quantum computation, and was followed by several other quantum algorithms for various problems, which all seem to rest on the same generic sequence: a Fourier transform, followed by an -controlled-, followed by another Fourier transform. (In some cases, such as Lov Grover’s “database search” algorithm (1996), this sequence is a critical component to a larger algorithm; see Appendix B). We illustrate this point by reviewing several of these other algorithms in the sections that follow.

## 3 Generalisations of Deutsch’s Problem

Deutsch’s original problem was subsequently generalised by Deutsch and Jozsa (1992) for Boolean functions in the following way. Assume that, for one of these functions, it is “promised” that it is either constant or balanced (i.e. has an equal number of 0’s outputs as 1’s), and consider the goal of determining which of the two properties the function actually has.

How many evaluations of are required to do this? Any classical algorithm for this problem would, in the worst-case, require evaluations of before determining the answer with certainty. There is a quantum algorithm that solves this problem with a single evaluation of . The algorithm is presented in Fig. 4,

where the control register is now composed of qubits, all initially in state , denoted as , and, as in the quantum algorithm for Deutsch’s simple problem, an auxiliary qubit is employed, which is initially set to state and is not altered during the computation. Also, the -qubit Hadamard transform is defined as

 |x⟩H⟶∑y∈{0,1}n(−1)x⋅y|y⟩, (8)

for all , where

 x⋅y=(x1∧y1)⊕⋯⊕(xn∧yn) (9)

(i.e. the scalar product modulo two). This is equivalent to performing a one-qubit Hadamard transform on each of the qubits individually. The actual computation of the function is by means of an -controlled-NOT gate (the middle gate in Fig. 4), which acts as

 |x⟩|y⟩f−c−N⟶|x⟩|y⊕f(x)⟩. (10)

This is similar to Eq. (3), except that now .

Stepping through the execution of the network, the state after the first -qubit Hadamard transform is applied is

 ∑x∈{0,1}n|x⟩(|0⟩−|1⟩), (11)

which, after the -controlled-NOT gate, is

 ∑x∈{0,1}n(−1)f(x)|x⟩(|0⟩−|1⟩). (12)

Finally, after the last Hadamard transform, the state is

 ∑x,y∈{0,1}n(−1)f(x)⊕(x⋅y)|y⟩(|0⟩−|1⟩). (13)

Note that the amplitude of is so if is constant then this state is ; whereas, if is balanced then, for the state of the first qubits, the amplitude of is zero. Therefore, by measuring the first qubits, it can be determined with certainty whether is constant or balanced. Note that, as in Deutsch’s simple example, this entails a single -controlled-NOT operation. (This is a slight improvement of Deutsch and Jozsa’s original algorithm, which involves two -controlled-NOT operations.)

Following Deutsch and Jozsa, Ethan Bernstein and Umesh Vazirani (1993) formulated a variation of the above problem that can be solved with the same network. Suppose that is of the form

 f(x)=(a1∧x1)⊕⋯⊕(an∧xn)⊕b=(a⋅x)⊕b, (14)

where and , and consider the goal of determining . Note that such a function is constant if and balanced otherwise (though a balanced function need not be of this form). Furthermore, the classical determination of requires at least -controlled-NOT operations (since contains bits of information and each classical evaluation of yields a single bit of information). Nevertheless, by running the quantum network given in Fig. 4, it is possible to determine with a single -controlled-NOT operation.

The initial conditions are the same as above. In this case, Eq. (12) takes the simple form

 ∑x∈{0,1}n(−1)(a⋅x)⊕b|x⟩(|0⟩−|1⟩), (15)

which, after the final Hadamard transform, becomes

 (−1)b∑x,y∈{0,1}n(−1)x⋅(a⊕y)|y⟩(|0⟩−|1⟩), (16)

which is equivalent to . Thus, a measurement of the control register yields the value of . (Bernstein and Vazirani’s algorithm is similar to the above, except that it employs two -controlled-NOT operations instead of one. Also, this problem, and its solution, is very similar to the search problems considered by Barbara Terhal and John Smolin (1997).)

The network construction presented in this section (Fig. 4) can be generalised to the case of a Boolean function (with ), with the promise that the parity of the elements in the range of is either constant or evenly balanced (i.e. its output values all have the same parity, or half of them have parity and half have parity ). In this case, by choosing an auxiliary register composed of qubits, and setting all of them in the initial state , it is possible to solve the problem with certainty in one run of the network. As in the above case, the function is constant when the qubits of the first register are detected in state , and evenly balanced otherwise.

A particular subclass of the above functions consists of those that are of the form , where is an binary matrix, is a binary -tuple, and is applied bitwise (this can be thought of as an affine linear function in modulo-two arithmetic). The output string of has constant parity if and has balanced parity otherwise. It is possible to determine all the entries of by evaluating the function only times, via a suitable multi-qubit -controlled-NOT gate of the form

 |x⟩|y⟩f−c−N⟶|x⟩|y⊕f(x)⟩, (17)

where and . The network described below is a generalisation of that in Fig. 4, and determines the -tuple , where is any binary -tuple. The auxiliary register is composed of qubits, which are initialised to the state

 (18)

(This state can be “computed” by first setting the auxiliary register to the state and then applying a Hadamard transform to it.) The -qubit control register is initialised in state , and then a Hadamard transform is applied to it. Then the -controlled-NOT operation is performed, and is followed by another Hadamard transform to the control register. It is straightforward to show that the control register will then reside in the state . By running the network times with suitable choices for , all the entries of can be determined. Peter Høyer (1997) independently solved a problem that is similar to the above, except that is an Abelian group homomorphism, rather than an affine linear function.

## 4 Another Look at the Quantum Fourier Transform

The quantum Fourier transform (QFT) on the additive group of integers modulo is the mapping

 |a⟩F2m⟶2m−1∑y=0e2πiay2m|y⟩, (19)

where (Coppersmith 1994). Let be represented in binary as , where (and similarly for ).

It is interesting to note that the state (19) is unentangled, and can in fact be factorised as

 (|0⟩+e2πi(0.am)|1⟩)(|0⟩+e2πi(0.am−1am)|1⟩)⋯(|0⟩+e2πi(0.a1a2…am)|1⟩). (20)

This follows from the fact that

 e2πiay2m|y1⋯ym⟩ (21) = e2πi(0.am)y1|y1⟩e2πi(0.am−1am)y2|y2⟩⋯e2πi(0.a1a2…am)ym|ym⟩, (22)

so the coefficient of in (19) matches that in (20).

A network for computing is shown in Fig. 5. Figure 5: A network for F2m shown acting on the basis state |a1a2⋯am⟩. At the end, the order of the output qubits is reversed (not shown in diagram).

In the above network, denotes the unitary transformation

 Rk=(100e2πi/2k). (23)

We now show that the network shown in Fig. 5 produces the state (19). The initial state is (and in binary). Applying to the first qubit in produces the state

 (|0⟩+e2πi(0.a1)|1⟩)|a2⋯am⟩.

Then applying the controlled- changes the state to

 (|0⟩+e2πi(0.a1a2)|1⟩)|a2⋯am⟩.

Next, the controlled- produces

 (|0⟩+e2πi(0.a1a2a3)|1⟩)|a2⋯am⟩,

and so on, until the state is

 (|0⟩+e2πi(0.a1…am)|1⟩)|a2⋯am⟩.

The next yields

 (|0⟩+e2πi(0.a1…am)|1⟩)(|0⟩+e2πi(0.a2)|1⟩)|a3⋯am⟩

and the controlled- to - yield

 (|0⟩+e2πi(0.a1…am)|1⟩)(|0⟩+e2πi(0.a2…am)|1⟩)|a3⋯am⟩. (24)

Continuing in this manner, the state eventually becomes

 (|0⟩+e2πi(0.a1…am)|1⟩)(|0⟩+e2πi(0.a2…am)|1⟩)⋯(|0⟩+e2πi(0.am)|1⟩),

which, when the order of the qubits is reversed, is state (20).

Note that, if we do not know , but are given a state of the form (20), then can be easily extracted by applying the inverse of the QFT to the state, which will yield the state .

## 5 A Scenario for Estimating Arbitrary Phases

In Sect. 1, we noted that differences in phase shifts by can, in principle, be detected exactly by interferometry, and by quantum computations. In Sects. 2 and 3, we reviewed powerful computational tasks that can be performed by quantum computers, based on the mathematical structure of detecting these phase differences. In this section, we consider the case of arbitrary phase differences, and show in simple terms how to obtain good estimators for them, via the quantum Fourier transform. This phase estimation plays a central role in the fast quantum algorithms for factoring and for finding discrete logarithms discovered by Peter Shor (1994). This point has been nicely emphasised by the quantum algorithms presented by Alexi Kitaev (1995) for the Abelian stabiliser problem.

Suppose that is any unitary transformation on qubits and is an eigenvector of with eigenvalue , where . Consider the following scenario. We do not explicitly know or or , but instead are given devices that perform controlled-, controlled-, controlled- (and so on) operations. Also, assume that we are given a single preparation of the state . From this, our goal is to obtain an -bit estimator of .

This can be solved as follows. First, apply the network of Fig. 6. Figure 6: A network illustrating estimation of phase ϕ with j-bit precision. The same network forms the kernel of the order-finding algorithm discussed in Section 6.

This network produces the state

 (|0⟩+e2πi2m−1ϕ|1⟩)(|0⟩+e2πi2m−2ϕ|1⟩)⋯(|0⟩+e2πiϕ|1⟩)=2m−1∑y=0e2πiϕy|y⟩. (25)

As noted in the last section, in the special case where , the state (and hence ) can be obtained by just applying the inverse of the QFT (which is the network of Fig. 5 in the backwards direction). This will produce the state exactly (and hence ).

However, is not in general a fraction of a power of two (and may not even be a rational number). For such a , it turns out that applying the inverse of the QFT produces the best -bit approximation of with probability at least . To see why this is so, let be the best -bit estimate of . Then , where . Applying the inverse QFT to state (25) yields the state

 12m2m−1∑x=02m−1∑y=0e−2πixy2me2πiϕy|x⟩ = 12m2m−1∑x=02m−1∑y=0e−2πixy2me2πi(a2m+δ)y|x⟩ (26) = 12m2m−1∑x=02m−1∑y=0e2πi(a−x)y2me2πiδy|x⟩

(for clarity, we are now including the normalization factors) and the coefficient of in the above is the geometric series

 12m2m−1∑y=0(e2πiδ)y = 12m(1−(e2πiδ)2m1−e2πiδ). (27)

Since , it follows that , and thus . Also, . Therefore, the probability of observing when measuring the state is

 ∣∣ ∣∣12m(1−(e2πiδ)2m1−e2πiδ)∣∣ ∣∣2≥(12m(4δ2m2πδ))2=4π2. (28)

Note that the above algorithm (described by networks in Figs. 5 and 6) consists of controlled- operations, and other operations.

In many contexts (such as that of the factoring algorithm of Shor), the above positive probability of success is sufficient to be useful; however, in other contexts, a higher probability of success may be desirable. The success probability can be amplified to for any by inflating to , and rounding off the resulting -bit string to its most significant bits. The details of the analysis are in Appendix C.

The above approach was motivated by the method proposed by Kitaev (1995), which involves a sequence of repetitions for each unit . The estimation of can also be obtained by other methods, such as the techniques studied for optimal state estimation by Serge Massar and Sandu Popescu (1995), Radoslav Derka, Vladimir Buzek, and Ekert (1997), and the techniques studied for use in frequency standards by Susana Huelga, Macchiavello, Thomas Pellizzari, Ekert, Martin Plenio, and Ignacio Cirac (1997). Also, it should be noted that the QFT, and its inverse, can be implemented in the fault tolerant “semiclassical” way (see Robert Griffiths and Chi-Sheng Niu (1996)).

## 6 The Order-Finding Problem

In this section, we show how the scheme from the previous section can be applied to solve the order-finding problem, where one is given positive integers and which are relatively prime and such that , and the goal is to find the minimum positive integer such that . There is no known classical procedure for doing this in time polynomial in , where is the number of bits of . Shor (1994) presented a polynomial-time quantum algorithm for this problem, and noted that, since there is an efficient classical randomised reduction from the factoring problem to order-finding, there is a polynomial-time quantum algorithm for factoring. Also, the quantum order-finding algorithm can be used directly to break the RSA cryptosystem (see Appendix A).

Let us begin by assuming that we are also supplied with a prepared state of the form

 |ψ1⟩=r−1∑j=0e−2πijr∣∣aj mod N⟩. (29)

Such a state is not at all trivial to fabricate; we shall see how this difficulty is circumvented later. Consider the unitary transformation that maps to . Note that is an eigenvector of with eigenvalue . Also, for any , it is possible to implement a controlled- gate in terms of elementary gates. Thus, using the state and the implementation of controlled- gates, we can directly apply the method of Sect. 5 to efficiently obtain an estimator of that has -bits of precision with high probability. This is sufficient precision to extract .

The problem with the above method is that we are aware of no straightforward efficient method to prepare state . Let us now suppose that we have a device for the following kind of state preparation. When executed, the device produces a state of the form

 |ψk⟩=r−1∑j=0e−2πikjr∣∣ajmodN⟩, (30)

where is randomly chosen (according to the uniform distribution) from . We shall first show that this is also sufficient to efficiently compute , and then later address the issue of preparing such states. For each , the eigenvalue of state is , and we can again use the technique from Sect. 5 to efficiently determine with -bits of precision. From this, we can extract the quantity exactly by the method of continued fractions. If and happen to be coprime then this yields ; otherwise, we might only obtain a divisor of . Note that, we can efficiently verify whether or not we happen to have obtained , by checking if . If verification fails then the device can be used again to produce another . The expected number of random trials until is coprime to is .

In fact, the expected number of trials for the above procedure can be improved to a constant. This is because, given any two independent trials which yield and , it suffices for and to be coprime to extract (which is then the least common denominator of the two quotients). The probability that and are coprime is bounded below by

 1−∑p\scriptsize\ primePr[p\ dividesk1]Pr[p% dividesk2]≥1−∑p\scriptsize\ prime1/p2>0.54. (31)

Now, returning to our actual setting, where we have no special devices that produce random eigenvectors, the important observation is that

 |1⟩=r∑k=1|ψk⟩, (32)

and is an easy state to prepare. Consider what happens if we use the previous quantum algorithm, but with state substituted in place of a random . In order to understand the resulting behavior, imagine if, initially, the control register were measured with respect to the orthonormal basis consisting of , …, . This would yield a uniform sampling of these eigenvectors, so the algorithm would behave exactly as the previous one. Also, since this imagined measurement operation is with respect to an orthonormal set of eigenvectors of , it commutes with all the controlled- operations, and hence will have the same effect if it is performed at the end rather than at the beginning of the computation. Now, if the measurement were performed at the end of the computation then it would have no effect on the outcome of the measurement of the control register. This implies that state can in fact be used in place of a random , because the relevant information that the resulting algorithm yields is equivalent. This completes the description of the algorithm for the order-finding problem.

It is interesting to note that the algorithm that we have described for the order-finding problem, which is follows Kitaev’s methodology, results in a network (Fig. 6 followed by Fig. 5 backwards) that is identical to the network for Shor’s algorithm, although the latter algorithm was derived by an apparently different methodology. The sequence of controlled- operations is equivalent to the implementation (via repeated squarings) of the modular exponentiation function in Shor’s algorithm. This demonstrates that Shor’s algorithm, in effect, estimates the eigenvalue corresponding to an eigenstate of the operation that maps to .

## 7 Generating Arbitrary Interference Patterns

We will show in this section how to generate specific interference patterns with arbitrary precision via some function evaluations. We require two registers. The first we call the control register; it contains the states we wish to interfere. The second we call the auxiliary register and it is used solely to induce relative phase changes in the first register.

Suppose the first register contains bits. For each -bit string we require a unitary operator . All of these operators should share an eigenvector which will be the state of the auxiliary register. Suppose the eigenvalue of for is denoted by . By applying a unitary operator to the auxiliary register conditioned upon the value of the first register we will get the following interference pattern:

 (33) (34)

The Conditional gate that was described in section 2 can be viewed in this way. Namely, the operator which maps to and the operator which maps to have common eigenstate . The operator has eigenvalue for .

In general, the family of unitary operators on qubits which simply add a constant integer modulo share the eigenstates

 2m−1∑y=0e−2πily2m|y⟩, (35)

and kick back a phase change of .

For example, suppose we wish to create the state where .

We could set up an auxiliary register with qubits and set it to the state

 2m−1∑y=0e−2πiϕy|y⟩. (36)

By applying the identity operator when the control bit is and the ’add modulo ’ operator, , when the control bit is we see that

 |0⟩2m−1∑y=0e−2πiϕy|y⟩

gets mapped to itself and

 |1⟩2m−1∑y=0e−2πiϕy|y⟩

goes to

 |1⟩2m−1∑y=0e−2πiϕy|y+1mod2m⟩ (37) =e2πiϕ|1⟩2m−1∑y=0e−2πiϕ(y+1)|y+1mod2m⟩ (38) =e2πiϕ|1⟩2m−1∑y=0e−2πiϕy|y⟩. (39)

An alternative is to set the -bit auxiliary register to the eigenstate

 2m−1∑y=0e−2πi2my|y⟩ (41)

and conditionally apply which adds to the auxiliary register. Similarly, the state

 |1⟩2m−1∑y=0e−2πi2my|y⟩

goes to

 |1⟩2m−1∑y=0e−2πi2my|y+amod2m⟩ (42) =e2πiϕ|1⟩2m−1∑y=0e−2πi2m(y+a)|y+amod2m⟩ (43) =e2πiϕ|1⟩2m−1∑y=0e−2πi2my|y⟩. (44)

Similarly, if for some integers and , we could also obtain the same phase “kick-back” by starting with state

 2m−1∑y=0e−2πia2my|y⟩ (45)

and conditionally adding to the second register.

The method using eigenstate

 2m−1∑y=0e−2πi2my|y⟩ (46)

has the advantage that we can use the same eigenstate in the auxiliary register for any . So in the case of an -qubit control register where we want phase change for state and if we have a reversible network for adding to the auxiliary register when we have in the first register, we can use it on a superposition of control inputs to produce the desired phase “kick-back” in front of . Which functions will produce a useful result, and how to compute them depends on the problems we seek to solve.

## 8 Conclusions

Various quantum algorithms, which may appear different, exhibit remarkably similar structures when they are cast within the paradigm of multi-particle interferometry. They start with a Fourier transform to prepare superpositions of classically different inputs, followed by function evaluations (i.e. -controlled unitary transformations) which induce interference patterns (phase shifts), and are followed by another Fourier transform that brings together different computational paths with different phases. The last Fourier transform is essential to guarantee the interference of different paths.

We believe that the paradigm of estimating (or determining exactly) the eigenvalues of operators on eigenstates gives helpful insight into the nature of quantum algorithms and may prove useful in constructing new and improving existing algorithms. Other problems whose algorithms can be deconstructed in a similar manner are: Simon’s algorithm (1993), Shor’s discrete logarithm algorithm (1994), Boneh and Lipton’s algorithm (1995), and Kitaev’s more general algorithm for the Abelian Stabiliser Problem (1995), which first highlighted this approach.

We have also shown that the evaluation of classical functions on quantum superpositions can generate arbitrary interference patterns with any prescribed precision, and have provided an explicit example of a universal construction which can accomplish this task.

###### Acknowledgements.
We wish to thank David Deutsch, David DiVincenzo, Ignacio Cirac and Peter Høyer for useful discussions and comments. This work was supported in part by the European TMR Research Network ERP-4061PL95-1412, CESG, Hewlett-Packard, The Royal Society London, the U.S. National Science Foundation under Grant No. PHY94-07194, and Canada’s NSERC. Part of this work was completed during the 1997 Elsag-Bailey – I.S.I. Foundation research meeting on quantum computation.

## Appendix A Cracking RSA

What we seek is a way to compute modulo given , and , that is, a method of finding th roots in the multiplicative group of integers modulo (this group is often denoted by and contains the integers coprime to ). It is still an open question whether a solution to this problem necessarily gives us a polynomial time randomised algorithm for factoring. However factoring does give a polynomial time algorithm for finding th roots for any relatively prime to and thus for cracking RSA. Knowing the prime factorisation of , say , we can easily compute . Then we can compute such that mod , which implies modulo .

However, to crack a particular instance of RSA, it suffices to find an integer such that modulo ord(), that is for some integer . We would then have modulo .

Since is relatively prime to it is easy to see that . So given , we can compute using Shor’s algorithm and then compute satisfying modulo using the extended Euclidean algorithm. Thus, we do not need several repetitions of Shor’s algorithm to find the order of for various random ; we just find the order of and solve for regardless of whether or not this permits us to factor .

## Appendix B Concatenated Interference

The generic sequence: a Hadamard/Fourier transform, followed by an -controlled-, followed by another Hadamard/Fourier transform can be repeated several times. This can be illustrated, for example, with Grover’s data base search algorithm (1996). Suppose we are given (as an oracle) a function which maps to such that for some . Our task is to find . Thus in a set of numbers from to one element has been “tagged” and by evaluating we have to find which one. To find with probability of any classical algorithm, be it deterministic or randomised, will need to evaluate a minimum of times. In contrast, a quantum algorithm needs only evaluations. Grover’s algorithm can be best presented as a network shown in Fig. 7. Figure 7: Network representation of Grover’s algorithms. By repeating the basic sequence 2n/2 times, value k is obtained at the output with probability greater than 0.5.

## Appendix C Amplifying success probability when estimating phases

Let be a real number satisfying which is not a fraction of , and let be the closest -bit approximation to so that where . For such a , we have already shown that applying the inverse of the QFT to (25) and then measuring yields the state with probability at least .

WLOG assume . For satisfying let denote the amplitude of . It follows from (26) that

 αt=12m⎛⎜⎝1−(e2πi(δ+t2m))2m1−e2πi(δ+t2m)⎞⎟⎠. (47)

Since

 ∣∣∣1−e2πi(δ+t2m)∣∣∣≤2π(δ+t2m)π/2=4(δ+t2m) (48)

then

 (49)

The probability of getting an error greater than is

 ∑k≤t<2m−1|αt|2+∑−2m−1≤t<−k|αt|2 (50) ≤2m−1−1∑t=k14(t+2mδ)2+−(k+1)∑t=−2m−114(t+2mδ)2 (51) ≤2m−1−1∑t=k14t2+2m−1∑t=k+114(t−12)2 (52) ≤2m−1∑t=2k14(t2)2 (53) <∫2m−12k−11t2 (54) <12k−1. (55)

So, for example, if we wish to have an estimate that is within of the value with probability at least it suffices to use this technique with bits.

## References

•  Barenco, A., Bennett, C.H., Cleve, R, DiVincenzo, D.P., Margolus, N., Shor, P., Sleater, T., Smolin, J. & Weinfurter, H. 1995, Phys. Rev. A 52, 3457.
•  Barenco, A., Deutsch D., Ekert A. & Jozsa R. 1995, Phys. Rev. Lett. 74, 4083.
•  Bernstein, E. & Vazirani, U. 1993, Proc. 25th Annual ACM Symposium on the Theory of Computing, ACM Press, New York, p.11-20.
•  Boneh,Dan & Lipton, Richard J. 1995, Advances in Cryptology - Proceedings of Crypto ’95, Lecture Notes in Computer Science, Springer-Verlag, p.424-437.
• 
•  Coppersmith, D., 1994, “An Approximate Fourier Transform Useful in Quantum Factoring”, IBM Research Report No. RC19642.
•  Derka, R., Buzek, V. & Ekert, A. 1997, e-print quant-ph/9707028.
•  Deutsch, D. 1985, Proc. R. Soc. London A 400, 97.
•  Deutsch, D. & Jozsa, R. 1992, Proc. R. Soc. London A 439, 553.
•  Ekert, A. & Jozsa, R. 1996, Rev. Mod. Phys. 68, 733.
•  Griffiths, R.B. & Niu, C.-S. 1996, Phys. Rev. Lett. 76, 3228.
•  Grover, L. 1996, Proc. 28 Annual ACM Symposium on the Theory of Computing, ACM Press New York, 212.
•  Høyer, P. 1997, “Quantum Algorithms”, Paper for qualifying exam at Odense University, Denmark.
•  Huelga, S.F., Macchiavello, C., Pellizzari, T., Ekert, A., Plenio, M.B. & Cirac J.I. 1997, e-print quant-ph/9707014.
•  Kitaev, A. 1995, Quantum measurements and the Abelian stabiliser problem, e-print quant-ph/9511026.
•  Massar, S. & Popescu, S. 1995, Phys. Rev. Lett. 74, 1259.
•  Shor, P. 1994, Proc. of 35th Annual Symposium on the Foundation of Computer Science, IEEE Computer Society, Los Alamitos, 124.
•  Tapp, A. 1997, private communication.
•  Terhal, B & Smolin, J. 1997, e-print quant-ph/9705041.
•
{"ft_lang_label":"__label__en","ft_lang_prob":0.9071396,"math_prob":0.9598814,"size":33683,"snap":"2020-24-2020-29","text_gpt3_token_len":7456,"char_repetition_ratio":0.15128121,"word_repetition_ratio":0.018578643,"special_character_ratio":0.22138764,"punctuation_ratio":0.124145605,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9902176,"pos_list":[0,1,2,3,4,5,6,7,8,9,10],"im_url_duplicate_count":[null,1,null,1,null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-11T08:02:28Z\",\"WARC-Record-ID\":\"<urn:uuid:5fe188e6-13c0-4159-a63e-8db5c104677c>\",\"Content-Length\":\"945006\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:6e5bb814-8e93-4edf-aec4-c541d0f0f001>\",\"WARC-Concurrent-To\":\"<urn:uuid:2909a8ec-9ffa-42ca-a3f1-f7d15dc21892>\",\"WARC-IP-Address\":\"172.67.158.169\",\"WARC-Target-URI\":\"https://www.arxiv-vanity.com/papers/quant-ph/9708016/\",\"WARC-Payload-Digest\":\"sha1:MZUSHRNTQ4T5YF5IJJBC434KRW3UJF22\",\"WARC-Block-Digest\":\"sha1:GY5VHJ3WCONAXHOSMOO2IKGXDAX3FGGE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593655924908.55_warc_CC-MAIN-20200711064158-20200711094158-00534.warc.gz\"}"}