49
Principles, Designs and Analysis of Quantum Computing Devices Goong Chen David A. Church Berthold-Georg Englert Carsten Henkel Bernd Rohwedder Marlan O. Scully

Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

Principles, Designs and Analysis ofQuantum Computing Devices

Goong Chen David A. Church Berthold-Georg EnglertCarsten Henkel Bernd Rohwedder Marlan O. Scully

Page 2: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

ii

Page 3: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

Contents

1 Introduction to Quantum Computation 11.1 Introduction. Turing machines and binary logic gates . . . . . . 11.2 Quantum mechanical systems . . . . . . . . . . . . . . . . . . . . 51.3 Hilbert spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131.4 Universality of elementary quantum gates . . . . . . . . . . . . . 181.5 Quantum algorithms . . . . . . . . . . . . . . . . . . . . . . . . . 26

1.5.1 The Deutsch–Jozsa problem ([15]) . . . . . . . . . . . . . 261.5.2 Bernstein–Vazirani problem ([6]) . . . . . . . . . . . . . . 281.5.3 Simon’s problem ([50]) . . . . . . . . . . . . . . . . . . . . 301.5.4 Grover’s quantum search algorithm ([25]) . . . . . . . . . 321.5.5 Shor’s factorization algorithm ([49]) . . . . . . . . . . . . 34

1.6 Quantum adder and multiplier . . . . . . . . . . . . . . . . . . . 371.7 Quantum error correction codes . . . . . . . . . . . . . . . . . . . 411.8 Quantum computing devices and requirements . . . . . . . . . 41

2 Two-Level Atoms and Cavity QED 412.1 Two-Level atoms . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

2.1.1 Atom-light interaction . . . . . . . . . . . . . . . . . . . . 412.1.2 Reduction to a two-level atom . . . . . . . . . . . . . . . 442.1.3 Single atom qubit rotation . . . . . . . . . . . . . . . . . . 462.1.4 Two-level atom hardware . . . . . . . . . . . . . . . . . . 48

2.2 Quantization of the electromagnetic field . . . . . . . . . . . . . 512.2.1 Normal mode expansion . . . . . . . . . . . . . . . . . . . 512.2.2 Field mode quantization . . . . . . . . . . . . . . . . . . . 522.2.3 Energy spectrum and stationary states . . . . . . . . . . . 532.2.4 Cavity hardware . . . . . . . . . . . . . . . . . . . . . . . 56

2.3 Cavity QED for the quantum phase gate . . . . . . . . . . . . . . 592.3.1 Atom-cavity Hamiltonian . . . . . . . . . . . . . . . . . . 602.3.2 Large detuning limit . . . . . . . . . . . . . . . . . . . . . 622.3.3 Two-qubit operation . . . . . . . . . . . . . . . . . . . . . 642.3.4 Atom-cavity hardware . . . . . . . . . . . . . . . . . . . . 66

iii

Page 4: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

iv CONTENTS

3 Imperfect Quantum Operations 713.1 Fidelity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713.2 Density matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723.3 Time evolution of density matrices . . . . . . . . . . . . . . . . . 75

3.3.1 The von Neumann equation . . . . . . . . . . . . . . . . . 753.3.2 Quantum operations . . . . . . . . . . . . . . . . . . . . . 753.3.3 The Kraus representation theorem . . . . . . . . . . . . . 763.3.4 Quantum Markov processes . . . . . . . . . . . . . . . . . 783.3.5 Non-Markovian environments . . . . . . . . . . . . . . . 81

3.4 Examples of master equations . . . . . . . . . . . . . . . . . . . . 823.4.1 Leaky cavity . . . . . . . . . . . . . . . . . . . . . . . . . . 823.4.2 Unstable two-level system . . . . . . . . . . . . . . . . . . 833.4.3 Dephasing . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

3.5 Fidelity calculations . . . . . . . . . . . . . . . . . . . . . . . . . . 863.5.1 Fluctuating gate parameters . . . . . . . . . . . . . . . . . 863.5.2 Spontaneous decay . . . . . . . . . . . . . . . . . . . . . . 88

4 Ion Traps 954.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954.2 Ion confinement, cooling, and condensation . . . . . . . . . . . . 98

4.2.1 Confinement. Several types of ion traps . . . . . . . . . . 984.2.2 Ion cooling and condensation . . . . . . . . . . . . . . . . 105

4.3 Ion qubits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1114.4 Summary of ion preparation . . . . . . . . . . . . . . . . . . . . . 1164.5 Coherence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

4.5.1 Coherence of the motional qubit . . . . . . . . . . . . . . 1194.5.2 Coherence of the internal qubit . . . . . . . . . . . . . . . 1224.5.3 Coherence in logic operations . . . . . . . . . . . . . . . . 1234.5.4 Studies of decoherence through coupling to engineered

reservoirs . . . . . . . . . . . . . . . . . . . . . . . . . . . 1264.5.5 Summary of ion coherence . . . . . . . . . . . . . . . . . 127

4.6 Quantum gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1284.6.1 General considerations . . . . . . . . . . . . . . . . . . . . 1294.6.2 Cirac–Zoller CNOT gate . . . . . . . . . . . . . . . . . . . 1404.6.3 Wave packet or Debye–Waller CNOT gate . . . . . . . . 1464.6.4 Sørensen–Mølmer gate . . . . . . . . . . . . . . . . . . . . 1474.6.5 Geometrical phase gate . . . . . . . . . . . . . . . . . . . 1514.6.6 Summary of quantum gates . . . . . . . . . . . . . . . . . 154

4.7 A vision of a large scale confined-ion quantum computer . . . . 1564.8 Trap architecture and performance . . . . . . . . . . . . . . . . . 1584.9 Teleportation of coherent information . . . . . . . . . . . . . . . 1594.10 Experimental DFS logic gates . . . . . . . . . . . . . . . . . . . . 1604.11 Quantum error correction by ion traps . . . . . . . . . . . . . . . 1614.12 Summary of ion quantum computation . . . . . . . . . . . . . . 162

4.12.1 Assessment . . . . . . . . . . . . . . . . . . . . . . . . . . 1624.12.2 Qubits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

Page 5: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

CONTENTS v

4.12.3 Coherence . . . . . . . . . . . . . . . . . . . . . . . . . . . 1644.12.4 Gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1654.12.5 Computation . . . . . . . . . . . . . . . . . . . . . . . . . 1664.12.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 1684.12.7 Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

5 Quantum Dots Quantum Computing Gates 1755.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

5.1.1 QD properties and fabrication: from quantum wells,wires to quantum dots . . . . . . . . . . . . . . . . . . . . 176

5.1.2 QD-based single-electron devices andsingle-photon sources . . . . . . . . . . . . . . . . . . . . 181

5.1.3 A simple quantum dot for quantum computing . . . . . 1845.1.4 Spintronics . . . . . . . . . . . . . . . . . . . . . . . . . . . 1865.1.5 Three major designs of QD-based quantum gates . . . . 1865.1.6 Universality of 1-bit and 2-bit gates in quantum computing188

5.2 Electrons in quantum dots microcavity . . . . . . . . . . . . . . . 1905.2.1 Resonance, 1-bit and CNOT gates . . . . . . . . . . . . . 1925.2.2 Decoherence and measurement . . . . . . . . . . . . . . . 194

5.3 Coupled electron spins in an array of quantum dots . . . . . . . 1955.3.1 Electron spin . . . . . . . . . . . . . . . . . . . . . . . . . 1955.3.2 The design due to D. Loss and D. DiVincenzo . . . . . . 1975.3.3 Model of two identical laterally coupled quantum dots . 1995.3.4 More details of the QD arrangements: Laterally coupled

and vertically coupled arrays . . . . . . . . . . . . . . . . 2065.3.5 Decoherence and measurement . . . . . . . . . . . . . . . 2095.3.6 New advances . . . . . . . . . . . . . . . . . . . . . . . . . 211

5.4 Biexciton in a single quantum dot . . . . . . . . . . . . . . . . . . 2115.4.1 Derivation of the unitary rotation matrix and the condi-

tional rotation gate . . . . . . . . . . . . . . . . . . . . . . 2145.4.2 Decoherence and measurement . . . . . . . . . . . . . . . 2185.4.3 Proposals for coupling of two or more biexciton QD . . . 218

5.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

6 Linear Optics Computers 1856.1 Classical electrodynamics –

Classical computers . . . . . . . . . . . . . . . . . . . . . . . . . . 1866.1.1 Light beam manipulation with four degrees of freedom . 1876.1.2 Optical circuits and examples . . . . . . . . . . . . . . . . 1966.1.3 Complexity issues of LOCC and alternatives . . . . . . . 200

6.2 Quantum electrodynamics –Quantum computers . . . . . . . . . . . . . . . . . . . . . . . . . 2046.2.1 Quantum optical states . . . . . . . . . . . . . . . . . . . 2056.2.2 Quantum operations and gates . . . . . . . . . . . . . . . 2106.2.3 The approach of Knill, Laflamme and Milburn . . . . . . 2166.2.4 Quantum teleportation . . . . . . . . . . . . . . . . . . . . 224

Page 6: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

vi CONTENTS

6.2.5 Application of quantum teleportation to LOQC . . . . . 2286.3 Summary and outlook . . . . . . . . . . . . . . . . . . . . . . . . 237

7 Nuclear Magnetic Resonance (Optional and Tentative) 245

A 247A.1 The Fock–Darwin States . . . . . . . . . . . . . . . . . . . . . . . 247

B 251B.1 Evaluation of the exchange energy . . . . . . . . . . . . . . . . . 251

Page 7: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

Chapter 1

Introduction to QuantumComputation

1.1 Introduction. Turing machines and binary logicgates

The earliest ideas of simulating and utilizing quantum systems to do compu-tation, i.e., quantum computation, can be attributed to P. Benioff ([5, 1980])and R. Feynman ([23, 1982]). In his 1980 paper, Benioff introduced a quantumTuring machine model. Deutsch ([12, 13]) further developed more concreteproposals and introduced the quantum circuit model of computation. Later,Yao [61] showed that the quantum circuit model of computation is equivalentto the quantum Turing machine model.

