quantum computation
play

Quantum Computation Lecture 27 And that s all we got time for! 1 - PowerPoint PPT Presentation

Quantum Computation Lecture 27 And that s all we got time for! 1 State 2 State State of a classical computer labeled by (say) bit strings 2 State State of a classical computer labeled by (say) bit strings e.g. 2-bit states: 00, 01, 10


  1. Operations on state Hadamard transform (on a single qubit) Takes [1 0] to ! ½ [1 1], and [0 1] to ! ½ [1 -1] Measurement (amp-square vector) of state obtained by applying this to a basis state is [ ½ ½ ] (so can be used to toss a coin) 6

  2. Operations on state Hadamard transform (on a single qubit) Takes [1 0] to ! ½ [1 1], and [0 1] to ! ½ [1 -1] Measurement (amp-square vector) of state obtained by applying this to a basis state is [ ½ ½ ] (so can be used to toss a coin) A quantum effect: 6

  3. Operations on state Hadamard transform (on a single qubit) Takes [1 0] to ! ½ [1 1], and [0 1] to ! ½ [1 -1] Measurement (amp-square vector) of state obtained by applying this to a basis state is [ ½ ½ ] (so can be used to toss a coin) A quantum effect: Had([1 0]) = [ ! ½ ! ½ ]; Had([ ! ½ ! ½ ]) = [1 0]. 6

  4. Operations on state Hadamard transform (on a single qubit) Takes [1 0] to ! ½ [1 1], and [0 1] to ! ½ [1 -1] Measurement (amp-square vector) of state obtained by applying this to a basis state is [ ½ ½ ] (so can be used to toss a coin) A quantum effect: Had([1 0]) = [ ! ½ ! ½ ]; Had([ ! ½ ! ½ ]) = [1 0]. Amplitudes of |1 ! destructively interfere! 6

  5. Operations on state Hadamard transform (on a single qubit) Takes [1 0] to ! ½ [1 1], and [0 1] to ! ½ [1 -1] Measurement (amp-square vector) of state obtained by applying this to a basis state is [ ½ ½ ] (so can be used to toss a coin) A quantum effect: Had([1 0]) = [ ! ½ ! ½ ]; Had([ ! ½ ! ½ ]) = [1 0]. Amplitudes of |1 ! destructively interfere! Contrast with classical case: probabilities can only add 6

  6. Quantum gates 7

  7. Quantum gates A quantum gate: Unitary operation on a small number of (say three) qubits 7

  8. Quantum gates A quantum gate: Unitary operation on a small number of (say three) qubits Number of input qubits equals number of output qubits 7

  9. Quantum gates A quantum gate: Unitary operation on a small number of (say three) qubits Number of input qubits equals number of output qubits There are infinitely many quantum gates 7

  10. Quantum gates A quantum gate: Unitary operation on a small number of (say three) qubits Number of input qubits equals number of output qubits There are infinitely many quantum gates A universal set of gates: can be used to well approximate any gate 7

  11. Quantum gates A quantum gate: Unitary operation on a small number of (say three) qubits Number of input qubits equals number of output qubits There are infinitely many quantum gates A universal set of gates: can be used to well approximate any gate e.g. Hadamard gate and Toffoli gate (when restricted to real amplitudes) 7

  12. Quantum gates A quantum gate: Unitary operation on a small number of (say three) qubits Number of input qubits equals number of output qubits There are infinitely many quantum gates A universal set of gates: can be used to well approximate any gate e.g. Hadamard gate and Toffoli gate (when restricted to real amplitudes) Toffoli gate has a classical analog (on 3 bits) that can be described as T(a,b,c) = (a,b,c ⊕ a ∧ b) 7

  13. Cleaning up the Garbage 8

  14. Cleaning up the Garbage Since only reversible gates, need extra qubits (scratch space) as input and output 8

  15. Cleaning up the Garbage Since only reversible gates, need extra qubits (scratch space) as input and output At the output, the values of this scratch qubits will depend on the input more than the desired output depends on it 8

  16. Cleaning up the Garbage Since only reversible gates, need extra qubits (scratch space) as input and output At the output, the values of this scratch qubits will depend on the input more than the desired output depends on it “Garbage” 8

  17. Cleaning up the Garbage Since only reversible gates, need extra qubits (scratch space) as input and output At the output, the values of this scratch qubits will depend on the input more than the desired output depends on it “Garbage” Can be a problem: e.g., two amplitudes will not cancel out because their garbage values are different 8

  18. Cleaning up the Garbage Since only reversible gates, need extra qubits (scratch space) as input and output At the output, the values of this scratch qubits will depend on the input more than the desired output depends on it “Garbage” Can be a problem: e.g., two amplitudes will not cancel out because their garbage values are different Solution: Ensure garbage qubits are returned to a standard state, by “uncomputing” 8

  19. Cleaning up the Garbage Since only reversible gates, need extra qubits (scratch space) as input and output At the output, the values of this scratch qubits will depend on the input more than the desired output depends on it “Garbage” Can be a problem: e.g., two amplitudes will not cancel out because their garbage values are different Solution: Ensure garbage qubits are returned to a standard state, by “uncomputing” “Copy” the output to unused qubits, and run the reverse computation to return the rest to original state 8

  20. Quantum Circuits and BQP 9

  21. Quantum Circuits and BQP Quantum circuit: composed of quantum gates 9

  22. Quantum Circuits and BQP Quantum circuit: composed of quantum gates And a quantum measurement at the end 9

  23. Quantum Circuits and BQP Quantum circuit: composed of quantum gates And a quantum measurement at the end To decide a language measurement on a single qubit 9

  24. Quantum Circuits and BQP Quantum circuit: composed of quantum gates And a quantum measurement at the end To decide a language measurement on a single qubit We shall require a poly-time uniform circuit family 9

  25. Quantum Circuits and BQP Quantum circuit: composed of quantum gates And a quantum measurement at the end To decide a language measurement on a single qubit We shall require a poly-time uniform circuit family It should be possible for a (classical/deterministic) TM to efficiently output the description of the quantum circuit for any given input length 9

  26. Quantum Circuits and BQP Quantum circuit: composed of quantum gates And a quantum measurement at the end To decide a language measurement on a single qubit We shall require a poly-time uniform circuit family It should be possible for a (classical/deterministic) TM to efficiently output the description of the quantum circuit for any given input length BQP: Class of languages L for which there is a poly-sized (and poly-time uniform) quantum circuit family {C n } s.t. for all n, for all x, |x|=n, 9

  27. Quantum Circuits and BQP Quantum circuit: composed of quantum gates And a quantum measurement at the end To decide a language measurement on a single qubit We shall require a poly-time uniform circuit family It should be possible for a (classical/deterministic) TM to efficiently output the description of the quantum circuit for any given input length BQP: Class of languages L for which there is a poly-sized (and poly-time uniform) quantum circuit family {C n } s.t. for all n, for all x, |x|=n, x ∈ L ⇒ C n (|x0 m ! ) = 1 w.p. > 2/3; x ∉ L ⇒ C n (|x0 m ! ) = 1 w.p. < 1/3 9

  28. BQP 10

  29. BQP BPP ⊆ BQP: Classical gates and coin-flipping can be emulated by quantum gates 10

  30. BQP BPP ⊆ BQP: Classical gates and coin-flipping can be emulated by quantum gates Probability of a quantum circuit (with say Hadamard and Toffoli gates) accepting can be calculated classically, by brute force 10

  31. BQP BPP ⊆ BQP: Classical gates and coin-flipping can be emulated by quantum gates Probability of a quantum circuit (with say Hadamard and Toffoli gates) accepting can be calculated classically, by brute force Multiply together all 2 n x2 n unitary matrices in EXP 10

  32. BQP BPP ⊆ BQP: Classical gates and coin-flipping can be emulated by quantum gates Probability of a quantum circuit (with say Hadamard and Toffoli gates) accepting can be calculated classically, by brute force Multiply together all 2 n x2 n unitary matrices in EXP More carefully, since each gate involves only 3 qubits, in PSPACE 10

  33. BQP BPP ⊆ BQP: Classical gates and coin-flipping can be emulated by quantum gates Probability of a quantum circuit (with say Hadamard and Toffoli gates) accepting can be calculated classically, by brute force Multiply together all 2 n x2 n unitary matrices in EXP More carefully, since each gate involves only 3 qubits, in PSPACE In fact, can be done in PP. i.e., BQP ⊆ PP 10

  34. BQP BPP ⊆ BQP: Classical gates and coin-flipping can be emulated by quantum gates Probability of a quantum circuit (with say Hadamard and Toffoli gates) accepting can be calculated classically, by brute force Multiply together all 2 n x2 n unitary matrices in EXP More carefully, since each gate involves only 3 qubits, in PSPACE In fact, can be done in PP. i.e., BQP ⊆ PP How about BQP and NP? 10

  35. Two Quantum Algorithms 11

  36. Two Quantum Algorithms Grover’ s Search 11

  37. Two Quantum Algorithms Grover’ s Search Quadratic speedup for NP-complete problems (over the best known classical algorithms) 11

  38. Two Quantum Algorithms Grover’ s Search Quadratic speedup for NP-complete problems (over the best known classical algorithms) Solve any NP problem with O(2 n/2 ) quantum gate operations 11

  39. Two Quantum Algorithms Grover’ s Search Quadratic speedup for NP-complete problems (over the best known classical algorithms) Solve any NP problem with O(2 n/2 ) quantum gate operations Shor’ s Factoring 11

  40. Two Quantum Algorithms Grover’ s Search Quadratic speedup for NP-complete problems (over the best known classical algorithms) Solve any NP problem with O(2 n/2 ) quantum gate operations Shor’ s Factoring Polynomial sized quantum circuit for factoring 11

  41. Two Quantum Algorithms Grover’ s Search Quadratic speedup for NP-complete problems (over the best known classical algorithms) Solve any NP problem with O(2 n/2 ) quantum gate operations Shor’ s Factoring Polynomial sized quantum circuit for factoring Exponential speedup over the best known classical algorithms 11

  42. Grover’ s Search 12

  43. Grover’ s Search Suppose f has a unique satisfying input z 12

  44. Grover’ s Search Suppose f has a unique satisfying input z Otherwise, modify f (by adding a hash “filter”) so that with good probability it has a unique solution (if any) 12

  45. Grover’ s Search Suppose f has a unique satisfying input z Otherwise, modify f (by adding a hash “filter”) so that with good probability it has a unique solution (if any) Plan: start with the uniform superposition on n-qubits (i.e., all 2 n states have same amplitude), and move it closer to (unknown) |z ! 12

  46. Grover’ s Search Suppose f has a unique satisfying input z Otherwise, modify f (by adding a hash “filter”) so that with good probability it has a unique solution (if any) Plan: start with the uniform superposition on n-qubits (i.e., all 2 n states have same amplitude), and move it closer to (unknown) |z ! Apply operations: (1) take |xy ! to |x y ⊕ f(x) ! (2) take |x1 ! to -|x1 ! , |x0 ! to |x0 ! (3) take |xy ! to |x y ⊕ f(x) ! 12

  47. Grover’ s Search Suppose f has a unique satisfying input z Otherwise, modify f (by adding a hash “filter”) so that with good probability it has a unique solution (if any) Plan: start with the uniform superposition on n-qubits (i.e., all 2 n states have same amplitude), and move it closer to (unknown) |z ! Apply operations: (1) take |xy ! to |x y ⊕ f(x) ! (2) take |x1 ! to -|x1 ! , |x0 ! to |x0 ! (3) take |xy ! to |x y ⊕ f(x) ! uses scratch qubits 12

  48. Grover’ s Search Suppose f has a unique satisfying input z Otherwise, modify f (by adding a hash “filter”) so that with good probability it has a unique solution (if any) Plan: start with the uniform superposition on n-qubits (i.e., all 2 n states have same amplitude), and move it closer to (unknown) |z ! Apply operations: (1) take |xy ! to |x y ⊕ f(x) ! (2) take |x1 ! to -|x1 ! , |x0 ! to |x0 ! (3) take |xy ! to |x y ⊕ f(x) ! uses scratch qubits Takes |z ! to -|z ! , and leaves other amplitudes unchanged 12

  49. Grover’ s Search Suppose f has a unique satisfying input z Otherwise, modify f (by adding a hash “filter”) so that with good probability it has a unique solution (if any) Plan: start with the uniform superposition on n-qubits (i.e., all 2 n states have same amplitude), and move it closer to (unknown) |z ! Apply operations: (1) take |xy ! to |x y ⊕ f(x) ! (2) take |x1 ! to -|x1 ! , |x0 ! to |x0 ! (3) take |xy ! to |x y ⊕ f(x) ! uses scratch qubits Takes |z ! to -|z ! , and leaves other amplitudes unchanged One more “reflection” to take the vector close to |z ! 12

  50. Grover’ s Search Suppose f has a unique satisfying input z Otherwise, modify f (by adding a hash “filter”) so that with good probability it has a unique solution (if any) Plan: start with the uniform superposition on n-qubits (i.e., all 2 n states have same amplitude), and move it closer to (unknown) |z ! Apply operations: (1) take |xy ! to |x y ⊕ f(x) ! (2) take |x1 ! to -|x1 ! , |x0 ! to |x0 ! (3) take |xy ! to |x y ⊕ f(x) ! uses scratch qubits Takes |z ! to -|z ! , and leaves other amplitudes unchanged One more “reflection” to take the vector close to |z ! In O(2 n/2 ) iterations, amplitude of |z ! becomes large (i.e., constant) 12

  51. Shor’ s Factoring 13

  52. Shor’ s Factoring By algebra, to factor a number N, enough to find the order r of a random number A (mod N) 13

  53. Shor’ s Factoring By algebra, to factor a number N, enough to find the order r of a random number A (mod N) i.e., smallest r s.t. A r ≡ 1 (mod N) 13

  54. Shor’ s Factoring By algebra, to factor a number N, enough to find the order r of a random number A (mod N) i.e., smallest r s.t. A r ≡ 1 (mod N) Prepare a superposition of states |x ! |A x mod N ! (for all x); pick random y 0 and make a measurement on second set of qubits to collapse the state to superposition over |x ! |y 0 ! where x=x 0 +ri (for all i) 13

  55. Shor’ s Factoring By algebra, to factor a number N, enough to find the order r of a random number A (mod N) i.e., smallest r s.t. A r ≡ 1 (mod N) Prepare a superposition of states |x ! |A x mod N ! (for all x); pick random y 0 and make a measurement on second set of qubits to collapse the state to superposition over |x ! |y 0 ! where x=x 0 +ri (for all i) Need to find the period r of this function 13

  56. Shor’ s Factoring By algebra, to factor a number N, enough to find the order r of a random number A (mod N) i.e., smallest r s.t. A r ≡ 1 (mod N) Prepare a superposition of states |x ! |A x mod N ! (for all x); pick random y 0 and make a measurement on second set of qubits to collapse the state to superposition over |x ! |y 0 ! where x=x 0 +ri (for all i) Need to find the period r of this function Tool used: Quantum Fourier Transform 13

  57. QFT for determining period 14

  58. QFT for determining period Recall Fourier Transform for functions f: {0,1} m → � 14

  59. QFT for determining period Recall Fourier Transform for functions f: {0,1} m → � Basis vectors: Χ x (y) = (-1) xy (normalized) 14

  60. QFT for determining period Recall Fourier Transform for functions f: {0,1} m → � Basis vectors: Χ x (y) = (-1) xy (normalized) Fourier Transform of f: � M → � 14

  61. QFT for determining period Recall Fourier Transform for functions f: {0,1} m → � Basis vectors: Χ x (y) = (-1) xy (normalized) Fourier Transform of f: � M → � Basis vectors: Χ x (y) = ω xy (normalized), where ω = e i2 " /M 14

  62. QFT for determining period Recall Fourier Transform for functions f: {0,1} m → � Basis vectors: Χ x (y) = (-1) xy (normalized) Fourier Transform of f: � M → � Basis vectors: Χ x (y) = ω xy (normalized), where ω = e i2 " /M Χ x is periodic (with period depending on x) 14

  63. QFT for determining period Recall Fourier Transform for functions f: {0,1} m → � Basis vectors: Χ x (y) = (-1) xy (normalized) Fourier Transform of f: � M → � Basis vectors: Χ x (y) = ω xy (normalized), where ω = e i2 " /M Χ x is periodic (with period depending on x) If f is periodic, then # (x) (coefficient of Χ x in f’ s FT) will be large for some x which is related to f’ s period 14

  64. QFT for determining period Recall Fourier Transform for functions f: {0,1} m → � Basis vectors: Χ x (y) = (-1) xy (normalized) Fourier Transform of f: � M → � Basis vectors: Χ x (y) = ω xy (normalized), where ω = e i2 " /M Χ x is periodic (with period depending on x) If f is periodic, then # (x) (coefficient of Χ x in f’ s FT) will be large for some x which is related to f’ s period QFT: initial state = Σ x f(x) |x ! and final state = Σ x # (x) |x ! 14

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend