Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Invitation to a Contemporary Physics (2004)

.pdf
Скачиваний:
609
Добавлен:
01.05.2014
Размер:
8.01 Mб
Скачать

Quantum Computation and

6

Information

6.1Introduction

With continuing miniaturization, as discussed in Chapter 5, computers will soon reach a point where the quantum e ect begins to a ect their basic operations. Instead of fighting to circumvent this problem, a more constructive approach is to use it to our advantage to design a new breed of computers and algorithms, capable of doing things that a conventional classical computer cannot do. This is theoretically feasible because quantum mechanics allows states to be coherently superimposed, which translates into a coherent superposition of numbers in the computer context. This capacity of operating on many numbers all at once allows a highly parallel processing, which in turn can be used to design computer algorithms that run much faster. Unfortunately, quantum computers needed to carry out such manipulations are di cult to build, so much so that as of December, 2001, the largest quantum computer is a 7-bit computer built by IBM. Worse still, as will be discussed in Sec. 6.9.3, this particular technology is really not a pure quantum technology, and much larger computers cannot be built with this method. A sizable quantum computer that can beat conventional computers in real operations is still quite some time away. Nevertheless, when they finally arrive, they will be very powerful. To illustrate how powerful we shall discuss two famous quantum algorithms: the algorithm for sorting an unstructured database by L. K. Grover, and the algorithm for factorizing a large integer into its prime components by P. W. Shor. Both are fast, but the second is even faster than the first. It takes a classical computer O(N)

steps1 to locate a specific item in a database with N entries, whereas Grover’s

algorithm allows a quantum computer to do so in only O( N ) steps, a vast saving of time for large N. A more dramatic saving occurs in Shor’s algorithm for factoring a large integer of the form N = pq into its prime factors p and q. If n is the number of bits in N, i.e., if 2n−1 < N ≤ 2n, the fastest classical algorithm takes O(exp[(64/9)1/3n1/3(ln n)2/3]) steps to get it done. Shor’s algorithm

1O(N) stands for ‘of the order N,’ or equivalently, cN for some constant c which does not grow with N.

195

196

Quantum Computation and Information

can accomplish the task in fewer than O(n3) steps. For example, a 129-digit number known as RSA129 has 64-digit and 65-digit prime factors. It requires something like 1.5 × 1017 (150 million billion) instructions by an ordinary computer to get it factorized. This was carried out in 1994 using 1000 work stations over a 8-month period! For a quantum computer with a 100 MHz clock and Shor’s routine, the factorization of RSA129 could be done in a few seconds.

There are practical consequences when a quantum computer can be built large enough to run Shor’s algorithm. The RSA encryption scheme commonly used in the Internet to encode transactions, whose security depends on the di culty for a classical computer to factorize a large number N, will no longer be reliable.

While quantum mechanics can be used this way of break a cipher, it can also be used to increase security in another way. These topics of encryption will be discussed towards the end of this chapter.

Quantum mechanics can also be used to send information on the quantum state of a system, without physically sending the system itself. This is known as quantum teleportation. It might remind you of what happens in the science fiction movies ‘Star Trek,’ but at this point we are merely talking about ‘beaming up’ a single quantum mechanical number, not the quantum state of a whole human being. This topic will also be discussed briefly at the end of the chapter.

In order to understand how quantum algorithms really work, there is no way of skipping a certain amount of detailed discussion. These discussions are relatively dry and harder to understand, and to emphasize this fact they are printed in a smaller font. For a first reading and for readers not interested in the details, those parts can be skipped.

Quantum computation and quantum information is a fast growing field, so clearly this chapter can provide only a very elementary introduction to the subject. Readers wishing to know more can consult the books and articles, as well as the web-sites, quoted at the end of this chapter.

6.1.1Summary

Superposition of states allowed in quantum mechanics can be used to design a new breed of computers, quantum computers. Algorithms designed using this coherent property can run much faster than the corresponding classical algorithms. However, the hardware needed to run them is di cult to build.

6.2 Classical Computers

In order to understand the outstanding features of a quantum computer, let us first sketch how a usual (classical) computer works.

A computer relies on a central processing unit (CPU) to carry out its basic operations. It is the brain of the computer, although it really cannot think by itself. It must be told what to do, step by step, in a set of instructions known as

6.2. Classical Computers

197

a ‘program.’ These operations are paced by a clock so that the next step will not start before the current step is finished. The speed of the clock, and the e ciency of the CPU, are some of the factors that determine the power of the computer. A computer also requires devices to store its program, and the input and output of the computation. These are: the internal random access memory (RAM), and the permanent storage devices like a hard drive or a CD ROM. In the rest of this section, we will concentrate on some of the most basic operations of the CPU.

A computer works on integers. As we learn in elementary school, a floating point number like 3.2095764 can be added or multiplied as if it were an integer 32095764. All that we need to do is to put back the decimal point at the right place at the end of the calculation. For that reason it is su cient to consider operations of integers when we deal with numbers. Alphabetical characters can also be coded in terms of integers. For example, in the ASCII code, the lowercase letter ‘a’ is represented by the integer 97, and the uppercase letter ‘A’ is represented by 65. Thus, only integers need to be considered by a computer.

The integers we are familiar with are the decimal numbers, with each digit running from 0 to 9. In a computer, for ease of storage and operation, integers are expressed as binary numbers, each bit of which being either ‘0’ or ‘1’. The conversion between a decimal number and a binary number goes as follows. The decimal number 1 is also 1 in binary, decimal 2 is 10 in binary, 4 is 100 in binary, 8 is 1000 in binary, etc. The binary number 1 followed by m zeros is the decimal number 2m. More generally, if (xn · · · x3x2x1) is an n-bit binary number corresponding to the decimal number y, with each xi being either 0 or 1, then

y = x1 + 2 x2 + 22x3 + 23 x4 + · · · + 2n−1 xn .

(6.1)

For example, the 6-bit binary number 101101 is equal to the decimal number 45. Hardware-wise, 0 and 1 are represented in a computer by the two states of a

transistor. A transistor is an electronic device with three leads, an incoming lead, an outgoing lead, and a third one connected to the ground. If the incoming lead carries a distinctly positive current or a distinctly positive voltage, the transistor conducts, and a current flows from the outgoing lead via the transistor and its third lead to the ground. If the incoming lead carries a negative or no current or voltage, then the transistor stops conducting. In short, the transistor is a switch, it is either ‘on,’ to allow current to flow through, or ‘o ,’ to stop current from flowing through. The number 0 is represented by the ‘o ’ state of the transistor, and the number 1 is represented by its ‘on’ state. The output current or voltage of one transistor can be fed to the incoming lead of another transistor to switch it on and o , and so on down the line. The basic operations in a CPU are implemented by hooking up the transistors in an appropriate way. Di erent operations correspond to di erent ways of connecting the transistors.

The basic operations in a CPU can be built up from relatively simple units known as gates. For example, there is a gate to do the addition of two bits without ‘carry,’ and there is another gate to do the multiplication of two bits. One advantage

198 Quantum Computation and Information

of using binary numbers is the simplicity of its arithmetic rules. If a, b are two bits, each being either 0 or 1, then there are only 4 rules of multiplication a × b that the computer has to be told: 0 × 0 = 0, 0 × 1 = 0, 1 × 0 = 0, 1 × 1 = 1. Compare this with the decimal multiplication table that we were made to memorize in elementary school! There are also only four rules of addition, a + b: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 10. The last rule appears a bit complicated, because the result 10 is a 2-bit number rather than a 1-bit number like the other seven rules. This can be rectified by using , addition without carry. In that case, 0 0 = 0, 0 1 = 1, 1 0 = 1, and 1 1 = 0. The carry bit of a + b is simply a × b.

In computer or logical jargon, the multiplication operation is known as and. It is often denoted as · rather than ×. The operation is called xor, standing for exclusive or. By definition, a and b is 1 if and only if both a and b are 1; a or b is 1 if either a or b, or both, is 1; a xor b is 1 if either a or b is 1, but excluding the case when a and b are both 1. With these definitions, it is clear that and is the same as ×, and xor is the same as .2 Another useful logical operation is called not, which interchanges 0 and 1. Therefore, not applied to 0 becomes 1 and not applied to 1 becomes 0. The compound operation of and followed by a not is called nand.

All classical computer calculations can essentially be obtained by combining the above simple logical operations, together with the rather trivial operations fanout and swap. fanout of a bit a is simply to make a copy of it, changing a to (a, a). swap is to exchange a pair of numbers, replacing (a, b) by (b, a). Moreover, these logical operations are not all independent. In addition to swap and fanout, only two more are needed to produce the rest. For more details, consult a book on digital computers.

It is convenient at this point to establish some conventions for later use. We will call the leftmost (the largest) bit of an n-bit binary number the first bit, and the rightmost (the smallest) bit the nth bit.

Registers are places where binary numbers are stored. Every n-bit binary number can be stored in a single n-bit register, or it can be separated into two (or more) portions, with the first k bits stored in a k-bit register and the remaining (n − k)bits in an (n − k)bit register. In the latter case, the register containing the largest (leftmost) bits is called register I, the one containing the next largest bits is called register II, etc. If necessary, parentheses are used to group the bits in the same register. For example, (10)(110) means the first two bits of 10110 is stored in register I, and the last three bits of 10110 is stored in register II.

A gate is denoted graphically by a rectangular box, with its name written inside. Data are fed into the gate from the left and extracted on the right. A gate may work on only some of the bits of an input number, in which case those bits will be

2The or operation can be related to arithmetic operations by the formula a or b = (a b)+(a×b). In electronic literature, a or b is often denoted as a + b. We shall avoid using that notation lest it get confused with the addition sign used above.

6.3. Quantum Computers

199

written as subscripts to the symbol for the gate. A Latin subscript means a bit, a Roman subscript means all the bits in that particular register.

For example,

10110 and12 0110

(10)(110) andI (0)(110)

10110 xor34 1000

(10)(110) xorI (1)(110)

The bits being operated on are printed in bold face.

6.2.1Summary

Classical computers work on binary numbers through elementary gates. Some of the usual gates are not, and, or, xor, nand, fanout, and swap.

6.3 Quantum Computers

6.3.1 Introduction

What makes a quantum computer di erent is the presence of ‘schizophrenic states,’3 and gates to manipulate them. To understand that, let us first review the basic facts of quantum mechanics needed to understand this section. (See also the discussion in Appendix B.)

In quantum mechanics, ‘particles’4 are regarded as waves. Di erent states (energy, spin, position, etc.) of a particle are described by di erent complex-valued wave functions ψ(x, t) = (x, t)|e(x,t). It is conventional to adopt Dirac’s notation and denote the wave function as a whole by . The intensity of the wave, or equivalently, the probability of finding the particle at position x at time t, is proportional to (x, t)|2.

The sum of two waves is another wave. Such a coherent superposition of two waves may produce very strange e ects. If ψ1 is the wave function of a particle in a certain state, and ψ2 is the wave function of the same particle in another state, then the wave function ψ = ψ1 + ψ2 represents the particle in a ‘schizophrenic’ state, with finite probabilities of finding it in either of the two ‘personalities.’ Since 1 + ψ2|2 =1|2 + 2|2, the intensity of the combined wave is not equal to the combined intensities of the individual waves. This is a quantum e ect that has no classical counterparts. In other words, because quantum mechanical particles are

3‘Schizophrenic state’ is not an o cial name in quantum mechanics. We use this term to describe a linear combination of (single or multi-particle) basis states.

4We use the generic term ‘particle’ to mean any isolated quantum mechanical system. Thus, a particle can be a photon, an electron, a nucleus, or an atom.

200

Quantum Computation and Information

waves, interference e ects may be present. The di erence of the intensity of the sum, and the sum of the intensities, is given by the cross term, which depends on the phase di erence ∆θ = θ1 − θ2 of the two waves.

Unless the particle is completely isolated, its interaction with the environment produces a phase shift. For a complex environment this additional phase shift could become random, destroying the original phase di erence. In that case the cross term averages to zero, and the probability of the sum is then equal to the sum of the probabilities, reverting it back to the classical scenario. This is known as decoherence. The operation of a quantum computer relies on coherence being maintained, which means that the e ect due to environmental interactions must be small during the course of quantum mechanical gate operations. This turns out to be one of the most di cult problems to solve in practice. Nevertheless, we shall assume in what follows that this can be achieved and that decoherence e ects can be ignored. Just like the transistor in a classical computer whose on- o positions represent the basic bits 1 and 0, in a quantum system we must find two convenient states |1 and |0 to act as the quantum mechanical bits, otherwise known as qubits. For example, the two spin states of a spin-12 electron could be used provided that their energy levels are not the same. More generally, any two states of a single particle could be used in principle, but in practice, they must be relatively long lived to allow quantum mechanical operations to be carried out before they decay. Moreover, practical techniques must be available to put the particle in any one of these two basis states, as well as any normalized schizophrenic state = α|0 + β|1 , for any complex numbers α and β satisfying |α|2 + |β|2 = 1. The picture below depicts the basis states and one such schizophrenic state.

|1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

α|0 + β|1

|0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A transistor in a classical computer can either be on, or o , but nothing in between. A particle in a quantum computer can be in |1 or |0 , but it can also be in a schizophrenic state. This di erence between a qubit and a classical bit is the fundamental reason why a quantum computer can do things that a classical computer cannot do. To work on a linear combination is like working on the basis states all at once, so a quantum computer is like a highly parallel classical computer. The problem is, a particle in a schizophrenic state is known only probabilistically, so it is not generally possible to extract a definitive answer at the end of a computation, which we need. To overcome this trade-o , a fast operation against a muddy outcome, we must find ways to exploit the schizophrenic advantage, yet ending up in an almost pure basis-state to avoid probabilistic uncertainty. Ingenuity is required to make this happen, and even so it works only in certain problems. The famous algorithms by Deutsch, by Shor, and by Glover discussed below are some examples of these ingenious algorithms.

6.3. Quantum Computers

201

6.3.2Multiple Qubits

In a classical computer, a binary number of n bits is implemented by n transistors, one for each bit. In a quantum computer, it is represented by n non-interacting particles, each in the state |0 or |1 , or a linear combination of them. The binary number 11001, for example, is represented by a 5-particle state, |1|1|0|0|1 , also written simply as |11001 . We shall often label an n-bit binary number by its decimal equivalent. In that notation, the state |11001 is |25 , and the state |1000000 is |64 . Every state of an n-particle system can be stored in an n-(qu)bit register. The picture below shows a 10-qubit register with the state |0000100101 = |37 stored in it.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Like single-particle states, we are allowed to make linear combinations of the multi-particle basis states. Some of these linear combinations can be factorized into a product of single-particle states, e.g., |00 +|01 +|10 +|11 = (|0 +|1 )(|0 +|1 ). There are others which cannot, e.g., |00 + |11 , or |01 − |10 . These latter states are known as entangled states. They contain a non-trivial and counter-intuitive correlation between the particles. It is states of this kind that lead to the EPR (Einstein–Podolsky–Rosen) ‘paradox’5 of quantum mechanics.

In a quantum computer, two-particle entangled states are produced by 2-bit ‘controlled gates,’ which take an uncorrelated 2-qubit input and convert it into a correlated entangled output. The necessary correlation makes these 2-bit controlled gates di cult to build, but their presence is indispensible if we want to obtain nontrivial outputs from a quantum computer.

6.3.3Summary

Each qubit in a quantum computer is represented by two states, |0 and |1 , of a quantum particle. These states can be superimposed and manipulated by quantum

5Suppose a spin-0 particle at rest decays into two spin- 21 particles, flying away in opposite directions. By spin angular momentum conservation, the spin wave function of the final state is

