skip to main content
research-article
Open Access

Algorithmic analysis of termination problems for quantum programs

Authors Info & Claims
Published:27 December 2017Publication History
Skip Abstract Section

Abstract

We introduce the notion of linear ranking super-martingale (LRSM) for quantum programs (with nondeterministic choices, namely angelic and demonic choices). Several termination theorems are established showing that the existence of the LRSMs of a quantum program implies its termination. Thus, the termination problems of quantum programs is reduced to realisability and synthesis of LRSMs. We further show that the realisability and synthesis problem of LRSMs for quantum programs can be reduced to an SDP (Semi-Definite Programming) problem, which can be settled with the existing SDP solvers. The techniques developed in this paper are used to analyse the termination of several example quantum programs, including quantum random walks and quantum Bernoulli factory for random number generation. This work is essentially a generalisation of constraint-based approach to the corresponding problems for probabilistic programs developed in the recent literature by adding two novel ideas: (1) employing the fundamental Gleason's theorem in quantum mechanics to guide the choices of templates; and (2) a generalised Farkas' lemma in terms of observables (Hermitian operators) in quantum physics.

Skip Supplemental Material Section

Supplemental Material

algorithmicanalysis.webm

References

  1. D. Aharonov, A. Ambainis, J. Kempe and U. Vazirani, Quantum walks on graphs, In: Proceedings of the 33rd ACM Symposium on Theory of Computing (STOC), 2001, 50-59. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. T. Altenkirch and J. Grattage, A functional quantum programming language, In: Proceedings of the 20th IEEE Symposium on Logic in Computer Science (LICS), 2005, 249-258. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Baltag and S. Smets, LQP: The dynamic logic of quantum information, Mathematical Structures in Computer Science 16(2006)491-525. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Barry, D. T. Barry and S. Aaronson, Quantum partially observable Markov decision processes, Physical Review A, 90(2014) art. no. 032311. Google ScholarGoogle ScholarCross RefCross Ref
  5. O. Bournez and F. Garnier, Proving positive almost-sure termination, In: Proceedingds of the 16th International Conference on Rewriting Techniques and Applications (RTA), 2005, Springer LNCS 3467, 323-337. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. R. Bradley, Z. Manna and H. B. Sipma, Linear ranking with reachability, In: Proceedings of the 17th International Conference on Computer Aided Verification (CAV), 2005, Springer LNCS 3576, 491-504. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. O. Brunet and P. Jorrand, Dynamic quantum logic for quantum programs, International Journal of Quantum Information, 2(2004)45-54. Google ScholarGoogle ScholarCross RefCross Ref
  8. R. Chadha, P. Mateus and A. Sernadas, Reasoning about imperative quantum programs, Electronic Notes in Theoretical Computer Science, 158(2006)19-39. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Chakarov and S. Sankaranarayanan, Probabilistic program analysis with martingales, In: Proceedings of the 25th International Conference on Computer Aided Verification (CAV), 2013, Springer LNCS 8044, 511-526. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. K. Chatterjee, H. F. Fu, P. Novotný and R. Hasheminezhad, Algorithmic analysis of qualitative and quantitative termination problems for affine probabilistic programs, In: Proceedings of the 43rd Annual ACM Symposium on Principles of Programming Languages (POPL), 2016, 327-342. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. A. Colón and H. B. Sipma, Synthesis of linear ranking functions, In: Proceedings of the 7th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2001, 67-81. Google ScholarGoogle ScholarCross RefCross Ref
  12. M. A. Colón, S. Sankaranarayanan and H. B. Sipma, Linear invariant generation using non-linear constraint solving, In: Proceedings of the 15th International Conference on Computer Aided Verification (CAV), 2003, Springer LNCS, 420-433. Google ScholarGoogle ScholarCross RefCross Ref
  13. H. Dale, D. Jennings and T. Rudolph, Provable quantum advantage in randomness processing, Nature Communications 6(2015), art. no. 8203. Google ScholarGoogle ScholarCross RefCross Ref
  14. H. Derksen and J. Weyman, Quiver representations, Notices of the American Mathematical Society 52 (2005) 200-206.Google ScholarGoogle Scholar
  15. A. Dvurečenskij, Gleason’s Theorem and Its Applications, Kluwer, 1993. Google ScholarGoogle ScholarCross RefCross Ref
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarCross RefCross Ref
  18. L. M. F. Fioriti and H. Hermanns, Probabilistic termination: soundness, completeness, and compositionality. In: Proceedings of the 42nd Annual ACM Symposium on Principles of Programming Languages (POPL), 2015, 489-501. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. W. Floyd, Assigning meanings to programs, In: Proceedings of the Symposium on Mathematical Aspects of Computer Science, 1967, 19-33. Google ScholarGoogle ScholarCross RefCross Ref
  20. F. G. Foster, On the stochastic matrices associated with certain queuing processes, The Annals of Mathematical Statistics 24(1953)355-360. Google ScholarGoogle ScholarCross RefCross Ref
  21. S. Gay, Quantum programming languages: survey and bibliography, Mathematical Structures in Computer Science 16(2006)581-600. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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), Springer LNCS 5123, 2008, 543-547. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. M. Gleason, Measures on the closed subspaces of a Hilbert space, Journal of Mathematics and Mechanics 6(1957)885-893. Google ScholarGoogle ScholarCross RefCross Ref
  24. A. S. Green, P. L. Lumsdaine, N. J. Ross, P. Selinger and B. Valiron, Quipper: A scalable quantum programming language, In: Proceedings of the 34th ACM Conference on Programming Language Design and Implementation (PLDI), 2013, 333-342. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Gudder, Quantum Markov chains, Journal of Mathematical Physics 49(2008) art. no. 072105. Google ScholarGoogle ScholarCross RefCross Ref
  26. A. JavadiAbhari, 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 ScholarGoogle Scholar
  27. A. JavadiAbhari, S. Patil, D. Kudrow, J. Heckey, A. Lvov, F. T. Chong and M. Martonosi, ScaffCC: Scalable compilation and analysis of quantum programs, Parallel Computing, 45(2015)2-17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Y. Kakutani, A logic for formal verification of quantum programs, In: Proceedings of the 13th Asian Computing Science Conference (ASIAN 2009), Springer LNCS 5913, 79-93. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. B. L. Kaminski, J. Katoen, C. Matheja and F. Olmedo, Weakest precondition reasoning for expected run-times of probabilistic programs, In: Proceedings of the 25th European Symposium on Programming Languages and Systems (ESOP 2016), Springer LNCS 9632, 364-389. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. B. L. Kaminski and J. Katoen, A weakest pre-expectation semantics for mixed-sign expectations, In: Proceedings of the 32nd ACM/IEEE Symposium on Logic in Computer Science (LICS 2017), 1-12. Google ScholarGoogle ScholarCross RefCross Ref
  31. M. S. Keane and G. L. O’Brien, A Bernoulli factory, ACM Transactions on Modelling and Computer Simulation 4(1994) 213-219. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Y. J. Li, N. K. Yu and M. S. Ying, Termination of nondeterministic quantum programs, Acta Informatica 51(2015)1-24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. T. Liu, Y. J. Li, 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 ScholarGoogle Scholar
  34. G. Mitchison and R. Jozsa, Counterfactual computation, Proceedings of the Royal Society of London A 457(2001)1175-1193. Google ScholarGoogle ScholarCross RefCross Ref
  35. F. Olmedo, B. L. Kaminski, J. Katoen and C. Matheja, Reasoning about recursive probabilistic programs, In: Proceedings of the 31st ACM/IEEE Symposium on Logic in Computer Science (LICS 2016), 672-681. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. B. Ömer, Structured Quantum Programming, Ph.D thesis, Technical University of Vienna, 2003.Google ScholarGoogle Scholar
  37. J. Paykin, R. Rand and S. Zdancewic, QWIRE: a core language for quantum circuits, In: Proceedings of 44th ACM Symposium on Principles of Programming Languages (POPL), 2017, 846-858. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. A. Podelski and A. Rybalchenko, A complete method for the synthesis of linear ranking functions, In: Proceedings of the 5th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI), 2004, 239-251. Google ScholarGoogle ScholarCross RefCross Ref
  39. A. Rybalchenko, Constraint solving for program verification: theory and practice by example, In:Proceedings of the 22nd International Conference on Computer Aided Verification (CAV), 2010, 57-71. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. A Sabry, Modelling quantum computing in Haskell, Proceedings of the 2003 ACM SIGPLAN workshop on Haskell, 39-49.Google ScholarGoogle Scholar
  41. J. W. Sanders and P. Zuliani, Quantum programming, In: Proceedings of 5th International Conference on Mathematics of Program Construction (MPC), Springer LNCS 1837, Springer 2000, 88-99.Google ScholarGoogle ScholarCross RefCross Ref
  42. P. Seinger, A brief survey of quantum programming languages, In: Proc. of 7th International Symposium on Functional and Logic Programming, Springer LNCS 2998, 2004, 1-6.Google ScholarGoogle Scholar
  43. P. Selinger, Towards a quantum programming language, Mathematical Structures in Computer Science 14 (2004), 527-586. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. 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 ScholarGoogle Scholar
  45. M. S. Ying, Floyd-hoare logic for quantum programs, ACM Transactions on Programming Languages and Systems 33(2011), 1-49. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. M. S. Ying, Foundations of Quantum Programming, Morgan-Kaufmann, 2016.Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. M. S. Ying and Y. Feng, Quantum loop programs, Acta Informatica 47 (2010), 221-250. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  49. M. S. Ying, S. G. Ying and X. D. Wu, Invariants of quantum programs: characterisations and generation, In: Proceedings of the 44th ACM Symposium on Principles of Programming Languages (POPL), 2017, 818-832. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. 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 ScholarGoogle ScholarCross RefCross Ref
  51. S. G. Ying, Y. Feng, N. K. Yu and M. S. Ying, Reachability probabilities of quantum Markov chains, In: Proceedings of the 24th International Conference on Concurrency Theory (CONCUR), 2013, 334-348. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. S. G. Ying and M. S. Ying, Reachability analysis of quantum Markov decision processes, arXiv:1406.6146Google ScholarGoogle Scholar
  53. N. K. Yu and M. S. Ying, Reachability and termination analysis of concurrent quantum programs, In: Proceedings of the 23th International Conference on Concurrency Theory (CONCUR), 2012, 69-83. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. P. Zuliani, Nondeterministic quantum programming, In: Proceedings of the 2nd International Workshop on Quantum Programming Languages (QPL), 2004, 179-195.Google ScholarGoogle Scholar

Index Terms

  1. Algorithmic analysis of termination problems for quantum programs

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!