19.3 Quantum Fourier transform algorithm 383
with
|
=
1
2
n
z
u
xz
|
z
, (19.12)
u
xz
=
x
(−1)
f (x)+x·z
. (19.13)
The n-qubit
|
defined in Eqs. (19.11) and (19.12) represents the output query
register. As we shall see, the corresponding amplitudes u
xz
contain all the information
needed to answer Deutsch’s problem. To show this, consider the two cases of interest:
f (x) is constant, or f (x) is balanced. If f (x) = a (a =±1 being a constant), all the
amplitudes u
xz
of
|
z
=|0
⊗n
are equal to u
x0
= (−1)
f (x)
= (−1)
a
=±1. Since
|
has a length of unity, this means that all other amplitudes u
x,z=0
must be zero. The
query registers thus displays
|
=|0
⊗n
, i.e., all output qubits are equal to |0. A single
measurement by projecting the register over |0
⊗n
, yielding |
⊗n
= 1, suffices to
prove the point. Consider next the second case: if f (x) is balanced, this means that the
amplitude u
x0
of
|
z
=|0
⊗n
is zero, as the terms (−1)
f (x)+x·0
= (−1)
f (x)
in the sum in
Eq. (19.3) cancel each other (one half yielding +1, the other half yielding −1). For any
x we thus have the property
x
(−1)
f (x)
= 0, indicating that f (x) is, indeed, balanced.
In this case, the query register cannot output
|
=|0
⊗n
, meaning that at least one of
the register qubits must be |1. A single projection test yielding
|
0
⊗n
= 0 suffices
to prove the point.
In summary, the Deutsch–Jozsa algorithm demonstrates the capability of quantum
parallelism over an arbitrary number of qubits n.Ittakesasingle calculation and a single
measurement of the output register
|
to obtain the answer to Deutsch’s problem. In
contrast, a classical computation would require at least “2
n
/2 plus one” measurements
with random inputs to obtain the same answer within reasonable confidence, and 2
n
measurements for absolute confidence.
While this discussion makes a point about the power of quantum parallelism,it
should not be concluded that evaluating the properties of the function f (x)isofany
particular interest to quantum computing algorithms. Rather, the Deutsch and Deutsch–
Jozsa algorithms must be regarded as representing a most elegant introduction to the
concept.
19.3 Quantum Fourier transform algorithm
In this section, I shall describe the quantum Fourier transform (QFT), which lies at
the root of several important quantum-computing algorithms, for some revolutionary
applications to be developed in Chapter 20. To avoid any misconception, QFT was not
developed with the purpose of boosting the speed of Fourier transforms, as they can
be implemented with classical bits in a von Neumann computer through the so-called
fast Fourier transform (FFT) algorithm. Rather, QFT opens up some new perspectives
in quantum computation, and we may realize this only through the next chapter. Here,