Abstract
Program invariant is a fundamental notion widely used in program verification and analysis. The aim of this paper is twofold: (i) find an appropriate definition of invariants for quantum programs; and (ii) develop an effective technique of invariant generation for verification and analysis of quantum programs.
Interestingly, the notion of invariant can be defined for quantum programs in two different ways -- additive invariants and multiplicative invariants -- corresponding to two interpretations of implication in a continuous valued logic: the Lukasiewicz implication and the Godel implication. It is shown that both of them can be used to establish partial correctness of quantum programs.
The problem of generating additive invariants of quantum programs is addressed by reducing it to an SDP (Semidefinite Programming) problem. This approach is applied with an SDP solver to generate invariants of two important quantum algorithms -- quantum walk and quantum Metropolis sampling. Our examples show that the generated invariants can be used to verify correctness of these algorithms and are helpful in optimising quantum Metropolis sampling.
To our knowledge, this paper is the first attempt to define the notion of invariant and to develop a method of invariant generation for quantum programs.
- D. Aharonov, A. Ambainis, J. Kempe and U. Vazirani, Quantum walks on graphs, In: Proc. of the 33rd ACM Symposium on Theory of Computing (STOC), 2001, pp. 50-59. Google Scholar
Digital Library
- A. J. Abhari, A. Faruque, M. Dousti, L. Svec, O. Catu, A. Chakrabati, C.-F. Chiang, S. Vanderwilt, J. Black, F. Chong, M. Martonosi, M. Suchara, K. Brown, M. Pedram and T. Brun, Scaffold: Quantum Programming Language, Technical Report TR-934-12, Dept. of Computer Science, Princeton University, 2012.Google Scholar
- A. Baltag and S. Smets, LQP: The dynamic logic of quantum information, Mathematical Structures in Computer Science, 16(2006)491- 525. Google Scholar
Digital Library
- O. Brunet and P. Jorrand, Dynamic quantum logic for quantum programs, International Journal of Quantum Information, 2(2004)45-54.Google Scholar
Cross Ref
- R. Chadha, P. Mateus and A. Sernadas, Reasoning about imperative quantum programs, Electronic Notes in Theoretical Computer Science, 158(2006)19-39. Google Scholar
Digital Library
- A. Chakarov and S. Sankaranarayanan, Probabilistic program analysis with martingales, In: Proc. of the 25th International Conference Computer Aided Verification (CAV), 2013, Springer LNCS 8044, pp. 511-526.Google Scholar
Cross Ref
- K. Chatterjee, H. F. Fu, P. Novotn´y and R. Hasheminezhad, Algorithmic analysis of qualitative and quantitative termination problems for affine probabilistic programs, In: Proceedings of the 43rd ACM Symposium on Principles of Programming Languages (POPL), 2016, pp. 327-342 Google Scholar
Digital Library
- M. A. Col´on, S. Sankaranarayanan and H. B. Sipma, Linear invariant generation using non-linear constraint solving, In: Proc. of the 15th International Conference on Computer Aided Verification (CAV), 2003, Springer LNCS, pp. 420-433.Google Scholar
Cross Ref
- M. Col´on and H. Sipma, Synthesis of linear ranking functions, In: Proc. of the 7th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2001, Springer LNCS 2031, pp. 67-81. Google Scholar
Digital Library
- P. Cousot and R. Cousot, Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints, In: Proceedings of the 4th ACM Symposium on Principles of Programming Languages (POPL), 1977, pp. 238-252. Google Scholar
Digital Library
- P. Cousot and N. Halbwachs, Automatic discovery of linear restraints among variables of a program, In: Proceedings of the 5th ACM Symposium on Principles of Programming Languages (POPL), 1978, pp. 84-96. Google Scholar
Digital Library
- H. Derksen and J. Weyman, Quiver representations, Notices of the American Mathematical Society, 52(2005)200-206.Google Scholar
- E. D’Hondt and P. Panangaden, Quantum weakest preconditions, Mathematical Structures in Computer Science, 16(2006)429-451. Google Scholar
Digital Library
- Y. Feng, R. Y. Duan, Z. F. Ji and M. S. Ying, Proof rules for the correctness of quantum programs, Theoretical Computer Science, 386(2007)151-166. Google Scholar
Digital Library
- Y. Feng, N. K. Yu and M. S. Ying, Model checking quantum Markov chains, Journal of Computer and System Sciences, 79(2013)1181- 1198.Google Scholar
- L. M. F. Fioriti and H. Hermanns, Probabilistic termination: Soundness, completeness, and compositionality, In: Proceedings of the 42nd ACM Symposium on Principles of Programming Languages (POPL), 2015, pp. 489-501. Google Scholar
Digital Library
- R. W. Floyd, Assigning meanings to programs, In: Proceedings of the Symposium on Mathematical Aspects of Computer Science, 1967, 19- 33.Google Scholar
Cross Ref
- S. Gay, Quantum programming languages: survey and bibliography, Mathematical Structures in Computer Science, 16(2006)581-600. Google Scholar
Digital Library
- S. Gay, R. Nagarajan, and N. Panaikolaou. QMC: A model checker for quantum systems, In: Proceedings of the 20th International Conference on Computer Aided Verification (CAV), 2008, Springer LNCS 5123, pp. 543-547. Google Scholar
Digital Library
- I.?M. Georgescu, S. Ashhab and F. Nori, Quantum simulation, Reviews of Modern Physics, 86(2014)153-185.Google Scholar
Cross Ref
- S. M. German and B. Wegbreit, A synthesiser of inductive assertions, IEEE Transactions on Software Engineering, 1(1975)68-75. Google Scholar
Digital Library
- M. Grant and S. Boyd. CVX: Matlab software for disciplined convex programming, version 2.0 beta. http://cvxr.com/cvx, September 2013.Google Scholar
- A. S. Green, P. L. Lumsdaine, N. J. Ross, P. Selinger and B. Valiron, Quipper: A scalable quantum programming language, Proceedings of the 34th ACM Conference on Programming Language Design and Implementation (PLDI), 2013, pp. 333-342. Google Scholar
Digital Library
- F. Gretz, J. -P. Katoen and A. McIver, Prinsys - On a quest for probabilistic loop invariants, in: Proc. 10th International Conference on Quantitative Evaluation of Systems (QEST), 2013, Springer LNCS 8054, pp.193-208. Google Scholar
Digital Library
- S. Gudder, Quantum Markov chains, Journal of Mathematical Physics, 49(2008) art. no. 072105.Google Scholar
- S. Gulwani, S. Srivastava and R. Venkatesan, Program analysis as constraint solving, In: Proceedings of 29th ACM Conference on Programming Language Design and Implementation (PLDI), 2008, pp. 281- 292. Google Scholar
Digital Library
- A. Gupta and A. Rybalchenko, InvGen: an efficient invariant generator, Proceedings of the 21st International Conference on Computer Aided Verification (CAV), 2009, pp. 634-640. Google Scholar
Digital Library
- G. Gutoski and X. Wu, Parallel approximation of min-max problems with applications to classical and quantum zero-sum games, Computational Complexity, 22(2013) 385-428.Google Scholar
- I. Hasuo and N. Hoshino, Semantics of higher-order quantum computation via Geometry of Interaction, In: Proceedings of the 26th IEEE Symposium on Logic in Computer Science (LICS), 2011, 237-246. Google Scholar
Digital Library
- Y. Kakutani, A logic for formal verification of quantum programs, in: Proceedings of the 13th Asian Computing Science Conference (ASIAN), 2009, Springer LNCS 5913, pp. 79-93. Google Scholar
Digital Library
- J. -P. Katoen, A. McIver, L. Meinicke and C. C. Morgan, Linearinvariant generation for probabilistic programs - Automated support for proof-based methods, in: Proc. 17th International Symposium on Static Analysis (SAS), 2010, Springer LNCS 6337, pp. 390-406. Google Scholar
Digital Library
- S. Katz and Z. Manna, Logical analysis of programs, Communications of the ACM, 19(1976)188-206. Google Scholar
Digital Library
- H. J. Keisler, Probability quantifiers, In: J. Barwise and S. Feferman (eds.), Model Theoretic Logics, Springer, 1985, pp. 509-556.Google Scholar
- N. Megiddo, A note on approximate linear programming, Information Processing Letters, 42(1992) 42-53. Google Scholar
Digital Library
- A. McIver and C. C. Morgan, Abstraction, Refinement and Proof of Probabilistic Systems, Springer, Heidelberg, 2004. Google Scholar
Digital Library
- Y. J. Li, T. Liu, S. L. Wang, N. J. Zhan and M. S. Ying, A theorem prover for quantum Hoare logic and its applications, http://arxiv.org/pdf/1601.03835.pdfGoogle Scholar
- B. Ömer, Structured Quantum Programming, Ph.D thesis, Technical University of Vienna, 2003.Google Scholar
- M. Pagani, P. Selinger and B. Valiron, Applying quantitative semantics to higher-order quantum computing, In: Proceedings of 41st ACM Symposium on Principles of Programming Languages (POPL), 2014, pp. 647-658. Google Scholar
Digital Library
- N. Rescher, Many-Valued Logic, McGraw-Hill, 1969.Google Scholar
- J. W. Sanders and P. Zuliani, Quantum programming, In: Proceedings of 5th International Conference on Mathematics of Program Construction (MPC), 2000, Springer LNCS 1837, Springer pp. 88-99. Google Scholar
Digital Library
- S. Sankaranarayanan, H. B. Sipma and Z. Manna, Non-linear loop invariant generation using Gröbner bases, in: Proceedings of the 31st ACM Symposium on Principles of Programming Languages (POPL), 2004, pp. 318-329. Google Scholar
Digital Library
- P. Selinger, A brief survey of quantum programming languages, In: Proc. of 7th International Symposium on Functional and Logic Programming, 2004, Springer LNCS 2998, pp. 1-6.Google Scholar
Cross Ref
- P. Selinger, Towards a quantum programming language, Mathematical Structures in Computer Science 14, (2004) 527-586. Google Scholar
Digital Library
- M. J. Serna, Approximating linear programming is log-space complete for P, Information Processing Letters, 37(1991) 233-236. Google Scholar
Digital Library
- Stanford Invariant Generator, http://theory.stanford.edu/ srirams/Software/sting.html.Google Scholar
- S. Staton, Algebraic effects, linearity, and quantum programming languages, In: Proceedings of 42nd ACM Symposium on Principles of Programming Languages (POPL), 2015, pp. 395-406. Google Scholar
Digital Library
- K. Temme, T. J. Osborne, K. G. Vollbrecht, D. Poulin, and F. Verstraete. Quantum Metropolis sampling. Nature, 471(2011) 87-90.Google Scholar
- D. Wecker and K. M. Svore, LIQUi |⟩: A software design architecture and domain-specific language for quantum computing, http://research.microsoft.com/pubs/209634/1402.4467.pdf.Google Scholar
- M. S. Ying, Floyd-hoare logic for quantum programs, ACM Transactions on Programming Languages and Systems, 33(2011) art no. 19, pp. 1-49. Google Scholar
Digital Library
- M. S. Ying, Foundations of Quantum Programming, Morgan-Kaufmann, 2016. Google Scholar
Digital Library
- M. S. Ying and Y. Feng, Quantum loop programs, Acta Informatica, 47(2010)221-250. Google Scholar
Digital Library
- M. S. Ying, Y. J. Li, N. K. Yu and Y. Feng, Model-checking linear-time properties of quantum systems, ACM Transactions on Computational Logic, 15(2014) art. no. 22. Google Scholar
Digital Library
- M. S. Ying, N. K. Yu, Y. Feng and R. Y. Duan, Verification of quantum programs, Science of Computer Programming, 78(2013)1679-1700.Google Scholar
Cross Ref
Index Terms
Invariants of quantum programs: characterisations and generation
Recommendations
Invariants of quantum programs: characterisations and generation
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesProgram invariant is a fundamental notion widely used in program verification and analysis. The aim of this paper is twofold: (i) find an appropriate definition of invariants for quantum programs; and (ii) develop an effective technique of invariant ...
Toward automatic verification of quantum programs
AbstractThis paper summarises the results obtained by the author and his collaborators in a program logic approach to the verification of quantum programs, including quantum Hoare logic, invariant generation and termination analysis for quantum programs. ...
Property-directed incremental invariant generation
AbstractA fundamental method of analyzing a system such as a program or a circuit is invariance analysis, in which one proves that an assertion holds on all reachable states. Typically, the proof is performed via induction; however, an assertion, while ...







Comments