跳转到内容

10.3 The quantum Fourier transform

Sanjoy Dasgupta, Christos Papadimitriou, Umesh VaziraniMcGraw-Hill Higher Education《Algorithms》大学本科 · 教材双语助读 (Alt+Y)

Recall the fast Fourier transform (FFT) from Chapter 2. It takes as input an M-dimensional, complex-valued vector α (where M is a power of2, say M = 2 ^ m ) , and outputs an M-dimensional complex-valued vector β colon

[ c β_ 0 β_ 1 β_ 2 vdots β_ M - 1 ] = frac 1sqrt M [ c c c c c 1 & 1 & 1 & … & 1 1 & ω & ω^ 2 & … & ω^ M - 1 1 & ω^ 2 & ω^ 4 & … & ω^ 2 (M - 1) & vdots & & & 1 & ω^ j & ω^ 2 j & … & ω^ (M - 1) j & vdots & & & 1 & ω^ (M - 1) & ω^ 2 (M - 1) & … & ω^ (M - 1) (M - 1) ] [ c α_ 0 α_ 1 α_ 2 vdots α_ M - 1 ],

where ω is a complex Mth root of unity (the extra factor of sqrt M is new and has the effect of ensuring that if the | α _ i | ^ 2 add up to 1, then so do the | β _ i | ^ 2 ) . Although the preceding equation suggests an O ( M ^ 2 ) algorithm, the classical FFT is able to perform this calculation in just O ( M log M ) steps, and it is this speedup that has had the profound effect of making digital signal processing practically feasible. We will now see that quantum computers can implement the FFT exponentially faster, in O ( log ^ 2 M ) time!

But wait, how can any algorithm take time less than M, the length of the input? The point is that we can encode the input in a superposition of just m = log M qubits: after all, this superposition consists of 2 ^ m amplitude values. In the notation we introduced earlier, we would write the superposition as r dot | α rangle = ∑ _ j = 0 ^ M - 1 α _ j dot | j rangle where α _ i is the amplitude of the m-bit binary string corresponding to the number i in the natural way. This brings up an important

Figure 10.4 The classical FFT circuit from Chapter 2. Input vectors of M bits are processed in a sequence of m = log M levels.

point: the | j rangle notation is really just another way of writing a vector, where the index of each entry of the vector is written out explicitly in the special bracket symbol.

Starting from this input superposition α , the quantum Fourier transform (QFT) manipulates it appropriately in m = log M stages. At each stage the superposition evolves so that it encodes the intermediate results at the same stage of the classical FFT (whose circuit, with m = log M stages, is reproduced from Chapter 2 in Figure 10.4). As we will see in Section 10.5, this can be achieved with m quantum operations per stage. Ultimately, after m such stages and m ^ 2 = log ^ 2 M elementary operations, we obtain the superposition β that corresponds to the desired output of the QFT.

So far we have only considered the good news about the QFT: its amazing speed. Now it is time to read the fine print. The classical FFT algorithm actually outputs the M complex numbers β _ 0 , … , β _ M - 1 . In contrast, the QFT only prepares a superposition r | β rangle = ∑ _ i = 0 ^ M - 1 bar β | j rangle And, as we saw earlier, these amplitudes are part of the “private world” of this quantum system.

Thus the only way to get our hands on this result is by measuring it! And measuring the state of the system only yields m = log M classical bits: specifically, the output is index j with probability | β _ j | ^ 2

So, instead of QFT, it would be more accurate to call this algorithm quantum Fourier sampling. Moreover, even though we have confined our attention to the case M = 2 ^ m in this section, the algorithm can be implemented for arbitrary values of M, and can be summarized as follows:

Input: A superposition of m = log M qubits, r | α rangle = ∑ _ j = 0 ^ M - 1 α _ j | j rangle

Method: Using O ( m ^ 2 ) = O ( log ^ 2 M ) quantum operations perform the quantum FFT to obtain the superposition r mathinner | bar β rangle = dot ∑ _ j = 0 ^ M - 1 β _ j mathinner | j rangle

Output: A random m-bit number j (that is, 0 ≤ j ≤ M - 1 ) , from the probability distribution P r [ j ] = | β _ j | ^ 2

Quantum Fourier sampling is basically a quick way of getting a very rough idea about the output of the classical FFT, just detecting one of the larger components of the answer vector. In fact, we don’t even see the value of that component—we only see its index. How can we use such meager information? In which applications of the FFT is just the index of the large components enough? This is what we explore next.

共 0 题