












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to quantum computers, focusing on the fundamental concepts of qubits, superposition, measurement, and the quantum fourier transform (qft). It explains how these principles differ from classical physics and discusses their implications for secure business transactions on the internet.
Typology: Study notes
1 / 20
This page cannot be seen from the preview
Don't miss anything!













This book started with the world’s oldest and most widely used algorithms (the ones for adding and multiplying numbers) and an ancient hard problem (FACTORING). In this last chapter the tables are turned: we present one of the latest algorithms—and it is an efficient algorithm for FACTORING! There is a catch, of course: this algorithm needs a quantum computer to execute.
Quantum physics is a beautiful and mysterious theory that describes Nature in the small, at the level of elementary particles. One of the major discoveries of the nineties was that quantum computers—computers based on quantum physics principles—are radically differ- ent from those that operate according to the more familiar principles of classical physics. Surprisingly, they can be exponentially more powerful: as we shall see, quantum computers can solve FACTORING in polynomial time! As a result, in a world with quantum computers, the systems that currently safeguard business transactions on the Internet (and are based on the RSA cryptosystem) will no longer be secure.
In this section we introduce the basic features of quantum physics that are necessary for understanding how quantum computers work.^1 In ordinary computer chips, bits are physically represented by low and high voltages on wires. But there are many other ways a bit could be stored—for instance, in the state of a hydrogen atom. The single electron in this atom can either be in the ground state (the lowest energy configuration) or it can be in an excited state (a high energy configuration). We can use these two states to encode for bit values 0 and 1 , respectively. Let us now introduce some quantum physics notation. We denote the ground state of our electron by
, since it encodes for bit value 0 , and likewise the excited state by
. These are (^1) This field is so strange that the famous physicist Richard Feynman is quoted as having said, “I think I can safely say that no one understands quantum physics.” So there is little chance you will understand the theory in depth after reading this section! But if you are interested in learning more, see the recommended reading at the book’s end.
311
312 Algorithms
Figure 10.1 An electron can be in a ground state or in an excited state. In the Dirac notation used in quantum physics, these are denoted
and
. But the superposition principle says that, in fact, the electron is in a state that is a linear combination of these two: α 0
∣ 0 〉^ + α 1
This would make immediate sense if the α’s were probabilities, nonnegative real numbers adding to 1. But the superposition principle insists that they can be arbitrary complex num- bers , as long as the squares of their norms add up to 1!
ground state
excited state
superposition α 0
the two possible states of the electron in classical physics. Many of the most counterintuitive aspects of quantum physics arise from the superposition principle which states that if a quantum system can be in one of two states, then it can also be in any linear superposition of those two states. For instance, the state of the electron could well be √^12
or √^1 2
2
∣ 1 〉^ ; or an infinite number of other combinations of the form α 0
∣ 0 〉^ + α 1
∣ 1 〉^. The
coefficient α 0 is called the amplitude of state
, and similarly with α 1. And—if things aren’t already strange enough—the α’s can be complex numbers, as long as they are normalized so that |α 0 |^2 + |α 1 |^2 = 1. For example, √^15
(where i is the imaginary unit,
− 1 ) is a
perfectly valid quantum state! Such a superposition, α 0
∣ 0 〉^ +α 1
∣ 1 〉^ , is the basic unit of encoded
information in quantum computers (Figure 10.1). It is called a qubit (pronounced “cubit”).
The whole concept of a superposition suggests that the electron does not make up its mind about whether it is in the ground or excited state, and the amplitude α 0 is a measure of its inclination toward the ground state. Continuing along this line of thought, it is tempting to think of α 0 as the probability that the electron is in the ground state. But then how are we to make sense of the fact that α 0 can be negative, or even worse, imaginary? This is one of the most mysterious aspects of quantum physics, one that seems to extend beyond our intuitions about the physical world.
This linear superposition, however, is the private world of the electron. For us to get a glimpse of the electron’s state we must make a measurement , and when we do so, we get a single bit of information— 0 or 1. If the state of the electron is α 0
∣ 0 〉^ + α 1
∣ 1 〉^ , then the
outcome of the measurement is 0 with probability |α 0 |^2 and 1 with probability |α 1 |^2 (luckily we normalized so |α 0 |^2 + |α 1 |^2 = 1). Moreover, the act of measurement causes the system to change its state: if the outcome of the measurement is∣ 0 , then the new state of the system is ∣ 0 〉^ (the ground state), and if the outcome is 1 , the new state is
∣ 1 〉^ (the excited state). This
314 Algorithms
Suppose we have two qubits, the first in the state α 0
and the second in the state β 0
∣ 0 〉^ + β 1
∣ 1 〉^. What is the joint state of the two qubits? The answer is, the (tensor) product of the two: α 0 β 0
Given an arbitrary state of two qubits, can we specify the state of each individual qubit in this way? No, in general the two qubits are entangled and cannot be decomposed into the states of the individual qubits. For example, consider the state
∣ψ〉^ = √^1 2
2
∣ 11 〉^ , which is one of the famous Bell states. It cannot be decomposed into states of the two individual qubits (see Exercise 10.1). Entanglement is one of the most mysterious aspects of quantum mechanics and is ultimately the source of the power of quantum computation.
of information, and the probability of outcome x ∈ { 0 , 1 }^2 is |αx|^2. Moreover, as before, if the outcome of measurement is jk, then the new state of the system is
∣jk〉^ : if jk = 10, for
example, then the first electron is in the excited state and the second electron is in the ground state. An interesting question comes up here: what if we make a partial measurement? For instance, if we measure just the first qubit, what is the probability that the outcome is 0? This is simple. It is exactly the same as it would have been had we measured both qubits, namely, Pr { 1 st bit = 0} = Pr { 00 } + Pr { 01 } = |α 00 | 2 + |α 01 | 2. Fine, but how much does this partial measurement disturb the state of the system? The answer is elegant. If the outcome of measuring the first qubit is 0 , then the new superposition is obtained by crossing out all terms of
∣α
that are inconsistent with this outcome (that is, whose first bit is 1 ). Of course the sum of the squares of the amplitudes is no longer 1 , so we must renormalize. In our example, this new state would be
∣∣ αnew
α 00 √ |α 00 | 2 + |α 01 | 2
α 01 √ |α 00 | 2 + |α 01 | 2
Finally, let us consider the general case of n hydrogen atoms. Think of n as a fairly small number of atoms, say n = 500. Classically the states of the 500 electrons could be used to store 500 bits of information in the obvious way. But the quantum state of the 500 qubits is a linear superposition of all 2500 possible classical states: ∑
x∈{ 0 , 1 }n
αx
x
It is as if Nature has 2500 scraps of paper on the side, each with a complex number written on it, just to keep track of the state of this system of 500 hydrogen atoms! Moreover, at each moment, as the state of the system evolves in time, it is as though Nature crosses out the complex number on each scrap of paper and replaces it with its new value. Let us consider the effort involved in doing all this. The number 2500 is much larger than estimates of the number of elementary particles in the universe. Where, then, does Nature store this information? How could microscopic quantum systems of a few hundred atoms
S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 315
Figure 10.3 A quantum algorithm takes n “classical” bits as its input, manipulates them so as to create a superposition of their 2 n^ possible states, manipulates this exponentially large superposition to obtain the final quantum result, and then measures the result to get (with the appropriate probability distribution) the n output bits. For the middle phase, there are elementary operations which count as one step and yet manipulate all the exponentially many amplitudes of the superposition.
Exponential superposition
Input x Output y n-bit string n-bit string
contain more information than we can possibly store in the entire classical universe? Surely this is a most extravagant theory about the amount of effort put in by Nature just to keep a tiny system evolving in time. In this phenomenon lies the basic motivation for quantum computation. After all, if Na- ture is so extravagant at the quantum level, why should we base our computers on classical physics? Why not tap into this massive amount of effort being expended at the quantum level? But there is a fundamental problem: this exponentially large linear superposition is the private world of the electrons. Measuring the system only reveals n bits of information. As before, the probability that the outcome is a particular 500 -bit string x is |αx|^2. And the new state after measurement is just
∣x〉^.
A quantum algorithm is unlike any you have seen so far. Its structure reflects the tension between the exponential “private workspace” of an n-qubit system and the mere n bits that can be obtained through measurement.
The input to a quantum algorithm consists of n classical bits, and the output also consists of n classical bits. It is while the quantum system is not being watched that the quantum effects take over and we have the benefit of Nature working exponentially hard on our behalf. If the input is an n-bit string x, then the quantum computer takes as input n qubits in
S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 317
complex-valued vector β:
β 0 β 1 β 2 .. . βM − 1
1 ω ω^2 · · · ωM^ −^1 1 ω^2 ω^4 · · · ω2(M^ −1) .. . 1 ωj^ ω^2 j^ · · · ω(M^ −1)j .. . 1 ω(M^ −1)^ ω2(M^ −1)^ · · · ω(M^ −1)(M^ −1)
α 0 α 1 α 2 .. . αM − 1
where ω is a complex M th root of unity (the extra factor of
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 equa- tion 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 sig- nal 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
∣α〉^ = ∑M j=0^ − 1 αj
∣j〉^ 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 point: the
∣j〉^ 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) manip- ulates 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
β
j=0 β
j
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 = 2m^ in this section, the algorithm can be implemented for arbitrary values of M , and can be summarized as follows:
318 Algorithms
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.