CS 497 Frontiers of Computer Science Introduction to Quantum Computing Lecture of http://www.cs.uwaterloo.ca/~cleve/cs497-f7 Richard Cleve David R. Cheriton School of Computer Science Institute for Quantum Computing University of Waterloo October & 3, 7
Contents of lecture. Preliminary remarks. Quantum states 3. Unitary operations & measurements 4. Subsystem structure & quantum circuit diagrams 5. Introductory remarks about quantum algorithms 6. Deutsch s parity algorithm 7. One-out-of-four search algorithm
Contents of lecture. Preliminary remarks. Quantum states 3. Unitary operations & measurements 4. Subsystem structure & quantum circuit diagrams 5. Introductory remarks about quantum algorithms 6. Deutsch s parity algorithm 7. One-out-of-four search algorithm 3
Moore s Law 9 number of transistors 8 7 6 5 4 year 975 98 985 99 995 5 Following trend atomic scale in 5- years Quantum mechanical effects occur at this scale: Measuring a state (e.g. position) disturbs it Quantum systems sometimes seem to behave as if they are in several states at once Different evolutions can interfere with each other 4
Quantum mechanical effects Additional nuisances to overcome? or New types of behavior to make use of? [Shor 94]: polynomial-time algorithm for factoring integers on a quantum computer This could be used to break most of the eisting public-key cryptosystems, including RSA, and elliptic curve crypto [Bennett, Brassard 84]: provably secure codes with short keys 5
Also with quantum information: Faster algorithms for combinatorial search problems Fast algorithms for simulating quantum mechanics Communication savings in distributed systems More efficient notions of proof systems Quantum information theory is a generalization of the classical information theory that we all know which is based on probability theory quantum information theory classical information theory 6
Contents of lecture. Preliminary remarks. Quantum states 3. Unitary operations & measurements 4. Subsystem structure & quantum circuit diagrams 5. Introductory remarks about quantum algorithms 6. Deutsch s parity algorithm 7. One-out-of-four search algorithm 7
Classical and quantum systems Probabilistic states:, p p = p p p p p p p p Quantum states:, α α = C α α α α α α α α Dirac notation:,,,, are basis vectors, so ψ = α 8
Dirac bra/ket notation Ket: ψ always denotes a column vector, e.g. Convention: = = α α M α d Bra: ψ always denotes a row vector that is the conjugate transpose of ψ, e.g. [ α * α * α * d ] Bracket: φ ψ denotes φ ψ, the inner product of φ and ψ 9
Contents of lecture. Preliminary remarks. Quantum states 3. Unitary operations & measurements 4. Subsystem structure & quantum circuit diagrams 5. Introductory remarks about quantum algorithms 6. Deutsch s parity algorithm 7. One-out-of-four search algorithm
Basic operations on qubits (I) () Initialize qubit to or to Recall = = () Apply a unitary operation U (formally U U = I ) Eamples: Rotation by θ: NOT (bit flip): σ cos θ sin θ = X = sin θ cos θ conjugate transpose Maps Phase flip: σ = Z = Maps z
Basic operations on qubits (II) More eamples of unitary operations: (unitary rotation) adamard: = Reflection about this line = ( + ) = + + = ( ) = +
Basic operations on qubits (III) ψ (3) Apply a standard measurement: α + β α a with prob with prob β α ψ β and the quantum state collapses to or ( ) There eist other quantum operations, but they can all be simulated by the aforementioned types Eample: measurement with respect to a different orthonormal basis { ψ, ψ } 3
Distinguishing between two states Let be in state + = ( + ) or = ( ) Question : can we distinguish between the two cases? Distinguishing procedure:. apply. measure This works because + = and = Question : can we distinguish between and +? Since they re not orthogonal, they cannot be perfectly distinguished but statistical difference is detectable 4
Operations on n-qubitqubit states Unitary operations: (U U = I ) α a U α Measurements: α α α M α a M with prob with prob M with prob α α M α and the quantum state collapses 5
Contents of lecture. Preliminary remarks. Quantum states 3. Unitary operations & measurements 4. Subsystem structure & quantum circuit diagrams 5. Introductory remarks about quantum algorithms 6. Deutsch s parity algorithm 7. One-out-of-four search algorithm 6
Entanglement Suppose that two qubits are in states: α + β α' + β' The state of the combined system their tensor product: ( α + β )( α' + β' ) = αα' + αβ' + βα' + ββ' Question: what are the states of the individual qubits for. +?. +? Answers:. ( )( ) +??.... this is an entangled state 7
Structure among subsystems qubits: time # U W # V #3 #4 unitary operations measurements 8
Quantum circuits Computation is feasible if circuit-size scales polynomially 9
Eample of a one-qubit gate applied to a two-qubit system (do nothing) U Maps basis states as: U U U U U u = u u u The resulting 44 matri is I U = u u u u u u u u Question: what happens if U is applied to the first qubit?
Controlled-U gates U Maps basis states as: U U U u = u u u Resulting 44 matri is controlled-u = u u u u
Controlled-NOT (CNOT) X a b a a b Note: control qubit may change on some input states! +
Contents of lecture. Preliminary remarks. Quantum states 3. Unitary operations & measurements 4. Subsystem structure & quantum circuit diagrams 5. Introductory remarks about quantum algorithms 6. Deutsch s parity algorithm 7. One-out-of-four search algorithm 3
Multiplication problem Input: two n-bit numbers (e.g. and ) Output: their product (e.g. ) Grade school algorithm takes O(n ) steps Best currently-known classical algorithm costs O(n log n loglog n) Best currently-known quantum method: same 4
Factoring problem Input: an n-bit number (e.g. ) Output: their product (e.g., ) Trial division costs n / Best currently-known classical algorithm costs O( n ⅓ log ⅔n ) ardness of factoring is the basis of the security of many cryptosystems (e.g. RSA) Shor s quantum algorithm costs n [O(n lognloglogn)] Implementation would break RSA and other cryptosystems 5
ow do quantum algorithms work? Given a polynomial-time classical algorithm for f :{,} n T, it is straightforward to construct a quantum algorithm that creates the state:, f ( ) n This is not performing eponentially many computations at polynomial cost The most straightforward way of etracting information from the state yields just (, f ()) for a random {,} n But we can make some interesting tradeoffs: instead of learning about any (, f ()) point, one can learn something about a global property of f 6
Contents of lecture. Preliminary remarks. Quantum states 3. Unitary operations & measurements 4. Subsystem structure & quantum circuit diagrams 5. Introductory remarks about quantum algorithms 6. Deutsch s parity algorithm 7. One-out-of-four search algorithm 7
Deutsch s problem Let f : {,} {,} f There are four possibilities: f () f () f 3 () f 4 () Goal: determine f() f() Any classical method requires two queries What about a quantum method? 8
Reversible black bo for f a b U f a b f(a) alternate notation: f A classical algorithm: (still requires queries) f f f() f() queries + auiliary operation 9
Quantum algorithm for Deutsch 3 f f() f() query + 4 auiliary operations = ow does this algorithm work? Each of the three operations can be seen as playing a different role... 3
Quantum algorithm ()( 3 f. Creates the state, which is an eigenvector of NOT with eigenvalue I with eigenvalue + This causes f to induce a phase shift of ( ) f() to f ( ) f() 3
Quantum algorithm ()(. Causes f to be queried in superposition (at + ) f ( ) f() + ( ) f() f () f () f 3 () f 4 () ±( + ) ±( ) 3
Quantum algorithm (3)( 3. Distinguishes between ±( + ) and ±( ) ±( + ) ± ±( ) ± 33
Summary of Deutsch s algorithm Makes only one query, whereas two are needed classically produces superpositions of inputs to f : + etracts phase differences from ( ) f() + ( ) f() 3 f f() f() constructs eigenvector so f-queries induce phases: ( ) f() 34
Contents of lecture. Preliminary remarks. Quantum states 3. Unitary operations & measurements 4. Subsystem structure & quantum circuit diagrams 5. Introductory remarks about quantum algorithms 6. Deutsch s parity algorithm 7. One-out-of-four search algorithm 35
One-out out-of-four four search Let f : {,} {,} have the property that there is eactly one {,} for which f () = Four possibilities: f () f () f () f () Goal: find {,} for which f () = What is the minimum number of queries classically? Quantumly? 36
y Quantum algorithm (I) Black bo for -4 search: f y f(, ) Start by creating phases in superposition of all inputs to f: Output state of query? f Input state to query? ( + + + )( ) (( ) f() + ( ) f() + ( ) f() + ( ) f() )( ) 37
Quantum algorithm (II) f Output state of the first two qubits in the four cases: Case of f? ψ = + + + ψ =+ + + Case of f? Case of f? Case of f? U ψ =+ + + ψ =+ + + Apply the U that maps ψ, ψ, ψ, ψ to,,, (resp.) What noteworthy property do these states have? Orthogonal! 38
39