Property-based Testing of Quantum Programs in Q#

Property-based testing is a structured method for automated testing using program specifications. We report on the design and implementation of what is to our knowledge the first property-based framework for quantum programs. We review various aspects of our design concerning property-specification, test-case generation, and test result analysis. We also provide an overview of the implementation and its way of working. Finally, we present the result of applying our framework to some examples.

[1]  Ulf Norell,et al.  Mysteries of DropBox: Property-Based Testing of a Distributed Synchronization Service , 2016, 2016 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[2]  Margaret Martonosi,et al.  Statistical Assertions for Validating Patterns and Finding Bugs in Quantum Programs , 2019, 2019 ACM/IEEE 46th Annual International Symposium on Computer Architecture (ISCA).

[3]  John Hughes,et al.  Software Testing with QuickCheck , 2009, CEFP.

[4]  Andriy V. Miranskyy,et al.  On Testing Quantum Programs , 2018, 2019 IEEE/ACM 41st International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER).

[5]  Andrew A. Jawlik Statistics from A to Z: Confusing Concepts Clarified: Confusing Concepts Clarified , 2016 .

[6]  Buzek,et al.  Quantum copying: Beyond the no-cloning theorem. , 1996, Physical review. A, Atomic, molecular, and optical physics.

[7]  Li Zhou,et al.  An applied quantum Hoare logic , 2019, PLDI.

[8]  Rajagopal Nagarajan,et al.  Specification and Verification of Quantum Protocols , 2010 .

[9]  Corrinne Pellillo Brase,et al.  Understandable Statistics: Concepts and Methods , 1978 .

[10]  John P. Hayes,et al.  Checking equivalence of quantum circuits and states , 2007, 2007 IEEE/ACM International Conference on Computer-Aided Design.

[11]  Marc Hughes Testing and Debugging , 2008 .

[12]  Claes Wohlin,et al.  Experimentation in Software Engineering , 2000, The Kluwer International Series in Software Engineering.

[13]  Mingsheng Ying,et al.  Termination of nondeterministic quantum programs , 2013, Acta Informatica.

[14]  Prakash Panangaden,et al.  Quantum weakest preconditions , 2005, Mathematical Structures in Computer Science.

[15]  Bao-Zhi Sun,et al.  On Local Unitary Equivalence of Two and Three-qubit States , 2017, Scientific Reports.

[16]  George Casella,et al.  Statistical Inference Second Edition , 2007 .

[17]  Mingsheng Ying,et al.  Floyd--hoare logic for quantum programs , 2011, TOPL.

[18]  Rajagopal Nagarajan,et al.  Formalization of Quantum Protocols using Coq , 2015, QPL.

[19]  Ulf Norell,et al.  Testing AUTOSAR software with QuickCheck , 2015, 2015 IEEE Eighth International Conference on Software Testing, Verification and Validation Workshops (ICSTW).

[20]  Martin Guha Statistics from A to Z: Confusing Concepts Clarified , 2017 .

[21]  Rajagopal Nagarajan,et al.  Equivalence Checking of Quantum Protocols , 2013, TACAS.

[22]  Martin Rötteler,et al.  Q#: Enabling Scalable Quantum Computing and Development with a High-level DSL , 2018, RWDSL2018.

[23]  Bohua Zhan,et al.  Formal Verification of Quantum Algorithms Using Quantum Hoare Logic , 2019, CAV.

[24]  Rajagopal Nagarajan,et al.  QMC: A Model Checker for Quantum Systems , 2007, CAV.

[25]  B. Kraus,et al.  Local unitary equivalence of multipartite pure states. , 2009, Physical review letters.

[26]  Martin Rötteler,et al.  Q#: Enabling scalable quantum computing and development with a high-level domain-specific language , 2018, ArXiv.

[27]  Yuan Feng,et al.  Model Checking Quantum Systems - A Survey , 2018, ArXiv.

[28]  Rajagopal Nagarajan,et al.  Automated Equivalence Checking of Concurrent Quantum Systems , 2018, ACM Trans. Comput. Log..