functional quantum programming
play

Functional Quantum Programming Thorsten Altenkirch University of - PowerPoint PPT Presentation

Functional Quantum Programming Thorsten Altenkirch University of Nottingham based on joint work with Jonathan Grattage supported by EPSRC grant GR/S30818/01 Tallinn Feb 06 p.1/44 Background Tallinn Feb 06 p.2/44 Background


  1. s q ⑥ ❧ � � ❧ ♥ ❥ � ⑤ ✪ r r ✐ r ✩ ✝ q � Extensional equality A classical computation induces a function U by ✇②①④③ t✈✉ U We say that two computations are extensionally equivalent , if they give rise to the same function. Tallinn Feb 06 – p.12/44

  2. ✩ ♣q ✪ ✝ ✩ ✪ ♣ ✩ q ✪ Extensional equality . . . Theorem: U U U Tallinn Feb 06 – p.13/44

  3. ✪ ♣ ✪ ✩ ♣q ✪ ✝ ✩ q ✩ Extensional equality . . . Theorem: U U U Hence, classical computations upto extensional equality give rise to the category . Tallinn Feb 06 – p.13/44

  4. ❥ ✩ ♣q ✪ ✝ ✩ ✪ ♣ ✩ q ✪ r Extensional equality . . . Theorem: U U U Hence, classical computations upto extensional equality give rise to the category . Theorem: Any function on finite sets can be realized by a computation. Tallinn Feb 06 – p.13/44

  5. q ✪ r ✩ ♣q ✪ ✝ ✩ ❥ ✪ ♣ ✩ Extensional equality . . . Theorem: U U U Hence, classical computations upto extensional equality give rise to the category . Theorem: Any function on finite sets can be realized by a computation. Translation for Category Theoreticians: U is full and faithful. Tallinn Feb 06 – p.13/44

  6. ✪ r ✒ ✝ ✪ ❥ ✩ ✟ r ✟ ✞ ✟ ❶ ✩ ✒ Example : function ⑦⑨⑧ ⑦⑩⑧ Tallinn Feb 06 – p.14/44

  7. ✒ ✟ ✝ ✪ ❶ r ✞ ✩ ✟ ✪ ✟ ✟ r ✟ ✩ ❥ ✟ � ❹ ✒ Example : function ⑦⑨⑧ ⑦⑩⑧ computation ❡❸❷ Tallinn Feb 06 – p.14/44

  8. ✪ r ✪ ❺ ❥ ✟ ✩ ✟ r ✟ ✒ ❺ ✒ ✝ ✩ ✒ Example : function Tallinn Feb 06 – p.15/44

  9. Tallinn Feb 06 – p.15/44 ✪ ✪ ✒ r ❽ ✩ ❾ ✟ ✩ r ✟ ✩ ✪ ✟ r ✟ ✝ ❽ ❥ ✝ ✪ ✒ ❿ r ✞ ✩ ✪ r ✒ r ✞ ✩ ❾ ✪ ✒ ✩ ❾ ❥ ❾ ✟ ✩ ✟ r ✟ ✪ ❺ ✒ ✝ ✩ ✒ r ✒ ✪ ❻ ❺ ✍ ✟ ✍ ❻ � ✟ ✍ ❽ ✟ ✍ ❻ ❼ ✟ ���� ���� : Example computation function

  10. 2. Finite quantum computation 1. Finite classical computation 2. Finite quantum computation 3. QML basics 4. Compiling QML 5. Conclusions and further work Tallinn Feb 06 – p.16/44

  11. Linear algebra revision Tallinn Feb 06 – p.17/44

  12. ➀ ✝ Linear algebra revision Given a finite set (the base) is a Hilbert space . Tallinn Feb 06 – p.17/44

  13. ➁ ❥ ✑ ➀ ✝ ❥ ➂ ❥ ➀ Linear algebra revision Given a finite set (the base) is a Hilbert space . Linear operators: induces . we write Tallinn Feb 06 – p.17/44

  14. ✪ ✑ ➄➇ ✩ ➈ ✪ ➄➇ ✩ ➀ ➆ ➅ ✝ ➃ ➉ ❥ ❥ ➂ ➀ ❥ ➁ ❥ ✝ ➀ Linear algebra revision Given a finite set (the base) is a Hilbert space . Linear operators: induces . we write Norm of a vector: ➃✢➄ , Tallinn Feb 06 – p.17/44

  15. ➅ ✪ ➀ ➆ ✪ ✝ ➃ ➈ ✩ ✑ ❥ ➄➇ ➂ ➄➇ ➀ ❥ ➁ ❥ ❥ ➉ ❥ ✝ ➀ ✑ ✩ Linear algebra revision Given a finite set (the base) is a Hilbert space . Linear operators: induces . we write Norm of a vector: ➃✢➄ , Unitary operators: A unitary operator is a linear iso- unitary morphism that preserves the norm. Tallinn Feb 06 – p.17/44

  16. Basics of quantum computation Tallinn Feb 06 – p.18/44

  17. ➄ ❥ ➀ ➃ ✝ ✞ Basics of quantum computation A pure state over is a vector with unit norm ➃✢➄ . Tallinn Feb 06 – p.18/44

  18. ✝ ➃ ✑ ➄ ❥ ➀ ❥ ✞ Basics of quantum computation A pure state over is a vector with unit norm ➃✢➄ . A reversible computation is given by a unitary operator . unitary Tallinn Feb 06 – p.18/44

  19. Quantum computations ( ) Tallinn Feb 06 – p.19/44

  20. ❞ ❝ ❡ ❢ � ❣ ❤ � Quantum computations ( ) Given finite sets (input) and (output): Tallinn Feb 06 – p.19/44

  21. ❢ � � ❤ ❣ ❝ ❞ ❡ Quantum computations ( ) Given finite sets (input) and (output): a finite set , the base of the space of initial heaps, Tallinn Feb 06 – p.19/44

  22. ❤ � ➊ ❥ ✐ ❝ ❞ ❡ ❢ � ❣ Quantum computations ( ) Given finite sets (input) and (output): a finite set , the base of the space of initial heaps, a heap initialisation vector , Tallinn Feb 06 – p.19/44

  23. � ❤ ➊ ❥ ✐ ❝ ❞ ❡ ❢ � ❣ Quantum computations ( ) Given finite sets (input) and (output): a finite set , the base of the space of initial heaps, a heap initialisation vector , a finite set , the base of the space of garbage states, Tallinn Feb 06 – p.19/44

  24. ➊ � ❥ ✐ ✑ � ❤ ❥ ❣ ❢ ❡ ❞ ❝ Quantum computations ( ) Given finite sets (input) and (output): a finite set , the base of the space of initial heaps, a heap initialisation vector , a finite set , the base of the space of garbage states, a unitary operator . unitary Tallinn Feb 06 – p.19/44

  25. Composing quantum computations Tallinn Feb 06 – p.20/44

  26. ♦ ♥ ❞ ♦ ♥ � ♥ ✕ ♦ � ♦ � ♥ � Composing quantum computations � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � Tallinn Feb 06 – p.20/44

  27. Semantics of quantum computations. . Tallinn Feb 06 – p.21/44

  28. Semantics of quantum computations. . . . . is a bit more subtle. Tallinn Feb 06 – p.21/44

  29. ⑦ ⑧ ❥ ❧ Semantics of quantum computations. . . . . is a bit more subtle. There is no (sensible) operator on vector spaces, replacing . Tallinn Feb 06 – p.21/44

  30. ⑦ ⑧ ❥ ❧ Semantics of quantum computations. . . . . is a bit more subtle. There is no (sensible) operator on vector spaces, replacing . Indeed: Forgetting part of a pure state results in a mixed state . Tallinn Feb 06 – p.21/44

  31. Density matrizes Tallinn Feb 06 – p.22/44

  32. ➋ ❥ ✑ Density matrizes Mixed states can be represented by density matrizes . Tallinn Feb 06 – p.22/44

  33. ➄ ➌ ➍ ➋ ❥ ✑ ➄ ➌ ➋ ➌ ➄ ✝ ➍ Density matrizes Mixed states can be represented by density matrizes . Eigenvalues represent probabilities System is in state with prob. Tallinn Feb 06 – p.22/44

  34. ➍ ➄ ✞ ➋ ❥ ✑ ➍ ➄ ➋ ➌ ➄ ✝ ➌ ➌ Density matrizes Mixed states can be represented by density matrizes . Eigenvalues represent probabilities System is in state with prob. Eigenvalues have to be positive and their sum (the trace) is . Tallinn Feb 06 – p.22/44

  35. Example: forgetting a qbit Tallinn Feb 06 – p.23/44

  36. ❁ ➏ ➏ ➐ ➐ ❁ ➏ ➐ ➐ ➐ ➐ ➐ ➐ ➐ ➐ ➑ ➐ ➑ ➐ ❁ ➏ ➎ ➎ ➎ ➑ ✏ ✏ ✑ ✏ ✏ ❥ ➋ ❁ Example: forgetting a qbit EPR is represented by : Tallinn Feb 06 – p.23/44

  37. Tallinn Feb 06 – p.23/44 ➓ ✩ ⑧ ➒ ✏ ★ ❽ ❽ ➓ ⑧ ➒ ✏ ★ ✞ ✞ ✪ ➑ ⑧ ➓ ✞ ✞ ★ ✏ ➒ ➓ ✝ ❽ ❽ ★ ✏ ➒ ⑧ ➋ ➑ ➏ ❁ ✏ ✑ ✏ ✏ ➋ ➎ ➎ ➎ ➏ ❁ ➐ ➐ ➑ ➐ ❥ ➐ ➐ ➐ ➐ ➐ ➐ ➐ ➏ ❁ ➐ ➐ ➏ ❁ ✏ Example: forgetting a qbit : EPR is represented by

  38. ➋ ➔ ❥ ✏ ✑ ✏ ➏ ❁ ➐ ➐ ➏ ❁ Example: forgetting a qbit . . . After measuring one qbit we obtain : Tallinn Feb 06 – p.24/44

  39. ➓ ❽ ✞ ✝ ➓ ✞ ★ ➔ ➋ ➓ ❽ ★ ✟ ✞ ✝ ✞ ★ ★ ➓ ➋ ➔ ❥ ✏ ✑ ✏ ➏ ➔ ❁ ➐ ➐ ➏ ❁ ➋ ✟ Example: forgetting a qbit . . . After measuring one qbit we obtain : Tallinn Feb 06 – p.24/44

  40. Superoperators Tallinn Feb 06 – p.25/44

  41. Superoperators Morphisms on density matrizes are called superoperators , these are linear maps, which are completely positive, and trace preserving Tallinn Feb 06 – p.25/44

  42. → Superoperators Morphisms on density matrizes are called superoperators , these are linear maps, which are completely positive, and trace preserving Every unitary operator gives rise to a superoperator . Tallinn Feb 06 – p.25/44

  43. ✫ ✬ ➂ ③ ➣ ❥ ✑ Superoperators. . . There is an operator super called partial trace . Tallinn Feb 06 – p.26/44

  44. ↔ ❧ ❥ ➙ ✑ ③ ➙ ✏ ✞➛ ➜ ✏ ✑ ❥ ➣ ③ ➂ ✬ ✫ ✏ Superoperators. . . There is an operator super called partial trace . E.g. is ✫✭✬↕↔ super represented by a matrix. Tallinn Feb 06 – p.26/44

  45. Semantics Tallinn Feb 06 – p.27/44

  46. � � � ⑤ ➢ ➡ ① � ➠ s ♥ ➝ ✑ ❥ q q Semantics Every quantum computation gives rise to a superoperator U super ➞⑩➟ U Tallinn Feb 06 – p.27/44

  47. ① s ➡ � � ➠ ♥ � ➝ ⑤ � ✑ ❥ q ❥ ✑ q ➢ Semantics Every quantum computation gives rise to a superoperator U super ➞⑩➟ U Theorem: Every superoperator super (on finite Hilbert spaces) comes from a quantum computation. Tallinn Feb 06 – p.27/44

  48. Classical vs quantum Tallinn Feb 06 – p.28/44

  49. ☎ ✆ ✆ ☎ ✆ Classical vs quantum classical ( ) quantum ( ) Tallinn Feb 06 – p.28/44

  50. ☎ ✆ ✆ ☎ ✆ Classical vs quantum classical ( ) quantum ( ) finite sets Tallinn Feb 06 – p.28/44

  51. ☎ ✆ ✆ ☎ ✆ Classical vs quantum classical ( ) quantum ( ) finite sets finite dimensional Hilbert spaces Tallinn Feb 06 – p.28/44

  52. ☎ ✆ ✆ ☎ ✆ ➤ Classical vs quantum classical ( ) quantum ( ) finite sets finite dimensional Hilbert spaces cartesian product ( ) Tallinn Feb 06 – p.28/44

  53. ➤ ☎ ✆ ✆ ☎ ✆ ➥ Classical vs quantum classical ( ) quantum ( ) finite sets finite dimensional Hilbert spaces cartesian product ( ) tensor product ( ) Tallinn Feb 06 – p.28/44

  54. ➤ ☎ ✆ ✆ ☎ ✆ ➥ Classical vs quantum classical ( ) quantum ( ) finite sets finite dimensional Hilbert spaces cartesian product ( ) tensor product ( ) bijections Tallinn Feb 06 – p.28/44

  55. ➤ ☎ ✆ ✆ ☎ ✆ ➥ Classical vs quantum classical ( ) quantum ( ) finite sets finite dimensional Hilbert spaces cartesian product ( ) tensor product ( ) bijections unitary operators Tallinn Feb 06 – p.28/44

  56. ➤ ☎ ✆ ✆ ☎ ✆ ➥ Classical vs quantum classical ( ) quantum ( ) finite sets finite dimensional Hilbert spaces cartesian product ( ) tensor product ( ) bijections unitary operators functions Tallinn Feb 06 – p.28/44

  57. ➤ ☎ ✆ ✆ ☎ ✆ ➥ Classical vs quantum classical ( ) quantum ( ) finite sets finite dimensional Hilbert spaces cartesian product ( ) tensor product ( ) bijections unitary operators functions superoperators Tallinn Feb 06 – p.28/44

Recommend


More recommend