Quantum computer algorithm moscathesis
Quantum computer algorithm moscathesis
Wolfson College
University of Oxford
1
Preface
Quantum computer algorithms are designed to exploit the properties of quan-
tum physics. Few powerful quantum algorithms are known. Although it is inter-
esting to nd applications of the existing quantum algorithms, we really seek a
fundamentally new one or an understanding of why we cannot nd one.
As part of this endeavour I have sought to understand the fundamental as-
pects of the existing quantum algorithms. Quantum computations can be carried
out in parallel on superpositions of exponentially many input states and infor-
mation about the outcomes of these computations can be measured via quan-
tum interference. By casting the known quantum algorithms within the para-
digm of quantum interferometry, I was able (together with co-authors) to clarify,
unite and generalise most of the known quantum algorithms in a series of papers
[CEMM98, CEH+99, vDDE+99, Mos98, Mos99, ME99, BHMT99]. These
results appear in Chapter 2. One class of algorithms that I have not yet studied
closely are those for simulating physical systems. However, one of the algorithms
developed for this purpose [AL98] turns out to be a rediscovery of the eigenvalue
estimation algorithm described in [CEMM98] (which was based on the one in
[Kit95]).
As a second part of this endeavour, I have sought to understand the limitations
of quantum computers, identifying approaches that cannot work, and shedding
light on why we nd it so hard to nd fundamentally new quantum algorithms. One
2
PREFACE 3
approach is to study the limitations of quantum computer algorithms in the black-
box model of computation, where we have a black-box that reveals information
about certain parameters (such as a string X of Boolean values X1 ; X2; : : : ; XN ),
and we wish to compute a function F (X ) of those parameters. We [BBC+98]
showed that the probability amplitudes of a quantum algorithm which has made
T black-box calls is a polynomial in X1; X2; : : : ; XN of degree at most T . From this
fact we derive several lower bounds on the number of queries required to compute
various functions of X1; X2; : : : ; XN , such as their parity, or majority value. We
show that any function that can be evaluated probabilistically using T queries
on a quantum computer can be evaluate deterministically on a classical computer
using at most (4T )6 queries. Several other relationships are also established. This
approach and the major results are presented in Chapter 3.
Some algorithms are interesting even if we never implement them. Perhaps
they prove a new mathematical theorem or possess some other intrinsic beauty.
However algorithms are often interesting because they solve a problem of practical
interest in which case their realisability is of fundamental importance. A good
example are algorithms for breaking cryptographic protocols. There is a large
gap between theory and practice in quantum computer algorithms. For the rst
few years since the eld of quantum computing was born [Fey82, Deu85] not
even two qubit algorithms had been implemented. Recently, nuclear magnetic
resonance technology was shown to be suitable for implementing quantum logic
[CFH96, GC97]. However no practical way of scaling NMR quantum computers
to large numbers of qubits is known and we are currently limited to a handful of
qubits. We illustrate techniques for better exploiting a xed amount of quantum
resources and suggest versions of quantum algorithms that can be implemented
PREFACE 4
with very few qubits. We have realised several of the rst quantum computations
[JM98, JMH98, JM99] and these are described in Chapter 4.
Acknowledgements
I am truly grateful to my supervisors Artur Ekert and Dominic Welsh for all
their teaching, advice, help and support.
Many thanks to my co-authors and collaborators. I thank those who have
generously hosted me, and the rest of the people at Oxford and around the world
who have helped me learn about this eld over the past three years. I also thank
my examiners for the many helpful suggestions.
Special thanks to Adriano Barenco, Simon Benjamin, Harry Buhrman, Richard
Cleve, Holly Cummins, Wim van Dam, Mark Ettinger, Matt Gevaert, Rasmus
Hvass Hansen, Bernard Howes, Peter Hyer, Hitoshi Inamori, Jonathan Jones,
Chiara Macchiavello, Frederic Magniez, Juan Poyatos, Miklos Santha, Alain Tapp,
Vlatko Vedral, Sue Witney, and Ronald de Wolf.
I am grateful to Richard Booth, Pete Seeviour, Kevin Thacker, and the
C.E.S.G. who funded this D.Phil. Many thanks to Wolfson College for supporting
me in so many ways over the past four years, this last year as the Robin Gandy
Junior Research Fellow. I thank the Wolfson College Boat Club and the mem-
bers of the many other clubs and societies in which I have participated during the
preparation of this thesis.
Many special thanks to my parents, brother, family, and friends for their love
and support.
5
Contents
Abstract 1
Preface 2
Acknowledgements 5
List of Figures 8
List of Tables 10
Chapter 1. Introduction 11
1.1. Quantum Physics 15
1.2. Quantum Computers 34
Chapter 2. Algorithms 37
2.1. The Deutsch algorithm 37
2.2. Eigenvalue Kick-Back 39
2.3. Phase Estimation and the Quantum Fourier Transform 42
2.4. Quantum Eigenvalue Estimation 47
2.5. Finding orders 50
2.6. Discrete Logarithms 56
2.7. Amplitude Estimation 59
2.8. Finding Hidden Subgroups 71
2.9. Equivalence of Shor and Kitaev approaches 82
2.10. Finding Hidden Ane Functions 85
6
CONTENTS 7
Chapter 3. Limitations of Quantum Computers 93
3.1. What is a complexity class? 94
3.2. Black-boxes 98
3.3. Relation between quantum networks, black-boxes and polynomials 101
3.4. Applications to lower bounds 104
3.5. Relating quantum and deterministic query complexity 107
3.6. Some examples and applications 108
3.7. Controlled-OX and some open problems 112
Chapter 4. Implementations 116
4.1. Dealing with errors and faults 116
4.2. Maximising exploitation of quantum resources 119
4.3. Quantum Computation using Nuclear Magnetic Resonance 123
4.4. Interesting algorithms for implementation with few qubits 130
Appendix A. Appendix 137
A.1. Computing a controlled-U 137
A.2. Computing M (U ) 139
A.3. Reversible Computing without keeping the input 140
A.4. Fourier Transforms 141
A.5. Public Key Cryptography and Quantum Computing 144
A.6. Finding logarithms, DSA, and Die-Hellman 148
A.7. Implementing a function with a pulse sequence 149
Bibliography 152
List of Figures
1.1 NOT and AND gates 13
1.2 Reversible AND 14
1.3 Reversibly computing a function 16
1.4 Beam-splitter 17
1.5 Two beam-splitters 18
1.6 Two beam-splitters and phase-shifters 19
1.7 Energy eigenstates of single spins 29
1.8 Energy eigenstates of two independent spins 31
1.9 Energy eigenstates of two coupled spins 32
2.1 Deutsch algorithm 38
2.2 Phase kick-back 40
2.3 Quantum Fourier transform and phase estimation 42
2.4 Eigenvalue estimation 49
2.5 Amplitude ampli cation 61
2.6 Hidden subgroup problem 73
2.7 Factoring algorithm analysis: computational vs. eigenvector
basis 84
2.8 Hidden subgroup analysis: computational vs. eigenvector basis 85
8
LIST OF FIGURES 9
2.9 Hidden ane functions algorithm 90
3.1 3-Colouring 95
3.2 A network which makes T black-box queries 102
3.3 A controlled black-box application 113
4.1 \Semi-classical" Fourier transform 121
4.2 Cytosine quantum computer 124
4.3 Classically computing f (0) and f (1) 133
4.4 Implementation of Deutsch algorithm 134
A.1 Network for controlled-controlled-NOT 138
A.2 Network for controlled-U 138
A.3 A network for M (U ) 140
A.4 Reversible computing without keeping the input 141
A.5 QFT (AB ) with A and B coprime 142
A.6 QFT (ABC ) for arbitrary A; B; C 144
List of Tables
2.5 Quantum vs. classical counting complexities 70
3.2 Quantum query complexities 113
10
CHAPTER 1
Introduction
An algorithm is a procedure for performing a task. For example, a cake recipe
is an algorithm that takes as input standard kitchen ingredients and uses standard
kitchen equipment to output a cake (sometimes with only a bounded probability of
success). A computer is a physical device that helps us process information, and an
information processing task can always be translated into physical one. Theorists
tend to work with an abstract model of computation, but when pondering the
capabilities and limitations of a computing device for some practical reason, it is
important not to forget the relationship between computing and physics. Dramatic
examples are the physical attacks used to break certain cryptosystems that made
use of RSA encryption. These protocols were designed with the hope that the
security of the system relies on the diculty of solving a problem which is closely
related to factoring large numbers. However, without factoring any integers, people
have been able correctly to infer the encryption keys. They did so by cleverly
probing physical devices performing the encryption for clues leaked during the
physical act of computing the ciphertext (see for example, [Koc96]).
A prototype computer is the Turing machine (see e.g. [GJ79, AHU74,
Pap94, MR95, Wel88]). The key ingredients are a piece of hardware which
runs according to some software and uses additional memory to carry out the
software instructions and produce some output. A suciently complex Turing
machine with an arbitrarily large supply of memory can simulate any other Turing
machine M provided the input contains a description of how M works. Such a
11
1. INTRODUCTION 12
Turing machine is called a universal Turing machine. If we equip a Turing ma-
chine with the ability to ip a fair coin, we get a probabilistic Turing machine. A
probabilistic Turing machine computers a function by outputting an answer that
is correct with probability at least 23 (the average is over all possible outcomes
of the coin ips, not the di erent inputs to the function f ). A universal Turing
machine can simulate any other Turing machine and in fact, they can simulate any
other reasonable computer known to date. Furthermore, a universal probabilistic
Turing machine can simulate any Turing machine (and any other reasonable device
known to date) with at most a polynomial overhead (this is the strong form of the
Church-Turing thesis). By polynomial overhead we mean that if our machine uses
T units of some resource (usually time or space), then the universal probabilistic
Turing machine will simulate it using at most p(T ) units of that resource where p is
a xed polynomial (often referred to as poly(T )). To do so, we specify the way our
reasonable computer works, and then the universal Turing machine simulates our
machine. Another model of computation is that of a uniform families of acyclic
circuits (see [Pap94] for example). An acyclic circuit Cn is described by a circuit
diagram which has n input wires, and at each time step t each wire can enter at
most one gate G. The term circuit seems to correspond to a particular physical
implementation. The acyclic circuits look more like an array or network of gates,
which is the terminology we will use in the quantum setting. The gates come from
a nite family of gates which take information from input wires and output infor-
mation along some output wires. A family of acyclic circuits is a family of circuits
fCnjn 2 Z+g. The family is uniform if we can easily construct Cn (say by an appro-
priately resource-bounded Turing machine - see [GJ79, Pap94, MR95, Cle99],
for a discussion). A deterministic Turing machine can compute whatever a prob-
abilistic one can (in nite time) by trying all possible outcomes of the coin ips.
1. INTRODUCTION 13
There is a well-de ned family of functions that can be computed in a nite number
of steps and those that cannot (see e.g. [Rog87] or [Dav82]). However not all
problems which have \e ective procedures" for solving them will have \ecient
procedures", that is procedures that use a `reasonable' amount of resources. The
computational complexity of a problem or task attempts to quantify the amount
of resources, such as time, space, or energy, necessary to perform the task for an
input of size n. We will restrict attention to worst-case complexities, that is the
complexity of a problem on the worst-case input of a speci c size. In particu-
lar, when using the acyclic circuit model, a natural measure of complexity is the
number of gates used in the circuit Cn.
In studying the minimum energy requirements of any computing device, Ben-
nett [Ben73] observed that the amount of energy necessary can be made arbitrarily
small if the computer has reversible components, that is if each operation was log-
ically reversible. For example, the NOT operation is reversible, but the AND
operation is not reversible (see gure 1.1).
Figure 1.1. The NOT and AND gate. Note that the NOT gate
is logically reversible while the AND is not.
1. INTRODUCTION 14
He also showed how any irreversible classical algorithm can be transformed into
a reversible one. This is easy to see in the circuit model of computation. Each gate
in a nite family of gates can be made reversible by adding some additional input
and output wires if necessary. For example, the AND gate can be made reversible
by adding an additional input wire and two additional output wires (see gure 1.2).
Note that additional information necessary to reverse the operation is now kept
Figure 1.2. The reversible AND gate keeps a copy of the inputs
and adds the AND of x0 and x1 (denoted x1 ^ x2 ) to the value in
the additional input bit. Note that by xing the additional input bit
to 0 and discarding the copies of the x0 and x1 we can simulate the
non-reversible AND gate.
instead of being somehow absorbed into the environment, as is done in any logically
irreversible computation. By simply replacing all the non-reversible components
with their reversible counterparts 1, we get a reversible version of the algorithm.
1 Our universal set of reversible gates might not contain this particular gate, but a xed size
circuit made from our universal set of gates could be used instead.
1.1. QUANTUM PHYSICS 15
If we start with the output, and run the circuit backwards, we obtain the input
again. The reversible version might introduce some constant number of additional
wires for each gate. Thus if we have a non-reversible algorithm which used time T
(the depth of the circuit) and space S , we can easily construct a reversible version
that used a total of O(T + S ) space and time T . Furthermore, the additional `junk'
information generated by making each gate reversible can also be erased at the end
of the computation by rst copying the output, and then running the reversible
algorithm in reverse to obtain the starting state again. This is illustrated in gure
1.3. Bennett subsequently showed how to turn a computation using time T and
space S in a reversible one using time O(T 1+) and space O(S log T ) or time O(T )
and space O(ST ), for any > 0 (see [Ben89], [LTV98]).
This beautiful theory of reversible computation was sparked by a simple ques-
tion about the physics of computation. It is important to note that Turing ma-
chines and modern-day computers implicitly refer only to notions of physics that
are over a century old and known as `classical physics'. This past century a new
theory has been developed which includes the theory of quantum mechanics.
In the next section we take a closer look at quantum physics and its relationship
to computation.
1.1. Quantum Physics
One experimental set-up that exempli es in a very simple way some of the
main principles of quantum mechanics is the Mach-Zehnder interferometer. The
interferometer is an apparatus that allows us to measure the interference of photons
following two di erent paths. It consists of two half-silvered mirrors (or beam-
splitters ), some full-mirrors to help direct the photons along one of two desired
paths (we will not illustrate these full-mirrors, but whenever you see a light path
take a sharp turn, there implicitly is a mirror there!), and two photon detectors
1.1. QUANTUM PHYSICS 16
path and set up the photon detectors along both possible directions the photon
could take. When the photon passes through the half-silvered mirror, we notice
that exactly one of the two photon detectors clicks (this is an ideal situation). We
never get two \half-clicks", or other fractions of a click. This discreteness is one of
the main features of quantum mechanics. We repeat this experiment many times,
and each time exactly one detector clicks, each one about half of the time. The
simplest explanation is that the photon impinging upon the half-silvered mirror
takes one of the two paths with 50% probability - a simple coin ip.
1.1. QUANTUM PHYSICS 18
Now let us repeat this experiment, except this time with two beam-splitters
aligned so that no matter which of the two paths the photon takes it will arrive at
the second beam-splitter at the same time (see gure 1.5).
Assuming that a photon going through a beam-splitter simply takes one of the
two paths at random, then we expect roughly half of the photons to be detected
at the j 1i detector and the other half at the j 0i detector. Quite logical, but false.
Set up this apparatus, and you will notice that you only detect photons at the j 1i
detector! By inserting an appropriate phase-shifter (usually a piece of glass), along
the j 0i path, the probability distribution shifts from only j 1i detections to only
j 0i detections. We call this a -phase-shifter. Thus we can reliably distinguish
between the presence and absence of this -phase-shifter. Further, by placing a
0-phase-shifter along the j 0i path and 1-phase-shifter (we can adjust the phase
shift of a phase shifter by changing internal properties such as thickness and
refractive index) along the j 1i path the proportions are sin2( 2 ) j 0i detections
0 1
iepi pi j 0i + p1 j 1i + epi p1 j 0i + pi j 1i :
0 1
(1)
2 2 2 2 2 2
Thus a photon can arrive at the j 0i detector by two di erent paths, one with
amplitude iepi2 pi2 = e2i , and the other path with amplitude ei2 . The
0 0 1
1.1. QUANTUM PHYSICS 20
0 +1
total amplitude of the state j 0i is e2i + ei2 = iei
0 1
sin( 2 ). Similarly we
2 0 1
see that the total amplitude of the state j 1i is iei cos( 2 ) and the state
0+ 1 0 1
2
in equation (1) is equal to iei 2 sin( 2 ) j 0i + cos( 2 ) j 1i . Note that all
0+ 1 0 1 0 1
that determines the magnitude of the amplitudes is the di erence between 0 and
1. In general the photon could be in any linear combination or superposition state
of the form
0 j 0i + 1 j 1i
0 ei 1
Suppose we had two such Mach-Zehnder apparatuses set up with the state of each
of photon described by p12 j 0i + p12 j 1i. The 2-photon system would be described
by the state
1 1 X 1
(2) p j 0i + p1 j 1i p j 0i + p1 j 1i = 2 j x1 i j x2 i :
2 2 2 2 x ;x 2f0;1g 1 2
(4) p1 j 0i j 0i + p1 j 1i j 1i :
2 2
This state cannot be factored into the product of two independent states. Note
that superpositions of the form in equation (3) can also be denoted as vectors in
C 4 , ( 00 ; 01 ; 10 ; 11 ). In general, if we have two systems in states (a0 j 0i + a1 j 1i)
the tensor product of the vectors describing the subsystems. We can prove that
state (4) cannot be factorised into two independent one-qubit states by showing
that the vector ( p12 ; 0; 0; p12 ) cannot be decomposed as the tensor product of two
complex vectors (a0 ; a1) (b0 ; b1). The two particles are strongly correlated in a
way we refer to as being entangled. This notation where (1; 0; 0; 0) is denoted j 00i
is Dirac's bra-ket notation [Dir58].
However, the path of a photon in a Mach-Zehnder interferometer is just one
example of a system with two discrete states which we label j 0i and j 1i. Any
quantum system with at least two reliably distinguishable states (for example, two
discrete energy levels which can represent the logical states 0 and 1) can be used
1.1. QUANTUM PHYSICS 22
as a qubit and prepared in a superposition of its logical states
(5) j i = 0 j 0i + 1 j 1i ;
p1 j 0i j 0i j 0i + p1 j 1i j 0i j 0i :
2 2
A similar pulse applied to the second qubit will act in parallel on both con gura-
tions j 0i j 0i j 0i and j 1i j 0i j 0i to produce
1 j 0i j 0i j 0i + 1 j 0i j 1i j 0i + 1 j 1i j 0i j 0i + 1 j 1i j 1i j 0i
2 2 2 2
and another pulse applied to the third qubit creates a superposition of all eight
con gurations 000, 001, : : : , 111. With n qubits we can similarly prepare superpo-
sitions of all 2n con gurations. All 2n possible strings are now physically present,
and any operation we apply to the register of n qubits will be applied to all con-
gurations in parallel. For example, if we apply an operation U only once to this
system, we will produce the state
X
p1 n U j xi :
x2f0;1gn 2
to other states
P j xi satisfying
x
x
X
j x j2 = 1
j 0i ! p1 j 0i + p1 j 1i
2 2
and
j 1i ! p1 j 0i p1 j 1i
2 2
1.1. QUANTUM PHYSICS 25
is called a Hadamard gate denoted by H . A gate such as the phase shifter of angle
along the j 1i path, that maps
j 0i ! j 0i
(6)
j 1i ! ei j 1i
is called a phase gate R .
These one-qubit gates alone will not allow us to perform every unitary operation
possible on n-qubits. They will not even allow us to create entangled states from
unentangled ones. We need a non-trivial two-qubit gate, such as the controlled-
NOT which maps
j 00i ! j 00i
j 01i ! j 01i
j 10i ! j 11i
j 11i ! j 10i :
We call this a controlled-NOT because the NOT is e ected to the second qubit
(or target qubit) when the rst qubit (or control qubit) is in the state j 1i. Another
non-trivial two-qubit gate is the controlled-R that maps
j 00i ! j 00i
j 01i ! j 01i
j 10i ! j 10i
j 11i ! ei j 11i
(note the symmetry between the control and target qubits).
We need such two-qubit gates to map the state j 0i j 0i to the state p12 j 0i j 0i +
p12 j 1i j 1i. We can do this by rst applying a Hadamard gate to the rst qubit to
create p12 j 0i + p12 j 1i j 0i = p12 j 0i j 0i + p12 j 1i j 0i. Applying a controlled-NOT
then yields the EPR state p12 j 0i j 0i + p12 j 1i j 1i. As mentioned earlier, this state
1.1. QUANTUM PHYSICS 26
cannot be decomposed as the product of two independent one-qubit states, and is
thus entangled. Superpositions that can be so decomposed are called unentangled
or separable. Qubits typically become very entangled in the intermediate stages
of most interesting quantum computations. Entangled pairs of qubits are also a
valuable physical resource in other applications of quantum information theory,
such as quantum communication and quantum key exchange.
The fact that one qubit in an entangled pair of qubits cannot be described
as a superposition independently of the other qubit forces us to reconsider the
mathematical description of quantum states in terms of state vectors. For example,
how should we describe the state of one qubit of an EPR pair? Such a state
can be described in terms of density operators [CTDL77] which provide a more
general mathematical description of a quantum state. For a single qubit in the
superposition state (or pure state ) j i = j 0i + j 1i, the corresponding density
operator is the projector = j i h j = j 0i h 0j + j 0i h 1j + j 1i h 0j +
j 1i h 1j. This operator can be written in the fj 0i ; j 1ig basis as
0 1 0 2 1
j j
@ A =@ A
2 :
jj
The probability of measuring j 0i is equal to
Tr( j i h j):
Note that for any unitary operator U acting on a qubit, the density operator
j 0i h 0j of the state j 0i = U j i is equal to UU where = j i h j.
1.1. QUANTUM PHYSICS 27
With any quantum state we can associate a density operator, , such that is
positive and the trace of , Tr() = 1 (see [CTDL77]). If we apply the unitary
operator U to that state, the outcome state has density operator UU .
If we wish to describe a qubit that is entangled to another we start by writing
the quantum state vector of the two qubit system
X
j i= wx j wxi
w;x2f0;1g
then we construct the density operator of the two qubits
X
= j ih j = wx yz j wxi h yz j :
w;x;y;z2f0;1g
To compute the density operator 1 of the rst qubit, we perform the partial trace
(see [CTDL77]) over the second qubit to get
X
wx yx j wi h y j :
1 = Tr2() =
w;y;x2f0;1g
Similarly we can compute the density operator 2 of the second qubit by performing
the partial trace over the rst qubit to get
X
wx wz j xi h z j :
2 = Tr1() =
w;x;z2f0;1g
For example, the state
j i = p1 j 00i + 21 j 01i + 2i j 11i
2
is described by the density operator
0 1 1 i
1
B 2 2p20 2p2 C
B
B 2p2
1 1 0 i C
C
=B
B 4 4 C
C
B
@ 0 0 0 0 C
A
i i 1
2p2 4 0 4
1.1. QUANTUM PHYSICS 28
and, after taking the partial traces we get
03 i
1
1 = Tr2() = @ 4i 4
1
A
4 4
0 1 1
1
2 = Tr1() = @ 21 2p2 A:
1
2p2 2
If the bit value is measured on the two qubits then with the probabilities 12 ; 14 ,and 14
one obtains respectively 00 , 01; and 11: The outcome 10 has the probability zero.
These probabilities are given by the diagonal elements of : Suppose the second
qubit was taken away so that one can measure only the bit value on the rst qubit.
In this case one obtains the bit values 0,1 with probabilities 43 ; 41 respectively,
which are given by the diagonal elements of 1: The diagonal elements of 2 give
probabilities of obtaining 0 or 1 when the measurement is performed on the second
qubit alone. The partial trace of larger systems is de ned similarly [CTDL77].
So how do we actually e ect an operation, such as the controlled-NOT , that
will create entanglement? Let us return to our example of a spin- 21 particle, say a
proton, in a magnetic eld oriented along the z-axis. The energy of a proton in the
spin-up state is !2 ~ and in the spin-down state is 2! ~ where ~ = 6:626 10 34 J s
and 2! is a frequency. The frequency 2! depends on the strength B of the magnetic
eld and on the type of nucleus according to ! = B , where is the gyromagnetic
ratio (which for a proton is about 2:675 10 6 Hz=Tesla). Thus a proton in a eld
of strength 9:4Tesla has a frequency ! = 400MHz. (The strength of magnetic
elds is often given in terms of the frequency 2! the magnetic eld would induce
on a proton.) We thus denote the energy operator H , or the Hamiltonian, by the
1.1. QUANTUM PHYSICS 29
matrix
0 !~ 1
@ 2 0 A 1
!~
= !~z
2
0 2
where
0 1
1 0
z = @ A:
0 1
and the other with energy eigenvalues !2~ . The joint system has a Hamiltonian
2
1.1. QUANTUM PHYSICS 30
equal to
0 1
B !1 + !2 0 0 0 C
B 0 !1 !2
~B 0 0 C
C
B
B C
C = 1 !1~z I+
1 ! ~I
2B 0 0 !1 + !2 0 C 2 2 2 z
@ A
0 0 0 !1 !2
as illustrated in gure 1.8.
However two such nuclei do not behave independently of each other, since their
own magnetic elds a ect the energy levels of surrounding nuclei. The energy
levels are increased by 2 J12~ if the nuclei are oriented in the same direction, and
decreased by the same amount if they are oriented in the opposite direction. The
Hamiltonian thus gets shifted to !2~ z I + !2~ I z + 2~ J12z z
1 2
0 1
B !1 + !2 + J12 0 0 0 CC
B
~B 0 !1 !2 J12 0 0 CC
= 2B
B CC
B
@ 0 0 !1 + !2 J12 0 A
0 0 0 !1 !2 + J12
(see gure 1.9). A radio-frequency pulse of frequency 21 (!2 + J12 ) of appropriate
intensity and duration would e ect the NOT on the second nucleus if and only if
the rst nucleus is in the state j 1i. The coupling of the two nuclei thus gives us
the opportunity to e ect conditional dynamics on the two qubits.
We have just illustrated one way of realising the controlled-NOT . We can use
similar pulse sequences to implement quantum algorithms using NMR technology.
I have said how quantum operations are unitary (some operations may seem
non-unitary, but only when ignoring part of the entire system), and have even
illustrated some examples of unitary operations, such as putting a beam-splitter
in the path of a photon, or applying a radio-frequency pulse to a nucleus. The
Schrodinger equation tells us how these black-boxes work.
1.1. QUANTUM PHYSICS 31
Consider a closed system in the state j (0)i 2 H N . This state can change
over time, and we denote by j (t)i the state of this system at time t. Let us
suppose that we start with a system in the state j (0)i and the system is in an
environment where the energy of a state j i is de ned by the operator H (t). The
1.1. QUANTUM PHYSICS 32
This equation implies that the evolution of the state j i is unitary. If we assume
the Hamiltonian remains constant then the solution to the Schrodinger equation
is
j (t)i = e ~i Ht j (0)i :
1.1. QUANTUM PHYSICS 33
This equation implies that the evolution of the state j i is unitary. For example,
if we change the environment of a qubit so that we e ect a Hamiltonian !~Ix,
where
0 1
1
0 A = 1 x;
Ix = @
2
1 0 2
2
( Ix is typically used in chemistry) then by letting the qubit evolve in this environ-
ment for a period of time t we e ect the unitary operation
0 1
@ cos( !2 t) i sin( !2 t) A
:
i sin( !2 t) cos( !2 t)
So if we set t = ! we get a unitary operation equal to
0 1
0 1
e iIx = i@ A
1 0
which corresponds to a NOT gate (apart from the global phase factor 3 of i).
This is often called a -pulse, or a 180Ix pulse. If t = 2! , we call this a 2 -pulse
or a 90Ix pulse, which realises the square root of NOT operation.
A 180Iy pulse, where
0 i
1
0 2 A = 1 ;
Iy = @ y
i 0 2
2
realises the operation
0 1
0 1
e iIy = @ A
1 0
3 Global phase shifts, say by a factor ei , of a state j do not a ect the probability of
i
observing any particular state j xi even if the state j i is transformed by unitary operator U .
1.2. QUANTUM COMPUTERS 34
and applying a 90Iy pulse realises what we call a pseudo-Hadamard gate [JM98]:
0 1
1 1
(7) e i Iy = p1 @
2 A:
2 1 1
One- and two-qubit gates like these will form the basis of a quantum computer,
which we describe in the next section.
This brief summary of quantum physics should suce for this course. For more
details, see for example [Fey65, CTDL77].
Algorithms
This chapter will discuss the algorithms which make explicit use of the quantum
nature of a quantum computer. I summarise the known quantum algorithms and
present them in a simple and uni ed way. The simplest quantum algorithm is
presented rst. I then generalise the basic elements of this algorithm and show
how they lead to the known powerful quantum algorithms.
(8) j xi j bi ! j xi j b f (x)i
37
2.1. THE DEUTSCH ALGORITHM 38
where x; b 2 f0; 1g. The `trick' used in [CEMM98] is to the encode the value of
f (x) into the phase. To do this we start with a second, auxiliary register in the
state j 0i j 1i (remember that we will often drop the normalisation factors), then
the operation j bi ! j b f (x)i maps j 0i j 1i to
j f (x)i j 1 f (x)i = ( 1)f (x) (j 0i j 1i):
Consequently we can describe Uf in a di erent basis as
j xi (j 0i j 1i) ! ( 1)f (x) j xi (j 0i j 1i)
j xi (j 0i + j 1i) ! j xi (j 0i + j 1i)
for x 2 f0; 1g. If we x the auxiliary register to be in state j 0i j 1i , then its state
remains unchanged and we e ectively have a way of mapping j xi ! ( 1)f (x) j xi.
Let us go back to the example of the Mach-Zehnder interferometer. There
we saw that if the relative phase-shift between the two computational paths was
either 0 or , then we could correctly distinguish the two cases 100% of the time.
The same `algorithm' can be applied to solve Deutsch's problem, as illustrated
in gure 2.1. We will now ignore the state of the auxiliary qubit, since it stays
in the state j 0i j 1i. The rst Hadamard gate H creates the state j 0i + j 1i.
The Uf induces phase shifts to produce ( 1)f (0) j 0i + ( 1)f (1) j 1i, and the nal H
2.2. EIGENVALUE KICK-BACK 39
completes the interference that produces the state ( 1)f (0) j f (0) f (1)i, in other
words, the answer.
As we will see in the subsequent sections, this simple algorithm illustrates all
the main ingredients of the known quantum algorithms.
In this section we generalise the method of inducing relative phases in the states
of the register (which we call the control register) that contains the input values
j xi. We make use of an auxiliary or target register and a function evaluation.
Suppose we have a family of unitary operators Ux which share an eigenvector
j i with eigenvalues e2i!x , respectively. The value !x corresponds to f (2x) ; f (x2)b , or
f (x) in the above examples. We de ne the controlled-U to be a unitary operation
N x
acting on two systems, a control system of dimension M and a target system of
dimension N . The controlled-Ux maps j xi j yi to j xi Ux j yi. We give an example
of such a controlled-Ux, and how to implement it, later in this section. Figure
2.2 shows how to use this operator to compute wx into the phases. Starting with
the state j i in a second target register, and the state j xi in a control register,
2.2. EIGENVALUE KICK-BACK 40
Let a1 a2a3 be the binary expansion of a, that is a = 4a1 + 2a2 + a3 , and each aj is
either 0 or 1. Using the fact that e2i = 1, we can also express this state as
(j0i + e2i(0:a ) j1i)(j0i + e2i(0:a a ) j1i)(j0i + e2i(0:a a a ) j1i).
3 2 3 1 2 3
2.3. PHASE ESTIMATION AND THE QUANTUM FOURIER TRANSFORM 43
We know immediately how to obtain the value of a3 since the Hadamard gate H
de ned in the introduction maps, for b 2 f0; 1g,
j bi ! j0i + ( 1)b j1i = j0i + e2i(0:b) j1i ;
and vice versa since H 1 = H . Thus applying the Hadamard gate to the leftmost
qubit gives us the state
j a3 i (j0i + e2i(0:a a ) j1i)(j0i + e2i(0:a a a ) j1i).
2 3 1 2 3
It would be very convenient if the second qubit were in the state j0i + e2i(0:a ) j1i 2
since we could then easily determine a2. Fortunately, since the rst qubit is in the
state ja3 i, we can simply apply a controlled-R gate (recall equation (6)) to the
2
leftmost and middle qubits to give us this state. Applying this gate and then a
Hadamard gate on the second qubit gives us
j a3 i j a2 i (j0i + e2i(0:a a a ) j1i).
1 2 3
A controlled-R
2
gate and a controlled-R
4
gate, as shown in gure 2.3, gives us
the state
j a3i j a2 i (j0i + e2i(0:a ) j1i) 1
In other words d(!0; !1) = minz2Zfj!0 !1 + zjg. Roughly speaking, the prob-
ability of getting an error of size is proportional to 1 . 2
MP1
Corollary 6. Given the integer M > 0 and the state e2ij! j j i, applying
j =0
QFT (M ) 1 and then measuring will yield the state j j i satisfying the following.
Let = d(!; Mj ).
2.3. PHASE ESTIMATION AND THE QUANTUM FOURIER TRANSFORM 46
{ If M! is an integer, then with probability 1, j = M!, that is = 0.
{ Otherwise, the probability of observing j j i is Msin sin(M(
2
2
2
) 1 .
) (2M )
2
8
With probability at least we have M .
2
1
For k > 1, with probability at least 1 2(k1 1) we have Mk .
Proof. We make use of the fact that for x between 0 and 12 , 2x sin(x)
x. From Lemma 4 the probability that we measure j is Msin(sin((M! j )) 2
1 2 1 2 (! Mj ))
M sin() 2M . We use this fact to prove the rest of the theorem.
1 2(k 1 1) :
The last inequality is easily proved by bounding the summation by an appropriate
integral.
We now use the fact that for M > 2, the function
sin2 (x)
1 1
M 2 sin2 (x=M ) + sin2 (( x)=M ) ;
0 x , attains its minimum at x = 2
Prob (jj M!j 1) = Prob(j = bM!c) + Prob(j = dM!e)
2 sin2 (M ( 1 ))
= sin2 (M2 ) + 2 2 M1
M sin () M sin (( M ))
82 :
Input:
An integer N .
A quantum network for a unitary operator U which acts on a vector space
HN of dimension N .
A positive integer M .
A target register in an arbitrary state described by the density matrix .
[Note that the input is the quantum state itself not a classical description of
it.]
Output:
A rational !~ (i.e. an integer x such that !~ = Mx ).
Complexity:
1 application of M (U ).
O(log2 M ) other elementary operations.
Procedure:
1. Initialise a control register to the state j 0i 2 H M .
2. Apply QFT (M ) to the control register.
3. Apply M (U ).
2.4. QUANTUM EIGENVALUE ESTIMATION 49
4. Apply QFT (M ) 1 to the control register.
5. Measure the control register, denote the outcome x. Output !~ = Mx .
Figure 2.4. We illustrate the e ect of the algorithm Eig Est with
the target register in an eigenvector of U and the control register in
the speci ed starting state.
More simply, if the target register contains the state j j i with probability j;j ,
then we will measure j !ej i with probability j;j .
2.5. FINDING ORDERS 50
Proof. At step 1 the density matrix of the two-system state is
X
j 0i h 0j = j;k j 0i h 0j j j i h k j :
j;k
The sequence (QFT (M ) 1 I )M (U )(QFT (M ) I ) maps j 0i j j i to j !ej i j j i.
Thus the state of the two systems becomes
X
j;k j !ej i h !fk j j j i h k j :
j;k
Tracing out the second register gives us the state
X
j;j j !ej i h !ej j :
j
The result follows.
We described the above algorithm in the most general setting where we were
given any input state . In this chapter we only use pure states.
This problem is not only of theoretical interest, but it is of great practical in-
terest. The reason is that integer factorisation and cracking the RSA cryptosystem
reduce to this problem for G = ZN , the multiplicative group integers modulo N
(see appendix A.5.3).
The quantum version we will address is the following. Let G be any group for
which we have unique binary representatives for each element and an algorithm
for computing the group operation and for computing inverses.
Problem 11. Given an element a of a nite group G, denote by Ua the unitary
operator that maps, for all x 2 G, j xi ! j axi. Find the order of Ua .
Before we describe the solution to this problem, we will make a few remarks
regarding the statement of these problems. First note that to turn Problem 10
into Problem 11, it suces to know a 1 , since this means we have an ecient
reversible way of implementing Ua (see appendix A.3). For groups where a 1 is
not easily obtained, we can apply the period- nding technique discussed later to
nd the order r of a (note that we can then simply compute a 1 = ar 1). We need
unique representatives for each element of G since this is necessary for quantum
interference to occur. Most groups of interest have some easy-to-compute canonical
representatives. Note that the group G does not need to be Abelian: it suces
that the subgroup generated by a is Abelian, which is always true.
Solving this quantum version is simple once we measure the following. Since
Uax = Uax , then r is also the order of Ua . Since Uar = I , the identity operator, then
2.5. FINDING ORDERS 52
any eigenvector j i must satisfy Uar j i = j i ; which implies that the eigenvalues
of Ua are rth roots of unity. For each coset fc; ac; a2c; :::; ar 1cg of hai, the subgroup
generated by a, there correspond r eigenvectors [Kit95]:
X
r 1
(15) j ck i = p1r e
ijk
2
r caj , for k = 0; 1; :::; r 1:
j =0
Then note that
1 X
r 1
ijk e ik X
2
r
r 1
ijk
Ua j ci = pr e caj+1 = pr e caj = e ik
r j ck i :
2 2 2
k r r
j =0 j =0
Further,
1 X
r 1
jci = pr j ck i
k=0
(that is we get constructive interference on the basis state j ca0i and totally de-
structive interference on the other j caj i states).
Estimating such random eigenvalues precisely enough will allow us to nd r.
This fact is based on the theory of continued fractions. Every real number y has
a sequence of rationals, called convergents, that approximate it. The convergents
can be eciently computed as outlined in [Kob94] or [Knu98]. The following
lemma follows from Theorem 184 of [HW79].
It is easy to see that there can be at most one fraction ab that satis es b r
and ab Mx < 21r . The continued fractions algorithm will nd integers a and b
2
Input:
An integer M
An element a 2 G.
Output:
A positive integer t or FAIL.
Complexity:
O(T log M ) elementary operations where a group operation uses O(T ) ele-
mentary operations.
O(log2 M ) other elementary operations.
Procedure:
1. Repeat Eig Est(Ua ; j 1i h 1j ; M ) twice to obtain two estimates Mx and xM of
1 2
random eigenvalues of Ua .
2. Use the continued fractions algorithm to seek two fractions ar and ar with
q
1 2
1 2
Proposition 14. If M > 2r2 , then Algorithm 13 nds the correct order r with
probability at least 32 . If it does not output FAIL, then it outputs a multiple of r.
4
Proof. The proposition follows by rst showing that with probability at least
8 2 , x 1 and x2 satisfy the equations (16) and (17) for k1 and k2 chosen indepen-
2
dently and uniformly at random from the set f1; : : : ; rg. The second part of the
proof shows that assuming x1 and x2 satisfy these equations for such k1 and k2
then we obtain r with probability at least 12 .
By Theorem 8 (Eig Est) we will obtain integers x1 and x2 such that for each
k1 and k2 2 f0; 1; : : : ; r 1g with probability 1r the value xM is an estimate of kr
1 1
know r since the integers k1; k2 and r might not be coprime. Taking the lowest
common multiple of the denominators yields t = gcd(kr;k ;r) . Since k1 and k2 are
1 2
selected uniformly at random between 1 and r, they are coprime with probability
at least 1
P 1 > 1 . Thus this procedure will successfully nd r with
p 2 2
prime p
probability greater than 32 . 4
The nal test that at = 1 guarantees that the algorithm only outputs FAIL or
multiples of r.
Note that j 1i could have been replaced by any mixture of j aj i states.
2.5. FINDING ORDERS 55
We are now ready to solve Problem 11. We will assume the worst case, that is
that we have no good bounds on r.
Input:
An element a 2 G.
Output:
A positive integer t.
Complexity:
Expected O(T log r) elementary operations where a group operation requires
O(T ) elementary operations.
Expected O(log2 r) other elementary operations.
Procedure:
1. Set M = 2.
2. Apply Algorithm 13 three times.
3. If all three outputs are FAIL, double M and go to step 2. Otherwise let t be
the minimum value of the non-FAIL outputs.
4. Test if at = 1. If so, output t. Otherwise double M and to go step 2.
estimate these eigenvalues with an error of at most 21r in order to nd the correct
numerator. If k 6= 0 we can simply compute s = k 1 ks mod r. The eigenvalue
estimation algorithm thus gives us the following algorithm for nding discrete log-
arithms.
Input:
Elements a and b 2 G, where b is a power of a.
The order r of a.
Output:
An integer t or FAIL.
Complexity:
O(log r) group operations.
O(log2 r) other elementary operations.
2.6. DISCRETE LOGARITHMS 58
Procedure:
1. Prepare three registers in the state
j 00 : : : 0i j 00 : : : 0i j 1i :
2. Let n = dlog2 2re+1. Apply QFT (2n) QFT (2n ) to the two control registers.
3. Apply 2n (Ua) using the rst control register and the target register.
4. Apply 2n (Ub ) using the second control register and the target register.
5. Apply QFT 1(2n) QFT 1(2n) to the two control registers.
6. Measure the rst two registers and denote the outcome j x1 i j x2 i. Compute
s1 = x2nr and s2 = x2nr .
1 2
has expected running time O(log r) group operations and O(log2 r) other elementary
operations.
Proof. After step 5 we have the state
Xr 1 e+ f+
k ks
k=0 r r j ki :
With probability at least ( 8 )2 the integers s1 and s2 will correspond to integers
2
(18) j i = A j 00 : : : 0i :
When 0 < p1 < 1, we can assume that
j i = cos(!) j X0 i + sin(!) j X1 i
Having summarised the use of the Grover iterate G for amplifying the amplitude
pp1 of j X1i in j i = A j 00 : : : 0i, we move on to describe its use for estimating
p1.
2.7. AMPLITUDE ESTIMATION 63
2.7.2. Amplitude Estimation. The strategy for estimating p1 = sin2 (!)
is simple. We will just estimate one of the eigenvalues e2i! of G using the
eigenvalue estimation algorithm. Note that when p1 = 0 or 1, j i = A j 00 : : : 0i is
an eigenvector of G with eigenvalue e2i! equal to 1 = e0 or 1 = ei respectively,
and so we still have p1 = sin2(!).
Input:
An integer M (a precision parameter).
An integer N .
A quantum network for implementing the operator (algorithm) A acting on
a vector space H N of dimension N .
A unitary operator which marks elements of a good set X1 by mapping
j xi ! ( 1)f (x) j xi, where f (x) = 1 i x 2 X1.
Output:
A description of a real number p~ (i.e. an integer x such that p~ = sin2 ( x
M )).
Complexity:
O(M ) applications of Uf
O(M ) applications of A and A 1
O(M log2 N ) other elementary operations
Procedure:
1. Prepare the input state j 00 : : : 0i A j 00 : : : 0i 2 H M H N .
2. Apply QFT (M ) to the rst register.
3. Apply M (G).
4. Apply QFT (M ) 1 to the rst register.
2.7. AMPLITUDE ESTIMATION 64
5. Measure the rst register to obtain a state j xi, x 2 f0; 1; : : : ; M 1g and
output p~ = sin2( Mx ).
Theorem 21. For any positive integer M , the algorithm Amp Est(A; f; M )
outputs p~ such that
with probability at least 8 we have
2
pp (1 p ) 2
jp1 p~j 2 1 M 1 + M 2
X
M 1
p1 j j i (ei(2j+1)! j +i + e i(2j +1)! j i)
2M j=0
e X1 2ij!
i! M e X1 2ij!
i! M
= p e j j i j +i + p e j ji j i
2M j=0 2M j=0
pe e
i! i!
jg
!iM j +i + p j]! iM j i :
2M 2M
Input:
An integer N .
A quantum network for Uf : j xi ! ( 1)f (x) j xi.
An integer M .
Output:
A description of a real number t~ (i.e. an integer x such that t~ = N sin2 ( x
M ).
Complexity:
2.7. AMPLITUDE ESTIMATION 66
O(M ) applications of Uf .
O(M log2 N ) other operations.
Procedure:
1. Output N Amp Est(FN ; f; M )
Theorem 23. For any integer M > 0, Count(f; M ) outputs a real number t~
satisfying
with probability at least 8 we have
pt(N t) N2
2
t t~ 2 M + 2
M
for any integer k > 1, with probability at least 1 1
2(k 1) we have
pt(N t) + Nk2 2
t t~ 2k M M2
and uses M applications of Uf .
p
Corollary 24. Let t~ = Count(f; dc N e). Then
r 2
t~ t 2c t (NN t) + c
with probability at least 8 .
2
Procedure:
1. Set l = 2.
2. Apply Count(f; 2l).
p
3. If t~ = 0 and 2l < 2 N then increment l by 1 and go to step 2.
4. Set M = d 20 2l e.
2
t t~ t
2.7. AMPLITUDE ESTIMATION 68
with probability at least 23 (t is the number of solutions to f (x) = 1). If t > 0 it
1qN
uses an expected number of O t applications of Uf . If t = 0, the algorithm
p
outputs t~ = t = 0 with certainty and Uf is evaluated ( N ) times.
Proof. The case t = 0 is easy. For t > 0, let e2i! be the eigenvalue of j + i,
1 c. From Lemma 4 we have that
so sin2 (!) = Nt , 0 ! 12 . Let m = blog2 5!
the probability that in step 2 Count(f; 2l) = 0 for l = 1; 2; : : : ; m is
Y
m
sin2(2l !) Y
m
sin 2 (2m+1 ! )
2 2
2 l
cos (2 !) = 2m 2 cos2 2 :
l=1 2 sin (! ) l=1 2 sin (2!) 5
l
The previous inequalities are obtained by using the fact that sin(x!)
x sin(!) cos(x!) for any x 0 and 0 !x < 12 , which can be seen by looking
at the Taylor expansion of tan(x) at x = M!.
p
Now assuming step 2 was repeated at least m times (note that 2m+1 25 N
4
qt
), after step 4 we have M ! and since ! 2 sin(!) = 2 N , then by
will get the correct t and thus the nal error is 0 t. If t 1, then rounding
o t0 to t~ can introduce an error of at most 23 23 t, which increases the error to
something less than t3 + 23 t. The overall probability of obtaining this estimate
is at least 8 cos2 ( 25 ) > 32 .
2
Proof. By Theorem 21, settingpt(N tk) = 7, we see that with probability greater
11 , t~1 satis es t~1 t
than 12 + 14 , and similarly for t~2 . This inequality
p p N
implies that t(N t) 2Mj , for j = 1; 2. Thus with probability at least 11
2
12
we have
pt(N t) p2
M 30 :
When this is the case, then Theorem 23 tells us that with probability 8 we have
2
p
t~ t 152 + 30 2 < 1
2 3
(so when we round o in step 3 we will get t~ = t). Therefore with probability at
least 8 11
2 2
2 12 > 3 we have t~ = t.
The following table summarises the complexities of these algorithms, along
with their classical counterparts for comparison. The complexity measure we use
2.7. AMPLITUDE ESTIMATION 70
For xed , or for all t N (1 ), the upper bound for quantumly counting
with accuracy epsilon is tight up to a constant factor since Nayak and Wu [NW99]
show a lower bound of
s p !
N + t(N t) :
d(t + 1)e d(t + 1)e
We believe it is possible to match the upper and lower bounds into a tight bound
for all and t (Nayak and Wu conjecture their lower bound is tight). I am not
aware of a tight lower bound for the classical complexity (some related results
appear in [CEG95] and [Gol99]), but I conjecture that the classical lower bound
is simply the square of the quantum lower bound.
2.8. FINDING HIDDEN SUBGROUPS 71
2.8. Finding Hidden Subgroups
Let us now return to the problem of nding orders and discrete logarithms and
explore the natural generalisations. Both can be described as special cases of the
following problem as illustrated in gure 2.6.
Generalisations of this form have been known since shortly after Shor presented
his factoring and discrete logarithm algorithms (for example, [Vaz97] presents
the hidden subgroup problem for a large class of nite Abelian groups, or more
generally in [Hy97] for nite Abelian groups presented as a product of nite cyclic
groups. In [ME99] the natural Abelian hidden subgroup algorithm is related to
eigenvalue estimation.)
Other algorithms which can be formulated in this way include:
Deutsch's Problem: Consider a function f mapping Z2 = f0; 1g to f0; 1g.
Then f (x) = f (y) if and only if x y 2 K , where K is either f0g or Z2 = f0; 1g.
If K = f0g then f is 1 1 or `balanced' and if K = Z2 then f is constant.
[Deu85, CEMM98].
Simon's Problem: Consider a function f from Zl2 to some set X with the
property that f (x) = f (y) if and only if x y 2 f0; sg for some s 2 Zl2. Here K =
f0; sg is the hidden subgroup of Zl2. Simon [Sim94] presents an ecient algorithm
for solving this problem, and the solution to the hidden subgroup problem in the
Abelian case is a generalisation.
2.8. FINDING HIDDEN SUBGROUPS 72
Finding Orders (Factoring): Let a be an element of a group H . Consider
the function f from Z to the group H where f (x) = ax for some element a of H .
Then f (x) = f (y) if and only if x y 2 rZ. The hidden subgroup is K = rZ and
a generator for K gives us the order r of a.
Discrete Logarithms: Let a be an element of a group H , with ar = 1,
and suppose b = ak from some unknown k. The integer k is called the discrete
logarithm of b to the base a. Consider the function f from Zr Zr to H satisfying
f (x1 ; x2) = ax bx . Then f (x1 ; x2) = f (y1; y2) if and only if (x1; x2 ) (y1; y2) 2
1 2
Algorithm 30.
Input:
An integer N ,
An integer M .
A unitary operator Uf which acts on H M H N and maps j xi j 0i !
j xi j f (x)i.
Output:
A positive integer t.
Complexity:
1 application of Uf on inputs of size dlog2 M e.
O(log2 M ) other elementary operations.
Procedure:
2.8. FINDING HIDDEN SUBGROUPS 75
The procedure is the same as in Algorithm 13 except that instead of using
Algorithm Eig Est we use the following (almost identical) procedure:
1a: Start in the state j 00 : : : 0i j 00 : : : 0i.
1b: Apply QFT (M ) to the rst register.
1c: Apply Uf .
1d: Apply QFT (M ) 1 to the rst register.
1e: Measure the rst register and output the measured integer y.
Theorem 31. If M > 2r2 , then Algorithm 30 nds the correct period r of f
with probability at least 32 . If it does not output FAIL, then it outputs a multiple
4
of r.
Having thus described the one-dimensional in nite order case, we are ready to
reduce the general nitely generated Abelian case to the nite Abelian case.
2.8.2. The general case. Let us assume that we have a set of generators
for G. Since f has nite index, K must contain some power of each of these
generators. We can use the period- nding algorithm to nd the period of f on
each of these generators. We can then assume each of the generators has nite
order. The algorithm described here is for G identi ed with a product of cyclic
groups, namely ZN ZN ZN . Although all Abelian groups are isomorphic
1 2 2
to such a product of cyclic groups, nding such a product and the isomorphism
can be very dicult (at least as hard as factoring integers when G = ZN ). In the
next section, we show how a reasonable representation of a nite Abelian group G
can be decomposed in this way by using this quantum algorithm.
With the factoring algorithm of Shor, we can factor each Nj into its prime power
factors, and then eciently nd the isomorphism between the additive group ZNj
and a product of cyclic groups of prime power order. For example, if N = pq, where
p and q are coprime, and hai is identi ed with ZN , then ZN hai = hapi haq i
2.8. FINDING HIDDEN SUBGROUPS 77
Zq Zp. We can thus restrict our attention to such products of groups where the
Nj are prime powers.
Furthermore, any subgroup K of an Abelian G = Gp Gp Gpk where 1 2
Kpk where Kpj Gpj . We can thus nd the hidden subgroup K of f piecewise
in the following way. For j = 1; 2; : : : ; k, we nd the hidden subgroup Kpj of the
function fpj : Gpj ! X , where fpj (x) = f (0; 0; : : : ; 0; x; 0; : : : ; 0) (x appears in the
j th entry), and then set K = Kp Kp Kpk .
1 2
Zpa Zpak for some prime p and positive integers aj . Let a = maxfaj g.
2
X
k
hj tj
(24) pa = 0 mod pa for all h 2 K:
j =1 paj
For each such t 2 T , de ne
X 2i P
k tj sj
a
(t1 ;t2 ;:::;tk ) = e j =1 p j j f (s)i :
s2G=K
The sum is over a set s of coset representatives for K in G. Since the t satisfy
equation (24), the j ti are well-de ned. Again these are eigenvectors of the shift
operations j f (x)i ! j f (x + y)i with respective eigenvalue
2i P
k yj tj
a
e j =1 p j :
Procedure:
1. Start with the state j 0i j 0i j 0i j 00 : : : 0i 2 H pa H pa H pak H .
1 2
3. Apply Uf .
4. Apply QFT (pa ) 1 QFT (pa ) 1 QFT (pak ) 1 I .
1 2
5. Measure the control registers and output the measured values t1 ; t2; : : : ; tk .
Proposition 35. Algorithm 34 (Find Hidden Subgroup(f )) outputs an ele-
ment t satisfying
X
k
hj tj
pa aj = 0 mod p for all h 2 K:
a
j =1 p
Proof. After step 3 we have the state
X
j xi j f (x)i ;
x2Zpa1 Zpa2 Zpak
which can be reexpressed in a di erent basis (in the same way as we did in the
proof of Theorem 31) as
X pX
a 1 1
x1 t1
! X
pak 1 xk tk
!
= e2i pa1 j x1i e2i pak j xki j ti :
t2T x1 =0 xk =0
2.8. FINDING HIDDEN SUBGROUPS 79
It is then clear that after step 4 we will have
X
j t1 i j t2 i j tk i j ti :
t2T
2. Compute a set y1; y2; : : : ; yl 2 Zkq=K of generators for Zkq=K (for example,
see Section 2.4.4 and Algorithm 2.4.14 of [Coh93]).
3. Output fg(y1); g(y2); : : : ; g(yl)g.
Theorem 37. The group G is equal to hg1i hg2 i : : : hgl i and Algorithm
Decompose Group(a1; a2; : : : ; ak ) nds the generators g1; g2; : : : ; gl using
O(k log q) quantum group multiplications, O(k2 log q) classical group multiplica-
tions, and O(k3 log2 q ) other elementary operations.
0 r kc 1
X
r 1 b MX
@
1
j rj + kiA ak :
k=0 j =0
j rj + kiA
j =0
for some random k. Since we never make use of the measured value ak ,
this `measurement' was only an illustrative tool. We ignore it.
The nal QFT (M ) 1 maps the periodic superposition to a superposition where
the amplitudes are concentrated near values of x where Mx is close to rj for some
integer j between 0 and r 1. The information about k is encoded primarily in
the phases:
(26)
0b M r k c 1 0b M r k c 1
X
r 1 X 1
X
r 1 X1
Since we ignore (or \trace out") the second register, the rst state is in a mixture
of states of the form
0b M r k c 1
X 1
QFT (M ) 1 @ j rj iA ak
j =0
which each have most of the probability amplitude near states j yi such that My is
close to kr for some integer k, as shown by Shor [Sho95b].
Using our eigenvalue estimation approach, we also have the state (25), and we
also apply QFT (M ) 1 to the rst register to produce the same state as in equation
(26) but we described it in a di erent basis as
r e+
X k j ki
k=0 r
as illustrated in gure 2.7.
We can similarly compare the common analysis of the hidden subgroup algo-
rithm in the computational basis, where after applying the QFT 1 to the rst
register in the state
X X X !
j xi j f (x)i = j s + yi j f (y)i ;
(x1 ;x2 ;:::;xl ) y2G=K s2K
2.10. FINDING HIDDEN AFFINE FUNCTIONS 85
Algorithm 42.
Input:
An integer N .
A black-box that implements Uf : j xi j yi ! j xi j y + f (x)i.
Output:
An integer m 2 ZN .
Complexity:
1 application of Uf
1 application of QFT (N ) and 2 applications of QFT (N ) 1.
Procedure:
1. Start with two registers in the state j 00 : : : 0i j 1i 2 H N H N where j 1 i =
QFT (N ) 1 j 1i.
2. Apply QFT (N ) to the rst register.
3. Apply Uf .
4. Apply QFT (N ) 1 to the rst register.
5. Measure the rst register and output the measured value.
Algorithm 45.
Input:
2.10. FINDING HIDDEN AFFINE FUNCTIONS 88
An integer N .
A black-box that implements Uf : j xi j yi ! j xi j y + f (x)i.
Output:
A tuple m 2 Zn2 .
Complexity:
1 application of Uf .
2n + 1 applications of H = QFT (2) = QFT (2) 1.
Procedure:
1. Prepare the state j 00 : : : 0i (j 0i j 1i).
2. Apply QFT (2) QFT (2) QFT (2) to the rst register.
3. Evaluate Uf .
4. Apply QFT (2) 1 QFT (2) 1 QFT (2) 1 to the rst register.
5. Measure the rst register and output the measured values.
Proposition 46. Algorithm 45 solves Problem 44.
Proof. After step 2 we have the state
X
p 1n+1 j xi (j 0i j 1i)
2 x2f0;1gn
and after step 3 we have
X
p 1n+1 ( 1)f (x) j xi (j 0i j 1i)
2 x2f0;1gn
b X
= p( 1) ( 1)mx j xi (j 0i j 1i)
2n+1 x2f0;1gn
b
= p( 1) +1 (j 0i + ( 1)m j 1i) (j 0i + ( 1)m j 1i) (j 0i + ( 1)mn j 1i) (j 0i j 1i) :
1 2
2n
Thus after applying a Hadamard transform H = QFT (2) 1 on each of the rst n
qubits we get ( p1)2 j m1 i j m2 i : : : j mn i (j 0i j 1i).
b
2.10. FINDING HIDDEN AFFINE FUNCTIONS 89
We now combine problems 41 and 44 and get the following.
Problem 47. Given a function f : x ! mT x + b, where x; m 2 ZnN , b 2 ZN ,
nd m.
Algorithm 45, replacing QFT (2) with QFT (N ), and replacing (j 0i j 1i) =
QFT (2) 1 j 1i with j 1i = QFT (N ) 1 j 1i will solve this problem. The proof
follows similarly, so it is omitted.
Problem 48. Given a function f : x ! Mx + b, where M 2 Mmn (N ),
x; b 2 ZnN , nd M.
Let us denote by r1; r2; : : : ; rm the rows of M and c1; c2; : : : ; cn the columns.
So
0 1
B r1 C
B
B r C
C
M=B
B
2 C
C = c1 c2 : : : cn :
B C
@ ::: A
rm
We describe an algorithm (illustrated in gure 2.9) for determining dT M for any
d 2 ZnN .
Algorithm 49.
Input:
The integers N ,n, and m.
A black-box that implements Uf : j xi j yi ! j xi j y + f (x)i.
A tuple d 2 ZmN.
Output:
A tuple t 2 ZnN .
2.10. FINDING HIDDEN AFFINE FUNCTIONS 90
j 0i j 0i : : : j 0i j d1 i j d2 i : : : j dm i
93
3.1. WHAT IS A COMPLEXITY CLASS? 94
(sections 3.4, 3.5). The main ingredient is the relationship between the amplitudes
of states in a quantum network and polynomials (section 3.3).
Definition 53. The class P consists of all languages L that have a polynomial
time classical algorithm A such that for any input x 2 ,
x 2 L , A(x) accepts.
Most people believe that P 6= NP . Furthermore, most people believe that even
probabilistic algorithms with some chance of error will not be able to decide all
NP problems in polynomial time. The class of languages that can be solved with
a classical computer in polynomial time with a small probability of error is called
BPP .
Definition 54. The class BPP (bounded-error probabilistic polynomial time)
consists of all languages L that have a randomised classical algorithm A running
in worst-case polynomial time such that for any input x 2 ,
x 2 L ) Pr[A(x) accepts ] 23 .
x 2= L ) Pr[A(x) accepts ] 13 .
By repeating this algorithm n times and taking the majority answer, we get
the correct result with probability at least 1 n for some , 0 < < 1 (by the
Cherno bound; e.g. [MR95]). The problems in BPP are held to be the tractable
3.1. WHAT IS A COMPLEXITY CLASS? 97
ones on a classical computer. Similarly, the problems in the quantum class BQP
are widely held to be the tractable ones on a quantum computer.
Two important notions are those of being \NP -complete" and \NP -hard".
Consider the problem where the inputs x encode (classical) acyclic circuits with
one output bit.
Definition 56. The language CIRCUIT SAT consists of all strings x which
encode classical acyclic circuits (using some reasonable encoding as discussed in
[Wel88, MR95]) for which there exists an input string y to the circuit x for
which the circuit outputs a 1.
A more practical quantity is the 2-sided error quantum query complexity Q2(F )
of F .
non-constructive proof that such an algorithm does or does not exist must make
use of the additional properties of X = f (1)f (2) : : :f (N ), other than that it is a
binary string of length N .
3.3. Relation between quantum networks, black-boxes and polynomials
In this section we will show how a quantum gate array which queries the string
X a total of T times will have amplitudes that are polynomials of degree T in the
variables X1 ; X2; : : : ; XN . In the subsequent section we describe several applica-
tions of this fact.
Lemma 63. Let N be a quantum network that uses a total of m qubits and
makes T queries to a black-box OX . Then there exist complex-valued N -variate
multi-linear polynomials p1; p2; : : : ; p2m , each of degree at most T , such that the
nal state of the network is the superposition
2X
m 1
py (X ) j yi
y=1
for any black-box X .
3.3. RELATION BETWEEN QUANTUM NETWORKS, BLACK-BOXES AND POLYNOMIALS
102
Proof. We can assume that N = 2n . We can assume that the black-boxes
are used sequentially. Let Uj denote the unitary transformation which we apply
between the j th and (j + 1)th black-box query. We can assume that we always
apply OX to the rst n +1 qubits (incorporate any permutations of the qubits into
the Uj operations). We thus have the network illustrated in gure 3.2. For the
proof, it will help to consider the register in three parts: the rst n qubits, the 1
output bit, and the remaining l = m n 1 ancilla bits.
where 0 j < 2n, 0 k < 2l , and the j;b;k , b 2 f0; 1g are independent of the
string X . In other words the j are polynomials of degree 0 in X1; X2 ; : : : ; XN .
For b 2 f0; 1g we also use the notation b = NOT (b) = 1 b. After the rst
black-box call, we have the state
X
j 0k j jXj ki + j 1k jXj k
j;k
X
= [(1 Xj ) j0k + Xj j1k ] j j 0ki + [(1 Xj ) j1k + Xj j0k ] j j 1ki :
j;k
Lastly, intuitively it seems obvious that functions which are very sensitive to
changes of the values of almost any of the bits in the string X will require us
to probe more bits of X than functions which are relatively indi erent to such
changes. One way of rigorously capturing this concept of sensitivity is by the
notion of the block sensitivity of F .
Definition 70. Let F : f0; 1gN ! f0; 1g be a function, X 2 f0; 1gN , and
B f1; 2; : : : ; N g be a set of indices.
Let X B denote the vector obtained from X by ipping the variables in B .
The function F is sensitive to B on X if f (X ) 6= f (X B ).
The block sensitivity bsX (F ) of F on X is the maximum number t for which
there exist t disjoint sets of indices B1 ; : : : ; Bt, such that F is sensitive to each Bi
on X .
The block sensitivity bs(F ) of F is the maximum of bsX (F ) over all X 2
f0; 1gN .
We get the following three theorems relating the quantum query complexities
QE (F ) and Q2(F ) to deg(F ); dg
eg(F ), and bs(F ).
The proof [BBC+98] makes clever use of the following theorem (from [EZ64,
RC66]).
Theorem 74. Let p : R ! R be a polynomial such that b1 p(i) b2 for
every integer i from 0 to N , and jp0(x)j c for some real x, 0 x N . Then
q
deg(p) c+bcN+b .
2 1
The notion of block sensitivity extends nicely to the study of partial Boolean
functions. The functions F we have considered so far are called total functions
since they are de ned on all of f0; 1gN . Partial functions are only de ned on a
3.5. RELATING QUANTUM AND DETERMINISTIC QUERY COMPLEXITY 107
subset S f0; 1gN . For example in [DJ92] Deutsch and Jozsa restricted the
domain to the set S of strings which were either all 0 or all 1 or which had an
equal number of 0s and 1s. They de ned the function F to be 1 if and only if
X1 = X2 = : : : = XN (i.e. if X is constant) and 0 otherwise (i.e. if X is balanced).
The block sensitivity of a partial function is simply the minimum bsX (F ) over all
X 2 S and Theorem 73 holds for partial functions as well. The Deutsch-Jozsa
function has block sensitivity 2 giving a lower bound of 1, which is tight since the
algorithm in [CEMM98] solves the problem with only one query (see Algorithm
45).
Combining these two lemmas gives D(F ) bs(F )3, and adding in Theorem 73
gives Theorem 62.
Some examples:
OR
The OR function maps all non-zero strings to 1 and the all-zero string
to 0. As a polynomial we have OR(X ) = 1 (1 X1)(1 X2 ) : : : (1 XN ),
and thus deg(OR) = N .
Thus by Theorem 71 QE (OR) N2 . This can in fact be tightened to
QE (OR) = N [BBC+98].
It is easy to see that the block sensitivity of the OR function is N , thus
p p
Theorem 73 gives us Q2 (OR) 14 N . Another way to prove an ( N )
lower bound is to make use of Theorems 79 and 72, and of the fact that
(OR) = N 1.
Note that Grover's algorithm or the quantum counting algorithms will
evaluate the OR function with probability at least 23 of being correct using
p
O( N ) queries, so our lower bound is tight up to a constant factor. Such a
lower bound was rst given in [BBBV97]. Several subsequent proofs have
also been given.
PARITY
3.6. SOME EXAMPLES AND APPLICATIONS 110
The PARITY function maps all strings with an even number of 1s to 0
and all strings with an odd number of 1s to 1. The PARITY function can be
Xj
compactly described as 1 j 2( 1) . By substituting ( 1)Xj = (1 2Xj ) we
=1
N
Algorithm 80.
Input:
{ A black-box which evaluates Uf .
Output:
{ PARITY (X )
Complexity:
{ N2 applications of Uf
{ O(N ) other elementary operations.
Procedure:
1. Use the Deutsch algorithm ( section 2.1) to compute X2j 1 X2j for
j = 1; 2; : : : ; N=2. This uses N=2 queries.
2. Compute PARITY (X ) = (X1 X2 ) (X3 X4 ) (XN 1 XN ).
Theorem 82. dg
eg(PARITY ) = N
THRESHOLDM
3.7. CONTROLLED-OX AND SOME OPEN PROBLEMS 112
The THRESHOLDM function maps strings X with at least M 1s to
1 and the others to 0. The MAJORITY function is a special case with
M = d N2 e, OR is a special case with M = 1 and AND is a special case
with M = N . For non-trivial M , we have deg(THRESHOLDM ) = N
and thus QE (THRESHOLDM ) d N2 e. We know that for special cases
M = 1 and M = N , QE (THRESHOLDM ) = N and for M = d N2 e,
algorithms [HKM98] have been found which use at most N + 1 e(N )
queries, where e(N ) is the number of 1s in the binary expansion of N .
Since (THRESHOLDM ) = j2M N + 1j, by theorem 79 we know that
p
for M > 0, Q2 (THRESHOLDM ) 2 ( N (N (THRESHOLDM ))) =
p
( M (N M + 1)). We rewrote the lower bound in a way to coincide
with the upper bound shown in section 2.7 (since exact counting will solve
the THRESHOLD problem). Thus we have a tight (up to a constant fac-
tor) algorithm for the THRESHOLDM function, Q2 (THRESHOLDM ) 2
p
( M (N M + 1)) (this also holds for M = 0).
In [Dam98] van Dam shows that we can determine the entire string X with
p
probability greater than 32 using only N2 + N queries, in which case we can
correctly evaluate any function F (X ).
The following table summarises the complexities of evaluating certain functions
in terms of the number of black-box calls OX .
Q2 (F ) QE (F )
p
OR; AND ( N ) N
PARITY N=2 N=2
p
THRESHOLDM ( M (N M + 1) (N )
Table 3.2. This table gives some bounded-error and exact quantum
query complexities.
Note that if the target qubit of OX is in the state j 0i + j 1i, the OX has no
e ect. We can thus implement a controlled-OX by implementing a 0-controlled-
SWAP (i.e. SWAP the qubits when the control bit is in state j 0i) between the
target qubit and an auxiliary qubit set to the state j 0i + j 1i. The qubits should
be swapped back immediately after then OX is applied (see gure 3.3).
information ( 1)X complicates any recursive use of this method. It seems very
0
tricky indeed to compute the value of the desired function and nothing else without
cumbersome `uncomputing'. For example, try to compute the AND of two bits X0
and X1 using only two queries. The best I know of is an algorithm which uses 3
queries.
Algorithm 87.
3.7. CONTROLLED-OX AND SOME OPEN PROBLEMS 115
Start with the state j 0i j 0i j 0i.
Apply a query using the rst two qubits. This produces j 0i j X0i j 0i.
Apply a query using the last two qubits. This produces the state
j 0i j X0i j XX i.
0
Again apply a query using the rst two qubits. This uncomputes the value
of X0 to produce j 0i j 0i j XX i.
0
Question 88. What is the black-box complexity of cleanly computing the AND
of N variables?
Implementations
In section 4.1 we brie y describe why it is dicult to realise a large scale
quantum computation and ways we hope to deal with errors once our quantum
components are suciently reliable. In section 4.2 we describe some methods
for maximising what we can do with a limited amount of quantum resources. In
section 4.3 we describe how current NMR technology is used to implement quantum
algorithms. Finally, in section 4.4 we describe some interesting algorithms that are
suitable for implementations on small quantum computers and describe some of
the rst implementations of quantum algorithms.
A quantum version of the 3-bit repetition code could consist of three parallel
copies of the quantum register, initialised to the same state. The computation
would be carried out on all three registers in parallel. An error-free computa-
tion would leave the state of the three quantum registers in the subspace that is
symmetric under permutations of the three registers. This encoding, along with
the corresponding error-detection (in order to suppress, but not correct, errors) is
described in [BBD+97]. A quantum version of linear codes with error-correction
soon followed [Sho95a, CS96, Ste96]. There is also the problem of introducing
and propagating errors during the process of error-correction. John von Neumann
addressed this in the classical case [Neu56], and a quantum version has been
developed [Sho96, Ste97].
The current state of the art in quantum error-correction and fault tolerant
computing holds that under reasonable models of decoherence, once the quality
of our elementary operations is above some threshold, we have ecient families of
4.2. MAXIMISING EXPLOITATION OF QUANTUM RESOURCES 119
fault-tolerant error correcting codes that allow us to reliably perform computations
requiring T steps using Tpolylog(T ) operations [Got98, KLZ97, ABO97].
X
n !
O aj (log pj + 1) = O(log M ):
j =1
4.2. MAXIMISING EXPLOITATION OF QUANTUM RESOURCES 121
The cost of combining all the answers to nd the answer modulo M is O(log2 M )
elementary classical operations.
Remark 90. Algorithm 7 (Eig Est) can be implemented using only one ying
control qubit at a time.
p1 j 0i j +1i + p1 j 1i j 1i :
2 2
If we start with the state 12 j 0i j 0i + 12 j 0i j 1i + 12 j 1i j 0i + 21 j 1i j 1i and
measure we would get
1 (j 0i j 0i) j +2i + p1 p1 j 0i j 1i + p1 j 1i j 0i j 0i + 1 (j 1i j 1i) j 2i :
2 2 2 2 2
This means, for example, that if we observe the apparatus, then with probability
1 1 1
2 , we observe an output of j 0i and are left with the state p2 j 0i j 1i + p2 j 1i j 0i.
If we have N copies of the spin, then the output signal for the state j x1 i j x2 i
PN
: : : j xN i is proportional to ( 1)xj = N 2H (x), where H (x) is the number
j =1
of 1s0in the string
1 x = x 1 x 2 : : : xN . If we observe a single qubit in the state
= @ 00 01 A, then the expected size of the output signal is
10 11
00 11 = Tr(z )
where
0 1
1 0
z = @ A
0 1
When we have N copies of this spin, the expected size of the output signal is
Ideally, we would like to somehow prepare some qubits that are almost entirely
in the state j 00 : : : 0i h 00 : : : 0j.
One way of better approximating the state j 00 : : : 0i h 00 : : : 0j [Tap98] is to
apply a transformation that sorts our n qubit strings according to their Hamming
weights. This way the more likely strings have a longer string of leading 0s in
their binary representation. This encoding means that with probability 1 o(1),
the leftmost O(2n) bits are all 0. We could use these rst O(2n) qubits for our
computation.
However the straightforward ways of sorting by Hamming weight require an
ancilla initialised to j 0i states, which brings us back to our original problem!
Schulman and Vazirani found a clever method of permuting the computational ba-
sis states that produces roughly the same result, and this method does not require
an ancilla [SV98]. In current experiments is roughly 10 5, thus to get even 100
qubits mostly in the j 0i state requires molecules with about 1012 spins, which is not
practical. Further, the algorithm assumes the operations are performed perfectly.
As far as I am aware, no careful treatment of this technique in the presence of errors
and imprecise operations has been done. We cannot simply use error-correcting
codes since they require ancilla bits initialised to j 0i! However this algorithm gives
hope that there is nothing in principle stopping us from initialising a register to
the desired starting state.
4.3. QUANTUM COMPUTATION USING NUCLEAR MAGNETIC RESONANCE 128
It suces however to produce a starting n-qubit state of the form
j 00 : : : 0i h 00 : : : 0j + (1 ) 21n I, where is large enough to produce an observable
signal. The reason is that when we apply our algorithm A on this state, we will
get
A j 00 : : : 0i h 00 : : : 0j A + (1 ) 21n I:
Let j i = A j 00 : : : 0i be the output of the algorithm. When we measure spin j ,
we get an output signal proportional to NTr(j i h j zj ) (note that Tr(Izj = 0).
This equals N (p0 p1) where p0 is the probability of measuring j 0i and p1 is the
probability of measuring j 1i if we measure the j th qubit of j i.
No unitary transformation can transform n independent qubits in the state
into
j 00 : : : 0i h 00 : : : 0j + (1 ) 21n I
(see e.g. [HSTC98]), so we must somehow use an ancilla and trace it out.
Let me now describe the methods that have been used in practice and work for
small systems.
Ignoring terms of second order in , the natural equilibrium state of two spins
is
1 1 1
1
(27) + j 00i h 00j + j 01i h 01j + j 10ih 10j + j 11i h 11j
4 4 4 4
(28) = 14 I + j 00i h 00j j 11i h 11j :
Note that
j 00i h 00j + (1 ) 14 I = 31 14 I + 34 j 00i h 00j 34 j 11i h 11j
+ 13 41 I + 34 j 00ih 00j 34 j 10i h 10j
+ 13 41 I + 34 j 00i h 00j 34 j 01i h 01j :
4.3. QUANTUM COMPUTATION USING NUCLEAR MAGNETIC RESONANCE 129
This equation suggests the following strategy. Leave the top third of the sample
alone (call this operation U0 ), map the middle third (using a controlled-NOT) from
1 1
4 I + j 00i h 00j j 11i h 11j ! 4 I + j 00i h 00j j 01i h 01j
(call this U1 ) and the bottom third from
1 1
4 I + j 00i h 00j j 11i h 11j ! 4 I + j 00i h 00j j 10i h 10j
(call this U2), and then average over all the molecules again. This gives us the
state
4 j 00i h 00j + (1 4 ) 1 I:
3 3 4
One way of looking at this is as adding a virtual two-qubit register to each
molecule, a location register, preparing the state
1 j 0i h 0j + 1 j 1i h 1j + 1 j 2i h 2j ;
3 3 3
applying a controlled-Uj on the two systems, and then tracing out the location
qubits giving us the desired state. In practice we can spatially address di erent
parts of the sample, so that one third of them (say the top third of the test
tube) are designated to be in region j 0i h 0j, the middle third are in region j 1i h 1j
and the bottom third are in region j 2i h 2j. We can thus apply U0 to the top
third, U1 to the middle third, and U2 to the bottom third. Cory et. al [CFH96]
describe such a method ( eld gradients). Knill et. al [KCL98] designed a similar
scheme where instead of averaging over spatial con gurations they would run U0 ,
U1 and U2 at three separate times and combine up the output signals afterwards
(temporal averaging). Gershenfeld and Chuang [GC97] have also described an
elegant method called logical labelling that uses additional spins in the molecule
4.4. INTERESTING ALGORITHMS FOR IMPLEMENTATION WITH FEW QUBITS 130
as the additional control bits. Each of these methods allows us to prepare pseudo-
pure states.
Unfortunately, the simple generalisations of these methods to large systems
only produce states with roughly 2nn . To have any hope of observing a signal
we need the number of copies N of the molecule to be of size on the order of 1 ,
which implies that N must be exponential in n, the number of qubits we wish to
have. This means that these techniques alone will not suce in providing eciently
scalable quantum computation, but must be combined with other methods, such
as those in [SV98]. We are still seeking a method that is both practical and whose
complexity scales at most polynomially in the number of qubits we wish to have.
180Ix on all spins (when the frequencies of the two spins are close together, these
hard pulses are easier to implement than selective pulses, that is pulses that only
target one of the spins). In general a pulse sequence for Uf produces a pseudo-pure
state corresponding to the pure state
( 1)f (0) j 0i + ( 1)f (1) j 1i (j 0i j 1i) ;
as described in section 2.1.
A pseudo-Hadamard gate applied to both qubits would give us a pseudo-pure
state corresponding to the pure state
j f (0) f (1)i j 1i
and a subsequent measurement of the rst qubit would give us a signal proportional
to Tr(j bi h bj z ) = ( 1)b where b = f (0) f (1) and measuring the second qubit
would give us a signal proportional to 1. We implemented similar pulse sequences
for all four possible functions f : f0; 1g ! f0; 1g. We rst implemented each Uf
4.4. INTERESTING ALGORITHMS FOR IMPLEMENTATION WITH FEW QUBITS 132
twice, once with a pseudo-pure starting state corresponding to j 0i j 0i and again
with a pseudo-pure state corresponding to j 1i j 0i in order to simply compute f (x)
on every possible classical input. The output signals for the `classical' computations
appear in gure 4.3. We then implemented the Deutsch algorithm to nd the
value of f (0) f (1) with only one application of Uf . The output signals from
these experiments are shown in gure 4.4. More details are provided in [JM98].
A similar implementation with a chloroform molecule was announced shortly after
[CVLL98].
4.4.2. Quantum searching. Quantum searching in a space of size N = 4 can
also be implemented with only two qubits. On an ensemble computer, it is useful
to promise that there is only one solution to f (x) = 1. Otherwise, if there is more
than one solution, we observe an average of the corresponding signals, which does
not necessarily give useful information. It also convenient when exactly one fourth
of the inputs are solutions, since in that case one iteration of the searching iterate
will produce exactly a superposition of the satisfying assignments (see section 2.7.
When N = 4 and we have only one solution, we enjoy both of these advantages.
This algorithm was implemented in [GCK98] and [JMH98].
4.4.3. Quantum counting. Quantum counting can also be done with as few
as 2 qubits. One qubit is used for the \semi-classical" phase estimation and the
other is the input to a function f . It gets more interesting of course as the domain
of f increases. The averaging in NMR that we describe in section 4.3 turns out to
be an advantage! This implementation is described in [JM99].
The quantum counting, or more generally, amplitude estimation algorithm,
seeks to estimate an eigenvalue of the unitary operator G = AU0 A 1Uf de-
ned in section 2.7. We adapted this algorithm to work with one control bit
by implementing, for increasing r, a controlled-Gr. We know that G has two
4.4. INTERESTING ALGORITHMS FOR IMPLEMENTATION WITH FEW QUBITS 133
4.4.4. Order- nding. Pick any group whose operation can be realised with
few qubits, add one control bit, and you can nd the order of that operation using
the order- nding algorithm and the modi ed phase estimation method described
in section 4.2.2 and in [Bhi98]. For example, multiplication by 2 mod 2k 1
corresponds to a cyclic permutation of the k bits, which can be implemented using
only k qubits. The order- nding algorithm can nd this period.
It is not worth implementing this algorithm on very small NMR quantum
computers (or other ensemble computers) because the average of the signals from
E
the eigenvalue estimations ekr does not provide useful information. We could in
principle perform the post-processing that computes the order r quantumly (so
E
that we observe an average signal over states of the form j ri ekr ), but in practice
this greatly increases the required amount of quantum memory.
4.4. INTERESTING ALGORITHMS FOR IMPLEMENTATION WITH FEW QUBITS 136
4.4.5. Simulating Quantum Chaotic Maps. Schack and Brun [Sch98,
BS99] have suggested using small quantum computers to implement quantum
chaotic maps and to observe and study the predicted chaotic features. Once the
number of qubits is above a few dozen, we are out of the range of what classical
computers can simulate. This is not the case for the factoring problem, where it
would take several hundred working logical qubits to outperform classical algo-
rithms.
APPENDIX A
Appendix
A.1. Computing a controlled-U
Given a quantum gate array for computing U , we wish to create a network for
computing the controlled-U which maps j 0i j yi ! j 0i j yi and j 1i j yi ! j 1i U j yi.
It is important to remember that we do not measure the control bit, and then
apply U if the outcome is 1 (in some circumstances, such as when the control
qubit never used again, or as described in section 4.2.2, this is possible, but not in
general).
In [BBC+95], they show the essential ingredients for performing this task.
Firstly, for each gate G in the available family of gates G , we should decompose
the controlled-G (at least approximately) into a network of gates from G. For
example, the controlled-controlled-NOT can be decomposed as shown in gure
A.1.
Creating a network for the controlled-U is now simple. Just replace every gate
G in U with a gate array for computing the controlled-G, always using the same
control bit, as illustrated in gure A.2. With our universal set of gates G we can,
for any , eciently approximate every controlled-G with error at most using
poly( 1 ) gates from G. Suppose we have a network N with T gates not necessarily
from our universal set. We wish to approximate N with a network N 0 such that
their respective outputs j i = N j 00 : : : 0i and j 0i = N 0 j 00 : : : 0i are `close',
that is jj 0i j ij < for some small . It suces to approximate each gate G
137
A.1. COMPUTING A CONTROLLED-U 138
in N with an error in O( T ). We can eciently do this using poly( T ) gates from
our universal set.
Although it suces to approximate every controlled-G, it is an interesting
mathematical question if it is possible to do so exactly.
A.2. Computing M (U )
Given a means for computing U , for any positive integer M , we wish to create
a gate array for computing M (U ) : j xi j yi ! j xi U x j yi. Note that this is a
generalisation of the controlled-U .
We will consider two cases. The rst case is where we are simply given a
quantum network for computing U . For a xed positive integer k, a controlled-
U 2k can easily be created by concatenating 2k consecutive controlled-U arrays.
If the quantum network for U has T gates, then the quantum network for the
controlled-U 2k has O(2k T ) gates.
The second case is where it is possible to compute U 2k more eciently than
by just iterating 2k times the operator U . For example, if U corresponds to mul-
tiplication by a in some group G, we can rst compute a2 by squaring a, then
compute a4 by squaring a2, and continue squaring a total of k times to compute
a2k . This requires k group operations, and we then directly implement the opera-
tion Ua k = Ua2k .
2
Lemma 92. Given a quantum network with T elementary gates for implement-
ing U , we can implement M (U ) using O(MT ) gates. If U = Ua , the operator that
multiplies by a in a group G where a group multiplication requires O(T ) gates, then
we can implement M (Ua ) using O(log MT ) elementary gates.
X !
kaB
j a2 i e2i 1AB1 j k1i
0k1 <A
X !
ka
= j a2i e2i 1A 1 j k1i .
0k1 <A
and applying QFT (A) 1 gives us j a2 i j a1 i.
Note that whereas in the input register j xi j yi corresponded to xB + y, in the
output register it corresponds to yA + x. This accounts for the reversal of the
qubits at the end of the QFT (2n), but it is not quite so simple when a mixed radix
representation is used. We will not worry about transforming the outputs back to
the same representation as the inputs.
We can recursively apply this technique for any N = A1A2 : : : An and map, for
any a 2 f0; 1; : : : ; N 1g, a = a1 A2A3 : : : An + a2 A3 A4 : : : An + : : : + an 1 An + an,
0 aj < Aj . The result is a network which maps, with indices k represented as
A.5. PUBLIC KEY CRYPTOGRAPHY AND QUANTUM COMPUTING 144
j kni j kn 1i : : : j k1i, k = knAn 1An 2 : : : A1 + kn 1An 2 : : : A1 + : : : + k2A1 + k1,
X
N 1
e2i kaN j ki ! j ani j an 1i : : : j a1i :
k=0
Again, the numbers are encoded di erently in the output and input registers.
step 1.
4. Output d.
Theorem 96. Algorithm Split(N ) outputs a non-trivial factor of N and runs
with expected running time of O(log3 N ) multiplications mod N and O(log2 N )
other elementary operations.
Proof. We will prove it for N = pq , where p < q are distinct primes. It is
easy to generalise. Let a1 be a generator of Zp and a2 be a generator of Zq . By
the Chinese Remainder theorem, the (p 1)(q 1) integers in ZN are in a 1 1
correspondence with the pairs of integer (x1 ; x2 ) 2 f1; 2; : : : ; p 1gf1; 2; : : : ; q
1g via the mapping a mod N ! (ax1 ; ax2 ) with a ax1 mod p and a ax2
1 2 1 2
Note that multiplying a and b only gives a+b. It is clear that being able to
compute discrete logarithms will allows us to solve the Die-Hellman problem and
crack any cryptosystems which rely on diculty of the Die-Hellman problem. For
example the U.S. Digital Signature Algorithm which is a U.S. Federal Information
Processing Standard (see section 11.5.1 of [MvOV97]) relies on the diculty of
the Die-Hellman problem in GF (p) where p is a 512-bit prime number.
(30) 90I2y 4J1 180x 4J1 180x 90I1z ( 90 )I2z ( 90)I2y
12 12
(applied from left to right) would implement Uf which corresponds to the matrix
0 1
01
B 1 0 0 0C
B
B 0 1 0 0C
C
(31) B
B C
C:
B
@0 0 0 1C
A
0 0 1 0
Here I will detail the action of this pulse sequence. The 90I2y e ects the 90Iy
pulse (see equation (7)) on the second qubit, corresponding to the matrix
0 1
B 1 1 0 0 C
1
B
B1 1 0 0 C
C
p B C :
2B
B C
C
@0 0 1 1 A
0 0 1 1
The point of the sequence 4J1 180x 4J1 180x is to e ect just the coupling
12 12
term 2~J12Iz Iz in the Hamiltonian for a period of time 2J1 in order to e ect
12
A.7. IMPLEMENTING A FUNCTION WITH A PULSE SEQUENCE 150
the operation e iIz Iz , which (apart from a global phase of e i
4 ) has matrix
0 1
B 1 0 0 0 C
B
B 0 i 0 0 C
C
B
B C
C :
B
@0 0 i 0 C
A
0 0 0 1
The problem with just waiting for a period of time 2J1 is that the entire Hamil-
12
tonian also has the terms ~!1Iz I and ~!2I Iz. The 180x operation, which
corresponds to the matrix
0 1
B 0 0 0 1C
B
B 0 0 1 0C
C
B
B C
C;
B
@0 1 0 0C
A
1 0 0 0
applied after each of two intervals of time 4J1 , leaves the coupling term to evolve
12
for a period of time 2J1 , and causes the e ect of the other two terms to cancel out
12
0 1
B 1 0 0 0C
B
B 0 1 0 0C
C
B
B C :
B
@0 0 i 0C
C
A
0 0 0 i
A.7. IMPLEMENTING A FUNCTION WITH A PULSE SEQUENCE 151
The ( 90 )I2z corresponds to the operation ei 2 Iz on the second qubit, which has
matrix (with a global phase of ei )
4
0 1
B 1 0 0 0 C
B
B 0 i 0 0 C
C
B
B C
C :
B
@0 0 1 0 C
A
0 0 0 i
The ( 90)I2y pulse has matrix
0 1
B 1 1 0 0C
B
B 1 1 0 0C C
B
B C
C:
B
@ 0 0 1 1C A
0 0 1 1
If we multiply these matrices we will get the operation U01 (apart from a global
phase factor).
Bibliography
[ABO97] D. Aharonov and M. Ben-Or. Fault tolerant quantum computation with constant er-
ror. In Proceedings of the 29th Annual ACM Symposium on the Theory of Computing
(STOC '97), 1997. Also available at quant-ph/9611025.
[ADH97] L. Adleman, J. Demarrais, and M.D. Huang. Quantum computability. SIAM Journal
on Computing, 26(5):1524{1540, 1997.
[AHU74] Alfred V. Aho, John E. Hopcroft, and Je rey D. Ullman. The Design and Analysis
of Computer Algorithms. Addison-Wesley, Reading, Massachusetts, 1974.
[AL98] Daniel S. Abrams and Seth Lloyd. A quantum algorithm providing exponential speed
increase for nding eigenvalues and eigenvectors. Technical report, 1998. Also avail-
able at quant-ph/9807070.
[BBBV97] Charles H. Bennett, Ethan Bernstein, Gilles Brassard, and Umesh Vazirani.
Strengths and weaknesses of quantum computing. SIAM Journal on Computing,
26:1510{1523, 1997.
[BBC+ 95] Adriano Barenco, Charles H. Bennett, Richard Cleve, David P. DiVincenzo, Norman
Margolus, Peter Shor, Tycho Sleator, John Smolin, and Harald Weinfurter. Elemen-
tary gates for quantum computation. Physical Review A, 52(5):3457{3467, 1995. On
the quant-ph archive, report no. 9503016.
[BBC+ 98] Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf.
Quantum lower bounds by polynomials. In Proceedings of the 39th Annual Sympo-
sium on Foundations of Computer Science (FOCS'98), pages 352{361, Los Alamitos,
California, November 1998. IEEE. On the quant-ph archive, report no. 9802049.
[BBD+ 97] A. Barenco, A. Berthiaume, D. Deutsch, A. Ekert, R. Jozsa, and C. Macchiavello.
Stabilization of quantum computations by symmetrization. SIAM Journal on Com-
puting, 26(5):1541{1557, 1997.
152
BIBLIOGRAPHY 153
[BBHT98] Michel Boyer, Gilles Brassard, Peter Hyer, and Alain Tapp. Tight bounds on quan-
tum searching. Fortschritte der Physik, 46(4{5):493{505, 1998. On the quant-ph
archive, report no. 9605034.
[BDEJ95] Adriano Barenco, David Deutsch, Artur Ekert, and Richard Jozsa. Conditional quan-
tum dynamics and quantum gates. Physical Review Letters, 74:4083{4086, 1995.
[Bea97] Robert Beals. Quantum computation of fourier transforms over symmetric groups.
In Proceedings of the 29th Annual ACM Symposium on Theory of Computing (STOC
'97), pages 48{53, 1997.
[Ben73] Charles H. Bennett. Logical reversibility of computation. IBM Journal of Research
and Development, 17:525{532, November 1973.
[Ben89] Charles H. Bennett. Time/space trade-o s for reversible computing. SIAM Journal
on Computing, 18(4):766{776, 1989.
[BEST96] Adriano Barenco, Artur Ekert, Kalle-Antti Suominen, and Paivi Torma. Approxi-
mate quantum fourier transform and decoherence. Physical Review A, 54(1):139{146,
1996.
[BH97] Gilles Brassard and Peter Hyer. An exact quantum polynomial-time algorithm for
simon's problem. In Proceedings of Fifth Israeli Symposium on Theory of Computing
and Systems, pages 12{23. IEEE Computer Society Press, June 1997.
[Bhi98] Wahid Bhimji. Approximate quantum fourier transforms and phase estimations,
1998. M.Phys. dissertation.
[BHMT99] Gilles Brassard, Peter Hyer, Michele Mosca, and Alain Tapp. Quantum amplitude
ampli cation and estimation, 1999.
[BHT98] Gilles Brassard, Peter Hyer, and Alain Tapp. Quantum counting. In Proceedings of
25th International Colloquium on Automata, Languages, and Programming (ICALP
'98), volume 1443 of Lecture Notes in Computer Science, pages 820{831. Springer-
Verlag, 1998.
[BL95] D. Boneh and R. J. Lipton. Quantum cryptanalysis of hidden linear functions (ex-
tended abstract). volume 963 of Lecture Notes on Computer Science, pages 424{437,
1995.
[BS99] T. A. Brun and R. Schack. Realizing the quantum baker's map on a nmr quantum
computer. Physical Review A, 59:2649{2658, 1999.
BIBLIOGRAPHY 154
[Buh96] H. Buhrman. A short note on shor's factoring algorithm. SIGACT News, 27(1):89{
90, 1996.
[BV97] Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. SIAM Journal
on Computing, 26(5):1411{1473, October 1997.
[CEG95] Ran Canetti, Guy Even, and Oded Goldreich. Lower bounds for sampling algorithms
for estimating the average. Information Processing Letters, 53:17{25, 1995.
[CEH+ 99] Richard Cleve, Artur Ekert, Leah Henderson, Chiara Macchiavello, and Michele
Mosca. On quantum algorithms. Complexity, 4:33{, 1999.
[CEMM98] Richard Cleve, Artur Ekert, Chiara Macchiavello, and Michele Mosca. Quantum
algorithms revisited. Proceedings of the Royal Society of London A, 454:339{354,
1998. quant-ph report no. 9708016.
[CFH96] D. G. Cory, A. F. Fahmy, and T. F. Havel. Nuclear magnetic resonance spectroscopy:
An experimentally accessible paradigm for quantum. In Proceedings of the 4th Work-
shop on Physics and Computation, 1996. New England Complex Systems Institute.
[Cle94] Richard Cleve. A note on computing fourier transforms by quantum programs. Avail-
able at www.cpsc.ucalgary.ca/ cleve/pubs/fourier transform.ps, 1994.
[Cle99] Richard Cleve. An introduction to quantum complexity theory. In C.Macchiavello,
G.M.Palma, and A.Zeilinger, editors, Collected Papers on Quantum Computation
and Quantum Information Theory. World Scienti c, 1999. To appear.
[Coc73] C. Cocks. A note on non-secret encryption. Technical report,
Communications-Electronics Security Group, U.K., 1973. Available at
http://www.cesg.gov.uk/downlds/nsecret/notense.pdf.
[Coh93] Henri Cohen. A Course in Computational Algebraic Number Theory. 1993.
[Coo71] S. A. Cook. The complexity of theorem proving procedures. In Proceedings of the 3rd
Annual ACM Symposium on the Theory of Computing (STOC'71), pages 151{158,
1971.
[Cop94] Don Coppersmith. An approximate fourier transform useful in quantum factoring.
Research report, IBM, 1994.
[CS96] A. R. Calderbank and P. W. Shor. Good quantum error-correcting codes exist. Phys-
ical Review A, 54:1098{1105, 1996.
BIBLIOGRAPHY 155
[CTDL77] Claude Cohen-Tannoudji, Bernard Diu, and Franck Laloe. Quantum Mechanics,
volume 1. John Wiley & Sons, 1977.
[CVLL98] I. L. Chuang, L. M. K. Vandersypen, X. Zhou D. W. Leung, and S. Lloyd. Experi-
mental realization of quantum algorithm. Nature, 393:143{146, 1998.
[Dam98] Wim van Dam. Quantum oracle interrogation: Getting all information for almost
half the price. In Proceedings of the 39th Annual IEEE Symposium on Foundations
of Computer Science (FOCS'98), pages 362{367, 1998. Also available at quant-
ph/9805006.
[Dav82] Martin Davis. Computability and Unsolvability. Dover Publications Inc., New York,
1982.
[Deu85] David Deutsch. Quantum theory, the Church{Turing principle and the universal
quantum computer. Proceedings of the Royal Society of London A, 400:97{117, 1985.
[Deu89] David Deutsch. Quantum computational networks. Proceedings of the Royal Society
of London A, 425:73{90, 1989.
[DH76a] W. Die and M. E. Hellman. Multiuser cryptographic techniques. In Proceedings of
AFIPS National Computer Conference, pages 109{112, 1976.
[DH76b] W. Die and M. E. Hellman. New directions in cryptography. IEEE Transactions
on Information Theory, 22:644{654, 1976.
[Dir58] Paul A.M. Dirac. The Principles of Quantum Mechanics. Clarendon Press, Oxford,
fourth edition, 1958.
[DiV95] David P. DiVincenzo. Two-bit gates are universal for quantum computation. Physical
Review A, 51(2):1015{1022, 1995. On the cond-mat archive, report no. 9407022.
[DJ92] David Deutsch and Richard Jozsa. Rapid solution of problems by quantum compu-
tation. Proceedings of the Royal Society of London A, 439:553{558, 1992.
[EH98] Mark Ettinger and Peter Hyer. On quantum algorithms for noncommutative hidden
subgroups. quant-ph report 9807029, Los Alamos archive, 1998.
[Ell70] J. H. Ellis. The possibility of non-secret encryption. Technical report,
Communications-Electronics Security Group, U.K., 1970. Available at
http://www.cesg.gov.uk/downlds/nsecret/possnse.pdf.
BIBLIOGRAPHY 156
[Ell87] J. H. Ellis. The story of non-secret encryption. Technical report,
Communications-Electronics Security Group, U.K., 1987. Available at
http://www.cesg.gov.uk/downlds/nsecret/ellis.pdf.
[EPR35] A. Einstein, B. Podolsky, and N. Rosen. Can quantum mechanical description of
physical reality be considered complete? Physical Review, 47:777{780, 1935.
[Ett98] J. M. Ettinger. On noncommutative hidden subgroups, 1998. A lecture at AQIP '98.
[EZ64] H. Ehlich and K. Zeller. Schwankung von polynomen zwischen gitterpunkten. Math-
ematische Zeitschrift, 86:41{44, 1964.
[Fey65] Richard P. Feynman. The Feynman lectures on physics, volume III: Quantum Me-
chanics. Addison-Wesley, 1965.
[Fey82] Richard P. Feynman. Simulating physics with computers. International Journal of
Theoretical Physics, 21(6,7):467{488, 1982.
[FGGS98] E. Farhi, J. Goldstone, S. Gutmann, and M. Sipser. A limit on the speed of quantum
computation in determining parity. Technical Report 9802045, Los Alamos archive,
1998.
[GC97] N. A. Gershenfeld and I. L. Chuang. Bulk spin-resonance quantum computation.
Science, 275:350{356, 1997.
[GCK98] N. A. Gershenfeld, I. L. Chuang, and M. Kubinec. Physical Review Letters, 80:3408,
1998.
[GJ79] Michael R. Garey and David S. Johnson. Computers and Intractability (A guide to
the theory of NP-completeness). W.H. Freeman and Company, New York, 1979.
[GJS76] M. R. Garey, D. S. Johnson, and L. Stockmeyer. Some simpli ed np-complete graph
problems. Theoretical Computer Science, 1:237{267, 1976.
[GN96] R. B. Griths and C. S. Niu. Semi-classical fourier transform for quantum compu-
tation. Physical Review Letters, pages 3228{3231, 1996.
[Gol99] Oded Goldreich. A sample of samplers { a computational perspective on sampling
(survey). Technical report, Electronic Colloquium on Computational Complexity,
199. Available at http://www.eccc.uni-trier.de/eccc/.
[Got98] Daniel Gottesman. A theory of fault-tolerant quantum computation. Physical Review
A, 57:127{137, 1998. Also available at quant-ph/9702029.
BIBLIOGRAPHY 157
[Gri97] D.Y. Grigoriev. Testing the shift-equivalence of polynomials by deterministic, prob-
abilistic and quantum machines. Theoretical Computer Science, 180:217{228, 1997.
[Gro96] Lov K. Grover. A fast quantum mechanical algorithm for database search. In Proceed-
ings of the 28th Annual ACM Symposium on the Theory of Computing (STOC'96),
pages 212{219, Philadelphia, Pennsylvania, May 1996. ACM. On the quant-ph
archive, report no. 9605043.
[Gro98] Lov K. Grover. Quantum computers can search rapidly by using almost any trans-
formation. Physical Review Letters, 80:4329{4332, May 1998.
[HKM98] T. Hayes, S. Kutin, and D. van Melkebeek. On the quantum complexity of majority.
Technical Report TR-98-11, University of Chicago, Computer Science Department,
1998.
[Hy97] Peter Hyer. Conjugated operators in quantum algorithms. IMADA preprint, 1997.
[HR90] Torben Hagerup and Christine Rub. Guided tour of Cherno bounds. Information
Processing Letters, 33(6):305{308, 1990.
[HSTC98] T. F. Havel, S. S. Somaroo, C.-H. Tseng, and D. G. Cory. Principles and demon-
strations of quantum information processing by nmr spectroscopy. Technical report,
1998. Available at quant-ph/9812086.
[HW79] G. H. Hardy and E. M. Wright. An Introduction to the Theory of Numbers. Oxford
University Press, Oxford, fth edition, 1979.
[JM98] J. A. Jones and M. Mosca. Implementation of a quantum algorithm on a nuclear
magnetic resonance quantum computer. Journal of Chemical Physics, 109:1648{
1653, 1998. Also available at Los Alamos archive quant-ph/9801027.
[JM99] J. A. Jones and M. Mosca. Approximate quantum counting on an nmr ensemble
quantum computer. Physical Review Letters, 83:1050{1053, 1999. Also available at
Los Alamos archive quant-ph/98008056.
[JMH98] J. A. Jones, M. Mosca, and R. H. Hansen. Implementation of a quantum search
algorithm on a quantum computer. Nature, 393:344{346, 1998. Also available at Los
Alamos archive quant-ph/9805069.
[KCL98] E. Knill, I. Chuang, and R. La amme. E ective pure states for bulk quantum com-
putation. Physical Review A, 57:3348{3363, 1998.
BIBLIOGRAPHY 158
[Kit95] A. Yu. Kitaev. Quantum measurements and the abelian stabilizer problem. Available
at Los Alamos e-Print achive (http://xxx.lanl.gov) as quant-ph/9511026, 1995.
[Kit97] A. Yu. Kitaev. Quantum computations: algorithms and error correction. Russian
Math. Surveys, 52(6):1191{1249, 1997. Uspekhi Mat. Nauk 52:6 53-112.
[KLZ97] Emanuel Knill, Raymond La amme, and Wojciech Zurek. Resilient quantum com-
putation: Error models and thresholds. Technical report, 1997. Available at quant-
ph/9702058.
[Knu98] Donald E. Knuth. Seminumerical Algorithms, volume 2. Addison-Wesley, third edi-
tion, 1998.
[Kob94] Neal Koblitz. A Course in Number Theory and Cryptography. Springer-Verlag, New
York, second edition, 1994.
[Koc96] Paul C. Kocher. Timing attacks on implementations of die-hellman, rsa, dss, and
other systems. In Neal Koblitz, editor, Advances in Cryptology - CRYPTO '96, 16th
Annual International Cryptology Conference, Santa Barbara, CA, volume 1109 of
Lecture Notes in Computer Science. Springer, 1996.
[Lev73] L. A. Levin. Universal sorting problems. Problems of Information Transmission,
9:265{266, 1973.
[Llo95] Seth Lloyd. Almost any quantum logic gate is universal. Physical Review Letters,
75:346{349, 1995.
[LTV98] M. Li, J. Tromp, and P. Vitanyi. Reversible simulation of irreversible computation.
Physica D, 120:168{176, 1998.
[ME99] Michele Mosca and Artur Ekert. The hidden subgroup problem and eigenvalue esti-
mation on a quantum computer. volume 1509 of Lecture Notes in Computer Science,
1999. Also available at Los Alamos archive, quant-ph/9903071.
[Mos98] Michele Mosca. Quantum searching and counting by eigenvector analysis. In Pro-
ceedings of Randomized Algorithms, A satellite workshop of 23rd International
Symposium on Mathematical Foundations of Computer Science, 1998. Available at
http://www.eccc.uni-trier.de/eccc-local/ECCC-LectureNotes/randalg/index.html.
[Mos99] Michele Mosca. Counting by quantum eigenvalue estimation. Theoretical Computer
Science, 1999. to appear.
[MP95] M. Minsky and S. Papert. Perceptrons. MIT Press, second edition, 1995.
BIBLIOGRAPHY 159
[MR95] Rajeev Motwani and Prabhakar Raghavan. Randomized Algorithms. Cambridge Uni-
versity Press, 1995.
[MvOV97] Alfred J. Menezes, Paul C. van Oorschot, and Scott A. Vanstone. Handbook of Ap-
plied Cryptography. discrete mathematics and its applications. CRC Press, London,
1997.
[Neu56] John von Neumann. Probabilistic logics and synthesis of reliable organisms from un-
reliable components. In C. E. Shannon and J. McCarthy, editors, Automata Studies.
Princeton University Press, 1956.
[Nis91] N. Nisan. Crew prams and decision trees. SIAM Journal of Computing, 20(6):999{
1007, 1991.
[NS94] N. Nisan and M. Szegedy. On the degree of boolean functions as real polynomials.
Computational Complexity, 4(4):301{313, 1994.
[NW99] Ashwin Nayak and Felix Wu. On the quantum black-box complexity of approximat-
ing the mean and related statistics. In Proceedings of the 21th Annual ACM Sym-
posium on Theory of Computing (STOC 99), 1999. Also available at Los Alamos
archive, quant-ph/9804066.
[Pap94] C. H. Papadimitriou. Complexity theory, 1994.
[Pat92] R. Paturi. On the degree of polynomials that approximate symmetric boolean func-
tions (preliminary version). In Proceedings of the 24th Annual ACM Symposium on
Theory of Computing, pages 468{474, 1992.
[Pra75] Vaughan R. Pratt. Every prime has a succinct certi cate. SIAM Journal on Com-
puting, 4(3):214{220, 1975.
[RB98] Martin Rotteler and Thomas Beth. Polynomial-time solution to the hidden subgroup
problem for a class of non-abelian groups. quant-ph 9812070, 1998.
[RC66] T. J. Rivlin and E. W. Cheney. A comparison of uniform approximations on an
interval and a nite subset thereof. SIAM Journal of Numerical Analysis, 3(2):311{
320, 1966.
[Rog87] Hartley Rogers. Theory of Recursive Functions and E ective Computability. MIT
Press, 1987.
BIBLIOGRAPHY 160
[RSA78] R. L. Rivest, A. Shamir, and L. M. Adleman. A method for obtaining digital sig-
natures and public-key cryptosystems. Communications of the ACM, 21:120{126,
1978.
[Sch98] R. Schack. Using a quantum computer to investigate quantum chaos. Physical Review
A, 57:1634{1635, 1998.
[Sho94] Peter W. Shor. Algorithms for quantum computation: Discrete logarithms and fac-
toring. In Sha Goldwasser, editor, Proceedings of the 35th Annual Symposium on
Foundations of Computer Science, pages 124{134. IEEE Computer Society Press,
November 1994. available at feynman.stanford.edu/qcomp/shor/index.html.
[Sho95a] P. W. Shor. Scheme for reducing decoherence in quantum computer memory. Physical
Review A, 52, 1995.
[Sho95b] Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete log-
arithms on a quantum computer. On the quant-ph archive, report no. 9508027.,
August 1995. Expanded version of [Sho94].
[Sho96] P. W. Shor. Fault tolerant quantum computation. In Proceedings of the 37th Annual
Symposium on Foundations of Computer Science, pages 56{65, Los Alamositos, CA,
1996. IEEE Computer Society Press.
[Sim94] Daniel R. Simon. On the power of quantum computation. In Sha Goldwasser, ed-
itor, Proceedings of the 35th Annual Symposium on Foundations of Computer Sci-
ence, pages 116{123. IEEE Computer Society Press, November 1994. available at
feynman.stanford.edu/qcomp/simon/index.html.
[Sol99] R. Solovay. Lie groups and quantum circuits, 1999. preprint.
[Ste96] A. M. Steane. Error correcting codes in quantum theory. Physical Review Letters,
77:793{797, 1996.
[Ste97] A. M. Steane. Active stabilisation, quantum computation, and quantum state syn-
thesis. Physical Review Letters, 78:2252{2255, 1997.
[SV98] Leonard J. Schulman and Umesh Vazirani. Scalable nmr quantum computation.
Technical Report 9804060, Los Alamos archive, 1998.
[Tap98] Alain Tapp, 1998. Personal communication.
[THL+ 96] Q. A. Turchette, C. J. Hood, W. Lange, H. Mabuchi, and H. J. Kimble. Measurement
of conditional phase shifts for quantum logic. Physical Review Letters, 76:3108, 1996.
BIBLIOGRAPHY 161
[Vaz97] Umesh Vazirani, 1997. UC Berkeley Course CS294-2 Quantum Computation Fall
1997.
[vDDE+ 99] Wim van Dam, Mauro D'Ariano, Artur Ekert, Chiara Macchiavello, and Michele
Mosca. Estimation of local phase shifts on a quantum computer, 1999. in preparation.
[Wel88] Dominic Welsh. Codes and Cryptography. Oxford University Press, Oxford, 1988.
[Yao93] Andrew Chi-Chih Yao. Quantum circuit complexity. In Proceedings of the 34th IEEE
Symposium on Foundations of Computer Science, pages 352{361, Los Alamitos,
California, 1993. Institute of Electrical and Electronic Engineers Computer Society
Press. available at feynman.stanford.edu/qcomp/yao/index.html.
[Zal98] Christof Zalka. Fast versions of shor's quantum factoring algorithm. Technical Report
9806084, Los Alamos archive, 1998.
[Zal99] Christof Zalka. preprint, 1999.