The foundation of modern computer science is built on the theory of Tur-ing machines. Alan Turing (1912–1954) ([43]) published his ideas of an ab-stract computing machine (now called a “Turing machine” (TM) in 1936, whichmoved from one state to another using a precise finite set of rules, given by afinite table, and depending on a single symbol it read from a tape ([45]). A TM,at the time Alan Turing invented it in his 1936 paper [54], was a hypotheticalcomputer. It consists of the following:

(i) an infinite tape on which symbols may be read and written.

(ii) The machine travels right or left along the tape, following a program.

(iii) At each step the machine writes to the tape, travels either left or right andchanges state, according to a set of internal states.

(iii) The set of symbols and the set of internal states are both finite sets.

Turing wrote [54]:

1

Page 8: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

2 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

“. . . Some of the symbols written down will form the sequencesof figures which is the decimal of the real number which is beingcomputed. The others are just rough notes to ”assist the memory”.It will only be these rough notes which will be liable to erasure. . . .”

Further, he established that a universal Turing machine existed [54]:

“. . . which can be made to do the work of any special-purpose ma-chine, that is to say to carry out any piece of computing, if a tapebearing suitable ”instructions” is inserted into it. . . .”

The tape referred above in his description of a universal Turing machinewas the “computer memory” and the instructions on the tape constituted the“computer program.”

We may formalize the notion of a TM as follows.

Definition 1.1.1. A (classical) Turing machine (TM) is a 6-tuple (Q,A, δ, q0, qa, qr),where

Q = {q1, q2, . . . , qm} is a finite set of control states;A = {α1, α2, . . . , αn}, the alphabet, is a finite set of distinct symbols;q0, qa, qr ∈ Q are, respectively, the initial, accepting and rejecting states;

andδ : Q×A −→ A×Q× {L,R},

is a transition function mapping from each “square” (q, α) ∈ Q×A on a “tape”to (q′, α′, L) or (q′, α′, R), left (L) or right (R) of that square on the tape. �

A simple TM satisfying the above definition is exemplified below.

Example 1.1.1. Consider

Q = {x, qa, qr},A = {1, B},

where B stands for “blank” while “Halt” means that the computation processis finished.

Define

δ(x, 1) = (1, x, R),δ(x,B) = (1, qa, R),δ(0, B) = (0, qr, R).

Then the above input-output relation defined by δ defines a fault-tolerant TMperforming an “unary increment” ([11]), i.e., it takes a string of 1’s and add anadditional 1 at the end, e.g.,

1111 −→ 11111.

Page 9: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.1. INTRODUCTION. TURING MACHINES AND BINARY LOGIC GATES3

It functions as follows. On the “tape,” initially the entries are

1 1 1 1 B B B · · · · · · B · · · ,

where B signifies “blank”. It first encounters 1 at square 1, as

δ(x, 1) = (1, x, R),

so the TM writes 1 there and moves R (right) and goes to state x. At square 2,3 and 4, it does the same. At the 5th square, because

δ(x,B) = (1, qa, R),

so the TM moves to square 6, rewrites B into 1, and finishes the computation(i.e., halt) by entering the accepting state qa. What is written on the tape is

1 1 1 1 1 B B B · · · B · · ·and the outcome is the unary incremented 11111.

If originally on the tape, there are entries other than 1 and B, say

1 1 0 1 B B · · · B · · · ,

then at the third square, “0” is not an unary symbol, and the TM realizes thatthe string on the tape is an invalid input. As δ(x, 0) = (0, qr, B), the TM rejectsthe input string by entering the rejecting state qr. �

The execution of the transition function δ and the computation on a TM isdone by logic gates. Such gates are based on binary logic. For example, wehave the NOT-gate and AND-gate, as shown in Fig. 1.1

AND−gate

xxy

x x

01

10

x y

0 00 11 01 1

yx

x y

00

10

NOT−gate

x

Figure 1.1: The NOT-gate and the AND-gate, and their truth tables. Note thatthe NOT-gate is reversible but the AND-gate is irreversible.

In Table 1.1, we provide a list of classical logic gates and notation for perform-ing Boolean operations.

Page 10: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

4 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

AND: ∧ x ∧ y = x · yOR: ∨ x ∨ y = x+ y − x · yNOT: ¬ ¬x = 1 − x, x = 1 − xCOPY COPY x = xxNAND: ↑(NOT AND) x ↑ y = ¬(x ∧ y) = (¬x) ∨ (¬y)NOR: ↓(NOT OR) x ↓ y = ¬(x ∨ y) = (¬x) ∧ (¬y)

Table 1.1: Classical gates for Boolean operations, where x, y ∈{0, 1}.

The dissipation of heat generated by the computer has always been an im-portant issue in the design of computers. In the early 1960’s, R. Landauer ofIBM identified the (main) source of heat generation as due to the irreversibilityof the computing process [35]. For example, the AND-gate “∧” is irreversiblebecause if x∧y = z, then we cannot determine x and y from the value of z. Thiscan be easily seen from the truth table for “∧” given in Fig. 1.1. If all the com-puting gates are reversible, then heat generation by the computer can be dramaticallycurtailed. (Ideally, such heat generation can be reduced to 0.)

Even though the 1-bit AND-gate is irreversible,∧, an “equivalent” reversible3-bit AND-gate can be constructed, as shown in Fig. 1.2.

0

1

0

1AND

x x

x

x2

x2

x

(x x )0 1

Figure 1.2: The reversible 3-bit AND-gate. Here ⊕ means the usual addition,but modulo 2. By choosing x2 = 0, the output on the lowest wire gives usx0 ∧ x1(= x0x1).

A gate operation is said to be universal if all the other logic operations canbe expressed by this gate. The 1-bit NAND-gate ↑ in Table 1.1 is universal, e.g.,as we can carry out negation, ∧ (and) and ∨ (or) by NAND:

x = x ↑ 1, x ∧ y = (x ↑ y) ↑ 1, x ∨ y = x ↑ y = (x ↑ 1) ↑ (y ↑ 1).

Nevertheless, the NAND-gate is irreversible.In order to have a gate operation that is both reversible and universal, the

number of bits involved must be at least 3. A famous theorem due to Fredkinand Toftoli [24] states the following:

Page 11: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.2. QUANTUM MECHANICAL SYSTEMS 5

“There exists a 3-bit “universal gate” for reversible computation,i.e., a gate which, when applied in succession to different tripletsof bits in a gate array, could be used to simulate any arbitrary re-versible computation.”

This universal, reversible gate, called the Toffoli gate, is exactly the 3-bitAND-gate as shown in Fig. 1.2.

All the quantum computing gates to be studied in this book will soon beknown to be reversible, as quantum operations are unitary transformationsand thus are reversible. A quantum Toffoli gate will be given in Fig. 1.5. It canbe represented by an 8×8 unitary matrix. Since the classical Toffoli gate is uni-versal, we see that all the classical logic circuits can be simulated by quantumcircuits.

1.2 Quantum mechanical systems. Basics of atomsand molecules

We assume that the reader has rudimentary knowledge of modern physics andmultivariate calculus. Quantum mechanics was developed in the 20th Centuryby the work of great physicists Planck, Einstein, Heisenberg, Schrodinger andDirac. But here we begin our discussion by presenting the Schrodinger equa-tion as a fundamental postulate of quantum mechanics.

The majority of quantum computer proposals utilize particular quantummechanical properties, such as photon emission and absorption, electronic andnuclear spins, energy level transitions, etc., in atomic, molecular and opti-cal systems. The physical law governing such phenomena is the Schrodingerequation

i~∂

∂tψ = Hψ, (1.1)

where ψ, the wave function, depends on both time t ∈ R and space rrr = (x1, x2,. . . , xN ) ∈ RN ; ψ is a complex-valued function H in (1.1) is an operator, calledthe Hamiltonian, and ~ is the Planck constant. H consists of two parts:

H = K + V, (1.2)

where

H = the kinetic energy of the system,V = the potential energy of the system.

Both K and V are functions of (rrr, t) classically. As heuristics, we consider themotion of a harmonic oscillator which, classically, describes a 1-dimensionalvibrating spring with an attached mass m and spring constant k:

K =1

2mp2, p = the linear momentum = mv = mx,

V =12kx2,

Page 12: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

6 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

where x denotes the displacement of the mass from the equilibrium, and x =dx/dt. The Hamiltonian principle gives us the equations of motion

x = ∂H/∂p = p/m, p = −∂H/∂x = −kx.Thus,

x = p/m = −kx/m,mx+ kx = 0,

which is the equation of motion of the harmonic oscillator in Newtonian me-chanics.

In quantum mechanics, K and V and, thus, H , are regarded as operators ina proper Hilbert space1 through quantization:

p 7→ ~

i

d

dx; x 7→ x · (i.e., x · (ψ) = xψ, the multiplication operator), (1.3)

K =1

2mp2 −→ − ~2

2md2

dx2,

V =12kx2 −→ 1

2kx2·,

and, thus, (1.1) becomes a time-dependent partial differential equation (PDE)

i~∂

∂tψ(x, t) = − ~2

2m∂2

∂x2ψ(x, t) +

12kx2ψ(x, t); x, t ∈ R. (1.4)

The proper abstract functional space setting for a rigorous mathematical inves-tigation of the equation (1.4) is

L2(R) ={f : R → C |

∫ ∞

−∞|f(x)|2dx <∞

}2, (1.5)

called the space of square Lebesgue-integrable functions on R. A function f ∈L2(R), after normalization to norm 1, i.e.,

f = f/ ∞∫

−∞|f(x)|2dx

1/2

, ‖f‖ ≡ ∞∫−∞

|f(x)|2dx1/2

= 1

becomes a so-called bound state (pure) in quantum mechanics. We will return tothe quantum-mechanical harmonic oscillator eq. (1.4) in Section 2.2 of Chap. 2.

We may now proceed to consider a concrete system involving a few parti-cles of electrons and nuclei in atomic and molecular physics. The Schrodinger

1We defer until Definition 1.3.1 later in this section to introduce what a Hilbert space is and therelevant notation.

2The integral in (1.5) is the Lebesgue integral. But for all practical purposes, the reader may viewit as the usual Riemann integral in calculus. Both the Riemann and the Lebesgue integrals obeythe same linearity rules. They differ only in sequential convergence properties.

Page 13: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.2. QUANTUM MECHANICAL SYSTEMS 7

equation modeling such a system provides satisfactory explanations of theirchemical, electromagnetic and spectroscopic properties. Assume that the sys-tem under consideration is non-relativistic, and has N1 nuclei with massesMK and charges eZK , e being the electron charge, for K = 1, 2, . . . , N1, and

N2 =N1∑

K=1

ZK is the number of electrons. The position vector of the Kth

nucleus will be denoted as RRRK , while that of the kth electron will be rrrk, fork = 1, 2, . . . , N2. Let m be the mass of the electron. The Schrodinger equationfor the overall system is given by

i~∂

∂tΨ(RRR,rrr, t) = HΨ(RRR,rrr, t) =

[−

N1∑K=1

~2

2MK∇2

K −N2∑k=1

~2

2m∇2

k

−N1∑

K=1

N2∑k=1

ZKe2

|RRRK − rrrk| +12

N2∑k 6=k′

k,k′=1

e2

|rrrk − rrrk′ |

+12

N1∑K 6=K′

K,K′=1

ZKZK′e2

|RRRK −RRRK′ |

Ψ(RRR,rrr, t), (1.6)

where H is the Hamiltonian and

RRR = (RRR1,RRR2, . . . ,RRRN1), rrr = (rrr1, rrr2, . . . , rrrN2), rrrj = (xj , yj , zj) ∈ R3.

The above PDE has a total of 3(N1 +N2) + 1 dependent variables and is oftentoo complex for practical purposes of studying atomic or molecular problems.Born and Oppenheimer [7] provide a reduced order model by approximation,permitting a particularly accurate decoupling of the motions of the electronsand the nuclei. The main idea is to assume that Ψ in (1.6) takes the separableform of a product

Ψ(RRR,rrr) = G(RRR)F (RRR,rrr),

which, after assuming that the electronic motions have much faster time scalethan those of nuclear motions, leads to

i~∂

∂tF (RRR,rrr, t) =

(− ~2

2m

N2∑k=1

∇2k +

12

N2∑k 6=k′

k,k′=1

e2

|rrrk − rrrk′ | −N1∑

K=1

N2∑k=1

ZKe2

|RRRK − rrrk|

+12

N1∑K 6=K′

K,K′=1

ZKZK′e2

|RRRK −RRRK′ |

)F (RRR,rrr, t). (1.7)

In “typical” molecules, the time scale for the valence electrons to orbit aboutthe nuclei is about once every 10−15 second (and that of the inner-shell elec-trons is even smaller), that of the bonds vibration is about once every 10−14

Page 14: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

8 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

second, and that of the molecule rotation is every 10−12 second. This differ-ence of time scale makes the Born–Oppenheimer approximation valid, as theelectrons move so fast that they can instantaneously adjust their motions withrespect to the vibration and rotation movements of the slower and much heav-ier nuclei.

The Born–Oppenheimer approximation breaks down in several cases, chiefamong them when the nuclear motion is strongly coupled to electronic mo-tions, e.g., when the Jahn–Teller effects [29, 30] are present. It also requirescorrections for loosely held electrons such as Rydberg atoms.

Using atomic units and considering only steady-states for (1.7):

F (RRR,rrr, t) = F (rrr, t) = e−iEtψ(rrr), rrr = (rrr1, rrr2, . . . , rrrN2),rrrj = (xj , yj , zj), 1 ≤ j ≤ N2,

we obtain the time-dependent form of the Born–Oppenheimer approximation

Hψ = Eψ, H = −12

N2∑j=1

∇2j +

∑1≤j<k≤Ne

1rjk

−N2∑j=1

N1∑k=1

Zk

|rrrj −RRRk|

+∑

1≤j<k≤N1

ZjZk

|RRRj −RRRk| , (1.8)

where

ψ = ψ(rrr1, rrr2, . . . , rrrN2), ∇2j ≡ ∂2

∂x2j

+∂2

∂y2j

+∂2

∂z2j

,

rjk ≡ |rrrj − rrrk|, j, k = 1, 2, . . . , N2.

Example 1.2.1. We use the simplest atom, the hydrogen H , as an example toillustrate a quantum mechanical model and the idea of quantum numbers. Inthe Born–Oppenheimer model (1.8), by letting, N2 = N1 = 1, with Z1 = 1 andRRR1 = 000, equation (5.20) becomes(

−12∇2 − 1

r

)ψ(rrr) = Eψ(rrr), rrr ∈ R3, (1.9)

the Born–Oppenheimer separation of the hydrogen atom.We write (5.21) in spherical coordinates in view of the symmetry involved:

1r

∂2

∂r2(rψ) +

1r2

Λ2ψ +2rψ − 2Eψ = 0, (1.10)

where

Λ2 ≡ 1sin2 θ

∂2

∂φ2+

1sin θ

∂θ

(sin θ

∂θ

), (the Legendrian); (1.11)

r = the radial variable, 0 < r <∞;θ = the colatitude, 0 ≤ θ ≤ π;φ = the azimuth, 0 ≤ φ ≤ 2π.

Page 15: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.2. QUANTUM MECHANICAL SYSTEMS 9

Equation (5.21) has separable solutions

ψ(rrr) = ψ(r, θ, φ) = R(r)Y (θ, φ). (1.12)

The angular variables are quantized first as we know that angular functionsare the spherical harmonics

Y (θ, φ) = Y`m(θ, φ) = Θ`m(θ)Φm(φ), ` = 0, 1, 2, . . . ,m = `, `− 1, . . . ,−`,(1.13)

on the unit sphere S2 ≡ {rrr ∈ R3 | |rrr| = 1}, satisfying

Λ2Y`m(θ, φ) = −`(`+ 1)Y`m(θ, φ), (1.14)

where in (5.27),

Φm(φ) = (2π)−12 eimφ, (1.15)

Θ`m(θ) ={

(2`+ 1)(`− |m|)!2(`+ |m|)!

} 12

P|m|` (cos θ), (1.16)

(P |m|` is the associated Legendre function).

