15-251: Great Theoretical Ideas in Computer Science Lecture 25 ! Quantum Computation WARNING I DO NOT KNOW ANYTHING ABOUT PHYSICS. SERIOUSLY. Image: Centre for Quantum Photonics It’s a bit hard to do direct experiments to get evidence confirming the theory. Let me tell you about a certain scientific theory. In the AskReddit thread “What scientific ‘fact’ It hasn’t been around that long do you think may eventually be proven false? ” – since about the late ’60s. it was the #1 answer (1104 points). Too new for your parents to have learned it The commenter (a scientist in the field), wrote: when they were at school. “A lot of the theories behind [its] mechanisms… seem a little tenuous to me .” Quantum Mechanics I’m talking, of course, about… on the other hand… Plate Tectonics has been standard physics for about 90 years • has been confirmed by zillions of experiments • is relied upon in the engineering of • hard drives , GPS devices , MRIs , etc. Please do not be skeptical of QM. 1
Late ’30s: Boolean circuits First 1/2 of lecture: Non-quantum stuff Nakashima Shannon Shestakov Late ’30s: Boolean circuits Late ’30s: Boolean circuits ∧ ∧ x x ¬ DUPE ¬ ∨ ∨ x⊕y x⊕y ∧ (XOR) ∧ y y ¬ ¬ DUPE Fact: Every function f : {0,1} n → {0,1} m Fact: Every function f : {0,1} n → {0,1} m ∧ ∨ ∧ ∨ is computable with ¬ is computable with ¬ DUPE DUPE Proof: x Fact: Every function f : {0,1} n → {0,1} m ∨ computable by a time-T algorithm y can be computed by a circuit with ≡ poly(T) gates x ¬ ∧ ¬ y ¬ 2
Fact: Every function f : {0,1} n → {0,1} m ’60s: Reversible computation is computable with DUPE NAND and “ scratch input bits” Proof: Suffices to get ¬ x ¬ (alternative) ≡ x weirdo DUPE NAND Landauer Bennett quantum x notation NAND (Remember Homework #1, Problem #4?) scratch bit, 〈1| 1 hardwired to 1 ? Bit 〈0| 〈1| In theory: ∧ 〈0| ? low high In practice: voltage voltage NOT reversible horizontally vertically Apparently, this means an AND gate polarized polarized must dissipate energy. photon photon (Because physics. 2 nd Law of Thermodynamics?) Gate A physical, localized gadget that Apparently, if a gate is reversible , manipulates a few bits. it need not (in principle) dissipate energy. ¬ Reversible Question: Is every function f : {0,1} n → {0,1} m computable with only reversible gates? ⊕ Not Reversible Answer: Yes! (As you know from homework.) • CNOT x x Reversible (controlled Need to allow some s scratch inputs, ⊕ y x⊕y NOT) and g “garbage outputs”. Not Reversible Such that n+s = m+g. DUPE (we require #in = #out) 3
• • x x x x CCNOT CCNOT • • (aka Reversible (aka Reversible y y y y Toffoli Toffoli gate) gate) ⊕ ⊕ z ( x∧y)⊕z z ( x∧y)⊕z garbage bit • • x x 〈1| 〈1| garbage bits • • y y x x DUPE(x) ⊕ ⊕ 〈1| NAND(x,y) 〈0| x scratch bits scratch bit Any circuit for f : {0,1} n →{0,1} can efficiently • x x be converted into a reversible circuit. CCNOT • (aka Reversible • y y x 1 f(x) ⊕ ⊕ Toffoli • • • • x 2 g 1 gate) ⊕ z ( x∧y)⊕z • x 3 g 2 ⊕ ⊕ • • • x 4 g 3 ⊕ ⁝ ⁝ • • • x n 〈1| 〈1| If you prefer all • • 〈1| ⊕ 〈1| 〈1| scratch bits to be 〈1|… • • 〈1 | ⊕ 〈0| • 〈1| • ⁝ ⊕ ⁝ • 〈1| ⊕ g n+s−1 Puzzle Late ’70s: Probabilistic computation Consider Multiply : {0,1} n+n → {0,1} 2n . Takes two n-bit numbers and outputs product. Can be done in poly(n) time. Hence has a poly(n)-gate circuit. Hence has a poly(n)-gate reversible circuit. Why can’t we just reverse the circuit, and get a poly(n)-gate circuit for Factoring ?! Rabin Solovay Strassen Gill Solution: Have to know what garbage bits to feed in so that all scratch bits become . 〈1| 4
CNOT • x x ¬ (1/2) ⊕ y x⊕y This captures the correlations between the two output bits CNOT CNOT • • ⊕ ⊕ 〈0| 〈0| True, but extremely misleading! The two outputs bits are always the same! CNOT CNOT • • ⊕ ⊕ = Transition matrix for CNOT 5
• x x A probabilistic gate I just made up CCNOT • (aka y y Toffoli gate) ⊕ if 〈0| do Bern (.8) z ( x∧y)⊕z if 〈1| do Bern (.1) Sorta like ¬ , but noisy (and asymmetric). Transition matrix for CCNOT Transition matrix In general: A k-input/output probabilistic gate can be any 2 k × 2 k stochastic matrix (matrix preserving prob. vectors). Here’s one of the trickiest parts of the lecture. I.e., each row nonnegative, sums to 1. It still has nothing to do with quantum. e.g., • • if 〈0| do Bern (.8) if 〈0| do Bern (.8) if 〈1| do Bern (.1) if 〈1| do Bern (.1) ⊕ ⊕ 〈0| if 〈0| do Bern (.8) 〈0| if 〈0| do Bern (.8) if 〈1| do Bern (.1) if 〈1| do Bern (.1) What is the distribution of the 2 output wires? Type = mismatch? So far, we did this already. (A few slides ago.) 6
• • if 〈0| do Bern (.8) if 〈0| do Bern (.8) if 〈1| do Bern (.1) if 〈1| do Bern (.1) ⊕ ⊕ if 〈0| do Bern (.8) if 〈0| do Bern (.8) 〈0| 〈0| if 〈1| do Bern (.1) if 〈1| do Bern (.1) = Even tho gate only acts on 1 bit, to get the correlations right you have to expand the matrix to all (2 of) the bits. • • if 〈0| do Bern (.8) if 〈0| do Bern (.8) if 〈1| do Bern (.1) if 〈1| do Bern (.1) ⊕ ⊕ 〈0| if 〈0| do Bern (.8) 〈0| if 〈0| do Bern (.8) if 〈1| do Bern (.1) if 〈1| do Bern (.1) = FINAL ANSWER expand • • if 〈0| do Bern (.8) if 〈0| do Bern (.8) if 〈1| do Bern (.1) if 〈1| do Bern (.1) ⊕ ⊕ 〈0| if 〈0| do Bern (.8) 〈0| if 〈0| do Bern (.8) if 〈1| do Bern (.1) if 〈1| do Bern (.1) Final thought on probabilistic circuits: In n-bit circuit, to mathematically analyze Suppose we measure just the top output bit. the output distribution is hard: requires tracking probability vectors of length 2 n . Pr [ 〈0| ] = .55 & “collapse” to In physical reality, Nature doesn’t need Pr [ 〈1| ] = .45 & “collapse” to to do this. Each wire carries an actual bit! 7
’80s and ’90s: Finally: Quantum computation is exactly the same as this, except… Quantum computation The state vectors can have negative entries! Instead of being called “probabilities”, the state vector entries are called “ amplitudes ”. Instead of the entries adding up to 1, Feynman Deutsch the squares of the entries must add up to 1. Bit 〈0| 〈1| In theory: Actually, according to quantum mechanics, Physically: horizontally vertically the amplitudes can even be complex numbers . polarized polarized photon photon I.e., we can have α , β∈ℂ satisfying | α | 2 +| β | 2 = 1. However, for quantum computation purposes, According to the actual laws of physics (QM), a photon’s state can be any superposition : it’s known that real amplitudes suffice (WLOG). α 〈0| + β 〈1| So let’s keep things simple. where α , β ∈ℝ satisfy α 2 + β 2 = 1. A qubit 2 qubits where “amplitudes” α , β ∈ℝ α 〈0| + β 〈1| satisfy α 2 + β 2 = 1. Joint state if they’re “prepared separately”: 〈1| Also written as a vector 〈0| Same rule as if they were satisfying: independent probabilities. Check: It’s NOT a probabilistic mixture of 〈0 | and 〈1|. It just is what it is. 8
2 qubits 2 qubits In general, 2 qubits can be in any superposition Example: (“EPR pair”) α 〈00| + β 〈01| + γ 〈10| + δ 〈11 | aka where amplitudes satisfy α 2 + β 2 + γ 2 + δ 2 = 1. Fact: Not of form Also written as a vector: Hence these two qubits are called entangled . satisfying: n qubits Quantum gates U State can be any 2 n -dimensional vector v satisfying ||v|| 2 = 1. ∙ U Gate is again represented by Coordinates indexed as v 〈x | some 4 × 4 matrix. for x ranging in {0,1} n . U Can be any U satisfying “ ||vU|| 2 = 1 whenever ||v|| 2 = 1 ”. Unitary matrices Unitary matrices “Length - preserving” matrices U, “Length - preserving” matrices U, meaning ||vU|| 2 = 1 whenever ||v|| 2 = 1, meaning ||vU|| 2 = 1 whenever ||v|| 2 = 1, are called unitary . are called unitary . Fact: An equivalent condition is: Fact: An equivalent condition is: ⇔ matrix with 1’s “ (conjugate) transpose” of U: on diagonal, ⇒ switch ij and ji entries 0’s elsewhere U is reversible (and take complex conjugates) 9
Example quantum gates Example quantum gates CNOT • ¬ ⊕ Example quantum gates Example quantum gates The crucially important “ Hadamard gate”: CCNOT H • • ⊕ H = Example quantum gates Example quantum gates CNOT ¬ • CCNOT 〈0| H H 〈0| ⊕ H • • THESE GATES ARE ALL PHYSICALLY REALIZABLE ⊕ H = By, like, having lasers fired at the photons/qubits. 10
Recommend
More recommend