hoare logic for quantum programs
play

Hoare Logic for Quantum Programs Mingsheng Ying University of - PowerPoint PPT Presentation

Hoare Logic for Quantum Programs Mingsheng Ying University of Technology, Sydney and Tsinghua University SamsonFest, May 28-30,2013 Abramsky Conjecture: For every n > 2, every n partite entangled state is logically non-local Happy


  1. Hoare Logic for Quantum Programs Mingsheng Ying University of Technology, Sydney and Tsinghua University SamsonFest, May 28-30,2013

  2. Abramsky Conjecture: For every n > 2, every n − partite entangled state is logically non-local

  3. Happy Birthday, Samson!

  4. Outline Introduction Syntax of Quantum Programs Operational Semantics Denotational Semantics Correctness Formulas Proof System for Quantum Programs Conclusion

  5. Outline Introduction Syntax of Quantum Programs Operational Semantics Denotational Semantics Correctness Formulas Proof System for Quantum Programs Conclusion

  6. Quantum Programming ◮ Quantum Random Access Machine (QRAM) model E. H. Knill, Conventions for quantum pseudocode , Technical Report, Los Alamos National Laboratory, 1996.

  7. Quantum Programming ◮ Quantum Random Access Machine (QRAM) model ◮ A set of conventions for writing quantum pseudocode E. H. Knill, Conventions for quantum pseudocode , Technical Report, Los Alamos National Laboratory, 1996.

  8. Quantum Programming Languages ◮ qGCL: quantum extension of Dijkstra’s Guarded Command Language [1] [1] J. W. Sanders and P. Zuliani, Quantum programming, Mathematics of Program Construction , 2000. [2] B. Ömer, Structural quantum programming , Ph.D. Thesis, Technical University of Vienna, 2003. [3] P. Selinger, Towards a quantum programming language, Mathematical Structures in Computer Science , 14(2004)

  9. Quantum Programming Languages ◮ qGCL: quantum extension of Dijkstra’s Guarded Command Language [1] ◮ QCL: high-level, architecture independent, with a syntax derived from classical procedural languages like C or Pascal [2] [1] J. W. Sanders and P. Zuliani, Quantum programming, Mathematics of Program Construction , 2000. [2] B. Ömer, Structural quantum programming , Ph.D. Thesis, Technical University of Vienna, 2003. [3] P. Selinger, Towards a quantum programming language, Mathematical Structures in Computer Science , 14(2004)

  10. Quantum Programming Languages ◮ qGCL: quantum extension of Dijkstra’s Guarded Command Language [1] ◮ QCL: high-level, architecture independent, with a syntax derived from classical procedural languages like C or Pascal [2] ◮ QPL: functional in nature, with high-level features (loops, recursive procedures, structured data types) [3] [1] J. W. Sanders and P. Zuliani, Quantum programming, Mathematics of Program Construction , 2000. [2] B. Ömer, Structural quantum programming , Ph.D. Thesis, Technical University of Vienna, 2003. [3] P. Selinger, Towards a quantum programming language, Mathematical Structures in Computer Science , 14(2004)

  11. Quantum Programming Languages ◮ Scaffold: Quantum programming language (Princeton, UCS, UCSB) [1] [1] A. J. Abhari, et al., Scaffold: Quantum Programming Language , Technical Report, Department of Computer Science, Princeton University, 2012. [2] A. S. Green, P. L. Lumsdaine, N. J. Ross, P. Selinger and B. Valiron, Quipper: A Scalable Quantum Programming Language, PLDI , 2013.

  12. Quantum Programming Languages ◮ Scaffold: Quantum programming language (Princeton, UCS, UCSB) [1] ◮ Quipper: A Scalable Quantum Programming Language [2] [1] A. J. Abhari, et al., Scaffold: Quantum Programming Language , Technical Report, Department of Computer Science, Princeton University, 2012. [2] A. S. Green, P. L. Lumsdaine, N. J. Ross, P. Selinger and B. Valiron, Quipper: A Scalable Quantum Programming Language, PLDI , 2013.

  13. Floyd-Hoare Logic for Quantum Programs [1] O. Brunet and P. Jorrand, Dynamic quantum logic for quantum programs, International Journal of Quantum Information , 2(2004) [2] A. Baltag and S. Smets, LQP: the dynamic logic of quantum information, Mathematical Structures in Computer Science , 16(2006) [3] Y. Kakutani, A logic for formal verification of quantum programs, Proceedings of 13th Asian conference on Advances in Computer Science , 2009 [4] M. S. Ying, TOPLAS 39(2011), art. no. 19 [4’] M. S. Ying, arXiv (quant-ph): 0906.4586

  14. Outline Introduction Syntax of Quantum Programs Operational Semantics Denotational Semantics Correctness Formulas Proof System for Quantum Programs Conclusion

  15. Syntax A “core”language for imperative quantum programming ◮ A countably infinite set Var of quantum variables

  16. Syntax A “core”language for imperative quantum programming ◮ A countably infinite set Var of quantum variables ◮ Two basic data types: Boolean , integer

  17. Syntax, Continued Hilbert spaces denoted by Boolean and integer : H Boolean = H 2 , H integer = H ∞ . Space l 2 of square summable sequences ∞ ∞ | α n | 2 < ∞ } , ∑ α n | n � : α n ∈ C for all n ∈ Z and ∑ H ∞ = { n = − ∞ n = − ∞ where Z is the set of integers.

  18. Syntax, Continued A quantum register is a finite sequence of distinct quantum variables. State space of a quantum register q = q 1 , ..., q n : n � H q i . H q = i = 1

  19. Syntax, Continued Quantum extension of classical while -programs: S :: = skip | q : = 0 | q : = Uq | S 1 ; S 2 | measure M [ q ] : S | while M [ q ] = 1 do S ◮ q is a quantum variable and q a quantum register

  20. Syntax, Continued Quantum extension of classical while -programs: S :: = skip | q : = 0 | q : = Uq | S 1 ; S 2 | measure M [ q ] : S | while M [ q ] = 1 do S ◮ q is a quantum variable and q a quantum register ◮ U in the statement “ q : = Uq ”is a unitary operator on H q

  21. Syntax, Continued Quantum extension of classical while -programs: S :: = skip | q : = 0 | q : = Uq | S 1 ; S 2 | measure M [ q ] : S | while M [ q ] = 1 do S ◮ q is a quantum variable and q a quantum register ◮ U in the statement “ q : = Uq ”is a unitary operator on H q ◮ statement measure :

  22. Syntax, Continued Quantum extension of classical while -programs: S :: = skip | q : = 0 | q : = Uq | S 1 ; S 2 | measure M [ q ] : S | while M [ q ] = 1 do S ◮ q is a quantum variable and q a quantum register ◮ U in the statement “ q : = Uq ”is a unitary operator on H q ◮ statement measure : ◮ M = { M m } is a measurement on the state space H q of q

  23. Syntax, Continued Quantum extension of classical while -programs: S :: = skip | q : = 0 | q : = Uq | S 1 ; S 2 | measure M [ q ] : S | while M [ q ] = 1 do S ◮ q is a quantum variable and q a quantum register ◮ U in the statement “ q : = Uq ”is a unitary operator on H q ◮ statement measure : ◮ M = { M m } is a measurement on the state space H q of q ◮ S = { S m } is a set of quantum programs such that each outcome m of measurement M corresponds to S m

  24. Syntax, Continued Quantum extension of classical while -programs: S :: = skip | q : = 0 | q : = Uq | S 1 ; S 2 | measure M [ q ] : S | while M [ q ] = 1 do S ◮ q is a quantum variable and q a quantum register ◮ U in the statement “ q : = Uq ”is a unitary operator on H q ◮ statement measure : ◮ M = { M m } is a measurement on the state space H q of q ◮ S = { S m } is a set of quantum programs such that each outcome m of measurement M corresponds to S m ◮ statement while : M = { M 0 , M 1 } is a yes-no measurement on H q

  25. Outline Introduction Syntax of Quantum Programs Operational Semantics Denotational Semantics Correctness Formulas Proof System for Quantum Programs Conclusion

  26. Notation ◮ A quantum configuration is a pair � S , ρ �

  27. Notation ◮ A quantum configuration is a pair � S , ρ � ◮ S is a quantum program or E (the empty program)

  28. Notation ◮ A quantum configuration is a pair � S , ρ � ◮ S is a quantum program or E (the empty program) ◮ ρ ∈ D − ( H all ) is a partial density operator on H all — (global) state of quantum variables

  29. Notation ◮ A quantum configuration is a pair � S , ρ � ◮ S is a quantum program or E (the empty program) ◮ ρ ∈ D − ( H all ) is a partial density operator on H all — (global) state of quantum variables ◮ Tensor product of the state spaces of all quantum variables: H all = � H q all q

  30. Notation ◮ A quantum configuration is a pair � S , ρ � ◮ S is a quantum program or E (the empty program) ◮ ρ ∈ D − ( H all ) is a partial density operator on H all — (global) state of quantum variables ◮ Tensor product of the state spaces of all quantum variables: H all = � H q all q ◮ Transitions between configurations: � S , ρ � → � S ′ , ρ ′ �

  31. Operational Semantics ( Skip ) � skip , ρ � → � E , ρ � ( Initialization ) � q : = 0, ρ � → � E , ρ q 0 � ◮ type ( q ) = Boolean : ρ q 0 = | 0 � q � 0 | ρ | 0 � q � 0 | + | 0 � q � 1 | ρ | 1 � q � 0 |

  32. Operational Semantics ( Skip ) � skip , ρ � → � E , ρ � ( Initialization ) � q : = 0, ρ � → � E , ρ q 0 � ◮ type ( q ) = Boolean : ρ q 0 = | 0 � q � 0 | ρ | 0 � q � 0 | + | 0 � q � 1 | ρ | 1 � q � 0 | ◮ type ( q ) = integer : ∞ ρ q ∑ | 0 � q � n | ρ | n � q � 0 | 0 = n = − ∞

  33. Operational Semantics, Continued ( Unitary Transformation ) � q : = Uq , ρ � → � E , U ρ U † � � S 1 , ρ � → � S ′ 1 , ρ ′ � ( Sequential Composition ) � S 1 ; S 2 , ρ � → � S ′ 1 ; S 2 , ρ ′ � Convention : E ; S 2 = S 2 . ( Measurement ) � measure M [ q ] : S , ρ � → � S m , M m ρ M † m � for each outcome m

Recommend


More recommend