Using (5.26)–(1.14) in (5.21), we obtain the equation for the radial function

1r(rR)′′ − `(`+ 1)

r2R +

(2r− 2E

)R = 0. (1.17)

Solutions to the eigenvalue problem (1.17) that are square integrable over 0 <r <∞ are known to be

R(r) = Rn`(r) = (−2){

(n− `− 1)!2n[(n+ `)!]3

}(2r)`L2`+1

n+` (2r)e−r;

` = 0, 1, 2, . . . , n− 1, (1.18)

En = −12

1n2, n = 1, 2, . . . , independent of `,

whereL2`+1n+` are the associated Laguerre functions such that form,n = 0, 1, 2, . . .

xLmm+n

′′ + (m+ 1 − x)Lmm+n

′ + (m+ n)Lmm+n = 0,

Lmm+n(x) =

exx−(m+n)

(m+ n)!dm+n

dxm+n(e−xx2m+n),

(when m = 0, L0n(x) is simply denoted as Ln(x)).

The electron state of the hydrogen can thus be characterized by three “quan-tum numbers” n, `,m:

|n`m〉 = Rn`(r)Θ`m(θ)Φm(φ), with a proper normalization factor,n = 1, 2, . . . ; ` = 0, 1, 2, . . . , n− 1;m = −`,−`+ 1, . . . , 0, 1, . . . , `,

with energy level E = En = −12

1n2, n = 1, 2, . . ., independent of ` and m.

Page 16: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

10 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

The first quantum number n is called the principal quantum number. This nsometimes is referred to as the shell. For each given n = 1, 2, . . ., there canbe at most 2n2 electron “orbitals.” The principal quantum number representsphysically the radial “range” that the region extends from the center of theatom.

The second quantum number ` is called the subsidiary quantum number. Thisvalue ` = 0, 1, 2, . . . , n − 1, is often associated with the “shape” of the orbital.For example,

(i) ` = 0 implies spherically shaped, denoted also as an “s” (sharp) orbital.There can be a maximum of 2 electrons with the assignment of s.

(ii) ` = 1 implies double loped, denoted also as a “p” (principal) orbital.There can be a maximum of 6 electrons with the assignment of p.

(iii) ` = 2 implies quadra-lobed, denoted also as a “d” (diffuse) orbital. Therecan be a maximum of 10 electrons with the assignment of d.

(iv) ` = 3 implies octa-lobed, denoted also as an “f” (fundamental) orbital.There can be a maximum of 14 electrons with the assignment of f . Therest of the orbital assignments corresponding to ` = 4, 5, . . ., goes on by

g, h, i, j, k, . . . .

The shapes of s, p and d orbitals are shown in Fig. 1.3

The third quantum number m is called the magnetic quantum number. Therecan be a maximum of two electrons due to e+imφ and e−imφ with the samevalue of m while having the same quantum numbers ` and n. This quantumnumber is associated with the Zeeman effect as when a magnetic field is applied,hyperfine lines of spectra would split from degenerate states of electrons withthe same n, ` but different m.

There is a fourth quantum number, called the spin quantum number, whichis not modeled by the Schrodinger equation. The spin quantum number for anelectron is either +1/2 (spin up) or −1/2 (spin down). �

We now examine some further fundamentals of the atomic physics that areessential in any quantitative study of the manipulation of the quantum behav-ior of atoms. A complete description of the Hamiltonian (i.e., energy) of anatom contains 9 terms as follow [21]:

H = Hel +HCF +HLS +HSS +HZe +HHF +HZn +HII +HQ. (1.19)

The first three terms have the highest order, called the atomic Hamiltonian.They are the electronic Hamiltonian term, crystal field term and the spin-orbit inter-action term, respectively. The electronic Hamiltonian consists of kinetic energyof all electrons, mv2

i /2 = p2i /2m, and two Coulomb terms: the potential energy

Page 17: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.2. QUANTUM MECHANICAL SYSTEMS 11

(c)

(b)

(a)

p

s

p

yz

z

x

x

y

z

y

z

x

y

x

z

z

y

x

x −yd 2 2

2zd

dxzd

xyd

yp

Figure 1.3: Shapes of s, p and d orbitals; cf. [1, p. 76].(a) s-orbital, spherical in shape;(b) p-orbitals, with 2 lobes;(c) d-orbitals, with 4 lobes.Each of the orbitals displayed here has multiplicity 2 because of the azimuthphase e+imφ and e−imφ.

Page 18: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

12 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

of electrons relative to the nuclei, −zne2/rni, and the inter-electronic repulsion

energy, e2/rij :

Hel =∑

i

p2i

2m−∑i>j

e2

rij+∑i,n

zne2

rni.

These three summations agree, respectively in sequential order, to the firstthree summations in (1.8).

The term HCF is called the crystal field term. It comes from the interactionbetween the electron and the electronically charged ions forming the crystal,and is essentially a type of electrical potential energy:

V = −∑i,j

Qje

rij,

where Qj is the ionic charge and rij is the distance from the electron to the ion.Normally, only those ions nearest to the electron are considered.

The third in the atomic Hamiltonian is the interaction between spin andorbit

HLS = λ~L · ~S,where ~L and ~S are the angular momenta of the orbit and spin, respectively, andλ is the coupling constant. In this section, we will use ~S for the electron spinand ~I for the nuclear spin.

The remaining six terms are called spin Hamiltonians. Terms HZe and HZn

are two resulted from the application of an external magnetic field:

HZe = β ~B · (~L+ ~S),

HZn = −∑

i

gniβn~B · ~Ii,

where ~B is the magnetic field strength. These two terms are called Zeemanterms, and they play big roles in NMR (nuclear magnetic resonance) and ESR(electron spin resonance).

The nuclear spin-spin interaction term HII is also important in quantumcomputation,

HII =∑i>j

~Ii · Jij · ~Ij ,

because it provides a mechanism for the interaction between qubits. Hyper-fine interaction arises from the the interaction between the nuclear magneticmoments and the electron,

HHF = ~S ·∑

i

Ai · ~Ii.

In (1.19), HSS is the spin-spin interaction term, expressed as

HSS = D[S2z − 1

3S(S + 1)] +E(S2

x − S2y).

Page 19: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.3. HILBERT SPACES 13

The very last term in (1.19) is called the quadrupolar energy:

HQ =e2Q

4I(2I − 1)

(∂2V

∂Z2

)(3I2

z − I(I + 1) + η(I2x − I2

y )).

For a specific system, only Hamiltonian playing major roles is needed in thefinal model. For example, in the study of ESR, only three terms are retained andthe Hamiltonian is written as

H = HZe +HHF +HSS ,

while in the NMR caseH = HZn +HII .

1.3 Hilbert spaces

A rigorous mathematical study of linear evolution partial differential equationssuch as (1.2) was developed during the 1950s based on functional analysis andoperator theory [27, 53, 9]; see (1.22) and (1.23). The partial differential opera-tors “live” on a Hilbert space which is a space of functions.

Definition 1.3.1. Let H be a vector space distributed over C. We say that H is aHilbert space if H is equipped with an inner product 〈·|·〉 such that for each pairof vectors x, y ∈ H, there is an associated complex number 〈x|y〉3 satisfying

〈y|x〉 = 〈x|y〉,〈x+ y|z〉 = 〈x|z〉 + 〈y|z〉,

〈αx|y〉 = α〈x|y〉,〈x|x〉 ≥ 0,〈x|x〉 = 0 only if x = 0,

and if we define the norm ‖x‖ ≡ [〈x|x〉]1/2 of any x ∈ H, the space H is com-plete with respect to the norm, i.e., for any (Cauchy) sequence {xn|n = 1, 2, . . .}satisfying

limn,m→∞ ‖xn − xm‖ = 0,

this sequence has a limit x0 ∈ H,

limn→∞ xn = x0, i.e., lim

n→∞ ‖xn − x0‖ = 0. �

The space L2(R) we mentioned earlier is a Hilbert space, with the innerproduct defined by

〈f |g〉 =∫ ∞

−∞f(x)g(x)dx;

3The notation for an inner product favored by most mathematicians is 〈x, y〉 instead of 〈x|y〉,the Dirac bra-ket notation.

Page 20: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

14 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

while C(R,C) the space of all continuous functions mapping from R to C isnot a Hilbert space because it cannot be equipped with an inner product thatis complete.

Every Hilbert space arising from physical applications has a countable or-thonormal basis, i.e., there exists a set {φi|i = 1, 2, 3, . . .} ⊆ H such that

〈φi|φj〉 = δij =

{1 if i = j,0 if i 6= j;

and for any f ∈ H, we have an orthonormal expansion

f =∞∑

i=1

〈φi|f〉φi.

Let H1,H2 be two Hilbert spaces and A : H1 → H2 be a bounded linear oper-ator, i.e., A satisfies

‖Af‖2 ≤ C‖f‖1

for some constant C ≥ 0, where ‖ ‖1 and ‖ ‖2 are, respectively, the norms onH1 and H2. In particular, when H2 = C, A is said to be a linear functional. Thevector space of all linear functionals endowed with the natural addition andscalar multiplication is a vector space denoted as H∗, which is algebraicallyisomorphic to H. (This is called the Riesz Representation Theorem in functionalanalysis.) Thus H∗ is itself a Hilbert space, called the dual space of H.

Let H be a complex Hilbert space with inner product 〈·|·〉. For any subsetS ⊆ H, define

span S = closure of

n∑

j=1

αjψj | αj ∈ C, ψj ∈ S, j = 1, 2, . . . , n, for all ψj ∈ S

in H. (1.20)

In quantum mechanics, the Dirac bra-ket notation writes the vector ψk as |k〉,pronounced ket k, where k labels the vector. The role of ψj in the inner product〈ψj |ψk〉 is that ψj is identified as a linear functional on H by

ψ∗j : H −→ C; ψ∗

j (ψk) ≡ 〈ψj |ψk〉.

The Dirac bra-ket notation writes ψ∗j as 〈j|, pronounced bra j. The inner prod-

uct is now written as〈ψj |ψk〉 = 〈j|k〉.

LetA : H → H be a linear operator. Then in Dirac’s notation we write 〈ψj |Aψk〉as 〈j|A|k〉.

The set of all kets (|k〉) generates the linear space H, and the set of all bras(〈j|) also generates the dual linear space H∗. These two linear spaces are called,respectively, the ket space and the bra space, which are dual to each other. The

Page 21: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.3. HILBERT SPACES 15

natural isomorphism fromH onto H∗, or fromH∗ onto H , is called “taking theadjoint” by physicists. An expression like 〈j|A|k〉 has an intended symmetry:one can think of A acting on |k〉 on the right as a matrix times a column vector,or A acting on 〈j| on the left as a row vector times a matrix.

The solution of the Schrodinger equation

i~∂

∂tψ(t) = Hψ(t), ψ(0) = ψ0 ∈ H (initial condition), (1.21)

can now be written as

ψ(t) = e−iHt/~ψ(0), −∞ < t <∞,

provided that H is independent of t. Note that {e−iHt/~| −∞ < t <∞} formsa 1-parameter group of evoutionary operators on H.

A linear operator A on H has a Hermitian conjugate (h.c.) A† defined bythe equation

〈x|A|y〉 = 〈y|A†|x〉, for all x, y ∈ H; (overbar means complex conjugate).

A linear operator A is said to be unitary if

AA† = A†A = I, the identity operator on H.

(We sometimes use 111H or just 111 to denote the identity operator I .)Assume that the Hamiltonian H in (1.21) is independent of time. Then as

H = H†, for any t ∈ R,

e−iHt/~(e−iHt/~)† = e−iHt/~eiH+t/~ = e−iHt/~eiHt/~ = I,

consequently, e−iHt/~ is unitary for any t ∈ R.If H in (1.21) is time-dependent: H = H(t), then the solution to (1.21) can-

not be represented in terms of a 1-parameter evolutionary group. Rather, a2-parameter group {U(t, s)| −∞ < t, s <∞} is needed:

ψ(t) = U(t, 0)ψ0, −∞ < t <∞, (1.22)

where∂

∂tU(t, s) = H(t)U(t, s)

∂sU(t, s) = U(t, s)A(s)

, −∞ < t, s <∞. (1.23)

Nevertheless, U(t, s) remains unitary for any s, t. Thus, all quantum operationsare unitary.

Complex finite dimensional Hilbert spaces are particularly useful in quan-tum computing due to the special features of quantum computer bit represen-tation and quantum device operations. We begin by considering a 2-dimensional

Page 22: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

16 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

complex Hilbert space H which is isomorphic to C2. The standard basis of C2

is

eee1 =[10

], eee2 =

[01

].

In quantum mechanics, the preferred notation for basis is, respectively, |0〉 and|1〉, where |0〉 and |1〉 generally refer to the “spin” state of a certain quantumsystem under discussion. “Spin up” and “spin down” form a binary quantumalternative and, therefore, a quantum bit or, a qubit. These spin states may thenfurther be identified with eee1 and eee2 through, e.g.,

|0〉 =[10

], |1〉 =

[01

]. (1.24)

For a column vector, say eee1, we use superscript T to denote its transpose, suchas eeeT

1 = [1 0], for example. The spin states |0〉 and |1〉 form a standard or-thonormal basis for the (single) qubit’s ket space. The tensor product of a setof n vectors |zj〉 ∈ C2

j , specified by the quantum numbers zj for j = 1, 2, . . . , n,is written interchangeably as

|z1〉 ⊗ |z2〉 ⊗ · · · ⊗ |zn〉 = |z1〉|z2〉 · · · |zn〉 = |z1z2 · · · zn〉. (1.25)

The tensor product space of n copies of C2 is defined to be

(C2)⊗n = span{|j1j2 · · · jn〉 | jk ∈ {0, 1}, k = 1, 2, . . . , n}. (1.26)

It is a 2n-dimensional complex Hilbert space with the induced inner productfrom C2. A quantum state is a vector in (C2)⊗n (or in any Hilbert space H) withthe unit norm4. A quantum state is said to be entangled if it is not a tensor prod-uct of the form (5.21). A quantum operation is a unitary linear transformation on H.The unitary group U(H) on H consists of all unitary linear transformations onH with composition as the (noncommutative) natural multiplication operationof the group.

It is often useful to write the basis vectors |j1j2 · · · jn〉 ∈ (C2)⊗n, jk ∈ {0, 1},

4This type of quantum state is actually a more restrictive type, called a pure state. A pure state,say ket |k〉, could be identified with the projection operator |k〉〈k|. Then a general state is a convexsum of such projectors, i.e.,

P

k

ck|k〉〈k| with ck ≥ 0 andP

k

ck = 1.

Page 23: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.3. HILBERT SPACES 17

k = 1, 2, . . . , n, as column vectors according to the lexicographic ordering:

|00 · · · 00〉 =

100...000

, |00 · · ·01〉 =

010...000

, |00 · · · 10〉 =

001...000

, · · ·

|11 · · · 10〉 =

000...010

, |11 · · ·11〉 =

000...001

; (1.27)

cf. (1.24).A quantum Turing machine (QTM) ([12]) has basic components same as those

of the classical TM, cf. Definition 1.1.1. A QTM is a 6-tuple (Q,A, δ, q0, qa, qr),also same as those given in Definition 1.1.1, except that the transition functionδ satisfies

δ : Q×A×Q×A× {L,R} −→ C

with ∑(q2,a2,d)∈Q×A×{L,R}

|δ(q1, a1, q2, a2, d)|2 = 1, for all (q1, a1) ∈ Q×A.

The above signifies the restriction that all the operations on the QTM must beunitary.

no magnetic

magnetic fieldis applied

field is applied

Energy

m=1/2 (α: spin up)

m=-1/2 (β: spin down)

Figure 1.4: Splitting of energy levels of a nucleus with spin quantum number1/2.

Page 24: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

18 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

1.4 Universality of elementary quantum gates.Quantum circuits

Any 2×2 unitary matrix is an admissible quantum operation on one qubit. Wecall it a 1-bit gate. Similarly, we call a 2k × 2k unitary transformation a k-bitgate. Let a 1-bit gate be

U =[u00 u01

u10 u11

];

we define the operator Λm(U) [3] on (m + 1)-qubits (with m = 0, 1, 2, . . .)through its action on the basis by

Λm(U)(|x1x2 · · ·xmy〉) ={|x1x2 · · ·xmy〉 if ∧m

k=1xk = 0,u0y|x1x2 · · ·xm0〉 + u1y|x1x2 · · ·xm1〉 if ∧m

k=1xk = 1,

where “∧” denotes the Boolean operator AND. The matrix representation forΛm(U) according to the ordered basis (1.27) is

Λm(U) =

1

. . . ©1

©[u00 u01

u10 u11

]

2m+1×2m+1

. (1.28)

This unitary operator is called the m-bit-controlled U operation.An important logic operation on one qubit is the NOT-gate

σx =[0 11 0

]; (1.29)

which is one of the Pauli spin matrices. (The two other important Pauli matri-ces are

σy =[0 −ii 0

], σz =

[1 00 −1

].)

(1.30)

From σx, define the important 2-bit operation Λ1(σx), which is the controlled-not gate, henceforth acronymed the CNOT gate.

For any 1-bit gate A, denote by A(j) the operation (defined through its ac-tion on the basis) on the slot j:

A(j)|x1x2 · · ·xj · · ·xn〉 = |x1〉⊗ |x2〉⊗ · · ·⊗ |xj−1〉⊗ [A|xj〉]⊗|xj+1〉⊗ · · ·⊗ |xn〉.Similarly, for a 2-bit gate B, we define B(j, k) to be the operation on the twoqubit slots j and k [8]. A simple 2-bit gate is the swapping gate

Usw|x1x2〉 = |x2x1〉, for x1, x2 ∈ {0, 1}. (1.31)

Then Usw(j, k) swaps the qubits between the j-th and the k-th slots.

Page 25: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.4. UNIVERSALITY OF ELEMENTARY QUANTUM GATES 19

The tensor product of two 1-bit quantum gates S and T is defined through

(S ⊗ T )(|x〉 ⊗ |y〉 = (S|x〉) ⊗ (T |y〉), for x, y ∈ {0, 1}.

A 2-bit quantum gate V is said to be primitive ([8, Theorem 4.2]) if

V = S ⊗ T or V = (S ⊗ T )Usw

for some 1-bit gates S and T . Otherwise, V is said to be imprimitive.It is possible to factor an n-bit quantum gate U as the composition of k-bit

quantum gates for k ≤ n. The earliest result of this universality study was givenby Deutsch [13] in 1989 for k = 3. Then in 1995, Barenco [2], Deutsch, Barencoand Ekert [14], DiVincenzo [17] and Lloyd [37] gave the result for k = 2. Here,we quote the elegant mathematical treatment and results by J.-L. Brylinski andR. K. Brylinski in [8].

Definition 1.4.1 ([8, Def. 4.2]). A collection of 1-bit gates A i and 2-bit gates Bj

is called (exactly) universal if, for each n ≥ 2, any n-bit gate can be obtained bycomposition of the gates Ai(`) and Bj(`,m), for 1 ≤ `,m ≤ n. �

Theorem 1.4.1 ([8, Theorem 4.1]). Let V be a given 2-bit gate. Then the followingare equivalent:

(i) The collection of all 1-bit gates A together with V is universal.

(ii) V is imprimitive.

Rather than following [8], which requires some knowledge of the Lie algebra theory,we will include an elementary proof of the universality of 2-bit gates at the end of thissection. �

A common type of 1-bit gate from AMO (atomic, molecular and optical)devices is the unitary rotation gate

Uθ,φ ≡[

cos θ −ie−iφ sin θ−ieiφ sin θ cos θ

], 0 ≤ θ, φ ≤ 2π. (1.32)

We have (the determinant) detUθ,φ = 1 for any θ and φ and, thus, the collec-tion of all such Uθ,φ is not dense in U(C2). Any unitary matrix with deter-minant equal to 1 is said to be special unitary and the collection of all specialunitary matrices on (C2)⊗n, SU((C2)⊗n), is a proper subgroup of U((C2)⊗n).It is known that the gates Uθ,φ generate SU(C2).

Another common type of 2-bit gate we shall encounter in the next two sec-tions is the quantum phase gate (QPG)

Qη =

1 0 0 00 1 0 00 0 1 00 0 0 eiη

, 0 ≤ η ≤ 2π. (1.33)

Page 26: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

20 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

Theorem 1.4.2 ([8, Theorem 4.4]). The collection of all the 1-bit gatesUθ,φ, 0 ≤ θ, φ,φ ≤ 2π, together with any 2-bit gate Qη where η 6≡ 0 (mod 2π), is universal. �

Note that the CNOT gate Λ1(σx) can be written as

Λ1(σx) = Uπ/4,π/2(2)QπUπ/4,−π/2(2); (1.34)

cf. [16, (2.2)]. Thus, we also have the following.

Corollary 1.4.3. The collection of all the 1-bit gates Uθ,φ, 0 ≤ θ, φ ≤ 2π, togetherwith the CNOT gate Λ1(σx), is universal. �

We now introduce the standard notation for several of the basic types ofquantum gates as follows. (When several wires are present, the top wire al-ways correspond to the leading qubit.)

NOT-gate σx (cf. (1.29))

unitary rotation gate Uθ,φ (cf. (1.32)) θ,φU

The Walsh–Hadamard gate H :

H |0〉 =1√2(|0〉 + |1〉)

H |1〉 =1√2(|0〉 − |1〉)

H =1√2

[1 11 −1

]

H

The CNOT-gate Λ1(σx)

The 2-bit controlled-U gate Λ1(U) (cf. (1.28) with m = 1)

Λ1(U) =

1 0 0 00 1 0 0

. . . . . . . .

0 0... U

0 0...

U

The QPG (cf. (1.33))

Page 27: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.4. UNIVERSALITY OF ELEMENTARY QUANTUM GATES 21

The tensor product S ⊗ T gate (where S and T are 1-bit gates)

S

T

Also, the Toffoli quantum gate is the 3-bit controlled-not gate as shown n Fig. 1.5.

Figure 1.5: The Toffoli quantum gate Λ2(σx).

According to the above notation, then diagramatically, the quantum circuit for(1.34) is given in Fig. 1.6.

Q

π, U π4

,U π4

π

2π2

Figure 1.6: The quantum circuits for equation (1.34). The top wire representsthe leading qubit (which is the most significant), while the second wire repre-sents the second qubit.

Let f be a Boolean function, where

f : {0, 1} × {0, 1} × · · · × {0, 1} = {0, 1}n → {0, 1}. (1.35)

For x ∈ {0, 1}n and y ∈ {0, 1}, define the Boolean function evaluation (unitary)operator

Uf : {0, 1}n+1 × {0, 1}n+1

Uf |x〉|y〉 = |x〉|y ⊗ f(x)〉 (y ⊕ f(x) ≡ y + f(x) mod 2).

This operator is represented as follows:

Page 28: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

22 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

Uf

y

x

y + f(x)

x...

...

.. ....

A very efficient operation in quantum computing is the n-bit quantum Fouriertransform (QFT). QFT is a unitary operation

QFT: {0, 1}n → {0, 1}n

QFT |x〉 =1

2n−1

2n−1∑y=0

e2πixy/2n |y〉,

where in the exponents on the right hand side above, x and y are taken to benumbers in {0, 1, 2, . . . , 2n − 1} corresponding to their binary representation.It is straightforward to verify that the circuit diagram for QFT can be given asfollows

H R1 ..

. ..

.

H

...

...

H

H

R R

R

1

1

.. .

....

2

y

0x

1x

2x

n

2y

1y

0y

..

Rn −1

− 2

− 1

xn

xn

yn − 2

− 1

where

Rd =[1 00 eiπ/2d

], d = 1, 2, . . . , n− 1

|x〉 = |x0x1x2 . . . xn−1〉, |y〉 = |y0y1y2 . . . yn−1〉.We now address the property of universality of 2-bit quantum gates. We

first give the following theorem, which is not exactly self-contained but con-tains some major ideas of a useful matrix factorization. In what follows, U(2n)

Page 29: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.4. UNIVERSALITY OF ELEMENTARY QUANTUM GATES 23

denotes the group of all 2n × 2n unitary matrices, while SO(2n) is the specialorthogonal group of 2n × 2n matrices, i.e., M ∈ U(2n) satisfies M ∈ SO(2n) ifand only if the determinant of M is 1.

Theorem 1.4.4. Let V ∈ U(2n). Then

V =2n−1∏i=1

i−1∏j=0

Vij . (1.36)

for a collection of matrices Vij ∈ U(2n) such thatVij : Sij −→ Sij is the identity transformation,Sij ≡ span{|m〉 | m ∈ {0, 1, . . . , 2n − 1},m 6= i,m 6= j},

0 ≤ j < i ≤ 2n − 1.

(1.37)

In other words, each V ∈ U(2n) is a product of (generalized) controlled-U(2) unitarymatrices Vij , which acts nontrivially only on S⊥

ij = span{|i〉, |j〉}.

Proof. We first quote the following fact [42, 48]: For any V ∈ U(2n), there existsa collection of unitary matrices Ti,j , 0 ≤ j < i ≤ 2n − 1, and a D such that

V =

2n−1∏i=1

i−1∏j=0

Ti,j

D, (1.38)

where Ti,j ∈ SO(2n) ⊆ U(2n) is a rotation involving |i〉 and |j〉 and satisfying(1.37), and D is a 2n × 2n diagonal matrix whose diagonal entries are complexnumbers of unit magnitude.

Now we can break up D into

D =

d0

d1

. . .d2n−1

= D1D2 . . . D2n−1 (1.39)

where

D1 =

d0 00 d1

1. . .

1

(1.40)

and

Di =

1. . .

di

. . .1

(1.41)

Page 30: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

24 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

for i = 2, 3, . . . , 2n − 1. It is easy to see that D1 acts trivially except on |0〉 and|1〉, and the other Di’s act non-trivially only on |i〉. In addition, Di’s commutewith each other, and each Di commutes with Tk,l, ∀0 ≤ l < k < i as well. Thus,

V = T2n−1,2n−2 . . . T2n−1,0T2n−2,2n−3 . . . T2n−2,0 . . . T2,1T2,0T1,0D1D2 . . . D2n−1

= T2n−1,2n−2T2n−2,2n−3 . . . T2n−1,0D2n−1

T2n−2,2n−3 . . . T2n−2,0D2n−2

. . . . . .T2,1T2,0D2

T1,0D1

2n − 1 strings of products

(1.42)

For 0 ≤ j < i ≤ 2n − 1, define

Vij ={Ti,j if j 6= 0,Ti,jDi = Ti,0Di if j = 0.

Therefore we have reached

V =2n−1∏i=1

i−1∏j=0

Vij

where each Vij is a unitary matrix which acts nontrivially only on the states |i〉and |j〉 satisfying (1.37).

Each factor Vij in (1.36) satisfies (1.37) and thus Vij acts nontrivially only onthe states |i〉 and |j〉. Denote the restriction of Vij to the 2-dimensional subspaceS⊥

ij = span{|i〉, |j〉} by Vij . Then Vij ∈ U(2). As pointed out in [3, p. 3465], eachVij is not a standard Λn−1(Vij) (in the notation of [3, p. 3458]) gate in the sensethat the controls are states rather than bits.

Nevertheless, using Proposition 1.4.5 below, Barenco et al. [3, §VIII] pointout how to rearrange basis states with a “gray code connecting state |i〉 to state|j〉” such that Vij becomes unitarily equivalent to Λn−1(Vij). In this sense, Vij

are generalized controlled-Vij gates.

Proposition 1.4.5. The symmetric group S2n of permutations on the symbols 0, 1, 2,. . . , 2n−1 is generated by the 2-cycle (2n−2, 2n−1) and the 2n-cycle (0, 1, 2, . . . , 2n−1).

Proof. This is a basic fact which can be found in most basic algebra or grouptheory books.

Incidentally, we note that the 2-cycle (2n − 2, 2n − 1) is a permutation be-tween the states | 1 1 . . . 1 0︸ ︷︷ ︸

n bits

〉 and | 1 1 . . . 1︸ ︷︷ ︸n bits

〉 and thus can be realized by the

controlled-NOT gate with the nth qubit as the target bit and the first (n − 1)bits as the control bits as shown in Fig. 1.7.

Page 31: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.4. UNIVERSALITY OF ELEMENTARY QUANTUM GATES 25

On the other hand, the 2n-cycle (0, 1, 2, . . . , 2n−1) makes the rotation of thestates |0〉 → |1〉 → · · · → |2n−2〉 → |2n−1〉 → |0〉, i.e., the |x〉 → |x+1 mod 2n〉operation. This can be implemented by the circuit as shown in Fig. 1.8.

Therefore, any permutation of the basis states |x〉, x = 0, 1, 2, . . . , 2n−1, canbe realized by finitely many controlled-NOT operations consisting of circuitsas shown in Figs 1.7 and 1.8.

Thus, each factor Vij in (1.36) can be realized by the circuit as shown inFig. 1.9.

σx

Figure 1.7: The nnn-bit controlled-NOT gate Λn−1(σx)Λn−1(σx)Λn−1(σx), where σxσxσx is given by(1.29). This gate implements the two cycle (2n − 2, 2n − 1)(2n − 2, 2n − 1)(2n − 2, 2n − 1) in Proposition 1.4.5.

1

Figure 1.8: This circuit implements the operation |x〉 → |x+ 1 mod 2n〉|x〉 → |x+ 1 mod 2n〉|x〉 → |x+ 1 mod 2n〉 or,equivalently, the 2n2n2n-cycle (0, 1, 2, . . . , 2n − 1)(0, 1, 2, . . . , 2n − 1)(0, 1, 2, . . . , 2n − 1) in Proposition 1.4.5. Note that thebit |1〉|1〉|1〉 at the bottom of the figure is the “scratch bit” which is sometimes omit-ted in circuit drawing. All the gates in this circuit are controlled-NOT gates.

Page 32: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

26 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

ijV

(i,2 -1)

(j,2 -2)(j,2 -2)

(i,2 -1)n

nn

n

Figure 1.9: The unitary matrix VijVijVij in (1.36) as a controlled-VijVijVij gate whereVij ∈ U(2)Vij ∈ U(2)Vij ∈ U(2). The operations (i, 2n − 1)(i, 2n − 1)(i, 2n − 1) and (j, 2n − 2)(j, 2n − 2)(j, 2n − 2) in the two boxes are cyclicpermutations (which can be realized by concatenations of circuits in Figs. 1.7and 1.8).

By concatenating together all the blocks Vij as shown in Fig. 1.9 accordingto the factorization (1.36), we have constructed all V ∈ U(2n) with controlled-Vij gates according to (1.36).

1.5 Quantum algorithms

In this section, we describe, in some brevity, several quantum algorithms andtheir circuit designs. Two of them, Grover’s quantum search and Shor’s fac-torization algorithms, have received the most recognition so far as their back-ground problems are more “pragmatic,” as they are related to data mining anddecryption. But algorithmic development is an active area in quantum com-puting and we expect to see more and more new algorithms with speeduptargeting a variety of real-world applications.

1.5.1 The Deutsch–Jozsa problem ([15])

Consider a Boolean function f : {0, 1}n → {0, 1} (cf. (1.35)). We say that aBoolean function is constant if

f(x) = c for some c ∈ {0, 1}, for all x ∈ {0, 1}n.

On the other hand, we say that f is balanced if

card(f−1({0})) = card(f−1({1})),where card denotes the cardinality of a set. Then Deutsch–Jozsa problem is:

Page 33: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.5. QUANTUM ALGORITHMS 27

“Given a Boolean function f : {0, 1}n → {0, 1}, f known to be ei-ther constant or balanced, determine whether f is constant or bal-anced.”

With the classical computer, in general we need 2n−1 +1 evaluations of f todetermine with certainty whether f is constant or balanced. But with the quan-tum computer, we need only one evaluation of f to make this determinationwith certainty. The Deutsch–Jozsa algorithm goes as follows.

1. Prepare an (n+ 1)-bit quantum register and initialize itto the state (|0〉)n|1〉.

2. Apply the Walsh-Hadamard transform to all the qubits.

3. Apply function evaluation unitary transform Uf

Uf : |x〉|y〉 → |x〉|y ⊕ f(x)〉

4. Apply the Walsh-Hadamard transform to the first n qubits (of x).

5. Measure the first n qubit. If the outcome is |00 . . .0〉, then fis constant. If the outcome is not |00 . . .0〉, then f is balanced.

The circuit diagram is given in Fig. 1.10.

H

H

H

H

H|0〉

|1〉

|0〉

Uf

Figure 1.10: Circuit diagram for the Deutsch–Jozsa algorithm.

Page 34: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

28 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

Example 1.5.1. We provide a simple example for n = 2 to illustrate how theDeutsch–Jozsa algorithm works.

(a) Let f(00) = f(01) = f(10) = f(11) = 1. The following sequence of quan-tum states shows the flow of computation utilizing the Deutsch-Jozsa al-gorithm. Start from the initial state |001〉. Then

|00〉|1〉

→|0〉 + |1〉√2

|0〉 + |1〉√2

|0〉 − |1〉√2

=|00〉 + |01〉 + |10〉 + |11〉

2|0〉 − |1〉√

2

→−|00〉 − |01〉 − |10〉 − |11〉2

|0〉 − |1〉√2

= −|0〉 + |1〉√2

|0〉 + |1〉√2

|0〉 − |1〉√2

→− |00〉 |0〉 − |1〉√2

.

The outcome of measuring the first 2 qubit is |00〉, hence f is constant.

(b) Let f(00) = f(01) = 0, and f(10) = f(11) = 1. The following sequence ofquantum states shows the result of computation utilizing Deutsch-Jozsa’sAlgorithm. We start from the initial state |001〉. Then,

|00〉|1〉

→|0〉 + |1〉√2

|0〉 + |1〉√2

|0〉 − |1〉√2

=|00〉 + |01〉+ |10〉+ |11〉

2|0〉 − |1〉√

2

→|00〉 + |01〉 − |10〉 − |11〉2

|0〉 − |1〉√2

=|0〉 − |1〉√

2|0〉 + |1〉√

2|0〉 − |1〉√

2

→|10〉 |0〉 − |1〉√2

.

The outcome of measuring the first 2 qubit is |10〉, hence f is balanced. �

1.5.2 Bernstein–Vazirani problem ([6])

Let x = x1x2 . . . xn and y = y1y2 . . . yn be two n-bit strings in {0, 1}n. We definethe dot product x · y by

x · y = x1y1 ⊕ x2y2 ⊕ . . .⊕ xnyn.

The Bernstein–Vazirani problem is

“Given a Boolean function fa : {0, 1}n → {0, 1} defined by fa(x) =a · x, where a is an unknown n-bit string in {0, 1}n, determine thevalue of a.”

As a contains n bits, with the classical computer, we need n evaluations offa to determine the value of a. But with the quantum computer, we need onlyone evaluation of fa to determine a.

Page 35: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.5. QUANTUM ALGORITHMS 29

The Bernstein–Vazirani algorithm proceeds as follows.

1. Prepare an (n+ 1)-bit quantum register and initialize it tothe state (|0〉)n|1〉.

2. Apply the Walsh-Hadamard transform to all the qubits.

3. Apply the function evaluation unitary transform Ufa

Ufa : |x〉|y〉 → |x〉|y ⊕ fa(x)〉.

4. Apply the Walsh-Hadamard transform to the first n qubits.

5. Measure the first n qubits. The outcome is |a〉.

H

H

H

H

H|0〉

|1〉

|0〉

Ufa

Figure 1.11: Circuit diagram for the Bernstein–Vazirani algorithm.

Example 1.5.2. We use n = 2 to illustrate some details as how the algorithmworks. Let a = 11. The following sequence of quantum states shows the flowof computation utilizing the Bernstein-Vazirani algorithm. Start from the initial

Page 36: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

30 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

state |001〉. Then

|00〉|1〉

→|0〉 + |1〉√2

|0〉 + |1〉√2

|0〉 − |1〉√2

=|00〉 + |01〉 + |10〉 + |11〉

2|0〉 − |1〉√

2

→|00〉 − |01〉 − |10〉 + |11〉2

|0〉 − |1〉√2

→|11〉 |0〉 − |1〉√2

.

The outcome of measuring the first 2 qubits is |11〉, hence a = 11. �

1.5.3 Simon’s problem ([50])

We say that a function f : {0, 1}n → {0, 1}n is 2–1 if for each z ∈ Range(f),there are exactly two distinct n-bit strings x and y such that f(x) = f(y) = z.

A function f : {0, 1}n → {0, 1}n has a period a if f(x) = f(x ⊕ a), for allx ∈ {0, 1}n.Simon’s problem is stated as follows.

“Given a function f : {0, 1}n → {0, 1}n which is 2-1 and has perioda, determine the period a.”

It is known that with the classical computer, we need exponentially many(with respect to n) evaluations of f to determine the period a. But with thequantum computer, we need only O(n) evaluations (expected) of f to deter-mine the period a.Simon’s algorithm can be stated as follows.

1. Repeat the following procedure for n times.

(a) Prepare a 2n-bit quantum register and initialize it to the state(|0〉)n(|0〉)n.

(b) Apply the Walsh-Hadamard transform to the first n qubits.(c) Apply function evaluation unitary transform Ufa

Ufa : |x〉|y〉 → |x〉|y ⊕ fa(x)〉.

(d) Apply the Walsh-Hadamard transform to the first n qubits.(e) Measure the first n qubits. Record the outcome |x〉.

2. With the n outcomes x1, x2, . . ., xn, solve the following system of linearequations:

x1 · a = 0x2 · a = 0

...xn · a = 0.

The solution a is the period of f .

Page 37: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.5. QUANTUM ALGORITHMS 31

H

H H

H

|0〉

|0〉

|0〉

|0〉

Uf

Figure 1.12: Circuit diagram for Simon’s algorithm. Operation and measure-ment by this circuit need to be repeatd O(n) times.

Example 1.5.3. As an illustration, let n = 2. Let f(00) = 01, f(01) = 11,f(10) = 01, and f(11) = 11. The following sequence of quantum states showsthe flow and result of computation utilizing Simon’s algorithm. We start fromthe initial state |0000〉. Then,

|0000〉

→|0〉 + |1〉√2

|0〉 + |1〉√2

|00〉 =12(|00〉 + |01〉 + |10〉 + |11〉)|00〉

→12(|0001〉+ |0111〉+ |1001〉+ |1111〉) =

12

((|0〉 + |1〉)|0〉|01〉 + (|0〉 + |1〉)|1〉|11〉)

→12

(|0〉(|0〉 + |1〉)|01〉 + |0〉(|0〉 − |1〉)|11〉) =12(|0001〉+ |0101〉+ |0011〉 − |0111〉).

The outcome of measuring the first 2 qubits yields either |00〉 or |01〉. Supposethat we have run the above computation twice and obtained |00〉 and |01〉, re-

Page 38: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

32 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

spectively. We now have a system of linear equations{00 · a = 001 · a = 0

The solution is a = 10, the period of this function. �

1.5.4 Grover’s quantum search algorithm ([25])

Suppose we are given an unsorted database with N items. We want to finda target item w. This problem can be formulated using an oracle function f :{0, 1, . . . , N − 1} → {0, 1}, where w ∈ {0, 1, . . . , N − 1} is given, and

f(x) ={

0, if x 6= w,1, if x = w.

(1.43)

The (single-item) search problem can now be stated as follows:

“Given an oracle function as in (1.43), find the w such thatf(w) = 1.”

This is an example of “data-mining.”It can be proved that with the classical computer, in average N+1

2 oraclecalls are needed in order to find the search target. But with the quantum com-puter, on average, we need O(

√N) oracle calls tofind the search target. So

there is a quadratic speedup. As a special case when N = 4, by using Grover’salgorithm, exactly one oracle call suffices in order to find the search target withcertainty.

L.K. Grover’s quantum search algorithm proceeds as follows.

Without loss of generality, let N = 2n.

1. Prepare an (n + 1)-bit quantum register and initialize it to the state(|0〉)n|1〉.

2. Apply the Walsh-Hadamard transforms individually and simultaneouslyto all the n+ 1 qubits.

3. Repeat the following procedure for about π4

√N times. See Fig. 1.13.

(a) Apply function evaluation unitary transform Uf (selective sign flip-ping operator)

Uf : |x〉|y〉 → |x〉|y ⊕ fa(x)〉.This is equivalent to the unitary operator Iw = I − 2|w〉〈w| on thefirst n qubits.

(b) Apply unitary operator (inversion about the average operator) Is =2|s〉〈s| − I on the first n qubits. See Fig. 1.14.

4. Measure the first n qubits. We obtain the search target with a high prob-ability.

Page 39: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.5. QUANTUM ALGORITHMS 33

H

H

|1〉

|0〉

|0〉

H

Uf Is Uf Is

Figure 1.13: Block diagram for Grover’s algorithm.

HH

Figure 1.14: Circuit diagram for the inversion about the average operator Is.

Page 40: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

34 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

Example 1.5.4. Let N = 22 = 4, and Item 3 be the search target. The qubitrepresentation of 3 is |11〉. The following sequence of quantum states showshow the computation works utilizing Grover’s algorithm. Start from the initialstate |001〉. Then

|00〉|1〉

→|0〉 + |1〉√2

|0〉 + |1〉√2

|0〉 − |1〉√2

=|00〉 + |01〉 + |10〉 + |11〉

2|0〉 − |1〉√

2

→ |00〉 + |01〉 + |10〉 − |11〉2

|0〉 − |1〉√2

→ |11〉 |0〉 − |1〉√2

.

The outcome of measuring the first 2 qubits yields |11〉, which is the searchtarget w = 3. �

1.5.5 Shor’s factorization algorithm ([49])

RSA cryptosystem, due to R. Rivest, A. Shamir and R. Merkle, is the mostwidely used public key cryptosystem presently. Decoding of RSA-encryptedmessages depends on the factorization of a composite integer that is a productof two large prime numbers. It is known that the integer factorization prob-lem is classically intractable. Given an integer N , the most efficient classicalalgorithm to date, number field sieve, has a time complexity of

O(exp (logN)1/3(log logN)2/3).

Shor’s quantum factorization algorithm has a time complexity of

O((logN)2 log logN log log logN).

Hence it is a polynomial time algorithm. We consider the integer factorizationproblem:

“Given a composite positive integer N , factorize it into the productof its prime factors.”

Shor’s algorithm utilizes several fundamental theorems in number theory.We refer the reader to a quite accessible account by Lomonaco [38], so that wecan omit the number-theoretic prerequisite here and go ahead to describe howthe Shor algorithm works, as follows.

Page 41: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.5. QUANTUM ALGORITHMS 35

1. Choose a random integer a < N , such that a and N are coprime. Thiscan be done by using a random number generator and the Euclideanalgorithm on a classical computer.

2. Find the period T of the function fa,N (x) = ax mod N . This step can beexpounded as follows:

(a) Prepare two L-bit quantum registers in initial state 1√2L

2L−1∑x=0

|x〉 |0〉,

where L is chosen such that N2 ≤ 2L < 2N2.

(b) Apply Uf : |x〉|0〉 → |x〉|fa,N (x)〉:

1√2L

2L−1∑x=0

|x〉|0〉 → 1√2L

2L−1∑x=0

|x〉|fa,N (x)〉

(c) Apply QFT to the first register:

1√2L

2L−1∑x=0

|x〉|fa,N (x)〉 → 12L

2L−1∑y=0

2L−1∑x=0

e2πixy/2L |y〉 |f(x)〉

(d) Make a measurement on the first register, obtaining y.

(e) Find T from y via continued fractions for y2L . This step might fail–

in that case, repeat (2a).

3. If T is odd, then repeat Step 1. If T is even and N |aT/2 + 1, repeat Step 1.If T is even and N - aT/2 + 1, compute d = gcd(aT/2 − 1, N), which is anontrivial factor of N .

Page 42: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

36 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

|0〉|0〉

|0〉

|0〉

|0〉|0〉|0〉

H

H

H

H

|0〉

QFT

a2n−1

a22

a2a

Figure 1.15: Quantum circuit for the Shor algorithm.

Example 1.5.5. Let N = 15. Choose L = 8 such that N 2 = 225 < 2L <450 = 2N2. Choose a random integer a = 2, which is coprime with 15. Thusfa,N(x) = 2x mod 15. The following sequence of quantum states shows theflow of computation utilizing Shor’s Algorithm:

|0〉|0〉 → 124

28−1∑x=0

|x〉|0〉

→ 124

28−1∑x=0

|x〉|fa,N (x)〉

=124

(|0〉|1〉 + |1〉|2〉 + |2〉|4〉 + |3〉|8〉+ |4〉|1〉 + |5〉|2〉 + |6〉|4〉 + |7〉|8〉 + . . .

+ |28 − 2〉|4〉 + |28 − 1〉|8〉)

→ 124

28−1∑x=0

124

28−1∑y=0

ωxy|y〉|2x mod 15〉

Page 43: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.6. QUANTUM ADDER AND MULTIPLIER 37

→ 128

28−1∑y=0

|y〉28−1∑x=0

ωxy|2x mod 15〉,

where ω = e2πi/28. Suppose that the outcome of measuring the first n qubits is

|56〉. We can compute the continued fraction of 56256 to be [0, 4, 1, 1, 3] i.e.,

56256

= 0 +1

4 +1

1 +1

1 +13

.

The second number 4 satisfies 24 = 1 mod 15. So 4 is the period of fa,N ; 24/2 −1 = 3 yields a factor of 15 and 15 = 3 × 5. �

1.6 Quantum adder and multiplier

To show some basic quantum computer design concept, such as how the quan-tum computer performs elementary arithmetic operations of addition and mul-tiplication, in this section we illustrate the quantum networks of adder andmultiplier design, based on Vedral, Barenco and Ekert [58], cf. also [46, §2.4].

First, consider the quantum adder. We need several basic circuits, as indi-cated in Figs. 1.16, 1.17 and 1.18.

i

j

k

S

S: |i,j,k |i,j, i j k , for i,j,k {0,1}

i

j

i j k

Figure 1.16: The quantum circuit for the S (sum) subroutine.

Page 44: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

38 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

C

c

j

k

c

c

j

j k

i

0

i

0 i ic jk c j c k

C: |c ,j,k,c ,i 0

i

0

0for c ,j,k, c {0,1}

|c ,j, j k, c jk c j c ki i i

Figure 1.17: The quantum circuit for the C (carry) subroutine. Here c0 denotesthe input carry bit (inherited from the preceding, lower qubits), while c0, origi-nally 0, at the output will be the next carry bit. The reader can easily check thatthe circuit works as intended.

c

j

j k

c1

j

c

k

C−1

2 1c j c k jk

1

2

−1C : |c ,j,k,c 1 2 ,

for c ,j,k,c {0,1};

C−1

C = I

1

1 2

2 1|c ,j,j k, c j c k jk

Figure 1.18: The quantum circuit for the C−1 (reverse carry) subroutine. Itcorresponds to the inverse operation of C.

Using S,C andC−1 as described, then Fig. 1.19 provides the network for ann-bit quantum adder. The inputs are anan−1 · · ·a1a0 and 0bnbn−1 · · · b1b0, andthe outputs are anan−1 · · ·a1a0 and a+ b. Note that the wire for bn+1 denotes apossible highest order carry qubit.Remark 1.6.1. The designs as given here ([58]) utilize only the CNOT and Tof-foli gates. They have the same complexity of the classical circuits and, thus,do not show any special advantage of quantum computing, when the addingoperations involve only two integers.

Quantum computing’s main advantages come from QC’s capability to uti-lize entanglement and then by achieving massive parallelism. For example, weillustrate how to add 2 to 0, 1, 3 and 5 in one adder operation. Write

|a〉 = |0 1 0〉 (a = 2 in decimal representation),|b〉 = α1|0 0 0〉 + α2|0 0 1〉 + α3|0 1 1〉 + α4|1 0 1〉,

Page 45: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.6. QUANTUM ADDER AND MULTIPLIER 39

0

0 = b

a

1a

2a

a n

0

n+1

nb

b 1

b

a

b.

...

.. a+b

ADDER

C

C

C

S

S

S

S

SC

C

C

C

C

b

a

a

b 0

0

c = 00

c = 0

c = 0

c = 0

c = 0

c = 0

c = 0

c = 0

c = 0

c = 0

a

b

a

b

a

s

s

a

s

a

s

a

s

a

1

1

1

2

3

n−1c = 0 c = 0

n−1

n−1

n−1

n−1

b = 0

n

n

n

2

1

1

0

0

0

n

n

n

s n+1

n−1

3

2

2

1

2b

a 2

n+1

s = sn+1sn sn−1... s s01 = a+b

a

−1

−1

−1

−1C

Figure 1.19: Quantum adder network (given by [58]), where s = a + b is thesum of two binary numbers a and b.

Page 46: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

40 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

where |b〉 is a superposition of quantum states corresponding to 0, 1, 3 and 5.By inputing |b〉 into the quantum adder, we will obtain the outcome

|ψ〉 = α1|0 1 0〉 + α2|0 1 1〉 + α3|1 0 1〉 + α4|1 1 1〉.

This shows some ideas why entanglement plays a crucial role in the speedupby QC. �

Once we have understood the circuit design for the quantum ADDER, wecan easily follow [58] to give the design of the quantum circuit for the (con-trolled) MULTIPLIER. The main idea of the MULTIPLIER design for perform-ing the multiplication of x·a, where x = xnxn−1 · · ·x1x0 and a = anan−1 · · · a1a0,is based on addition:

x · a = x020 · a+ x121 · a+ x222 · a+ · · · + xn2n · a.

In Fig. 1.20, the top register entering ADDER j is exactly the number xj−12j−1 ·a, for j = 1, 2, . . . , n+ 1. Therefore, we obtain the desired outcome.

In Figs. 1.20 and 1.21, by following [58] an extra control bit c is added, whichcan either activate (c = 1) or deactivate (c = c) the entire circuit. Thus, thiscircuit is called the controlled multipliers.

Also, note that the number a is not explicitly shown in the circuit Fig. 1.20.The matter of fact is that 2ja is generated by a set of Toffoli gates. This isillustrated in Fig. 1.21 in some detail.

One can further design the exponentiation ax mod N quantum operationusing the ADDER and MULTIPLIER circuits. Thus this and all the other quan-tum arithmetic operations require for the Shor algorithm can be carried outsuccessively by the corresponding circuits.

��������

������

������

����

����

���

���

���

���

����

����

���

���

���

���

����

��������

���

���

��������

��������������������������

��������������������������

������

AD

DE

R

AD

DE

R

AD

DE

R

c

x

y

Ctrl−

MU

LT

c

x

0

0 0 x

0 y

x

c c

. . .

x0x

x

1

n

1 2 n+1

. . .

Figure 1.20: Quantum circuit of a controlled multiplier design (adapted from[58]) for performing the multiplication x · a, where x and a have, respectively,binary representation xnxn−1 · · ·x1x0 and anan−1 · · · a1a0. Details of the areaframed within the dotted lines are given in Fig. 1.21.

Page 47: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

1.7. QUANTUM ERROR CORRECTION CODES 41

���

���

������

������

������

������

���

���

������

������

������

������

������

������

������

������

������

������

���

���

���

���

������

������

������

������

���

���

���

���

������

������

x

x

x

AD

DE

R

AD

DE

R

1

. . .0

c cx 0

x 1

x n

y2

a0

a

a

a

1

2

3

0

1

n

0 0

Figure 1.21: This circuit explains part of Fig. 1.5.4 with some details. Weuse a = |0011〉 as an example. The leftmost two Toffoli gates prepare a forADDER1. Between ADDER1 and ADDER2, a set of four Toffoli gates prepares2a for the top register if x1 = 1. Otherwise if x1 = 0, then what is preparedfor the top register is just 0. To the right of ADDER2, the rightmost two Toffoligates recover the top register to 0 and set it up for ADDER3.

1.7 Quantum error correction codes

1.8 Quantum computing devices and requirements

At present, several types of elementary quantum computing devices have beendeveloped, based on AMO (atomic, molecular and optical) or semiconductorphysics and technologies. We may roughly classify them into the followingtypes:

atomic — ion and atom traps, cavity QED [11];

molecular — NMR;

semiconductor — coupled quantum dots [10], silicon (Kane) [32];

crystal structure — nitrogen-vacancy (NV) diamond;

superconductivity — SQUID.

Page 48: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

42 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION

The above classification is not totally rigorous as new types of devices, such asquantum dots, or ion traps imbedded in cavity-QED, have emerged which areof the hybrid nature. Also, laser pulse control, which is of the optical nature,seems to be omnipresent. In [4], a total of 12 types of quantum computingproposals have been listed5.

5The additional proposals not listed above but given in [4] are quantum Hall qubits, electronsin liquid helium, and spin spectroscopies.

Page 49: Principles, Designs and Analysis of Quantum Computing Devicesgoong.chen/chapter1.pdf1.1 Introduction. Turing machines and binary logic gates The earliest ideas of simulating and utilizing

266 CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION