Abstract
Relational verification of quantum programs has many potential applications in quantum and post-quantum security and other domains. We propose a relational program logic for quantum programs. The interpretation of our logic is based on a quantum analogue of probabilistic couplings. We use our logic to verify non-trivial relational properties of quantum programs, including uniformity for samples generated by the quantum Bernoulli factory, reliability of quantum teleportation against noise (bit and phase flip), security of quantum one-time pad and equivalence of quantum walks.
Supplemental Material
- Scott Aaronson and Guy N. Rothblum. 2019. Gentle Measurement of Quantum States and Differential Privacy. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (STOC 2019). ACM, New York, NY, USA, 322–333. Google Scholar
Digital Library
- Samson Abramsky and Bob Coecke. 2004. A Categorical Semantics of Quantum Protocols. In 19th IEEE Symposium on Logic in Computer Science (LICS 2004), 14-17 July 2004, Turku, Finland, Proceedings. 415–425. Google Scholar
Cross Ref
- V.S. Anil Kumar and H. Ramesh. 2001. Coupling vs. conductance for the Jerrum–Sinclair chain. Random Structures & Algorithms 18, 1 (2001), 1–17. Google Scholar
Cross Ref
- Ebrahim Ardeshir-Larijani, Simon J. Gay, and Rajagopal Nagarajan. 2013. Equivalence Checking of Quantum Protocols. In Tools and Algorithms for the Construction and Analysis of Systems - 19th International Conference, TACAS 2013, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2013, Rome, Italy, March 16-24, 2013. Proceedings (Lecture Notes in Computer Science), Nir Piterman and Scott A. Smolka (Eds.), Vol. 7795. Springer, 478–492. Google Scholar
Digital Library
- Gilles Barthe, Thomas Espitau, Benjamin Grégoire, Justin Hsu, Léo Stefanesco, and Pierre-Yves Strub. 2015. Relational Reasoning via Probabilistic Coupling. In Logic for Programming, Artificial Intelligence, and Reasoning - 20th International Conference, LPAR-20 2015, Suva, Fiji, November 24-28, 2015, Proceedings (Lecture Notes in Computer Science), Martin Davis, Ansgar Fehnker, Annabelle McIver, and Andrei Voronkov (Eds.), Vol. 9450. Springer, 387–401. Google Scholar
Digital Library
- Gilles Barthe, Thomas Espitau, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2017. Proving uniformity and independence by self-composition and coupling. In LPAR-21, 21st International Conference on Logic for Programming, Artificial Intelligence and Reasoning, Maun, Botswana, 7-12th May 2017 (EPiC Series), Thomas Eiter and David Sands (Eds.), Vol. 46. EasyChair, 385–403. http://www.easychair.org/publications/paper/340344Google Scholar
- Gilles Barthe, Thomas Espitau, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2018. Proving expected sensitivity of probabilistic programs. PACMPL 2, POPL (2018), 57:1–57:29. Google Scholar
Digital Library
- Gilles Barthe, Marco Gaboardi, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2016. Proving Differential Privacy via Probabilistic Couplings. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’16, New York, NY, USA, July 5-8, 2016, Martin Grohe, Eric Koskinen, and Natarajan Shankar (Eds.). ACM, 749–758. Google Scholar
Digital Library
- Gilles Barthe, Benjamin Grégoire, and Santiago Zanella Béguelin. 2009. Formal certification of code-based cryptographic proofs. In Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2009, Savannah, GA, USA, January 21-23, 2009, Zhong Shao and Benjamin C. Pierce (Eds.). ACM, 90–101. Google Scholar
Digital Library
- Gilles Barthe, Justin Hsu, Mingsheng Ying, Nengkun Yu, and Li Zhou. 2019. Relational Proofs for Quantum Programs (Extended Version). CoRR abs/1901.05184 (2019). arXiv: 1901.05184 http://arxiv.org/abs/1901.05184Google Scholar
- Gilles Barthe, Boris Köpf, Federico Olmedo, and Santiago Zanella Béguelin. 2012. Probabilistic relational reasoning for differential privacy. In Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2012, Philadelphia, Pennsylvania, USA, January 22-28, 2012, John Field and Michael Hicks (Eds.). ACM, 97–110. Google Scholar
Digital Library
- Gilles Barthe, Boris Köpf, Federico Olmedo, and Santiago Zanella-Béguelin. 2013. Probabilistic Relational Reasoning for Differential Privacy. ACM Trans. Program. Lang. Syst. 35, 3, Article 9 (nov 2013), 49 pages. Google Scholar
Digital Library
- Charles H. Bennett, Gilles Brassard, Claude Crépeau, Richard Jozsa, Asher Peres, and William K. Wootters. 1993. Teleporting an unknown quantum state via dual classical and Einstein-Podolsky-Rosen channels. Phys. Rev. Lett. 70 (Mar 1993), 1895–1899. Issue 13. Google Scholar
Cross Ref
- P. Oscar Boykin and Vwani Roychowdhury. 2003. Optimal encryption of quantum bits. Phys. Rev. A 67 (Apr 2003), 042317. Issue 4. Google Scholar
Cross Ref
- Rohit Chadha, Paulo Mateus, and Amílcar Sernadas. 2006. Reasoning About Imperative Quantum Programs. Electr. Notes Theor. Comput. Sci. 158 (2006), 19–39. Google Scholar
Digital Library
- Howard Dale, David Jennings, and Terry Rudolph. 2015. Provable quantum advantage in randomness processing. Nature communications 6 (2015), 8203.Google Scholar
- Ellie D’Hondt and Prakash Panangaden. 2006. Quantum weakest preconditions. Mathematical Structures in Computer Science 16, 3 (2006), 429–451. Google Scholar
Digital Library
- Yuan Feng, Runyao Duan, Zheng-Feng Ji, and Mingsheng Ying. 2007. Proof rules for the correctness of quantum programs. Theor. Comput. Sci. 386, 1-2 (2007), 151–166. Google Scholar
Digital Library
- Yuan Feng and Mingsheng Ying. 2015. Toward Automatic Verification of Quantum Cryptographic Protocols. In 26th International Conference on Concurrency Theory, CONCUR 2015, Madrid, Spain, September 1.4, 2015 (LIPIcs), Luca Aceto and David de Frutos-Escrig (Eds.), Vol. 42. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 441–455. Google Scholar
Cross Ref
- Justin Hsu. 2017. Probabilistic Couplings for Probabilistic Reasoning. CoRR abs/1710.09951 (2017). arXiv: 1710.09951 http://arxiv.org/abs/1710.09951Google Scholar
- Shih-Han Hung, Kesha Hietala, Shaopeng Zhu, Mingsheng Ying, Michael Hicks, and Xiaodi Wu. 2018. Quantitative Robustness Analysis of Quantum Programs (Extended Version). CoRR abs/1811.03585 (2018). arXiv: 1811.03585 http: //arxiv.org/abs/1811.03585 To appear at POPL’19.Google Scholar
- Yoshihiko Kakutani. 2009. A Logic for Formal Verification of Quantum Programs. In Advances in Computer Science -ASIAN 2009. Information Security and Privacy, 13th Asian Computing Science Conference, Seoul, Korea, December 14-16, 2009. Proceedings (Lecture Notes in Computer Science), Anupam Datta (Ed.), Vol. 5913. Springer, 79–93. Google Scholar
Digital Library
- MS Keane and George L O’Brien. 1994. A Bernoulli factory. ACM Transactions on Modeling and Computer Simulation (TOMACS) 4, 2 (1994), 213–219.Google Scholar
Digital Library
- Julia Kempe. 2003. Quantum random walks: an introductory overview. Contemporary Physics 44, 4 (2003), 307–327.Google Scholar
Cross Ref
- Takahiro Kubota, Yoshihiko Kakutani, Go Kato, Yasuhito Kawano, and Hideki Sakurada. 2013. Automated Verification of Equivalence on Quantum Cryptographic Protocols. In 5th International Symposium on Symbolic Computation in Software Science, SCSS 2013, Castle of Hagenberg, Austria (EPiC Series in Computing), Laura Kovács and Temur Kutsia (Eds.), Vol. 15. EasyChair, 64–69. http://www.easychair.org/publications/paper/143661Google Scholar
- Burkhard Kümmerer and Kay Schwieger. 2016. Diagonal couplings of quantum Markov chains. Infinite Dimensional Analysis, Quantum Probability and Related Topics 19, 2 (2016), 1650012.Google Scholar
Cross Ref
- Yangjia Li and Dominique Unruh. 2019. Quantum Relational Hoare Logic with Expectations. CoRR abs/1903.08357 (2019). arXiv: 1903.08357 http://arxiv.org/abs/1903.08357Google Scholar
- Torgny Lindvall. 2002. Lectures on the coupling method. Courier Corporation.Google Scholar
- Michele Mosca, Alain Tapp, and Ronald de Wolf. 2000. Private quantum channels and the cost of randomizing quantum information. arXiv preprint quant-ph/0003101 (2000). https://arxiv.org/abs/quant- ph/0003101Google Scholar
- Michael A Nielsen and Isaac Chuang. 2002. Quantum computation and quantum information. Cambridge University Press.Google Scholar
Digital Library
- Peter Selinger. 2004a. A Brief Survey of Quantum Programming Languages. In Functional and Logic Programming, 7th International Symposium, FLOPS 2004, Nara, Japan, April 7-9, 2004, Proceedings (Lecture Notes in Computer Science), Yukiyoshi Kameyama and Peter J. Stuckey (Eds.), Vol. 2998. Springer, 1–6. Google Scholar
Cross Ref
- Peter Selinger. 2004b. Towards a quantum programming language. Mathematical Structures in Computer Science 14, 4 (2004), 527–586. Google Scholar
Digital Library
- Volker Strassen. 1965. The existence of probability measures with given marginals. The Annals of Mathematical Statistics (1965), 423–439. http://projecteuclid.org/euclid.aoms/1177700153Google Scholar
- Hermann Thorisson. 2000. Coupling, Stationarity, and Regeneration. springer.Google Scholar
- Dominique Unruh. 2019a. Quantum Hoare Logic with Ghost Variables. In 2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS). 1–13. Google Scholar
Cross Ref
- Dominique Unruh. 2019b. Quantum Relational Hoare Logic. Proc. ACM Program. Lang. 3, POPL, Article 33 (Jan. 2019), 31 pages. Google Scholar
Digital Library
- Salvador Elías Venegas-Andraca. 2012. Quantum walks: a comprehensive review. Quantum Information Processing 11, 5 (2012), 1015–1106.Google Scholar
Digital Library
- Cédric Villani. 2008. Optimal transport: Old and new. springer.Google Scholar
- Andreas Winter. 2016. Tight uniform continuity bounds for quantum entropies: conditional entropy, relative entropy distance and energy constraints. Communications in Mathematical Physics 347, 1 (2016), 291–313.Google Scholar
Cross Ref
- Mingsheng Ying. 2011. Floyd-Hoare logic for quantum programs. ACM Trans. Program. Lang. Syst. 33, 6 (2011), 19:1–19:49. Google Scholar
Digital Library
- Mingsheng Ying. 2016. Foundations of Quantum Programming. Morgan-Kaufmann.Google Scholar
- Mingsheng Ying, Nengkun Yu, Yuan Feng, and Runyao Duan. 2013. Verification of quantum programs. Sci. Comput. Program. 78, 9 (2013), 1679–1700. Google Scholar
Cross Ref
- Li Zhou, Shenggang Ying, Nengkun Yu, and Mingsheng Ying. 2019a. Strassen’s theorem for quantum couplings. Theoretical Computer Science (2019). Google Scholar
Cross Ref
- Li Zhou, Nengkun Yu, and Mingsheng Ying. 2019b. An Applied Quantum Hoare Logic. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2019). ACM, New York, NY, USA, 1149–1162. Google Scholar
Digital Library
Index Terms
Relational proofs for quantum programs
Recommendations
Ket Quantum Programming
Quantum programming languages (QPL) fill the gap between quantum mechanics and classical programming constructions, simplifying the development of quantum applications. However, most QPL addresses the inherent quantum programming problem, neglecting ...
Twist: sound reasoning for purity and entanglement in Quantum programs
Quantum programming languages enable developers to implement algorithms for quantum computers that promise computational breakthroughs in classically intractable tasks. Programming quantum computers requires awareness of entanglement, the phenomenon in ...
Quantum Programming With Mixed States
In this paper we offer a programming approach to quantum computation using mixed states. Mixed-state quantum systems generalise standard (pure) quantum systems by allowing the state of the system to be a probabilistic distribution of pure states. We ...






Comments