Chapter 1 Introduction to Quantum Computation 1.1 Motivations The main task in this course is to discuss application of quantum mechanics to information processing (or computation). Why? Education:Asingleq-bitisthesmallestpossiblequantummechanical system. Just a few q-bits are enough to describe (almost) everything that is known. Science:Acollectionofeven0q-bitsiswelldefined,butpoorly understood. Analysis of such systems can bring you to frontiers of (theoretical and experimental) physics. Engineering: Quantum computer is not science fiction, but a technological challenge. 1.1.1 History (1930 s - 1940 s) Development of classical computers hypothetical computer (universal Turing machine) foundation of computer science (Church-Turing thesis) modeling of a computer (von Neumann) information theory (Shannon) development of transistors (Bardeen, Brattain, Shockley) 1
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION (1950 s - 1960 s) Production of classical computers commercial computers (IBM) high level programming language (Fortran) internet (ARPAnet), etc. (1970 s) Development of experimental techniques single atom trapping (trapping of small quantum systems) scanning tunneling microscope (moving around small quantum systems) electronic devices to transfer single electrons, etc. (1980 s - 1990 s) Development of theoretical basis for quantum computes hard to simulate quantum systems (Feynman) non-cloning theorem (Wooters, Zurek) quantum cryptography (Bennett, Bassard) universal quantum computer (Deutsch) factoring algorithm (Shor) search algorithm (Grover) 1.1. Big picture Crisis of the 19th century classical physics gave birth to three types of 0th century physics QuantumPhysics:usuallythestudyofnatureofsmallscales. (last, this and next semester) (000 s-010 s) Production of small noncommercial quantum computers StatisticalMechanics:usuallythestudyofnatureonintermediate scales. (last semester) GeneralRelativity:usuallythestudyofnatureonlargescales. (next semester)
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 3 For the past century quantum mechanics was applied to almost everything with enormous success, but QuantumFieldTheory:givesasatisfactorydescriptionofonly perturbative physics on small scales. QuantumStatisticalMechanics:givesasatisfactorydescription of only equilibrium physics on intermediate scales. QuantumGravity: gives a satisfactory description of physics on large scales. Crisis of the 0th century quantum physics is likely to give birth to some new theories, but it remain unclear what these theories will be. StringTheory/StringFluids? Supersymmetry/Supergravity? QuantumComputation/Information? Whatever it is one should expect it to include all of the 19th and 0th century physics (i.e. perturbative, equilibrium) and perhaps more (e.g. non-perturbative, non-equilibrium) 1.1.3 Q-bit High-EnergyPhysics(e.g. quantum chromodynamics) Cosmology(e.g. eternal inflation) GeneralRelativity(e.g. black holes) CondensedMatter(e.g. superfluids) Biophysics(e.g. polymers) Classical bit can be in one of two states which can be parametrized (or labeled) by 0 or 1. In contrast quantum bit (or qubit, or q-bit) can be in (uncountably) many states which can be parametrized by complex numbers α and β such that α + β = α α + β β = Re(α) + Im(α) + Re(β) + Im(β) =1. (1.1) The reason for the above constraint will become clear shortly. For now note that this implies that the configuration space (or Hilbert space) or a single q-bit is isomorphic to S 3.
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 4 The construction of quantum systems usually (but not always) starts with defining a Hilbert space with vectors (also known as ket vectors) are denoted by Greek letters (e.g. ψ, φ, etc.)andareoftenwrittenusing Dirac notations (e.g. ψ, φ, etc.). The smallest possible quantum system (or a single q-bit) consists of only two basis vectors denoted by 0 and 1 (known as computational basis) and all other vectors are constructed from linear combinations of these vectors (or superposition state) ψ = α 0 + β 1 (1.) where α and β are complex numbers. Furthermore, one defines inner product ( ψ, φ ) =(α 0 + β 1,γ 0 + δ 1 ) α γ + β δ (1.3) and demands that all physical states correspond to vectors with unit norm ψ ( ψ, ψ ) =α α + β β =1. (1.4) (compare with Eq. (1.1)). Note that the inner product can be used to define bra-vectors ψ, as amapfromket-vectorstocomplexnumbers, ψ ( φ ) ( ψ, φ ) (1.5) and the bra-vectors together with ket-vectors can be used to define outer product ψ φ, asamapfromket-vectorstoket-vectors, ψ φ ( χ ) =( φ, χ ) ψ (1.6) Upon measurement of the ket-vector ψ = α 0 + β 1 one can only get classical values of bits (i.e. 0 or 1) withprobabilities p(0) = α α (1.7) p(1) = β β (1.8) so that probabilities add up to one. Clearly most of the (infinite) information about the state is lost after measurement, but by constructing a clever state and designing a clever measurement one can learn relevant information. This is what quantum computation is all about.
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 5 Consider the following parametrization of the state of a single q-bit ( ψ = e iγ cos θ 0 + eiϕ sin θ ) 1 (1.9) with γ [0, π),ϕ [0, π) and θ (0,π]. Itturnsoutthatthe overall phase γ is unobservable which reduces the configuration space of S 3 to only S parametrized by spherical coordinates (θ, φ). This is the so-called Bloch sphere which is nothing but a Hopf fibration of S 3 into S with fiber S 1.NogeneralizationoftheBlochsphereexistformany q-bits, but it turns out that Hopf fibration play an important role for the system of two and three q-bits. Consider a system with two classical bits with only four possible states {00, 01, 10, 11}. Then the Hilbert space of two q-bits has four basis vectors (denotes by 00, 01, 10 and 11 ) and arbitrary ket-vector is represented by superposition with normalization ψ = α 00 00 + α 01 01 + α 10 10 + α 11 11 (1.10) ψ x {0,1} α x = x {0,1} α x α x =1. (1.11) An important example of a state of two q-bits is the Bell state or EPR state 00 + 11. (1.1) Upon measurement of only a single bit (let s say the first bit) the system with end up in either state ψ = α 00 00 + α 01 01 α00 + α 01 (1.13) with probability or state p(0) = α 00 + α 01 (1.14) ψ = α 10 10 + α 11 11 α10 + α 11 (1.15) with probability p(1) = α 10 + α 11. (1.16) (Note, that if we measured the state but did not look at the result of the measurement, then the system is not in a pure state, but in a mixed state described by density matrix ρ = p(0) ψ ψ + p(1) ψ ψ.)
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 6 1. Quantum Computation 1..1 Single q-bit gate Classical information carried by classical bits are manipulated using classical logic gates and quantum information is manipulated using quantum gates. For a single classical bit the only non-trivial gate is the NOT gate given by the following truth table a NOT a 0 1 1 0 (1.17) and the quantum NOT gate is given by or as an operator X X : α 0 + β 1 β 0 + α 1. (1.18) X(α 0 + β 1 ) =( 0 1 + 1 0 )(α 0 + β 1 ) =β 0 + α 1. (1.19) In the matrix representation the ket-vectors are given by column vectors ( ) α α 0 + β 1 (1.0) β bra-vectors are given by row vectors α 0 + β 1 ( α β ) (1.1) and quantum gates are given by square matrices ( U00 U U 00 0 0 + U 01 0 1 + U 10 1 0 + U 11 1 1 01 U 10 U 11 ) (1.) For example quantum NOT gate is given by ( 0 1 X = 1 0 + 1 0 1 0 ). (1.3) The only constraint on the quantum gates is that they must be unitary U U = I. (1.4)
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 7 Clearly the quantum NOT gate satisfies the unitarity condition ( )( ) ( ) 0 1 0 1 1 0 X X = = = I (1.5) 1 0 1 0 0 1 but (in contrast to classical case) there are many others. Some important gates are the Z gate ( ) 1 0 Z (1.6) 0 1 and the Hadamard gate H 1 ( 1 1 1 1 ). (1.7) These quantum gates act on a general state as described in the table below X : α 0 + β 1 β 0 + α 1 (1.8) Z : α 0 + β 1 α 0 β 1 (1.9) H : α 0 + β 1 (α + β) (α β) 0 + 1. (1.30) 1.. Multiple q-bits gates Classical gates are summarized as follows:
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 8 Truth tables are given by. NOT: AND: OR a NOT a 0 1 1 0 a b aandb 0 0 0 0 1 0 1 0 0 1 1 1 a b aorb 0 0 0 0 1 1 1 0 1 1 1 1 (1.31) (1.3) (1.33)
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 9 XOR NAND a b axorb 0 0 0 0 1 1 1 0 1 1 1 0 a b anandb 0 0 1 0 1 1 1 0 1 1 1 0 (1.34) (1.35) NOR XNOR a b anorb 0 0 1 0 1 0 1 0 0 1 1 0 a b axorb 0 0 1 0 1 0 1 0 0 1 1 1 (1.36) (1.37) It can be shown by direct construction that NAND and NOR gates are universal (i.e. arbitrary gate can be constructed out of only NAND gates or out of only NOR gates). For example, NOT(a) = ananda aandb = (anandb) NAND(aNANDb) aorb = (ananda) NAND(bNANDb) anorb = ((ananda) NAND(bNANDb)) NAND((aNANDa) NAND(bNANDb)) axorb = ((anand(anandb)) NAND(bNAND(aNANDb)) anorb = ((anand(anandb)) NAND(bNAND(aNANDb)) NAND ((anand(anandb)) NAND(bNAND(aNANDb))
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 10 Hilbert space of multiple q-bit is formed by tensor product. For example a ket vector of two q-bits can be represented by a four component column vector ψ = α 00 00 + α 01 01 + α 10 10 + α 11 11 α 00 α 01 α 10 α 11 (1.38) Quantum gates for two q-bits are unitary four-by-four matrices. For example, CNOT (or controlled NOT)gate is given by 1 0 0 0 U CNOT = 0 1 0 0 0 0 0 1 (1.39) 0 0 1 0 such that a, b a, a b (1.40) where is sum module two. It can be shown that the CNOT gate and single q-bit gates form a universal set of quantum gates in quantum computing similar to how NAND and NOR gates are universal in classical computing. The CNOT gate can be generalized to create a controlled U gate from arbitrary U gate. Quantum circuit is built from a collection of quantum gates. For example, a, b a, a b (1.41) a (a b),a b = b, a b b, (a b) b = b, a
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 11 Note that unitarity of quantum mechanics puts restrictions onquantum circuits. In particular the two q-bits cannot be looped nor copied. Suppose we try to copy first q-bit ψ = α 0 + β 1 (1.4) into second q-bit (whose initial state without loss of generality may be 0 ) sothatthecombinedstateis ψ 0 = α 00 + β 10. (1.43) After applying the CNOT gate we seem to have copied the classical bit but not the q-bit ψ which would have given us α 00 + β 11 (1.44) ψ ψ = (α 0 + β 1 )(α 0 + β 1 ) (1.45) = α 00 + αβ 01 + αβ 10 + β 11. Unless αβ =0the q-bit was not copied which is in agreement with the so-called non-cloning theorem (proved only in early 80 s). An important class of Bell states can be formed by applying thehadamard gate to the first q-bits which is then used as a control but for the second q-bit a, b β ab 0,b +( 1)a 1,b 1 (1.46)
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 1 1..3 Quantum Teleportation Let us assume that Alice and Bob have q-bits a and b that are in state β 00. Now let say Alice want to send to Bob an arbitrary q-bit c which can be written as ψ = α 0 + β 1 (1.47) which can be teleported using the following quantum circuit. Then the overall initial state is ψ 0 =(α 0 + β 1 ) 1 ( 00 + 11 ) (1.48) after CNOT gate ψ 1 = 1 (α 0 ( 00 + 11 )+β 1 ( 10 + 01 )) (1.49) after Hadamard gate ψ = 1 (α ( 0 + 1 )( 00 + 11 )+β ( 0 1 )( 10 + 01 ))(1.50) = 1 ( 00 (α 0 + β 1 )+ 01 (α 1 + β 0 )) + 1 ( 10 (α 0 β 1 )+ 11 (α 1 β 0 )). Then Alice can measure both q-bits (c and a) andsendtheresultofmeasurements M 1 and M to Bob. What Bob must do to recover the original unknown state ψ is to pass his own bit through M of X gates and M 1 of Z gates.
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 13 1..4 Superdense coding Let us assume that Alice and Bob have q-bits a and b that are in the same state β 00,butnowAlicewantstosendBobtwobitsofclassicalinformation. Depending of what the two bits are she can perform a certain transformation on her bit I if x =00 Z if x =01 U(x) = X if x =10 iy if x =11 then the final state is ( where 1 0 0 1 ) ( ) 1 0 0 1 U(x)β 00 = ( ) 0 1 1 0 ( ) 0 i i i 0 00 + 11 = 00 + 11 = β 00 if x =00 00 + 11 = 00 11 = β 10 if x =01 00 + 11 = 01 + 10 = β 01 if x =10 00 + 11 = 01 10 = β 11 if x =11 β ab 0,b +( 1)a 1,b 1 (1.51) are the Bell states. Then the Alice can send her q-bit and Bob should be able to recover both classical bits since all of Bell states are orthogonal. Indeed CNOT (with the first q-bit being control bit)followed by Hadamard gate on the first q-bit gives us HU CNOT ( 00 + 11 ) = H ( 00 + 10 ) = 00 ( ) 00 11 ( ) HU CNOT = H 00 10 = 10 ( ) 01 + 10 ( ) HU CNOT = H 01 + 11 = 01 ( ) 01 10 ( ) HU CNOT = H 01 11 = 11
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 14 1.3 Quantum Algorithms 1.3.1 Classical computation To show that one can preform classical computations on quantum computer it is sufficient to show that one can simulate NAND and FANOUT gates using unitary transformations. This can be accomplished using Toffoli gate with truth table Then NAND is given by a b c a b c ab 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 (1.5) and FANOUT is given by
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 15 1.3. Quantum parallelism. The main advantage of quantum computation is that superposition states (of computational basis) can be used to simultaneously evaluate the same function at different values. For example, consider a binary function f : {0, 1} {0, 1}. (1.53) Let say we built a circuit which evaluates with function, i.e. U f : x, y x, y f(x) (1.54) then ( ) 0 + 1 0,f(0) + 1,f(1) U f 0 =. (1.55) 1.3.3 Deutsch s algorithm We now implement a simple algorithm to demonstrate how quantum circuits can outperform classical ones.
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 16 Then the initial state ψ 0 = 01 (1.56) after passing through Hadamard gates ψ 1 = 1 ( 0 + 1 )( 0 1 ) (1.57) after U f ψ = 1 ( ( 1) f(0) 0 ( 0 1 )+( 1) f(1) 1 ( 0 1 ) ) (1.58) or ψ = 1 ( 0 + 1 ) 1 ( 0 1 ) if f(0) = f(1) = 0 1 ( 0 + 1 ) 1 ( 0 1 ) if f(0) = f(1) = 1 1 ( 0 1 ) 1 ( 0 1 ) if f(0) f(1) = 1 1 ( 0 1 ) 1 ( 0 1 ) if f(0) f(1) = 0 (1.59) and after running the first bit through Hadamard gate 0 1 ( 0 1 ) if f(0) = f(1) = 0 0 1 ψ 3 = ( 0 1 ) if f(0) = f(1) = 1 1 1 ( 0 1 ) if f(0) f(1) = 1 1 1 ( 0 1 ) if f(0) f(1) = 0 (1.60) However and we can rewrite f(0) f(1) = 0 f(0) = f(1) (1.61) ψ 3 = ± f(0) f(1) 1 ( 0 1 ). (1.6)
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 17 Thus by measuring the first q-bit we can find out a global property of our function (i.e. f(0) f(1)) withonlyasingleevaluationoff(x). Aclassical computer would require at least two evaluations. 1.3.4 Deutsch-Jozsa Algorithm Using quantum parallelism even functions of many bits f : {0, 1} n {0, 1} (1.63) can be evaluated using essentially the same quantum gate (1.54) where x is now a multicomponent (or multi-bit) vector. In general the transformation of Hadamard gates is described by H n y = n ( 1) x y x (1.64) x {0,1} n and thus the superposition state can be prepared from 0 n 0000... by passing through Hadamard gates, H n 0 = n x. (1.65) x {0,1} n Then we can generalize the Deutsch circuit to multiple input gates ψ 0 = 000... 1 (1.66) ( ) ψ 1 = n 0 1 (1.67) x {0,1} n x ψ = n ( 1) f(x) x x {0,1} n ψ 3 = n z {0,1} n ( ) 0 1 x {0,1} n ( 1) x z+f(x) z (1.68) ( ) 0 1. (1.69) Now let us suppose that we know for sure that f is either constant f(x) =constant (1.70) or balanced x {0,1} n f(x) = n 1. (1.71)
CHAPTER 1. INTRODUCTION TO QUANTUM COMPUTATION 18 Then, assuming f(x) is constant, if we measure the query bits and if, we would get zero for the first n bits (the last bit is in state 0 1 and need not be measured) with amplitude { 0 n ( 1) x 0+f(x) +1 if f(x) =0 0 = (1.7) 1 if f(x) =1 x {0,1} n and thus due to normalization n x {0,1} n ( 1) x 0+f(x) 0 = { +1 if f(x) =0 1 if f(x) =1. (1.73) On the other hand if f(x) is balanced, we would get zero for all bits with amplitude 0 n x {0,1} n ( 1) x 0+f(x) 0 = 0 0 0 =0 (1.74) Thus if we get zero for all n bits the function must be constant and if we get at least one bit nonzero the function must be balance. To run the same test on the function using classical computers would require not one, but (in the worst case scenario) n 1 +1evaluations of the function.