Quantum Computing
Quantum Computing
Quantum Computing
&20387Ζ1*
$&5&35(66)5((%22.
Introduction
1 - Quantum Information
2 - Quantum Computers
3 - Quantum Computing
6 - Application Areas
@CRCPreu
A!AWU)O.fOAN(lllOO•
QUANTUM
COMPUTING
VISIT WWW.ROUTLEDGE.COM
TO BROWSE FULL RANGE OF QUANTUM COMPUTING TITLES
SAVE 20% AND FREE STANDARD SHIPPING WITH DISCOUNT CODE
JML20
CHAPTER 15
Quantum Information
CONTENTS
15.1 Quantum Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
15.2 Entanglement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
15.3 Cloning and Teleportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Teleportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
15.4 Quantum Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
The quantum Fourier transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
15.5 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
This chapter aims to introduce some of the applications of the ideas of quantum
mechanics that were developed during the last twenty years or so of the twentieth
century. The topics chosen reflect our increased understanding of a number of areas
and its application to new phenomena that have been predicted and sometimes
observed. They all rely on the interplay between the two types of time dependence
implicit in the fundamental postulates set out in Chapter 6:
Postulate 5 Between measurements, the development of the wave function with time
is governed by the time-dependent Schrödinger equation.
Postulate 2 Immediately after a measurement, the wave function of the system will
be identical to the eigenfunction corresponding to the eigenvalue obtained as a result
of the measurement.
343
344 Quantum Mechanics
into one of a set of possible outcomes, which is an irreversible change that occurs
in one time direction only. Although, in practice, we easily know when to apply
which form of time dependence, it is difficult to set objective criteria for this, and
we shall discuss the consequent “quantum measurement problem” in more detail in
Chapter 16.
Most of our discussion in this chapter will refer to the behaviour of what have
become known as “qubits.” A classical bit is a system that can exist in one or other
of two possible states, conventionally used to represent zero and one; a qubit is a
quantum system that can exist in one of two base states, but can also be in a state that
is a linear combination of these. A prime example is the spin-half particle, whose
component of angular momentum relative to the z axis can have the values ± 12 , with
corresponding eigenstates αz and βz . As we saw in Chapter 9, the spin could also be
measured relative to some other direction, producing new eigenvectors that could be
expressed as linear combinations of the old. For example, if α x and β x respectively,
represent positive and negative spin measured with respect to the x direction
α x = 2−1/2 (αz + βz )
β x = 2−1/2 (αz − βz ) (15.1)
E = Ms mod c (15.2)
where the right-hand side means that the number M is raised to the power s and the
answer expressed as a number to base c. If c is a product of two prime numbers (p
and q), it can be shown that the message can be decoded by the algorithm
M = Et mod c (15.3)
where t is a simple function of p and q. However, if p and q are not known, the
message is secure and all the other quantities can be exchanged publicly. If c is
large enough, breaking the code by searching for its prime factors would take a
conventional computer an impossibly long time (more than 106 years if c is 1000
binary digits in length). As we shall see later in this chapter, this factorization
problem is one where quantum computers could, in theory, make a dramatic
contribution, but it may well be 106 years before this technology is available!
The present section describes a method whereby a sender and receiver can both
acquire knowledge of a number to be used as a key to a code, while being sure that
no eavesdropper knows it. As we shall see, it cannot be directly used to transmit
previously defined numbers like p and q, because even the sender does not know
in advance what the shared number is going to be. However, the commonly held
information can be used to decide on which of a number of previously agreed
protocols is to be used; e.g. which pair of primes contained in a previously prepared
346 Quantum Mechanics
Alice Bob
z or x z or x
z or x
Eve
FIGURE 15.1 Alice sends a series of qubits to Bob, which are αz /βz or α x /β x at
random. Bob makes a similar set of randomly selected x or z measurements on the
qubits he receives. They then exchange information on the measurement orientations
they have chosen and use the results for the subset where these are the same, to define
the key to be used. In the absence of Eve’s intervention, Alice and Bob have the same
key, but this no longer holds if Eve has attempted to make a measurement.
list are to be used as p and q. In this way they can both follow the same coding
process, even if they do not know what this is going to be before the exchange takes
place. This key distribution process is where quantum mechanics comes in.
A sender (conventionally known as “Alice”) transmits a message to a receiver
(“Bob”) in the form of a stream of qubits where, say, αz and βz represent 0 and 1,
respectively. As we shall see, the specifically quantum properties of the particles
allow us to detect the presence of an eavesdropper (“Eve”) who is intercepting the
message and retransmitting it to Bob while hoping to do so undetected. The setup is
illustrated in Figure 15.1
The central idea is that Alice sends a sequence of qubits where some are in
the form αz or βz , but others are represented by α x or β x . Both αz and α x are to
be interpreted as 0, while βz and β x represent 1. Which orientations Alice uses are
decided at random, but she keeps a record of them. When Bob detects the qubits, he
also varies the orientation of his apparatus between the z and x directions at random
and records which apparatus he uses, as well as the results he obtains. Alice and
Bob then publicly tell each other which settings they used in each case and discard
those that were not the same—on average half the total. The remainder consists
of a set of numbers whose values they both know, and which they can then use to
decide which procedure they will follow to encode and decode messages sent openly
between them.
We now consider the effect of the possible intervention of Eve. She may intercept
the qubits sent by Alice, but she has no means of knowing the orientation of Alice’s
Quantum Information 347
apparatus when they were sent. The simplest thing she can do is randomly guess
which orientation might have been used for a particular qubit, set her apparatus in
this orientation, record the result, and send a qubit in the same state as that just
recorded on to Bob. On average, she will guess right one-half of the time, but there is
only a 50% probability that this guess will be the same as Bob’s. The upshot is that
about one-half of the qubits that Bob later believes are reliable, have been corrupted
by passing through Eve’s apparatus set in the “wrong” orientation. About one-half
of these (i.e., one-quarter of the final sequence used as the key) will decode as bits
that are the opposite of those sent by Alice. Alice and Bob therefore no longer have a
set of numbers in common and soon find they cannot decode each other’s messages.
They have therefore detected the presence of Eve and can take appropriate action.
Worked Example 15.1 Illustrate the above procedure by considering the processing of a
string of twelve qubits sent by Alice to Bob in (i) the presence and (ii) the absence of Eve.
Solution See Table 15.1.
15.2 ENTANGLEMENT
The remaining examples discussed in this chapter involve two or more particles in
what is called an “entangled state.” In quantum mechanics, the word “entanglement”
refers to a quantum state of two or more particles, where the probabilities of the
outcome of measurements on one of them depend on the state of the other—even
though there is no interaction between them.
As an example of entanglement, consider two spin-half particles in a state where
they are far apart, their spins are opposite and we have no other information about
them. The spin part of their wave function has the form
where αz (i) and βz (i) represent particle i with a positive and negative spin component,
respectively, relative to the z axis. However, the only information this wavefunction
contains is that the spins are opposite—it does not tell us the absolute direction of
either spin. This is because ψ(1, 2) is independent of the direction of the axis of
quantization: to see this, we apply the transformation (15.1) to express ψ(1, 2) in
terms of α x (i) and β x (i) and get
ψ(1, 2) = 2−3/2 [α x (1) + β x (1)][α x (2) − β x (2)] − [α x (1) − β x (1)][α x (2) + β x (2)]
= −2−1/2 [α x (1)β x (2) − β x (1)α x (2)] (15.5)
which is the same as (15.4) with z replaced by x, apart from an irrelevant change
of sign. We can therefore drop the suffixes on α and β when we describe qubits
entangled in this way.
We now consider the effect of performing a measurement of the z component
of either of the spins when the system is in the state ψ(1, 2). Clearly we expect to
get a positive or a negative result at random with equal probability. But suppose we
measure the spin of particle 2 after we have measured the spin of particle 1 and
obtained (say) a positive result. As a result of this first measurement, the system
will have collapsed into an eigenstate of the spin-component operator with positive
eigenvalue. It therefore has the form
and we now know that the particles are in eigenstates of Ŝ z , because the state has
Quantum Information 349
φ(1)ψ(2) →ψ(1)ψ(2)
(15.7)
∂
φ∗ (1)ψ∗A (2)φ(1)ψB (2)dτ1 dτ2 =
∂t
− (i/h̄) φ∗ (1)ψ∗A (2)H(1, ˆ 2)φ(1)ψB (2)dτ1 dτ2
+ (i/h̄) φ(1)ψB (2)Ĥ ∗ (1, 2)φ∗ (1)ψ∗A (2)dτ1 dτ2
=0 (15.8)
where we have used the time-dependent Schrodinger equation and its complex
conjugate—c.f. (11.1) and (11.2)— along with the fact that Ĥ is Hermitian. (15.8)
means that the integral of the product of the wave functions does not change with
time. It therefore follows from (15.8) that if (15.7) holds
∗ ∗
φ (1)ψA (2)φ(1)ψB (2)dτ1 dτ2 = ψ∗A (1)ψ∗A (2)ψB (1)ψB (2)dτ1 dτ2 (15.9)
or 2
ψ∗A ψB dτ = ψ∗A ψB dτ (15.10)
This is true only in the special cases where the integral on the left-hand side is zero
or unity, which means that there is no such general procedure and the no-cloning
theorem is proved.
If the no-cloning theorem were not true, we could in principle create a large
number of cloned systems whose properties could be measured without significantly
affecting the ensemble as a whole and this would potentially be in breach of the
uncertainty principle. Suppose, for example, we have a spin-half particle in a state
where the direction of spin is unknown. If a large number of identical copies of these
could be made by cloning, then all three components of spin could be accurately
measured on the resulting ensemble, even though the operators representing them do
not commute.
Teleportation
The word “teleportation” entered the English language via the science-fiction
television series Star Trek. In this fantasy, a person or object could be transported to
a distant destination using a transmitter that measured all the properties of the object
Quantum Information 351
Teleported
Bob
SEP
(2)
BMA Alice
Object
and sent them (presumably by some radio link) to a receiver that reassembled the
information to recreate the object. In the process the original object was destroyed
(dematerialized?). In the quantum analogue, teleportation is the same as quantum
cloning except that the state of the reference system is inevitably changed in the
process. We consider, as a simple example, an object qubit, such as a spin-half
particle, in a state given by
as can be checked by expanding the right-hand sides of (15.12) and (15.13). This set
of states can be shown to have the maximum possible entanglement for two spin-half
particles and are known as “Bell states” (after John Bell—see Chapter 16) .
Alice sends particle 1 to Bob and then performs a measurement on particles 2 and
3. The essential feature of this “Bell state measurement” is that it is represented by an
operator whose eigenfunctions are the four ψi s, so that the whole system, including
particle 1, collapses into one of these states. Alice communicates the result of this
to Bob, using a classical channel of communication—cf. Figure 15.2. Thus, if Alice
obtains the result corresponding to ψ1 , Bob’s particle (1) must have the same spin
function as was originally possessed by particle 3, which of course was Alice’s
original intention. If she obtains one of the other results and lets Bob know, then
Bob can transform the state function into that required, simply by rotating the spin
using a magnetic field B for an appropriate time. For example, to generate the second
square-bracketed expression in (15.13) from the first, we use (11.14) in Chapter 11
to get
1 1
A(t) = A(0) exp(− iω p t) and B(t) = B(0) exp( iω p t) (15.15)
2 2
where ω p = eB/m. We get the required result (apart from an irrelevant phase factor)
if t = πm/eB. We emphasize that teleportation transfers the full quantum state of
the object qubit to the target, but, as always in quantum mechanics, only part of
this is revealed in any single measurement. However, the statistical properties of the
teleported state of the target are predicted to be the same as those of the object qubit
in the absence of teleportation, and this has been verified experimentally.
A major challenge to the practical realization of quantum teleportation is making
a measurement that collapses the system into one of the Bell states. If, for example,
we were simply to measure a component of spin of one of the particles, we would
cause the system to collapse into the corresponding eigenstate, which is not one of
the Bell states. To perform a Bell-state measurement successfully, we must address
both qubits 2 and 3 simultaneously and execute a measurement that is sensitive to
their relative properties, but does not produce any information about their individual
Quantum Information 353
D1
a
c
d
b
D2
states. Figure 15.3 illustrates how this could be partially achieved for two qubits,
which in practice are normally photons. Qubits 2 and 3 are represented by polarized
photons, which strike a semitransparent mirror simultaneously (i.e., within a time
short compared with the length of the associated wave packets) from opposite sides.
To understand how this can lead to a Bell-state measurement, we have to go beyond
the spin states set out in (15.14) and include a representation of the spatial parts
of the wave functions. Referring to figure 15.3, we denote the spatial parts of the
wave functions of the two beams approaching the beam splitter by a and b. As
photons are bosons, the total wave function (15.13) must be symmetric with respect
to exchange of labels 2 and 3. Referring to (15.14), we see that the spin function ψ1
is antisymmetric and the others are symmetric. It follows that when constructing the
total wave function the ψi (2, 3) must be multiplied by
where the negative sign applies when i = 1 and the positive sign for i = 2, 3, 4.
We now consider the effect of the semitransparent mirror from which the photons
emerge in states c and d—see Figure 15.3. Each photon has an equal probability of
transmission or reflection, so it is impossible to tell which path was followed by any
particular detected photon. The wave function in beam c is made up of a reflected
component that originated in beam a and a transmitted component that originated in
b. Similarly, d is a superposition of a transmitted part from a and a reflected part from
b; moreover, because this last reflection was at the interface with an optically denser
medium, a change of sign is introduced at this point. We represent these relations by
1
a →2− 2 (c + d)
1
b →2− 2 (c − d) (15.17)
354 Quantum Mechanics
It follows that, if we detect one photon in detector D1 and the other in D2 , then
one must have been in c and the other in d, so only the first alternative can apply.
This means that photons 2 and 3 have been successfully measured to be in the first
Bell state and the initial state of photon 3 has been successfully teleported to photon
1. However, if both photons are detected in either D1 or D2 no Bell state is uniquely
determined by this measurement and no teleportation is possible. As ψ1 , is one of four
equally weighted Bell states that make up the original wave function, teleportation
occurs only 25% of the time. When a photon is registered in each of the two detectors,
Alice can tell Bob that the properties of the object photon have been successfully
teleported to his target photon. More sophisticated experimental arrangements, with
four possible outcomes, each of which corresponds to one of the Bell states, have
been devised. One of these is based on the parametric up-conversion of two photons
into a single photon followed by manipulation of its state.
We note that a classical communication channel by which Alice communicates
the result of her measurement to Bob is an essential part of the experiment and, as
she must identify one of four possibilities, two bits of classical information must be
transmitted in this way. This is an example of a general principle that forbids the
transmission of information using entanglement alone. Otherwise we could transmit
information instantaneously in breach of the principles of special relativity. We shall
return to this point in Chapter 16.
The principles of quantum teleportation have been experimentally demonstrated
for polarized photons and also using atomic beams. However, this is a long way from
Star Trek! Before any significantly complex object could be teleported, it would have
to be coupled in some way to a system consisting of as many entangled particle pairs
as the number of parameters needed to define the reference state. The practicability
of this is certainly well beyond our present technology.
significant number of qubits; such entangled states are extremely sensitive to noise
and decoherence, so the practical obstacles to constructing a useful device are
immense, and overcoming them would almost certainly involve the development of
a completely new technology.
Of course, there is no reason why anyone would go to such trouble to construct
something that could do no more than a conventional computer. The great interest
in quantum computers is that, although they would carry out most computing
tasks no more efficiently than conventional machines, there are some processes that
would be performed at an immensely faster speed. An often-quoted example is the
factorization of a large number into its prime-number components by a method
known as Shor’s algorithm, after the person who devised it; as mentioned earlier, if
this operation could be efficiently performed it would endanger the security of some
commonly used cryptographic protocols. The factorization of a number consisting
of N decimal digits using a conventional computer requires a number of computing
steps that is proportional to exp(2L1/3 ln L2/3 ), where L = ln N. In contrast, the number
of operations required by a quantum computer has been shown to be about 300L3 .
For L equal to 10, the classical algorithm is faster, but the quantum computer takes
over for larger numbers: for L = 200, the calculation would take 109 years classically,
but could be performed by a quantum computer in about 8 hours.
As a first step to understanding the principles of quantum computation, we
consider a particular simple operation, known as a NOT gate. This has the property
of reversing the state of a bit: if we input 0 we get out 1, while if we input 1 we get
out 0. (Because it acts on one bit at a time, a NOT gate is an example of a “single-bit”
gate). It is very easy to devise a unitary operation that will carry out this procedure
on a qubit. We represent 0 and 1 by the spin-up (αz ) and spin-down (βz ) states of a
spin-half particle, which we subject to a field directed in the y direction. The spin
precesses according to (11.17) in Chapter 11 and if we apply the field for the correct
length of time, its direction will be reversed: i.e. αz → βz and βz → −αz , which is just
what we expect from the operation of a NOT gate (NB, the sign change is a result
of the phase change associated with spin rotation discussed in Chapter 11 and is not
relevant to the present discussion).
Suppose now we perform the same operation, but starting from a state where the
spin is not in an eigenstate of S z , but in one that is a linear combination of αz and βz .
(To simplify the notation, from now on we shall drop the subscript z when referring
to eigenstates of spin measured along the z axis.) We now get
Aα + Bβ → Aβ − Bα (15.19)
We see that both the operations α → β and β → −α are now contained in this single
operation. This procedure is central to quantum computation and is known as the
operation of a “Hadamard gate.”
A single NOT gate can be considered as a very simple computer, programmed
to perform a single operation. If this were a conventional device, we could fully
determine its properties only by running it twice: once with each of its possible inputs
(0 or 1). In the quantum case, however, if we run the program once only using, say,
356 Quantum Mechanics
α x as input, then the wave function of the output is a linear combination of both
outcomes. Thus, both calculations have been performed in one step!
We might be forgiven for being less than impressed by this, when we realize that
we could do the same thing by inverting a classical pointer held at an angle to the
horizontal—because reversing the direction of any vector reverses the direction of
all its components. In one sense, a quantum computer has much in common with
a classical analogue computer, but the power of a quantum computer is realized
only when it operates on a quantum state made up from a number of qubits
simultaneously, and this could be modelled classically only if our pointer existed
in a many dimensional space —2n dimensions in the case of n qubits.
An important restriction on the power of quantum computing is that, in order to
access the result of a calculation, we must make a measurement and this inevitably
causes wave function collapse. This means that in the case of the simple example
above, although both α and β are operated on simultaneously, only one of these
components can be measured in one operation, so there is apparently no practical
gain in performing the calculation in this way. For this reason, quantum computation
often has little or no advantage over conventional methods. However, there are
important exceptions to this rule and these relate to cases where the aim is to extract
a single piece, or a small number of pieces, of information that would require a
long and complex computation to determine classically. One example is searching
a large database for a single match and another is the determination of the period
of a periodic function. (For reasons we shall not go into, the latter is a key part of
the algorithm to factorize a product of two prime numbers mentioned above). We
shall give an outline of the principles of how the latter calculation could be carried
out, provided the correct unitary operations could be performed and the appropriate
measurements made. We shall see that a subtle interplay of unitary evolution and
collapse can be employed to perform this calculation with very high efficiency
We first note a further important constraint on the operation of a quantum
computer. This arises from the fact that the Schrödinger equation is time-reversible,
by which we mean that if we make the substitution t → −t, the equation is still valid.
Thus, if a system undergoes a unitary evolution from one state to another, it must also
be able to reverse the process in a similar manner; an example of this is the rotation of
a spin state in a magnetic field as discussed above, which can be reversed by applying
a field of the same strength and for the same time, but in the opposite direction. A
corollary of this is that each operation must have the same number of outputs as
it has inputs. To understand this, think of an operation where the input consists of
two numbers and the output consists of their sum: it is impossible to reconstruct the
original pair uniquely if the only information we have is the final result. This does not
mean that a quantum computer cannot perform an addition, but the process is more
complex than that employed classically and involves retaining more information.
Suppose we have a quantum computer that contains a number of qubits, which we
shall continue to think of as spin-half particles. We shall use n of these to construct
what is known as a register that can be used to represent all numbers from 0 to
2n − 1. We first want to set our register to zero, which means that all qubits must be
in the state α; this can be achieved by applying a magnetic field in the z direction
Quantum Information 357
and allowing the spins to relax into their ground state. (NB: this is an example of an
irreversible measurement). Now consider the result of applying a magnetic field in
the y direction for a time sufficient to rotate the spins through 90 degrees so that they
are all in the state α x ; in the case where n = 3, this state is
χ =α x (1)α x (2)α x (3)
=2−3/2 (α1 + β1 ) (α2 + β2 ) (α3 + β3 )
=2−3/2 [α1 α2 α3 + α1 α2 β3 + α1 β2 α3 + α1 β2 β3
+β1 α2 α3 + β1 α2 β3 + β1 β2 α3 + β1 β2 β3 ] (15.20)
where α x (i) represents atom i in state α x and we have made a small change in notation
from the second line onwards, where αi represents atom i in state αz . These final eight
combinations of α and β are just the binary representations of the numbers zero to
seven, so generalizing, we have
N−1
− 12
|χ = N | j (15.21)
j=0
where N = 2N and | j represents the state of the three qubits equivalent to the binary
representation of the number j; our example treated the case where N = 8, but (15.21)
holds for any number of qubits. We see therefore that the application of the magnetic
field has transformed the state from one representing the number zero, to one that
is a linear combination of the representations of all the numbers from zero to seven.
We note that this operation is unitary, because the system is governed by the time-
dependent Schrödinger equation. It is also reversible as the original state can be
restored simply by applying a field in the opposite direction.
We shall call the register just discussed the x-register and we now suppose that we
have another register (the y-register) containing two qubits (numbered 4, 5), which
are initially in the state α. We now perform what is called a controlled NOT (or
CNOT) operation; this acts on the state of a particular qubit in the y-register (known
as the “target qubit”) leaving it alone or reversing its state, depending on the state
of a particular qubit in the x register (the “control qubit”). In particular, if qubit(2)
is zero, qubit(4) remains zero, while if qubit(2) is one qubit(4) is changed to one.
(In principle this could be achieved by focusing the magnetic field created by the
magnetic dipole associated with qubit(2) onto qubit(4) and applying a further field to
cancel this out or reinforce it, depending on whether qubit(2) is in the state α or β,
respectively.) The state of qubit(5) is subjected to the same procedure, using qubit(3)
as the control. Because the state of the first three qubits is the linear combination
(15.21), the five qubits end up in an entangled state that can be expressed as
1
|ψ = N − 2 (|0|0 + |1|1 + |2|2 + |3|3 + |4|0 + |5|1 + |6|2 + |7|3
1
N−1
= N− 2 | j|y j ) (15.22)
j=0
358 Quantum Mechanics
where the first and second kets in a product represents the state of the x and y
registers, respectively, and |y j is defined by the first line. Because the last four states
of the y-register are the same as the first four, we have an example of a function that
is periodic in the variable defined by the values in the x-register, and this has been
created by unitary operations on a set of qubits.
The above is a simple example of the generation of a periodic function by
performing unitary operations on qubits. Moreover, we know in advance what its
periodicity is going to be. A more interesting case is where a state similar to (15.22)
is created by some other process, such that we do not know what the period is. In this
case we would expect to be able to determine its period by subjecting it to a Fourier
transform: this will have maxima corresponding to its fundamental frequency and/or
some or all of its harmonics. It turns out that this period can be found very efficiently
by a quantum computation as we shall now explain.
Worked Example 15.2 If the y register contains a single qubit, explain how to construct a
state similar to (15.22), but with period 2.
Solution We first place the qubit in state α, then subject it to a controlled NOT, where the
control bit is qubit 3 of the x register. This produces the state
N−1
− 12 2πi
ỹk = N exp jk y j (15.23)
j=0
N
where the functions ỹk and y j are evaluated at the points k = 0, 1...(N − 1) and
j = 0, 1...(N − 1), respectively. We note that this expression is generally applicable,
provided the spaces spanned by j and k are appropriately scaled. It is convenient to
assume that N = 2n where n is an integer and we shall do so from now on. If y j is
periodic with period r and N/r = m where m is an integer, (15.23) becomes
m−1 r−1
− 12 2πi
ỹk =N exp k( j + lr) y j+lr
l=0 j=0
N
m−1 r−1
− 12 2πi 2πi
=N exp klr exp jk y j
l=0
N j=0
N
⎡ ⎤ r−1
⎢⎢⎢ 1 − exp (2πik)) ⎥⎥⎥ 2πi
− 2 ⎢⎢
1
⎥
=N ⎢⎣ ⎥⎥⎦ exp jk y j (15.24)
1 − exp 2πik j=0
N
m
Quantum Information 359
where the expression in square brackets equals the sum over l in the line above
because the latter is a geometric series. Unless k = pm, where p is an integer ≤ r,
this term equals zero, because the numerator is zero and the denominator is finite.
However, if k = pm both are zero and their ratio equals m. If N/r is not an integer,
these statements are true to a good approximation provided N >> r. It follows that the
period r can be determined from the positions of the peaks in the Fourier transform.
Classical “fast Fourier transform” methods have been developed that allow this
calculation to be performed with considerable efficiency, but this could be greatly
exceeded by a quantum calculation as we shall see.
Consider the quantum transformation
N−1
− 12 2πi
| j → N exp jk |k (15.25)
k=0
N
where each of | j and |k describe the states of N qubits. If |ψ represents the state of
two registers entangled as in (15.22) and we apply the transformation (15.25) to the
x-register only, we get
1
N−1
|ψ = N − 2 | j|y j
j=0
⎛ ⎞⎟
⎜
N−1
⎜⎜⎜ − 1 N−1 2πi ⎟⎟
→N − 12 ⎜⎜⎝N 2 exp jk |k⎟⎟⎟⎠ |y j
j=0 k=0
N
⎛ ⎞⎟
⎜⎜⎜ 1 N−1
N−1 2πi ⎟⎟⎟
⎜⎜⎜⎜N − 2 ⎟⎟⎟ |k
1
= N− 2 ⎝ exp jk |y j ⎠
k=0
N j=0
N−1
= |ỹk |k (15.26)
k=0
where
N−1
−1 2πi
|ỹk = N exp jk |y j (15.27)
j=0
N
|ỹk represents the state of the qubits in the y register, which are now entangled
with the transformed states, |k, of the x-register. We note that each |ỹk is a linear
combination of n products of the spin eigenfunctions, while |k is a single product
that represents the number k. Comparing (15.27) with (15.23), we see that |ỹk is a
representation of the Fourier transform of |y j . We can also use the fact that y j is
periodic so that |y j+r = |y j to follow a similar procedure as we did for the classical
case above and write (15.27) as
⎡ ⎤ r−1
⎢⎢⎢ 1 − exp (2πik) ⎥⎥⎥ 2πi
−1 ⎢⎢ ⎥
|ỹk = N ⎢⎣ ⎥⎥⎦ exp jk |y j (15.28)
1 − exp 2πik j=0
N
m
360 Quantum Mechanics
We may now think that we have calculated the whole Fourier transform of |y j in a
single operation. However, as is the case for all quantum computations, only a small
part of the outcome can be extracted by a single measurement. Suppose we were to
attempt to measure the state of the y-register by measuring the z components of its
component atoms; this would cause the state to collapse into a single product of spin
eigenfunctions, which would give us little or no information about the previous state
of the y-register. Remembering that the single piece of information we are seeking
is the period, r, of the function yk , we shall show that this can be obtained, not by
operating on |ỹk , but by measuring the state of the x-register, which contains the
values of k. The probability of obtaining a particular value of k following such a
measurement is |k|ψ|2 = ỹk |ỹk , using (15.26). Referring to (15.28) we see that the
term in square brackets is zero unless k = pm, where p is an integer, in which case it
equals m, so that
m2
r−1 r−1
2πi
ỹk |ỹk = 2 exp ( j − j )k y j |y j
N j=0 j =0 N
m2 r
=
N2
1
= (15.29)
r
remembering that N = mr and that the |y j are orthonormal. We note that the
probabilities are all equal and they sum to unity, because there are r maxima less
than N in the Fourier transform. We also note that this result is exact only if r is a
submultiple of N, but is a good approximation in the general case, provided N >> r.
Thus, a measurement of k is almost certain to yield a value equal to a multiple of N/r.
To obtain r itself, we would have to repeat the procedure a number of times and look
for the lowest common multiple of the measured values of N/k. Alternatively, we
could test each result we obtain against the original data as this often involves a very
short conventional calculation: for example, if the quantum Fourier transform is used
to determine prime factors, their correctness can be tested by a single multiplication.
We note that once the entangled state representing the periodic function has been
established, all subsequent transformations and measurements, which actually lead
to a value of the period of the function represented by the y-register, are carried on
the x-register only.
We illustrate the above by considering the particular case defined in (15.22);
using (15.26) and (15.27) we see that the wave function |ψ can be written as the
Quantum Information 361
where we have represented |k by products of the spin states α and β, which represent
0 and 1 respectively. Because |y j = |y j+4 , the contributions from these terms to
|ỹk |k have doubled up in the case where k is even and cancelled out when k is odd.
The probability of obtaining one of the allowed values of k is proportional to ỹk |ỹk
and equals 0.25 in all cases. When we measure the x-register we therefore obtain a
value of k equal to 0, 2, 4 or 6. If we get zero, we get no information, but otherwise
we can deduce that r = 4, 2 or 4/3. Repeating the whole calculation a small number
of times is very likely to lead us to conclude that r = 4.
We now describe in a little more detail how, in principle, the quantum Fourier
transform (15.25) could be carried out. We first write the number k in its binary form
n
l=1 kl 2 , where kl = 0 or 1. Substituting into (15.25) we get
n−l
⎛ ⎞
1
1
1 ⎜⎜⎜ 2πi
n ⎟⎟⎟
| j → 2−n/2 ... exp ⎜⎜⎜⎝ n j kl 2n−l ⎟⎟⎟⎠ |k1 |k2 ..|kn
k1 =0 k2 =0 k =0
2 l=1
n
n
1
= 2−n/2 exp 2πi jkl 2−l |kl
l=1 kl =0
n
= 2−n/2 αl + exp 2πi j2−l βl (15.31)
l=1
where, in the last line, we have again replaced |0 and |1 by the corresponding spin
states αl and βl . We now write j in its expanded binary form, so that the exponent in
(15.31) can be written as
n
−l
2πi j2 = 2πi jm 2n−m−l (15.32)
m=0
where jm = 0 or 1. We substitute (15.32) into (15.31) dropping all terms with m ≤ n−l
in the above summation because the exponential of 2πi times an integer equals one.
This yields
⎡ ⎛ ⎞ ⎤
n ⎢
⎢ ⎜
⎜
n ⎟⎟ ⎥⎥⎥
⎢⎢⎢ ⎜⎜⎜ n−m−l ⎟⎟⎟⎟ βl ⎥⎥⎥
| j → 2−n/2 α
⎣⎢ l + exp ⎝⎜2πi j m 2 ⎠ ⎦ (15.33)
l=1 m=n−l+1
362 Quantum Mechanics
>
| j1 H R2 R3 C C
>
| j2 H R2
>
| j3 H C
FIGURE 15.4 Quantum Fourier transform. The boxes labelled H represent Hadamard
gates that perform a π/2 rotation of spin about the y axis. The boxes labelled R2 and
R3 rotate the spin about the z axis so as to introduce phase changes of π/2 and π/4,
respectively if the relevant control bit equals 1. The three boxes labelled C are CNOT
gates, whose combined effect is to swap the states of qubits 1 and 3.
Our earlier example treated the case where the x register contained three qubits in
which case (15.33) can be written as
| j →2−3/2 α1 + exp (iπ j3 ) β1 α2 + exp (i ( j2 π + j3 π/2)) β2
× α3 + exp (i ( j1 π + j2 π/2 + j3 π/4)) β3 (15.34)
α1 + exp i ( j1 π + j2 π/2 + j3 π/4) β1
The qubit | j2 is operated on by the Hadamard gate H and by R2 and changes in a
similar way to become
α2 + exp i ( j2 π + j3 π/2) β2
while | j3 is operated on only by H to become
α3 + exp i ( j3 π) β2
If we compare the above expressions with (15.34), we see that these gates have
created a state of the three qubits similar to the one we were aiming at, but with
the labels 1 and 3 interchanged. The states of these qubits are then swapped by the
operation of the three CNOT gates shown in figure 15.4 to produce the state (15.34).
The total number of operations involved in a quantum Fourier transform is easily
estimated. Referring to figure 15.4, we see that the first qubit is subject to one H
followed by (n − 1) R2 ’s, the second to one H plus (n − 2) R2 ’s, and so on. There are
then about n/2 swap gates making a total number of around n2 operations. This is
in contrast to the fastest classical computation, which involves 2n n operations. The
potential gain is huge for large values of n (faster by a factor of about 5 × 104 if n = 20
and 2 × 1013 for n = 50) and this has motivated the considerable scientific effort that
has been devoted to the possible realization of such a quantum calculation.
As we stressed from the beginning our discussion has been confined to how “in
principle” a quantum Fourier transform could be carried out, but we now briefly
turn to what might be possible in practice. The practical problems involved in using
the spins associated with single atoms are formidable, but some progress has been
made using liquids made up of molecules that contain atoms with unpaired nuclear
spins. When a magnetic field is applied to such a liquid, the nuclear spins tend to
line up parallel to it to create a macroscopic magnetic moment. If a radio frequency
field tuned to the energy difference between the parallel and antiparallel nuclear
spin states is applied, this magnetic moment can be rotated. This process, which
is known as nuclear magnetic resonance (NMR), allows the magnetic moment to be
treated as a qubit much as described above. As the nuclei contained in the molecules
making up the liquid have different resonant frequencies, they can be manipulated
independently, and it is also possible to arrange for them to interact in such a way
as to create a CNOT and other quantum gates. Because the states are represented
by macroscopically sized spins, they are not collapsed by a measurement in the way
described earlier and this part of the calculation has to be performed in a different
way. Indeed, it can be argued that a calculation based on NMR is closer to a many-
dimensional classical analogue calculation than to a true quantum calculation. Using
NMR techniques, a quantum calculation based on seven qubits has been carried out
to implement Shor’s algorithm for the factorization of a number into its prime factors.
This involved generating a four-qubit periodic function, finding that its period is four
and deducing that the factors of the number fifteen are five and three! However,
although NMR has provided a robust realization of a quantum computation, seven is
probably close to the maximum number of qubits that can be employed in this way.
364 Quantum Mechanics
This is because each qubit is identified with the resonance of a particular nucleus in
the molecule and the number of these is equal to the number of different nuclear sites
in the molecule. If molecules with a larger variety of spins were used, their resonant
frequencies could be too close to each other to allow them to be distinguished by
an applied field—unless this is applied for a time greater than the inverse of the
frequency difference, in which case the process is slowed to the point where its
advantage is lost.
This example illustrates the enormous potential power of the quantum computer,
the essential feature being the almost miraculous way in which a superposition of the
results of n calculations can be generated by a single operation. The measurement
process limits the amount of this information we can retrieve, but in appropriate cases
very powerful results can be achieved. We should, however, remember the immense
obstacles that lie in the way of any practical application of these ideas. Although
entangled states of two particles can be generated almost routinely, extending this to
more than a few is difficult, and a hundred or so really seems impossible. However,
there are many examples in the past of the seemingly impossible being achieved and
we should beware of underestimating human technological capacity. Whether more
“in principle” objections may arise if and when we understand the measurement
process better will be speculated on in the next chapter.
15.5 PROBLEMS
15.1 Construct a variant of Table 15.1 in which Eve makes different guesses about the settings of Alice’s
apparatus.
15.2 Confirm that the state defined by Equation (15.5) is the same as that given in (15.4)
15.4 Describe the operation of a quantum Fourier transform on the system described in worked example
12.3 and explain how it can be used to obtain the period of this function.
2
QUANTUM COMPUTERS
Learn more
CHAPTER 7
Quantum Computers
7.1 INTRODUCTION
Present day computers perform computations using two-state binary logic.
They led to an amazing revolution in data manipulation and processing. The
components of a computer are subject to various laws of physics. What will
happen if the components of a computer become very small such that they are
subjected to the principles of quantum mechanics? Alternatively, can a real
quantum system be used to build a computer functioning in the quantum
mechanical regime? This is one of the major issues in quantum computing.
The name quantum computing refers to calculations using logic based on the
probability amplitude concept.
Classical computers of the present decade are able to answer one question
at a time. In contrast a quantum computer will have the ability to carry out
more than one problem simultaneously. Essentially quantum computers ma-
nipulate quantum states instead of classical bits. In a quantum computer the
eigenstates of, for example, a two-level system are renamed 0 and 1. Now, the
two level quantum system becomes a qubit (that is, quantum binary digit)
[1-4]. The concept of the quantum computer was introduced first by Paul Be-
nioff (1980) [5]. Richard Feynman [6,7] contributed to the early development of
quantum computation. The first paper on quantum computing was published
by David Deutsch [8] in the year 1985.
During the past one decade or so, many quantum algorithms have emerged.
Among them the most remarkable successes of quantum computation are
Shor’s efficient algorithms for integer factorization and the computation of
discrete logarithms [9,10]. Peter Williston Shor has shown that quantum com-
puters would solve the problem of finding discrete logarithms (mod N ). He
predicted that a quantum computer can perform prime factoring in polynomial
time: t ∝ k p where p is a constant and k is the number of bits in the number
1/3
to be factored. For this problem a classical computer is believed to take eck
time where c is a constant. Shor’s breakthrough created an avalanche of re-
search activity in quantum computation and quantum information theory. In
161
162 Quantum Mechanics II: Advanced Topics
7.2.1 Qubits
Quantum information can be represented by the elementary units called quan-
tum bits abbreviated as qubits or qbits. A qubit is two levels of a quantum
system (like the spin of an electron). For example, spin-up, | ↑, represents 1
(true) and spin-down, | ↓, represents 0 (false). Note that | ↑ to | ↓ can be
achieved by a magnetic field and dissipates no heat. All information can be
encoded into a sequence of qubits. In principle, any two-state system can be
used as a quantum bit. Some examples are presented in table 7.1.
What is the difference between a classical bit and a qubit? A qubit can
be in a state other than |0 and |1. It is possible to form a combination
of states
called
states given by |ψ = α|0 + β|1. Denoting
superposition
1 0
|0 = and |1 = the quantum state |ψ is written in vector
0 1
α
notation as . For example, we can represent the spin of an electron
β
in the horizontal direction as the sum of the up and down states. When we
measure a qubit, the result will be either 0 with probability |α|2 or 1 with
probability |β|2 . Hence, |α|2 + |β|2 = 1. A classical bit has either 0 state or 1
state whereas a qubit can exist between |0 and |1 until it is observed.
1
|ψ1 ⊗ |ψ2 denotes tensor product of |ψ1 and |ψ2 . If |ψ1 = and
2i
2
|ψ2 = then
3
⎡ ⎤ ⎡ ⎤
1 × 2 2
1 2 ⎢ 1×3 ⎥ ⎢ 3 ⎥
|ψ1 ⊗ |ψ2 = ⊗ =⎢ ⎥ ⎢
⎣ 2i × 2 ⎦ = ⎣ 4i ⎦ .
⎥ (7.1)
2i 3
2i × 3 6i
Multiple bits have more states. With two classical bits 0 and 1 there are
four possible states 00, 01, 10, 11. But a general two qubit system can be
represented by
|ψ = α00 |00 + α01 |01 + α10 |10 + α11 |11 (7.3)
Then
We note that σx gives rise to bit flip while σz causes phase flip. What is the
effect of σy ?
1A term defining the maximum number of digital inputs allowed by a logic gate.
2 It defines the maximum number of digital inputs that the output of logic gates can
feed.
Quantum Computers 165
Example 1:
Consider a quantum state of a modest number of qubits, for example 100
lines in a Hilbert space of dimensions 2100 ∼ 1030 . To perform a compu-
tation a classical computer has to work with matrices of exponentially
large size and this would take a very long time.
Example 2:
A single computation acting on say, 300 qubits can achieve the same
effect as 2300 computations acting simultaneously on classical bits.
Example 3:
To factor a 400 digit number, a powerful workstation would require
about 10 years. But a quantum computer could complete the same task
in just a few minutes.
2. There are a number of problems for which the underlying process can be
sped-up tremendously through quantum algorithms. Consider a number
N of L digits so that N ≈ 10L . To determine its factors, in the least case,
166 Quantum Mechanics II: Advanced Topics
√ √
it is required to divide N by numbers up to N . That is N ∼ 10L/2
operations are essential. Hence, the number of operations would increase
with L exponentially. The best known classical algorithm requires s =
1/3 2/3
Ae1.9L (log L) (A is a constant) number of operations for factorizing
an L digit number. Therefore, it is not considered an efficient algorithm.
To factorize a 130 digit number at the rate of ∼ 1012 operations per
second, a classical computer would require ∼ 42 days. It would require
∼ 10 years for a 400 digit number. However, a quantum algorithm of
Peter Williston Shor requires time ∝ L3 .
3. Computations cannot be reversible in a classical computer (why can’t a
computer run backwards?). In quantum theory, reverse time evolution
is specified by the unitary operator U −1 = U † . A consequence of this is
that computations can be reversible in a quantum computer.
4. Calculations in a classical computer lead to dissipation in order to damp
out an attempt by the system to make a transition. In contrast, in a
quantum computer dissipation cannot be used and further the accuracy
of a computation is built-in.
5. In a classical computer errors in the initial data may grow exponentially
with the number of steps involved. This is because, the classical dy-
namics involves the symplectic group that is noncompact. In quantum
mechanics, inaccuracies in the initial data do not grow. This is because
it uses the compact unitary group.
and |xj |2 is the probability that the register is in state j. We call x the wave
function (ψ) of the register.
In a quantum computer, the software is represented by ψ and the hardware
by a Hamiltonian. The Hamiltonian describes the dynamics of the central
processing unit (CPU). The hardware generates a unitary evolution of ψ(t)
representing the state of the software at time t. The software is a finite string
of bits with a logical meaning. It includes the inputs (such as programs and
data), the output and a scratch pad necessary to store intermediate results.
The states, for example, | ↓ and | ↑ represent a bit with logical values 0 and
1 respectively.
|0 |1
|1 |0
α|0 + β|1 α|1 + β|0
Unlike the digital gates, the quantum gates are assumed to act on superposi-
tion states. The UNOT provides the transformation
Here α and β are the amplitudes of the states. If we represent |0 and |1 in
column matrix then the output of the NOT gate is
α 0 1 α β
X = = . (7.14)
β 1 0 β α
The truth table of the quantum NOT gate is given in the table 7.2.
In classical gates, the NOT gate is the only nontrivial single-bit gate. In
quantum mechanics there are many nontrivial qubit gates with |α|2 +|β|2 = 1.
Examples are the Z gate and Hadamard (H) gate. They are given by
1 0 1 1 1
Z= , H= √ . (7.15)
0 −1 2 1 −1
These gates are very useful. The truth table of them are given in tables 7.3 and
7.4 respectively. These gates are represented pictorially as shown in Fig. 7.1.
Consider the Hadamard transformation given by
1 1 1 1 1 1 1
H= √ , H =√ = √ (|0 + |1),
2 1 −1 0 2 1 2
0 1 1 1
H =√ = √ (|0 − |1). (7.16)
1 2 −1 2
It acts on a single qubit. Its effect is to rotate the state about the y-axis.
Interestingly, there are infinitely many 2 × 2 unitary matrices and so in-
finitely many qubit gates. Remember that the classical gate NOT gate is the
Quantum Computers 169
|0 |0
|1 −|1
α|0 + β|1 α|0 − β|1
α | 0 > + β | 1> α
H ( |0 > + |1>)
2
β
+ ( |0 > | 1>)
2
Solved Problem 2:
If X, H and Z denote the quantum NOT, Hadamard and Z gates respectively,
show that HXH = Z.
We obtain
1 1 1 0 1 1 1 1
HXH = √ √
2 1 −1 1 0 2 1 −1
1 1 1 1 1
=
2 −1 1 1 −1
1 0
=
0 −1
= Z. (7.18)
The first qubit is the control and the target is the second qubit. The first
two terms in Eq. (7.19) indicates that if the control qubit is in the state |0
then the target state remains the same. The target state is changed when the
control state is |1. The last two terms in Eq. (7.19) represent these. Because
the state of the second qubit is dependent on the first qubit’s state, the two
qubits become entangled on passing through the CNOT gate. Combination
of the CNOT and the Hadamard gates can be used to realize both quantum
superposition and entanglement. We notice that the control and the target
qubits are XORed and stored in the target qubit. The matrix representation
of the CNOT operation is given by
⎛ ⎞ ⎛ ⎞⎛ ⎞
|00 1 0 0 0 |00
⎜ |01 ⎟ ⎜ 0 1 0 0 ⎟ ⎜ |01 ⎟
UNOT ⎜ ⎟ ⎜ ⎟⎜ ⎟
⎝ |10 ⎠ = ⎝ 0 0 0 1 ⎠ ⎝ |10 ⎠ . (7.20)
|11 0 0 1 0 |11
A reversible quantum gate is Toffoli gate. It has three input bits, say a, b
and c and three outputs a , b and c . The truth table of Toffoli gate is given in
table 7.6. a and b are treated as control bits and are unaffected by the target
bit c. But c is inverted if both a and b are 1.
Solved Problem 3:
√
Given |ψ = α|0 + β|1 and an EPR pair (|00 + |11) / 2 find the state of
the complete system and the effect of CNOT on it.
We obtain
1 1 u1
√ [α|0 (|00 + |11) + β|1 (|00 + |11)] = √ , (7.21a)
2 2 u2
172 Quantum Mechanics II: Advanced Topics
where
⎛ ⎞ ⎛ ⎞
α β
⎜0⎟ ⎜0⎟
u1 = ⎜ ⎟
⎝0⎠ , u2 = ⎜ ⎟
⎝0⎠ . (7.21b)
α β
Performing CNOT we get
⎛ ⎞
0
1 1 u1 ⎜β ⎟
√ [α|0 (|00 + |11) + β|1 (|10 + |01)] = √ , u3 = ⎜ ⎟
⎝β ⎠ .
2 2 u3
0
(7.22)
Solved Problem 4:
Find the output state |ψ1 of the circuit given in Fig. 7.5 for the input state
|ψ0 = α|0 + β|1.
We have
1 0 0 1
Z= , X= (7.24)
0 −1 1 0
and
1 0 α
|ψ0 = α|0 + β|1 = α +β = . (7.25)
0 1 β
Further,
1 0 α α
Z|ψ0 = = = α|0 − β|1 . (7.26)
0 −1 β −β
Quantum Computers 173
(i) NOT 1 0 0 0
a x b 0 0 1 0
0 1 0 0
b x a 0 0 0 1
(ii) Controlled-NOT 1 0 0 0
a a 0 1 0 0
0 0 0 1
b + b +a 0 0 1 0
(iii) Toffoli 1 0 0 0 0 0 0 0
a a 0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
b b 0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
c + c + ab 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 0
n ψ U ψ
U
ψ0 ψ1
Z X
Then
0 1 α −β
|ψ1 = XZ|ψ0 = = = α|1 − β|0 . (7.27)
1 0 −β α
where the output is initially set to 0. The values of f (0), · · · , f (2m − 1) found
by applying Uf only once to a superposition of all input as
2m −1
1
|ψ = Uf |x |0
2m/2 x=0
m
2 −1
1
= |x|f (x) . (7.30)
2m/2 x=0
|01 if f = f1
|11 if f = f2
(7.40)
−|11 if f = f3
−|01 if f = f4 .
Thus, by comparing the final state of |ψ with Eq. (7.40) we can identify
whether the unknown f is f1 or f2 or f3 or f4 .
The essential features of the above quantum algorithm are:
1. The crucial elements are the superposition and linearity of quantum
mechanics. |ψ in Eq. (7.40) is computed on the superposition states
|00, |01, |10 and |11 simultaneously.
2. The final state |ψ is due to an interference of various parts of the su-
perposition.
3. If it is desired to know whether f is a constant (f = f1 or f4 ) or balanced
(f = f2 or f3 ) then it is enough to measure the final state of the first
qubit. If the first qubit is |0 then f is a constant. f is balanced if the
first qubit is |1. Notice that the algorithm does not say whether f is f1
or f4 and f2 or f3 . However, nowhere we learn about either f (0) or f (1).
We are able to find out that the f is a constant or not by computing f
once. In classical computation we must evaluate f twice before making
a decision.
The quantum circuit to implement Deutsch’s algorithm is given in Fig. 7.6.
The input state is |ψi = |01 and the output is
|0 − |1
|ψf = ±|f (0) ⊕ f (1) √ . (7.41)
2
So, by measuring the first qubit, we may determine f (0) ⊕ f (1) and hence
178 Quantum Mechanics II: Advanced Topics
0 H a a H
Uf
1 H b b + f(a)
ψi ψ
f
The number of steps needed for this is O(log N ). The second register is ini-
tialized to a state different from |0. The action of the oracle Uω is
|i is the index register, |j is the oracle single qubit which is flipped if f (i) = 1
and unchanged otherwise. We can find whether i is a solution of the problem
by preparing |i|0, applying the oracle and checking whether the oracle qubit
is flipped to |1. We have
⎡ ⎤
1 ⎣ |1 − |0 |1 − |0 ⎦
Uω |φ = √ |i √ − |ω √ . (7.45)
N i=ω 2 2
The action of Uω on |φ is to change the sign of the component in the direc-
tion of |ω. This reflects |φ in the Hilbert space of dimension N about the
hyperplane orthogonal to |ω. At this instant the value of ω is unknown to
us. We can find the value of ω by consulting the oracle a certain minimum
number of times.
Now, we construct another operator Us which performs a reflection in
such a way that the component of |φ along |s is preserved and the signs of
the component in the hyperplane perpendicular to |s is changed. Here one
iteration is the unitary transformation RGrov = Us Uω . Let θ be the angle
between |s and |ω. Then the action of one iteration on |φ is to rotate its
component along |s through an angle 2θ that is away from the hyperplane
perpendicular to the vector |ω. Successive iterations with various choices of |s
makes |φ close to |ω and moreover away from the hyperplane perpendicular
to |ω. The number of queries required to obtain the correct value √ of |ω with
large probability when |φ is measured after the iterations is π N /4. So,
Grover’s algorithm has a quadratic speedup compared to the best classical
algorithm.
number N into exactly two large prime numbers [17]. Classically,√ to find the
two prime numbers we have to check all the numbers from 1 to N .
In Shor’s algorithm, randomly a number a < N , ar = 1 (mod N ) for an
even integer value of r is chosen. It can be shown that for most choices of a,
N shares a common factor having ar/2 + 1 or ar/2 − 1. Once r is found then
applying a classical Euclid’s algorithm one can easily compute the common
factor of N and also ar/2 ± 1. Thus, the problem of factorizing N is solved.
Let us choose
Now, to get the value of r apply a quantum Fourier transform on the first
register (of the state |φ). The effect is
UFT |φ → f (k) |k |u , (7.52)
k
From the above, the period T of f (x) is obtained as T = 2. This period can be
determined by employing the method described earlier. To find N , calculate
Z = aT /2 = 91 = 9. The greatest common divisor of (Z + 1, N ) = (9 + 1, 20) =
(10, 20) is 10. The greatest common divisor of (Z −1, N ) = (9−1, 20) = (8, 20)
is 4. These two numbers 4 and 10 are factors of 20. In this way two factors of
a number N can be obtained if the quantum algorithm gives the period T of
f (x).
8. A subroutine should not leave any qubits over its computed answer. This
is because the computational paths with different information cannot
interfere.
In order to perform a quantum computation one should make proper use of
the above features.
7.10 BIBLIOGRAPHY
[1] B. Schumacher, Phys. Rev. A 51:2738, 1995.
[2] G.P. Berman, G.D. Doolen, R. Mainieri and V.I. Tsifrinovich, Introduc-
tion to Quantum Computers. World Scientific, Singapore, 1998.
[3] M. Nielsen and I.L. Chuang, Quantum Computation and Quantum In-
formation. Cambridge University Press, Cambridge, 2002.
[4] V. Sahni, Quantum Computing. Tata McGraw–Hill, New Delhi, 2007.
[5] P.A. Benioff, Phys. Rev. Lett. 48:1581, 1980.
[6] R. Feynman, Found. Phys. 16:507, 1986.
[7] R. Feynman, Int. J. Theor. Phys. 21:467, 1982.
[8] D. Deutsch, Proc. Roy. Soc. London A 400:97, 1985.
[9] P.W. Shor, “Algorithms for quantum computation: Discrete logarithms
and factoring,” in the Proceedings of 35th Annual Symposium on the
Foundations of Computer Science. IEEE Press, Los Alamos, 1994.
[10] P.W. Shor, SIAM J. Comp. 26:1484, 1997.
[11] D. Deutsch and R. Jozsa, Proc. Royal Soc. London A 439:553, 1992.
[12] L.K. Grover, in Proceedings, 28th Annual ACM Symposium on the The-
ory of Computation. ACM Press, New York, 1996 pp. 212.
[13] C.H. Bennett, Physics Today, October 1995, pp. 24.
[14] T. Toffoli, Reversible Computing. Technical Report MIT/LCS/TM-151 ,
1980.
[15] D. Deutsch, A. Berenco and A. Ekert, Proc. Royal Soc. London A
449:669, 1995.
[16] L.K. Grover, Phys. Rev. Lett. 79:325, 1997.
[17] E.C.G. Sudarshan, Current Science 84:511, 2003.
186 Quantum Mechanics II: Advanced Topics
[30] J. Karsal, S.P. Jordan, P.J. Love, M. Mohseni and A.A. Guzik, Proc.
Natl. Acad. Sci. 105:18681, 2008.
[31] J.D. Whitfield, J.D. Biamonte and A.A. Guzik, Mol. Phys. 109:735,
2011.
[32] N.K. Langford, S. Ramelow, R. Prevedel, W.J. Munro, G.J. Milburn
and A. Zeilinger, Nature 478:360, 2011.
[33] W. Harneit, Phys. Rev. A 65:032322, 2002.
[34] S.C. Benjamin, A. Ardavan, G.A.D. Briggs, D.A. Britz, D. Gunlycke,
J. Jefferson, M.A.G. Jones, D.F. Leigh, B.W. Lovett, A.N. Khobystov,
S.A. Lyon, J.J.L. Morton, K.Porfyrakis, M.R. Sambrook and A.M. Tyry-
shkin, J. Phys.: Condens. Matter 18:S867, 2006.
7.11 EXERCISES
7.1 Assume that a qubit can be expressed as |ψ = cos (θ/2) |0 +
sin (θ/2) eiφ |1 with θ ∈ [0, π] while φ ∈ [0, 2π]. Express the two qubits
|ψ|φ in separable form and also find |ψ⊗2 .
7.2 Obtain the matrix representation of the Hadamard gate.
7.3
Express the Hadamard terms of the Pauli matrices σ1 =
gate in
0 1 1 0
and σ3 = .
1 0 0 −1
188 Quantum Mechanics II: Advanced Topics
a a
b X aXb
7.6 If X, H and Z denote the quantum NOT, Hadamard and Z gates re-
spectively, find HZH.
7.7 Consider the initial state
λ μ
|ψ = √ (|000 + |011) + √ (|100 + |111).
2 2
Find the state after applying a CNOT gate (using the first qubit as the
control qubit and the second as the target) followed by Hadamard gate
on first qubit.
1
1 0
7.8 Suppose M0 = |00| = 0 1 = and M2 =
0 0 0
0
0 0
0 1 = are two measurement operators. If |ψ =
1 0 1
a|0 + b|1 find the probability of measuring |0.
1 0
7.9 If S = is a quantum phase gate then form its truth table.
0 i
1 0
7.10 Form the truth table for the T gate defined as T = .
0 eiπ/4
7.11 Consider the two circuits shown in Fig. 7.8. The left-side circuit is the
swap gate which exchanges the state of two qubits. Show that the two
circuits in Fig. 7.8 are equivalent.
x +
x + +
FIGURE 7.8 Two equivalent circuits.
Quantum Computers 189
7.12 In the notation |a|b = |ab where a is the control bit and b is the target
bit, find the outputs of the quantum circuit shown in Fig. 7.9 for the
inputs |00, |01, |10 and |11.
a H
b +
ψi ψ0
7.13 Construct the truth table for the Toffoli gate shown in Fig. 7.10 and
show that it stimulates NAND gate.
a a
b b
1 + c
FIGURE 7.10 A Toffoli gate.
7.14 Find the output of the circuit given in Fig. 7.11, which can be used to
implement the Deutsch’s algorithm, for the input |ψi = |0 |1 = |01.
0 Η a a Η
Uf
1 Η b b + f(a)
ψi ψ1 ψ2 ψf
Learn more
Appendix G: Quantum Computing
G.1 INTRODUCTION
It is strongly suspected that computers that function as quantum mechanics simulators, so-
called quantum computers, will prove to be inherently more powerful than conventional or
classical computers. The main reason for this is that quantum computers, whose functions are
based on manipulating coherent quantum amplitudes, will have a huge advantage in algorithmic
speed. A number of fundamental algorithms require fewer logical steps to solve on a quantum
computer than its conventional counterpart. Another intrinsic advantage is in the expansion of
the memory space of computations. The state space of such machines will someday overwhelm
conventional machines in terms of the storage and manipulation of large data sets.
Quantum computers are now a reality, but we are only in the initial stages of understanding
the things such machines are capable of doing. I cannot in any way do justice to the burgeoning
field of quantum computation and information here, but I will attempt to impart some of the
excitement of the concepts involved and make connections to helpful references that can paint a
more complete picture. In any case, a student in quantum mechanics is actually in a very advan-
tageous position to understand, utilize, and manipulate such new resources, and so a modest
introductory tutorial on this topic seems very appropriate.
What is a quantum computer?* First, let us distinguish it from what we are terming a classical
computer. A classical computer works its way serially through a problem, one step at a time. This
mode of operation has been greatly improved upon over the past several decades by incorporating
the concept of parallel processing: a problem can be broken into pieces and many independent
calculations can be done simultaneously. However, a quantum computer will do better: it can
manipulate all possibilities at once without the need to break the problem into pieces with the
attendant overheads. The classical computer works on irreversible steps of logic, pulling items
out of an inventory, whereas the quantum computer works on reversible global amplitudes that
are immediately accessible. The logic necessary for a quantum computer is a generalization of the
ways we learned how to manipulate spin 1/2 amplitudes in Chapter 1. Quantum computation
involves all the concepts we learned about in our quantum excursions: indeterminism, interfer-
ence, uncertainty, and superposition. There will only be a change in terminology here, with no
change in the underlying quantum concepts. Mathematically, quantum computation is just an
application of linear algebra, but it is important to get used to the language in this new field.
Let us first think about the basic algorithmic elements of a quantum computer. The basic com-
putational component of a classical computer is the bit, which is a logical unit that can take on
only two values, conventionally labeled 0 and 1, whereas the basic unit on a quantum computer
* See the early overview article for a more eloquent orientation: L. Grover, “Quantum Computing,” The Sciences, July/
August 1999, 24–30.
565
566 Appendix G: Quantum Computing
is a two-valued qubit (quantum bit), whose general structure we learned about in Chapter 1. The
general state of this qubit |ψ〉 is the linear superposition
| yñ = a | 0ñ + b | 1ñ , (G.1)
where bra–ket notation is being used, and the states are orthonormal: á0 | 0ñ = á1 | 1ñ = 1,
á0 | 1ñ = á1 | 0ñ = 0. α and β are complex numbers with the normalization condition:
áy | yñ = | a |2 + | b | 2 = 1. Thus |0〉 is simply “spin up” (| 0ñ º | +ñ from Chapter 1), and |1〉 is “spin
down” (|1ñ º | -ñ ):
æ1ö æ0ö
0 « ç ÷ , 1 « ç ÷. (G.2)
ç0÷ ç1÷
è ø è ø
The states |0〉 and |1〉 are called the computational basis states, and are the analog of the bits 0 and
1 in conventional computer logic. The column–matrix equivalent form of the state in Equation
G.1 is of course
æaö
y = ç ÷. (G.3)
çb÷
è ø
After normalization, the qubit parameter space (or manifold) is characterized by two numbers.
Going back to bra–ket notation, the most general state may be written
æ q if q ö
| yñ = ç cos | 0ñ + e sin | 1ñ ÷ (G.4)
è 2 2 ø
(cf. Equations 1.80 and 1.222 in Chapter 1 and Equation 10.100 in Chapter 10) outside of an irrel-
evant overall phase, for the real parameters θ and ϕ. Based upon our experience with spin 1/2,
we know that θ and ϕ may be interpreted as the spherical coordinate direction angles associated
with the vector pointing in the geometrical “up” spin direction; θ is the polar angle and ϕ is the
azimuthal one. This one-to-one mapping of the state in Equation G.4 to a direction in an internal
space is embodied in the so-called Bloch sphere, shown in Figure G.1.
Defining a set of labels xi=(0,1) for qubit i, a direct product of qubits, | x1 , x2 ,... ñ º | x1 ñÄ | x2 ñ Ä ...,
may be used as computational basis states for the computer state just as a conventional spin basis
for a set of particles, | m1 , m2 ,...ñ º | m1 ñÄ | m2 ñ Ä ..., can be used for the spin state, just as we studied
in Chapter 8. So, for a two-qubit system, the basis states can be taken to be |0,0〉, |1,0〉, |0,1〉, and
|1,1〉. The state of such a system can be in a mixture of such basis states, for example
FIGURE G.1 The Bloch sphere representation of the state of a single qubit.
progress is embodied in Moore’s law,* which states that market forces drive a doubling in compu-
tational power roughly every 2 years. However, this level of advancement in conventional mem-
ory would be equivalent to simply adding a single additional qubit to a quantum computer in the
same amount of time!
A new computational field has emerged in which conventional computers are used to sim-
ulate quantum ones. Such simulations can be used for testing and reliability considerations.
Conventional parallel computers with better algorithms have so far kept pace with their quantum
cousins. However, a point will come where quantum computers, which are capable of doing 2n
mathematical operations simultaneously, will outpace all conventional ones. This point of separa-
tion is termed quantum supremacy.
In conventional computers, logic is performed by so-called logic gates on bits. Four examples are
shown in Figure G.2. The NOT gate is the only single-bit logic gate. The three others are called
AND, OR, and NOR gates. They have incoming bits labeled a and b; the output bit is determined
by the logic of the gate, which is represented by a symbol. Notice that in the last three cases the
action is irreversible: 2 bits in, 1 bit out. In each case, an associated truth table is also given for the
gate. The horizontal lines represent the causal flow from left to right.
Quantum logic gates are fundamentally different. The number of gates on input and output are
always the same. In contrast to the conventional computer single-bit gate, there are an unlimited
number of single-qubit logic gates. In fact, the operations on single-qubit gates are equivalent
to 2 × 2 unitary matrices U in linear algebra, and the action on the gates is always reversible.
* Named after Gordon Moore, a computer entrepreneur who made his observation/forecast in 1975. More technically,
the law involves the number of transistors on a central processing unit (CPU). This rate has held roughly constant until
the present (2019), but this trend must end eventually, as microprocessors are reaching the limits of the classical world,
where quantum indeterminacy is definitely not an advantage. The latest prognostication is that the law will last until
around 2025.
568 Appendix G: Quantum Computing
Some standard single-qubit operations and their associated unitary transformations are given
in Figure G.3. Note that such operations are specified by the action on the computational basis
| x1 , x2 ñ ® U | x1 , x2 ñ, which is analogous to the truth tables for conventional logic gates. Multiple
operations may be performed on a qubit, with the right-flowing causal order indicated by a hori-
zontal line. We found it useful in Chapter1 to explain the action of operators on quantum ket-
states by the use of Process Diagrams, in which there was an understood causal flow of symbols
from right to left. Similarly, workers in the quantum information field have found it useful to
illustrate multiple qubit operations as such a flow. Qubits are conventionally shown as flowing
horizontal lines, with operations taking place on them in causal order from left to right.
In addition to the single-qubit operations, there are also operations involving multiple qubits.
One of the two-qubit types of logic gates is called controlled operations, in that one qubit state is
used to control the output of another qubit. The symbolic form of the controlled-U operation is
shown next. Note that the gates are labeled from top to bottom.
The control qubit is used to set a condition, whereas the target qubit is conditionally modified
with one of the single-qubit logic gates, U. The control qubit is said to be “set” when its computa-
tional basis x-value is 1. That is, when qubit 1 is the control and qubit 2 is the target, one has the
controlled U(1) unitary operation:
Appendix G: Quantum Computing 569
ì | x1 , x2 ñ , x1 = 0,
U (1 ) ï (G.6)
| x1 , x2 ñ ¾¾¾ ®í
ï| x ñU | x ñ , x = 1.
î 1 2 1
When control and target are reversed, one has the controlled U(2) operation:
ì | x1 , x2 ñ , x2 = 0,
U (2) ï (G.7)
| x1 , x2 ñ ¾¾¾ ®í
ïU | x ñ | x ñ , x = 1.
1 2 2
î
CNOT(1)
| x1 , x2 ñ ¾¾¾¾¾®| x1 , x1 Å x2 ñ , (G.8)
when the first qubit is the control, and where the addition of the labels on the target qubit, x1 Å x2 ,
is done in mod(2) arithmetic. It is symbolized by
◾ Factorization of numbers. Calculating the prime factors of a very large odd com-
posite number N is considered essentially impossible for a conventional computer,
but turns out to be considerably less computationally intensive for a quantum one. A
quantum computer uses (log N ) 2 (log log N )(log log log N ) (base 2 logarithms) logic
gates, whereas a conventional computer, using a so-called number field sieve, uses
~ exp(c (log N )1/ 3 (log log N )2/ 3 ) gates, where c » 1.9 . Such factorizations, which are easy
to assign but hard to decode, are used every day for commercial encryption purposes,
which means that quantum computers could decipher such communications. This is
obviously an impetus for the development of study of such machines! The quantum fac-
torization code was developed by Peter Shor in 1994.†
◾ Quantum search algorithms. The problem of doing searches through data is intrinsi-
cally more efficient on quantum computers than classical ones. It can be shown that a
search through N items can be done with N logic steps as opposed to the classical
* See the Wiki “Quantum Algorithms” (https://en.wikipedia.org/wiki/Quantum_algorithm) for a more detailed list.
† P. Shor, “Algorithms for Quantum Computation: Discrete Logarithms and Factoring,” Proceedings of the 35th Annual
number of steps N. This algorithm can also be used to speed up cryptographic searches.
The algorithm was developed by Lov Grover in 1996.*
◾ Quantum simulations. Is it possible to do an actual quantum simulation† of quantum
systems that arise in atomic, nuclear, or particle physics? Classical simulations of quan-
tum systems use the Monte Carlo algorithm described in Appendix E. This is a way
of summing over a huge set of possible states. Is it possible to simulate such theories
directly on a set of spatially arrayed qubits? This possibility was speculated upon by
Feynman in a visionary talk in 1981.‡ His point was that to simulate the responses of
quantum systems, the best thing to do is to make them quantum mechanical also. There
is an impressive amount of work in this direction already.§
◾ Trapped ions. Individual charged atoms or ions can be trapped using an oscillating
electric field in a so-called Paul trap. Tuning with lasers can also place the atoms in a
superposition of two of their standard atomic states.
* L. Grover, “A Fast Quantum Mechanical Algorithm for Database Search”, Proceedings of the 28th Annual ACM
Symposium on the Theory of Computing, ACM Press, 212 (1996). L. Grover, “Quantum Mechanics Helps in Searching
for a Needle in a Haystack,” Phys. Rev. Lett. 79, 325 (1997).
† T. Johnson, S. Clark, and D. Jaksch, “What Is a Quantum Simulator?” EPJ Quantum Technology 1, 10 (2014).
‡ R. Feynman, “Simulating Physics with Computers,” Int. J. Theor. Phys. 21, 467 (1982). Such devices were also consid-
ered in Yu. Manin, “Computable and Noncomputable” (in Russian), Sov. Radio. 13 (1980).
§ See, for example, the articles in A. Trabesinger, ed., “Quantum Simulation,” Nat. Phys. 8 (2012). A recent imposing
simulation is described in J. Zhang et al., “Observation of a Many-Body Dynamical Phase Transition with a 53-Qubit
Quantum Simulator,” Nature 551, 601 (2017).
572 Appendix G: Quantum Computing
This is just a mere sampling of the technologies that are being tested.* The list given now for the
leading candidates may be completely different in just a few years!
A major problem with such machines is the tendency for the quantum state created to lose
quantum coherence, or “decohere.” It turns out the system decoherence time decreases as the
number of qubits increases. The decoherence time for n qubits is roughly 1/n times shorter than
the decoherence time for an individual qubit.† Maintaining a quantum state in the macroscopic
world is hard to do! The decoherence time for Josephson circuits is the shortest of the tech-
nologies listed, on the order of microseconds, whereas the decoherence time for trapped ions is
the greatest, on the order of seconds. Decoherence times for quantum dots falls somewhere in
between, and it is thought that the quasiparticle approach could provide a very stable system.
Besides the coherence issue, one must also consider the timescale necessary for individual gate
processes to occur, which vary greatly over the various technologies. The time necessary for the
algorithm to complete is the gate process speed times the number of gates, and this must be much
smaller than the system decoherence time for a workable machine.
Part of the cure for the decoherence issue are quantum error-correction and fault tolerance
codes. A major theoretical discovery in the 1990s was that quantum computers could reliably
compute despite the imperfections and faults introduced by quantum noise. The theory of such
quantum error protection is remarkably well developed. The basic idea is to fight entanglement
with entanglement and redundancy. Amazingly, it turns out that reliable computation can be
performed with faulty logic gates, as long as the probability of error on gates is below a certain
threshold. However, the reliability encoding thus introduced means many more qubits must be
3
introduced to control the “working” ones. In order to factor a 300 digit number (» 210 ) using
Shor’s algorithm, it is optimistically estimated‡ to require about 104 qubits, but with error correc-
tion and encoding, it could take 103 × 104 = 107 qubits to actually work. Thus, unless qubits turn
out to be easily protectable (as is possible with the quasiparticle approach) or as easy to form as
transistors on an integrated circuit, this could be a problem!
G.6 REFERENCES
A short list of some popular and recent introductory textbooks on quantum computing follows.
P. Kaye, R. Laflamme, and M. Mosca, An Introduction to Quantum Computing (Oxford University Press,
2007).
N. Mermin, Quantum Computer Science: An Introduction (Cambridge University Press, 2007).
M. Nielson and I. Chuang, Quantum Computation and Quantum Information (Cambridge University
Press, 2010).
E. Rieffel and W. Polak, Quantum Computing: A Gentle Introduction (MIT Press, 2011).
N. Yanofsky and M. Mannucci, Quantum Computing for Computer Scientists (Cambridge University Press,
2008).
PROBLEMS
G.1 The qubit state
1
| yñ =
2
(
| 0ñ + | 1ñ )
* See the Wiki “Quantum computing” (https://en.wikipedia.org/wiki/Quantum_computing).
† M. Dyakonov, “Is Fault-Tolerant Quantum Computation Really Possible?” Future Trends in Microelectronics Workshop,
is represented on the Bloch sphere at the point (1,0,0) in (x, y, z) coordinate space,
because comparing to Equation G.4 one has θ = π/2 and ϕ = 0. Given this initial state,
find the action of the single-qubit operators H, Z, S, and T on |ψ〉 and the associated
final position on the Bloch sphere in (x, y, z) space.
HZH = X .
G.3 Show that the CNOT operation is equivalent to the controlled Pauli X operation, as
discussed and illustrated in Section G.3.
That is, it is possible to interchange control and target qubits for this operation?
G.6 Prove directly that the quantum Fourier transform defined in Appendix B (Equations
B.9 and B.10) is unitary and therefore can be considered a qubit gate operation.
4
Quantum Gates, Quantum Circuit and
Quantum Computation
4.1 Introduction
Now that we have introduced qubits to store information, it is time to consider
operations acting on them. If they are simple, these operations are called
gates, or more precisely quantum gates, in analogy with those in classical
logic circuits. More complicated quantum circuits are composed of these
simple gates. A collection of quantum circuits for executing a complicated
algorithm, a quantum algorithm, is a part of a quantum computation.
Suppose the register is set to a fiducial initial state, |ψin = |00 . . . 0, for
example. A unitary matrix Ualg is designed to represent an algorithm which
we want to execute. Operation of Ualg on |ψin yields the output state |ψout =
Ualg |ψin . Information is extracted from |ψout by appropriate measurements.
Actual quantum computation processes are very different from those of a
classical counterpart. In a classical computer, we input the data from a key-
board or other input devices and the signal is sent to the I/O port of the
computer, which is then stored in the memory, then fed into the micropro-
cessor, and the result is stored in the memory before it is printed or it is
65
66 QUANTUM COMPUTING
displayed on the screen. Thus information travels around the circuit. In con-
trast, information in quantum computation is stored in a register, first of all,
and then external fields, such as oscillating magnetic fields, electric fields or
laser beams are applied to produce gate operations on the register. These
external fields are designed so that they produce desired gate operation, i.e.,
unitary matrix acting on a particular set of qubits. Therefore the information
sits in the register and they are updated each time the gate operation acts on
the register.
One of the other distinctions between classical computation and quantum
computation is that the former is based upon digital processing and the latter
upon hybrid (digital + analogue) processing. A qubit may take an arbitrary
superposition of |0 and |1, and hence their coefficients are continuous com-
plex numbers. A gate is also an element of a relevant unitary group, which
contains continuous parameters. An operation such as “rotate a specified
spin around the x-axis by an angle π” is implemented by applying a partic-
ular pulse of specified amplitude, angle and duration. These parameters are
continuous numbers and always contain errors. These aspects might cause
challenging difficulties in a physical realization of a quantum computer.
Parts of this chapter depend on [1, 2] and [3].
Similarly we introduce X : |0 → |1, |1 → |0, Y : |0 → −|1, |1 → |0,
and Z : |0 → |0, |1 → −|1, whose matrix representations are
01
X = |10| + |01| = = σx , (4.2)
10
0 −1
Y = |01| − |10| = = −iσy , (4.3)
1 0
1 0
Z = |00| − |11| = = σz . (4.4)
0 −1
The action of the CNOT gate, whose matrix expression will be written as
UCNOT , is
Let {|i} be the basis vectors, where i ∈ {0, 1}. The action of CNOT on
the input state |i|j is written as |i|i ⊕ j, where i ⊕ j is an addition mod 2,
that is, 0 ⊕ 0 = 0, 0 ⊕ 1 = 1, 1 ⊕ 0 = 1 and 1 ⊕ 1 = 0.
EXERCISE 4.1 Show that the UCNOT cannot be written as a tensor prod-
uct of two one-qubit gates.
EXERCISE 4.2 Let (a|0 + b|1) ⊗ |0 be an input state to a CNOT gate.
What is the output state?
It is convenient to introduce graphical representations of quantum gates. A
one-qubit gate whose unitary matrix representation is U is depicted as
The left horizontal line is the input qubit state, while the right horizontal line
is the output qubit state. Therefore the time flows from the left to the right.
A CNOT gate is expressed as
where • denotes the control bit, while denotes the conditional negation.
There may be many control bits (see CCNOT gate below).
More generally, we consider a controlled-U gate,
V = |00| ⊗ I + |11| ⊗ U, (4.7)
in which the target bit is acted on by a unitary transformation U only when
the control bit is |1. This gate is denoted graphically as
EXERCISE 4.3 (1) Find the matrix representation of the “upside down”
CNOT gate (a) in the basis {|00, |01, |10, |11}.
Quantum Gates, Quantum Circuit and Quantum Computation 69
1
UH : |0 → √ (|0 + |1)
2
(4.9)
1
|1 → √ (|0 − |1).
2
It is used to generate a superposition state from |0 or |1. The matrix repre-
sentation of H is
1 1 1 1 1
UH = √ (|0 + |1)0| + √ (|0 − |1)1| = √ . (4.10)
2 2 2 1 −1
(H ⊗ H ⊗ . . . ⊗ H)|00 . . . 0
1 1 1
= √ (|0 + |1) ⊗ √ (|0 + |1) ⊗ . . . √ (|0 + |1)
2 2 2
n
2 −1
1
= √ |x. (4.11)
2n x=0
EXERCISE 4.5 Show that the two circuits below are equivalent:
This exercise shows that the control bit and the target bit in a CNOT gate
are interchangeable by introducing four Hadamard gates.
(4.13)
where q1 denotes the first qubit, while q2 denotes the second. What are the
outputs for the inputs |00, |01, |10 and |11?
Note that the SWAP gate is a special gate which maps an arbitrary tensor
product state to a tensor product state. In contrast, most two-qubit gates
map a tensor product state to an entangled state.
is also called the Fredkin gate. It flips the second (middle) and the third
(bottom) qubits when and only when the first (top) qubit is in the state |1.
Its explicit form is
UFredkin = |00| ⊗ I4 + |11| ⊗ USWAP. (4.17)
Now let us measure the output state. We employ the following measurement
operator:
M1 = |11|. (4.20)
M1 has eigenvalues 0 and 1 with the eigenvectors |0 and |1, respectively.
When the input is |0, the output is |1 and the measurement gives the value
1 with the probability 1. If, on the other hand, the input is |1, the output
is |0 and the measurement yields 1 with probability 0, or in other words, it
yields 0 with probability 1. It should be kept in mind that the operator X
acts on an arbitrary linear combination |ψ = a|0 + b|1, which is classically
impossible. The output state is then X|ψ = a|1 + b|0.
We show in the following that the CCNOT gate implements all classical
logic gates. The first and the second input qubits are set to |1 to obtain the
NOT gate as
UCCNOT |1, 1, x = |1, 1, ¬x. (4.21)
We call this function f , also the XOR gate. The quantum gate that does this
operation is nothing but the CNOT gate defined by Eq. (4.5),
Note that the XOR gate may be also obtained from the CCNOT gate.
Suppose the first qubit of the CCNOT gate is fixed to |1. Then it is easy to
verify that
UCCNOT |1, x, y = |1, x, x ⊕ y. (4.24)
Thus the CCNOT gate can be used to construct the XOR gate.
Clearly this operation is not reversible and we have to introduce the same sort
of prescription which we employed in the XOR gate.
Let us define the logic function
which we also call AND. Note that we have to keep both x and y for f to be
reversible since x = x ∧ y = 0 implies both x = y = 0 and x = 0, y = 1. The
unitary matrix that computes f is
Observe that the third qubit in the RHS is 1 if and only if x = y = 1 and 0
otherwise. Thus the CCNOT gate may be employed to implement the AND
gate. It follows from Eq. (4.28) that the AND gate is denoted graphically as
4.3.4 OR Gate
The OR gate represents the logical function
0 x=y=0
OR(x, y) = x ∨ y = x, y ∈ {0, 1}. (4.29)
1 otherwise
74 QUANTUM COMPUTING
This function OR is not reversible either and special care must be taken.
Let us define
which we also call OR. Although the first and the second bits are negated, it
is not essential in the construction of the OR gate. These negations appear
due to our construction of the OR gate based on the de Morgan theorem
EXERCISE 4.8 Verify that the above matrix UOR indeed satisfies
Now it is obvious why negations in the first and the second qubits appear in
the OR gate. Since we have already constructed the NOT gate and AND gate,
we take advantage of this in the construction of the OR gate. The equality
(4.31) leads us to the following diagram:
Accordingly, the first and the second qubits are negated. The unitary matrix
obtained from this diagram is
UOR = (I ⊗ I ⊗ X)
·(|0000| ⊗ I + |0101| ⊗ I + |1010| ⊗ I + |1111| ⊗ X)
·(X ⊗ X ⊗ I). (4.34)
Observe that the OR gate is implemented with the X and the CCNOT gates
and, moreover, the X gate is obtained from the CCNOT gate by putting the
first and the second bits to |1.
If we want to have a gate VOR |x, y, 0 = |x, y, x ∨ y, we may multiply
X ⊗ X ⊗ I to UOR from the left so that VOR = (X ⊗ X ⊗ I)UOR .
EXERCISE 4.9 Show that the NAND gate can be obtained from the CC-
NOT gate. Here NAND is defined by the function
0 x=y=1
NAND(x, y) = ¬(x ∧ y) = x, y ∈ {0, 1}. (4.35)
1 otherwise
In summary, we have shown that all the classical logic gates, NOT, AND,
OR, XOR and NAND gates, may be obtained from the CCNOT gate. Thus
all the classical computation may be carried out with a quantum computor.
Note, however, that these gates belong to a tiny subset of the set of unitary
matrices.
In the next section, we show that copying unknown information is impos-
sible in quantum computing. However, it is also shown that this does not
restrict the superiority of quantum computing over the classical counterpart.
THEOREM 4.1 (Wootters and Zurek [4], Dieks [5]) An unknown quantum
system cannot be cloned by unitary transformations.
Let |ϕ and |φ be two states that are linearly independent. Then we should
have U |ϕ0 = |ϕϕ and U |φ0 = |φφ by definition. Then the action of U on
1
|ψ = √ (|ϕ + |φ) yields
2
1 1
U |ψ0 = √ (U |ϕ0 + U |φ0) = √ (|ϕϕ + |φφ).
2 2
76 QUANTUM COMPUTING
been delivered beforehand, and one of the qubits carries two classical bits of
information in the dense coding system. In the quantum teleportation, on
the other hand, two classical bits are used to transmit a single qubit. At first
glance, the quantum teleportation may seem to be in contradiction with the
no-cloning theorem. However, this is not the case since the original state is
destroyed.
1
|Φ+ = √ (|00 + |11) (4.38)
2
in advance. Suppose Alice has the first qubit and Bob has the second.
FIGURE 4.1
Communication from Alice to Bob using dense coding. Each qubit of the Bell
state |Φ+ has been distributed to each of them beforehand. Then two bits
of classical information can be transmitted by sending a single qubit through
the quantum channel.
Alice: Alice wants to send Bob a binary number x ∈ {00, 01, 10, 11}. She
picks up one of {I, X, Y, Z} according to x she has chosen and applies the
transformation on her qubit (the first qubit of the Bell state). Applying the
transformation to only her qubit means she applies an identity transformation
78 QUANTUM COMPUTING
to the second qubit which Bob keeps with him. This results in
Alice sends Bob her qubit after the transformation given above is applied.
Note that the set of four states in the rightmost column is nothing but the
four Bell basis vectors.
Bob: Bob applies CNOT to the entangled pair in which the first qubit, the
received qubit, is the control bit, while the second one, which Bob keeps, is
the target bit. This results in a tensor-product state:
Note that Bob can measure the first and second qubits independently since
the output is a tensor-product state. The number x is either 00 or 11 if the
measurement outcome of the second qubit is |0, while it is either 01 or 10 if
the meansurement outcome is |1.
Finally, a Hadamard transformation H is applied on the first qubit. Bob
obtains
Received state 1st qubit UH |1st qubit
1
|ψ0 √ (|0 + |1) |0
2
1
|ψ1 √ (|1 + |0) |0
2 (4.41)
1
|ψ2 √ (|1 − |0) −|1
2
1
|ψ3 √ (|0 − |1) |1
2
Quantum Gates, Quantum Circuit and Quantum Computation 79
FIGURE 4.2
Quantum circuit implementation of the dense coding system. The leftmost
Hadamard gate and the next CNOT gate generate the Bell state. Then a
unitary gate U , depending on the bits Alice wants to send, is applied to the
first qubit. Bob applies the rightmost CNOT gate and the Hadamard gate to
decode Alice’s message.
be the state of the qubit. Both of them have been given one of the qubits of
the entangled pair
1
|Φ+ = √ (|00 + |11)
2
as in the case of the dense coding.
80 QUANTUM COMPUTING
FIGURE 4.3
In quantum teleportation, Alice sends Bob two classical bits so that Bob
reproduces a qubit state Alice used to have.
Alice applies the decoding step in the dense coding to the qubit |φ =
a|0 + b|1 to be sent and her qubit of the entangled pair. They start with the
state
1
|φ ⊗ |Φ+ = √ a|0 ⊗ (|00 + |11) + b|1 ⊗ (|00 + |11)
2
1
= √ (a|000 + a|011 + b|100 + b|111) , (4.43)
2
where Alice has the first two qubits while Bob has the third. Alice applies
UCNOT ⊗ I followed by UH ⊗ I ⊗ I to this state, which results in
If Alice measures the two qubits in her hand, she will obtain one of the states
|00, |01, |10 or |11 with equal probability 1/4. Bob’s qubit (a qubit from the
Bell state initially) collapses to a|0 + b|1, a|1 + b|0, a|0 − b|1 or a|1 − b|0,
respectively, depending on the result of Alice’s measurement. Alice then sends
Bob her result of the measurement using two classical bits.
Notice that Alice has totally destroyed the initial qubit |φ upon her mea-
surement. This makes quantum teleportation consistent with the no-cloning
theorem.
Bob: After receiving two classical bits, Bob knows the state of the qubit in
Quantum Gates, Quantum Circuit and Quantum Computation 81
his hand;
Received bits Bob’s state Decoding
00 a|0 + b|1 I
01 a|1 + b|0 X (4.45)
10 a|0 − b|1 Z
11 a|1 − b|0 Y
Bob reconstructs the intial state |φ by applying the decoding process shown
above. Suppose Alice sends Bob the classical bits 10, for example. Then Bob
applies Z to his state to reconstruct |φ as follows:
Figure 4.4 shows the actual quantum circuit for quantum teleportation.
FIGURE 4.4
Quantum circuit implementation of quantum teleportation. Alice operates
gates in the left side. The first Hadamard gate and the next CNOT gates
generate the Bell state |Φ+ from |00. The bottom qubit is sent to Bob
through a quantum channel while the first and the second qubits are measured
after applying the second set of the CNOT gate and the Hadamard gate on
them. The measurement outcome x is sent to Bob through a classical channel.
Bob operates a unitary operation Ux , which depends on the received message
x, on his qubit.
−β 0 0 α
where a = 1 and b = 4.
Proof. The proof requires several steps. It is instructive to start with the case
d = 3. Let ⎛ ⎞
ad g
U= b e⎝ h⎠
cf j
be a unitary matrix. We want to find two-level unitary matrices U1 , U2 , U3
such that
U3 U2 U1 U = I.
Then it follows that
U = U1† U2† U3† .
Quantum Gates, Quantum Circuit and Quantum Computation 83
(i) Let ⎛ ⎞
a∗ b∗
u u 0
U1 = ⎝−b a 0⎠,
u u
0 0 1
where u = |a|2 + |b|2 . Verify that U1 is unitary. Then we obtain
⎛ ⎞
a d g
⎝
U 1 U = 0 e h ⎠ ,
c f j
where a , . . . , j are some complex numbers, whose details are not necessary.
Observe that, with this choice of U1 , the first component of the second row
vanishes.
(ii) Let
⎛ a∗ ∗ ⎞ ⎛ ∗ ⎞
u 0 cu a 0 c∗
U2 = ⎝ 0 1 0 ⎠ = ⎝ 0 1 0 ⎠ ,
− uc 0 ua −c 0 a
where u = |a |2 + |c |2 = 1. Then
⎛ ⎞ ⎛ ⎞
1d g 1 0 0
U2 U1 U = ⎝ 0 e h ⎠ = ⎝ 0 e h ⎠ ,
0 f j 0 f j
where the equality d = g = 0 follows from the fact that U2 U1 U is unitary,
and hence the first row must be normalized.
namely the (1, 1) component is unity and other components of the first row
and the first column vanish. The number of matrices {Uk } to achieve this
form is the same as the number of zeros in the first column, hence (d − 1).
We then repeat the same procedure to the (d − 1) × (d − 1) block unitary
matrix using (d−2) two-level unitary matrices. After repeating this, we finally
decompose U into a product of two-level unitary matrices
U = V1 V2 . . . VN ,
THEOREM 4.2 (Barenco et al.)[14] The set of single qubit gates and
CNOT gate are universal. Namely, any unitary gate acting on an n-qubit
register can be implemented with single qubit gates and CNOT gates.
Proof. We closely follow [1] for the proof here. Thanks to the previous
Lemma, it suffices to prove the theorem for a two-level unitary matrix. Let
U be a two-level unitary matrix acting nontrivially only on |s and |t ba-
sis vectors of an n-qubit system, where s = sn−1 2n−1 + . . . + s1 2 + s0 and
t = tn−1 2n−1 + . . .+ t1 2 + t0 are binary expressions for decimal numbers s and
t. This means that matrix elements Uss , Ust , Uts and Utt are different from
those of the unit matrix, while all the others are the same, where |s stands for
|sn−1 |sn−2 . . . |s0 , for example. We can construct Ũ , the non-trivial 2 × 2
unitary submatrix of U . Ũ may be thought of as a unitary matrix acting on
a single qubit, whose basis is {|s, |t}.
Quantum Gates, Quantum Circuit and Quantum Computation 85
FIGURE 4.5
Example of circuit implementing the gate U .
q1 q2 q3
g1 = 0 0 0
g2 = 1 0 0 (4.51)
g3 = 1 1 0
g4 = 1 1 1
Since g3 and g4 differ only in the third qubit, which we call q3 , we have to
bring g1 to g3 and then operate Ũ on the qubit q3 provided that the first and
the second qubits are in the state |11. (Namely we have a controlled-Ũ gate
with the target bit q3 and the control bits q1 and q2 .) After this controlled
operation is done, we have to put |g3 = |110 back to the state |000 as
This operation is graphically shown in Fig. 4.5. Here ◦ denotes the negated
control node. This means that the unitary gate acts on the target bit only
when the control bit is in the state |0. This is easily implemented by adding
two X gates as
It is easy to see that this gate indeed implements U . Suppose the input is
|101, for example. Figure 4.6 shows that the gate has no effect on this basis
vector since U should act as a unit matrix on this vector. The operation of U
Quantum Gates, Quantum Circuit and Quantum Computation 87
FIGURE 4.6
U -gate has no effect on the vector |101.
If we use the circuit shown in Fig. 4.5, we produce the same result as shown
in Fig. 4.7
FIGURE 4.7
U -gate acting on α|000 + β|111 yields the desired output (aα + cβ)|000 +
(bα + dβ)|111.
be implemented with single-qubit gates and CNOT gates, which proves the
universality of these gates.
EXERCISE 4.14 (1) Find the shortest Gray code which connects 000 with
110.
(2) Use this result to find a quantum circuit, such as Fig. 4.5, implementing
a two-level unitary gate
⎛ ⎞
a00000c0
⎜0 1 0 0 0 0 0 0⎟
⎜ ⎟
⎜0 0 1 0 0 0 0 0⎟
⎜ ⎟
⎜0 0 0 1 0 0 0 0⎟ ac
⎜ ⎟
U =⎜ ⎟ , Ũ ≡ b d ∈ U (2).
⎜0 0 0 0 1 0 0 0⎟
⎜0 0 0 0 0 1 0 0⎟
⎜ ⎟
⎝ b 0 0 0 0 0 d 0⎠
00000001
LEMMA 4.3 Let U ∈ SU(2). Then there exist A, B, C ∈ SU(2) such that
U = AXBXC and ABC = I, where X = σx .
Proof. Lemma 4.2 states that U = Rz (α)Ry (β)Rz (γ) for some α, β, γ ∈ R.
Let
β β α+γ α−γ
A = Rz (α)Ry , B = Ry − Rz − , C = Rz − .
2 2 2 2
Then
β β α+γ α−γ
AXBXC = Rz (α)Ry XRy − Rz − XRz −
2 2 2 2
β β α+γ α−γ
= Rz (α)Ry XRy − X XRz − X Rz −
2 2 2 2
β β α+γ α−γ
= Rz (α)Ry Ry Rz Rz −
2 2 2 2
= Rz (α)Ry (β)Rz (γ) = U,
where use has been made of the identities X 2 = I and Xσy,z X = −σy,z .
It is also verified that
β β α+γ α−γ
ABC = Rz (α)Ry Ry − Rz − Rz −
2 2 2 2
= Rz (α)Ry (0)Rz (−α) = I.
FIGURE 4.8
Controlled-U gate is made of at most three single-qubit gates and two CNOT
gates for any U ∈ SU(2).
Proof. The proof is almost obvious. When the control bit is 0, the target bit
|ψ is operated by C, B and A in this order so that
EXERCISE 4.15 Let us consider the controlled-V1 gate UCV1 and the
controlled-V2 gate UCV2 . Show that the controlled-V1 gate followed by the
controlled-V2 gate is the controlled-V2 V1 gate UC(V2 V1 ) as shown in Fig. 4.10.
Quantum Gates, Quantum Circuit and Quantum Computation 91
FIGURE 4.9
Equality UCΦ(φ) = D ⊗ I.
FIGURE 4.10
Equality UCV2 UCV1 = UC(V2 V1 ) .
PROPOSITION 4.1 Let U ∈ U(2). Then the controlled-U gate UCU can
be constructed by at most four single-qubit gates and two CNOT gates.
where
D = Rz (−φ)Φ(φ/2)
and use has been made of the identity (D ⊗ I)(I ⊗ A) = D ⊗ A.
Figure 4.11 shows the statement of the proposition.
STEP 3: CCNOT gate and its variants are implemented with CNOT gates
and their variants.
Now our final task is to prove that controlled-U gates with n − 1 control
bits are also constructed using single-qubit gates and CNOT gates. Let us
start with the simplest case, in which n = 3.
92 QUANTUM COMPUTING
FIGURE 4.11
Controlled-U gate is implemented with at most four single-qubit gates and
two CNOT gates.
FIGURE 4.12
Controlled-controlled-U gate is equivalent to the gate made of controlled-V
gates with U = V 2 and CNOT gates.
LEMMA 4.6 The two quantum circuits in Fig. 4.12 are equivalent, where
U = V 2.
Proof. If both the first and the second qubits are 0 in the RHS, all the gates
are ineffective and the third qubit is unchanged; the gate in this subspace
acts as |0000| ⊗ I. In case the first qubit is 0 and the second is 1, the
third qubit is mapped as |ψ → V † V |ψ = |ψ; the gate is then |0101| ⊗ I.
When the first qubit is 1 and the second is 0, the third qubit is mapped as
|ψ → V V † |ψ = |ψ; hence the gate in this subspace is |1010| ⊗ I. Finally
let both the first and the second qubits be 1. Then the action of the gate on
the third qubit is |ψ → V V |ψ = U |ψ; namely the gate in this subspace is
|1111| ⊗ U . Thus it has been proved that the RHS of Fig. 4.12 is
FIGURE 4.13
Decomposition of the C3 U gate.
EXERCISE 4.16 Prove Lemma 4.6 by writing down the action of each gate
in the RHS of Fig. 4.12 explicitly using bras, kets and I, U, V, V † . (For exam-
ple, UCNOT = |00| ⊗ I + |11| ⊗ X for a two-qubit system.)
EXERCISE 4.17 Show that the circuit in Fig. 4.13 is a controlled-U gate
with three control bits, where U = V 2 .
Now it should be clear how these examples are generalized to gates with
more control bits.
The proof of the above proposition is very similar to that of Lemma 4.6
and Exercise 4.17 and is left as an exercise to the readers.
Theorem 4.2 has been now proved.
Other types of gates are also implemented with single-qubit gates and the
CNOT gates. See Barenco et al. [14] for further details. A few remarks are in
order. The above controlled-U gate with (n − 1) control bits requires Θ(n2 )
elementary gates.∗† Let us write the number of the elementary gates required
∗ We call single-qubit gates and the CNOT gates elementary gates from now on.
† We will be less strict in the definition of “the order of.” In the theory of computational
complexity, people use three types of “order of magnitude.” One writes “f (n) is O(g(n))”
if there exist n0 ∈ N and c ∈ R such that f (n) ≤ cg(n) for n ≥ n0 . In other words, O sets
the asymptotic upper bound of f (n). A function f (n) is said to be Ω(g(n)) if there exist
94 QUANTUM COMPUTING
FIGURE 4.14
Decomposition of the C(n−1) U gate. The number on the top denotes the layer
refered to in the text.
to construct the gate in Fig. 4.14 by C(n). Construction of layers I and III
requires elementary gates whose number is independent of n. It can be shown
that the number of the elementary gates required to construct the controlled
NOT gate with (n − 2) control bits is Θ(n) [14]. Therefore layers II and IV
require Θ(n) elementary gates. Finally the layer V, a controlled-V gate with
(n − 2) control bits, requires C(n − 1) basic gates by definition. Thus we
obtain a recursion relation
n0 ∈ N and c ∈ R such that f (n) ≥ cg(n) for n ≥ n0 . In other words, Ω sets the asymptotic
lower bound of f (n). Finally f (n) is said to be Θ(f (n)) if f (n) behaves asymptotically as
g(n), namely if f (n) is both O(g(n)) and Ω(g(n)).
Quantum Gates, Quantum Circuit and Quantum Computation 95
‡ Let m, N ∈ N (m < N ) be numbers coprime to each other. Then there exists P ∈ N such
that mP ≡ 1 (mod N ). The smallest such number P is called the period or the order.
It is easily seen that mx+P ≡ mx (mod N ), ∀x ∈ N.
Quantum Gates, Quantum Circuit and Quantum Computation 97
leaving other digits unaffected. Even worse, consider how many different basis
vectors are required for this system. This single system must have an enor-
mous number, 2n , of basis vectors! Let us consider 20 spin-1/2 particles in
a magnetic field. We can employ the spin-up and spin-down energy eigen-
states of each particle as the qubit basis vectors. Then there are merely 40
energy eigenvectors involved. Suppose we use energy eigenstates of a certain
molecule to replace this register. Then we have to use 220 ∼ 106 eigenstates.
Separation and control of so many eigenstates are certainly beyond current
technology. These simple consideration shows that multipartite implemen-
tation of a quantum algorithm requires an exponentially smaller number of
basis vectors than monopartite implementation since the former makes use of
entanglement as a computational resource.
References
[1] M. A. Neilsen and I. L. Chuang, Quantum Computation and Quantum
Information, Cambridge University Press (2000).
[2] E. Riefell and W. Polak, ACM Computing Surveys (CSUR) 32, 300
(2000).
[3] Y. Uesaka, Mathematical Principle of Quantum Computation, Corona
Publishing, Tokyo, in Japanese (2000).
[4] W. K. Wootters and W. H. Zurek, Nature 299, 802 (1982).
[5] D. Dieks, Phys. Lett. A 92, 271 (1982).
[6] D. Bouwmeester et al., Nature 390, 575 (1997).
[7] D. Boschi et al., Phys. Rev. Lett. 80, 1121 (1998).
[8] I. Marcikic et al., Nature 421, 509 (2003).
[9] R. Ursin et al., Nature 430, 849 (2004).
[10] A. Furusawa et al., Science 282, 706 (1998).
[11] M. A. Nielsen et al., Nature 396, 52 (1998).
[12] M. Riebe et al., Nature 429, 734 (2004).
[13] M. D. Barret et al., Nature 429, 737 (2004).
[14] A. Barenco et al., Phys. Rev. A 52, 3457 (1995).
Chapter 9
Superconducting
Quantum Computing
Devices
• Superconductivity history
• Components of superconducting circuits
• Quantization of superconducting circuits
• Types of qubits: charge, flux, phase and charge-flux
• Universality of quantum gates
• Measurements
Superconductivity manifests macroscopic quantum phenomena. A super-
conducting circuit composed of Josephson junctions, Cooper pair boxes, and
rf-/dc-SQUID, properly miniaturized, becomes quantized and demonstrates
Rabi oscillations and entanglement. In this chapter, we begin with an in-
troduction of the history and elementary theory of superconductivity. Then
we describe the building blocks of superconducting classical circuits and
derive their canonical quantizations. The set up of qubits and supercon-
ducting quantum logic gates are then examined. Finally, ways to make
measurements are discussed. We should remark that SQUID are widely
regarded as the most scalable quantum computing device.
9.1 Introduction
Even though quantum effects are mostly observed in microscopic scales,
they also manifest macroscopically. A particular case of such is supercon-
ductivity. Superconducting devices composed of Josephson junctions (JJ),
407
408 CHAPTER 9. SUPERCONDUCTING DEVICES
9.2 Superconductivity
We begin by giving a brief historical account [13, 23, 33]. Superconductiv-
ity was discovered in 1911 by the Dutch physicist Heike Kamerlingh Onnes
(1853–1926), who dedicated his career to the exploration of extremely cold
refrigeration. In 1908, he successfully liquefied helium by cooling it to
−452◦ F (4 K). In 1911, he began the investigation of the electrical prop-
erties of metals in extremely cold temperatures, using liquid helium. He
noticed that for solid mercury at cryogenic temperature of 4.2 K, its elec-
tric resistivity abruptly disappeared (as if there were a jump discontinuity).
This is the discovery of superconductivity, and Onnes was awarded the No-
bel Prize of Physics in 1913.
Subsequently, superconductivity was found in other materials. For ex-
ample, lead was found to superconduct at 7 K, and (in 1941) niobium nitride
was found to superconduct at 16 K.
Important understanding of superconductivity was made by Meissner
and Ochsenfeld in 1933 who discovered that superconductors expelled ap-
plied magnetic fields, a phenomenon which has come to be known as the
Meissner effect. In 1935, F. and H. London showed that the Meissner effect
was a consequence of the minimization of the electromagnetic free energy
Chapter 2
Application Areas
9
10 Introduction to Reversible Computing
2.3.2 Supercriticality
Critical Path (CP) analysis of a parallel application is the determination of
the inherently sequential path(s) of data dependencies from the start to end
of the computation [Yang and Miller, 1988, Hollingsworth, 1998]. Clearly, the
longest path from start to end is the most critical one. It is well-known that the
Application Areas 13
the lower bound on computation time if Uij is in the critical path of the over-
all computation Note that supercriticality is only possible due to reversible
execution. In the example, if xi is not equal to x∗i , then f −1 would have to
be invoked to correct the execution to conform to the dependencies. Thus,
reversible computing can be used to sometimes provide supercritical paral-
lel computation that exceeds the parallel efficiency and speedup otherwise
prescribed by the critical path.
2.4.3 Anti-Memoization
A form of reversible computing can be employed in recovering temporary val-
ues that are usually pushed from registers to main memory when a register
conflict occurs (due to register file size limitation or due to named registers
being reused and overwritten across operations). If a register value is poten-
tially about to be lost, it is usually pushed to memory and later loaded back
from memory when it is again needed/used. Because memory operations are
orders of magnitude slower than register speeds, it is desirable to keep op-
erations confined to register accesses as much as possible. Thus, when the
intermediate value that is lost in a register (due to being overwritten) is again
needed, it is sometimes possible to either recompute or reverse compute ear-
lier operations to recover the lost register value, instead of relying on storage
to/retrieval from main memory.
A generalization of such memory versus computation trade-off is the con-
Application Areas 17
2.5 Debugging
Reversibility of execution is very useful in the process of debugging programs
in an efficient and convenient fashion. When running a program, if an unex-
pected condition or undesirable results occur, the program’s execution needs
to be retraced to find the precise point where the deviation from desired be-
havior actually originated. In order to be able to step backward, the program
state needs to be saved before every forward operation. However, the amount
of saved state can become extremely large because the computer executes
millions of instructions per second; in fact, the accumulated state grows so
quickly that it may be infeasible to store the program trace for long program
execution length. The trace for only a small window of execution may be
stored. Yet, the distance between the point of the bug’s manifestation and the
original source location of the bug may be large, making it infeasible to step
backward to the correct origin of the bug via trace traversal. This is where
reversible computing can be applied—instead of saving/restoring the values of
the variables to/from memory, the inverses of the instructions can be executed
backward to traverse the program in reverse from the bug manifestation point
until the bug’s source is determined.
The difficulty in debugging is especially pronounced in (1) assembly-level
debugging, due to very large sizes of traces; and (2) parallel computing. Re-
versible computing is either a significantly more efficient method or the only
feasible method in these cases.
In debugging programs at the level of its assembly language, since the
18 Introduction to Reversible Computing
Reversible computing can be used for fault detection and, in some cases,
fault correction. Reverse execution can be used in trapping errors in either
forward code or the reverse code, or even in the implementation of the reverse
compiler. This is achieved by checking the following simple necessary correct-
ness condition at runtime [Bishop, 1997], which, when applied on every local
variable and global variable, is useful in detecting errors in the code or the
compiler.
back (non-faulted) processor Pr need only use reverse computation, but does
not have to access its own checkpoint LCr . The checkpoint is only used by
a processor if and only if it is the faulted processor. This particular aspect
dramatically relieves congestion in the system in terms of lowered pressure on
the memory bus and on the file system.
In Figure 2.1, Pr ’s corresponding state of LCf is joined by the dashed line
between the processors. The faulted processor Pf restarts from LCf , because
the state from LCf to the fault point is assumed to be lost or unavailable due
to failure.
22 Introduction to Reversible Computing
Interesting Contexts
Software for reversible execution found an interest-
ing application in the 1980s when J. Briggs reported a
way to use reverse code generation and reversible ex-
ecution to undo incorrect updates to the scoreboard
in cricket matches [Briggs, 1987]. Reversal code was
automatically generated with the objective of mini-
mization of the state information to be stored to en-
able reversal.
In the game of cricket [Knight et al., 2007], as in other
sports, mistakes and corrections inevitably occur in
recording and publishing the scores even as the game
is in progress. Errors can appear in two ways: (1) the
scoreboard operators may commit errors of omission
or commission in entering events into the comput-
ing system, or (2) the game itself may experience re-
versals of decisions and other sport-specific updates,
such as umpire’s corrections. In each of these types,
there are many occasions where updates are rolled
back and corrected, naturally warranting reversible
execution in the scoring program software.