skip to main content
research-article

Formal semantics of a classical-quantum language

Published: 20 April 2022 Publication History

Highlights

A classical-quantum imperative language with an operational and denotational semantics.
Two Hoare-style proof systems that are satisfaction-based.
An abstract proof system is sound and relatively complete, and a concrete proof system is sound.

Abstract

We investigate the formal semantics of a simple imperative language that has both classical and quantum constructs. More specifically, we provide an operational semantics, a denotational semantics and two Hoare-style proof systems: an abstract one and a concrete one. The two proof systems are satisfaction-based, as inspired by the program logics of Barthe et al. for probabilistic programs. The abstract proof system turns out to be sound and relatively complete, while the concrete one is sound only.

References

[1]
K. Apt, F.S. De Boer, E.-R. Olderog, Verification of Sequential and Concurrent Programs, Springer Science & Business Media, 2010.
[2]
K.R. Apt, E.-R. Olderog, Fifty years of Hoare's logic, Form. Asp. Comput. 31 (6) (2019) 751–807.
[3]
G. Barthe, T. Espitau, M. Gaboardi, B. Grégoire, J. Hsu, P. Strub, An assertion-based program logic for probabilistic programs, in: Proceedings of the 27th European Symposium on Programming, in: Lecture Notes in Computer Science, vol. 10801, Springer, 2018, pp. 117–144.
[4]
C. Bennett, S. Wiesner, Communication via one- and two-particle operators on Einstein-Podolsky-Rosen states, Phys. Rev. Lett. 69 (20) (1992) 2881–2884.
[5]
R. Chadha, L. Cruz-Filipe, P. Mateus, A. Sernadas, Reasoning about probabilistic sequential programs, Theor. Comput. Sci. 379 (1–2) (2007) 142–165.
[6]
R. Chadha, P. Mateus, A. Sernadas, Reasoning about imperative quantum programs, Electron. Notes Theor. Comput. Sci. 158 (2006) 19–39.
[7]
J. Den Hartog, E.P. de Vink, Verifying probabilistic programs using a Hoare like logic, Int. J. Found. Comput. Sci. 13 (03) (2002) 315–340.
[8]
Feng, Y.; Li, S.; Ying, M. (2021): Verification of distributed quantum programs. arXiv preprint arXiv:2104.14796.
[9]
Y. Feng, M. Ying, Quantum Hoare logic with classical variables, ACM Trans. Quantum Comput. 2 (4) (2021).
[10]
L.K. Grover, A fast quantum mechanical algorithm for database search, in: Proceedings of the 28th Annual ACM Symposium on Theory of Computing, ACM, 1996, pp. 212–219.
[11]
C.A.R. Hoare, An axiomatic basis for computer programming, Commun. ACM 12 (10) (1969) 576–580.
[12]
Y. Kakutani, A Logic for Formal Verification of Quantum Programs, Lecture Notes in Computer Science, 2009, pp. 79–93.
[13]
D. Kozen, Semantics of probabilistic programs, J. Comput. Syst. Sci. 22 (1981) 328–350.
[14]
D. Kozen, A probabilistic PDL, J. Comput. Syst. Sci. 30 (2) (1985) 162–178.
[15]
Y. Li, D. Unruh, Quantum relational Hoare logic with expectations, in: Proceedings of the 48th International Colloquium on Automata, Languages, and Programming, Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021, pp. 136:1–136:20.
[16]
A. McIver, C. Morgan, C.C. Morgan, Abstraction, Refinement and Proof for Probabilistic Systems, Springer Science & Business Media, 2005.
[17]
C. Morgan, A. McIver, K. Seidel, Probabilistic predicate transformers, ACM Trans. Program. Lang. Syst. 18 (3) (1996) 325–353.
[18]
M. Nielsen, I. Chuang, Quantum Computation and Quantum Information, Cambridge University Press, 2000.
[19]
F. Olmedo, B.L. Kaminski, J.-P. Katoen, C. Matheja, Reasoning about recursive probabilistic programs, in: 2016 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), IEEE, 2016, pp. 1–10.
[20]
L.H. Ramshaw, Formalizing the analysis of algorithms, Technical report Stanford University, 1979.
[21]
P.W. Shor, Algorithms for quantum computation: discrete logarithms and factoring, in: Proceedings of the 35th Annual Symposium on Foundations of Computer Science, IEEE Computer Society, 1994, pp. 124–134.
[22]
D. Unruh, Quantum Hoare logic with ghost variables, in: 2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), IEEE, 2019, pp. 1–13.
[23]
J. von Neumann, States, Effects and Operations: Fundamental Notions of Quantum Theory, Princeton University Press, 1955.
[24]
G. Winskel, The Formal Semantics of Programming Languages - An Introduction, The MIT Press, 1993.
[25]
M. Ying, Floyd–Hoare logic for quantum programs, ACM Trans. Program. Lang. Syst. 33 (6) (2012) 1–49.
[26]
M. Ying, Foundations of Quantum Programming, Morgan Kaufmann, 2016.
[27]
M. Ying, L. Zhou, Y. Li, Y. Feng, A proof system for disjoint parallel quantum programs, Theor. Comput. Sci. 897 (2022) 164–184.
[28]
L. Zhou, N. Yu, M. Ying, An applied quantum Hoare logic, in: Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2019, pp. 1149–1162.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Theoretical Computer Science
Theoretical Computer Science  Volume 913, Issue C
Apr 2022
174 pages

Publisher

Elsevier Science Publishers Ltd.

United Kingdom

Publication History

Published: 20 April 2022

Author Tags

  1. Classical-quantum language
  2. Formal semantics
  3. Soundness
  4. Completeness

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 30 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media