1 | − | | |

2 ( 01 10 ), where 0 , 1 are respectively the spin-down and spin-up states of the particle. This is an example of an entangled state. If a measurement of particle 1 shows that it is in the spin-up state, then we automatically know that particle 2 is in the spin-down state, and vice versa. This fact has been confirmed by experiments, but it violates usual intuition, and hence it is thought to be a ‘paradox.’ Since the two particles travel in opposite directions, and could be very far apart when a measurement is made, this correlation seems to show that the result of the measurement of particle 1 is instantaneously transmitted to observer 2, with a speed faster than the speed of light. That this is not the case has been demonstrated by showing that we cannot use the e ect to transmit a message from observer 1 to observer 2 at a speed faster than the speed of light.

202

Quantum Computation and Information

gates. One may consider the basis states in the superposition to be manipulated simultaneouly, so in that sense, a quantum computer works in a highly parallel manner. If the final result remains a superposition of basis states, then the answer is only probabilistic, and the advantage gained by parallel processing is lost. However, for certain problems, the final state can be put in a single basis state (to be continued).

6.4 Quantum Gates

A gate in a classical computer is a basic component which turns a number into another one, according to some function y = F (x). The and gate, for example, takes a 2-bit number (ab) and converts it into the 1-bit number a × b. The xor gate takes (ab) and converts it into a b.

A gate in a quantum computer converts a state |x into another state F (|x ) ≡ |F (x) . This is accomplished by switching on suitable quantum mechanical interactions inside the gate. Interactions in quantum mechanics must be linear and unitary, so quantum gates must be linear and unitary as well. If = α|x1 +β|x2 , linearity demands |F (ψ) = α|F (x1) + β|F (x2) . In practice, this means that once we know how a gate transforms the basis states, we know how it transforms all their linearly combined states.

Since it is linear, the function F may be thought of as a matrix, mapping the 2n n-particle orthonormal states |x to the 2n states |F (x) . Unitarity requires this matrix to be unitary, meaning that the 2n states |F (x) must also be orthonormal.6 A unitary matrix has an inverse, hence two di erent states |x must map to two distinct states |F (x) . In particular, if the gate has an n-bit input, it must also have an n-bit output. For that reason, none of the classical gates and, xor, or, and nand can be a quantum gate, because these gates map a 2-bit number into a 1-bit number.

Although the classical gates and, xor, etc. are not unitary, we can design in each case a unitary gate to encompass their functions. What we need is to include additional bits to pad it into a unitary gate. More generally, from a function y = f(x) mapping an n-bit register into an m-bit register, an (m + n)-bit unitary gate Uf can be constructed. Unlike the function F , which has to be linear and unitary, the function f here only has to be linear. The unitary gate Uf maps |x |y onto |x |y f(x) , with the first register carrying n bits and the second m bits:

|x |y → Uf → |x |y f(x) .

(6.2)

6The inner product ψ12 of two wave functions is defined to be d31 (x)ψ2(x). If this inner product is zero the two states are said to be orthogonal. If ψ11 = 1, the state is said to be normalized. A set of n wave functions ψi(x) is said to be an orthonormal set if ψij is 1 when i = j, and 0 when i =j. The set of basis vectors are always chosen to be orthonormal.

6.4. Quantum Gates

203

The symbol here means addition modulo7 2m. It can be shown that this operation is unitary but we shall skip the proof. In particular, Uf maps |x |0 onto |x |f(x) so we can read out f(x) from the second output register.

For example, the UAND gate is a 3-bit gate, converting the 3-bit state |x |y = |ab |y into the 3-bit state |ab |y a × b . In particular, it converts |ab |0 into |ab |a×b , so the result of the and operation can be read out in the third output bit.

We turn now to the question of how these quantum gates can be constructed. The most commonly used gates are 1-bit gates. Happily, they are also the easiest

to construct. A 1-bit gate u changes |0 into some specific normalized state, and |1 into an orthogonal one. If |0 and |1 are two levels separated by an energy ν ( is Planck’s constant), then an electromagnetic pulse with frequency ν and an appropriate phase, applied to the particle for a suitable length of time, can produce any unitary transformation on the two basis states |0 and |1 , and hence any u gate. If the two basis states are the two polarizations of a photon, then we can use standard optical equipment to rotate and combine these polarizations to produce a desired 1-bit gate. It is also possible to have |0 and |1 represented by light beams from two orthogonal directions, as shown in the diagram below. Then two prisms sandwiching a partially silvered mirror can be used to mix the two beams (to get outputs a and b), and a dielectric material inserted in the path of a beam (a) can be used to shift the phase of the beam (to get c). The amount of mixing is determined by the amount of silvering of the mirror, and the amount of phase delay is determined by the thickness of the dielectric material. In this way one can again construct any 1-bit unitary gate u.

|1

 

 

 

 

 

 

 

 

 

 

c c

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

a

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

b

 

 

 

b

 

 

 

 

 

 

 

 

|0

 

 

 

 

 

7a mod c is an integer between 0 and c −1. It is obtained by subtracting from a a suitable integral multiple of c. For example, 3 mod 15 = 3, but 31 mod 15 = 1 because 31 = 1 + 2 × 15. We can apply this rule to addition, so 57 + 13 mod 15 is 70 mod 15, which is 10. An equivalent way of thinking about ‘mod c’ is to imagine counting numbers in the following way. We count 0, 1, 2, . . . , up to c − 1, then we circle back and count from 0 up again. Hence, c is 0, c + 1 is 1, etc. The binary addition without carry, discussed in Sec. 6.2, for which we use the symbol , is the same as addition mod 2.

204

Quantum Computation and Information

The most frequently used 1-bit gates are the not (n) gate and the hadamad (h) gates. The n gate interchanges |0 and |1 . It promotes the particle at the ground state |0 to the excited state |1 .

The h gate changes the basis states into an equal mixture of the two. Specifically,

1

|0 h (|0 + |1 ) 2

1

|1 h (|0 − |1 ) .

2

When h isapplied to a 1-bit ground state |0 , it changes into the state |h = (|0 + |1 )/ 2 . When h is applied to every bit of an n-bit ground state, it changes every bit into this state h. The result is a sum of 2n n-bit states, where every bit can be either a 0 or a 1. Converting that into decimal notation, it becomes

 

|0

H →

1

n 2n1

(6.3)

 

2

x=0 |x ≡ |Υ ,

 

 

 

 

 

 

 

H as the n-

 

acts on the ith bit of |0 . We shall refer to the gate

where H ≡

in=1 Hi, and Hi

bit hadamad gate. The ordinary h gate is simply the 1-bit hadamad

gate.

The uniform state |Υ is a very useful state in quantum computation. It allows maximal parallel processing because a quantum gate acting on it acts simultaneously on all the 2n states |x .

A quantum computer requires also 2-bit controlled-u (cu) gates to function. One of the two incoming bits is a control bit (c), and the other is the data bit (d). The outgoing control bit is always the same as the incoming control bit. The outgoing data bit d is also the same as the incoming data bit if c = 0, but d is to be transformed by the 1-bit u gate to get d if c = 1.

These gates establish a correlation between the two bits. Such correlations are clearly needed for computations, for without them one cannot even add or multiply two numbers. Unfortunately these gates are di cult to manufacture in practice precisely because of the required correlations. In fact, getting these gates working is one of the big obstacles in the construction of a practical quantum computer. We will discuss the problem more thoroughly in Sec. 6.9.

The most common cu gate is the controlled-not (cn) gate where u = n. In this case, d = c d, so it can be used as an adder without carry.

The correlation inherent in a control gate can also be used to produce entangled

states from unentangled ones. For example, starting from the 2-bit ground state

2|00 , apply h to the control bit to change it to |0 + |1 , and apply n to the data bit to change it to |1 . Now pass that through a cn gate. The outgoing state |cd is then the entangled state |01 + |10 .