ABSTRACT
Existing quantum languages force the programmer to work at a low level of abstraction leading to unintuitive and cluttered code. A fundamental reason is that dropping temporary values from the program state requires explicitly applying quantum operations that safely uncompute these values.
We present Silq, the first quantum language that addresses this challenge by supporting safe, automatic uncomputation. This enables an intuitive semantics that implicitly drops temporary values, as in classical computation. To ensure physicality of Silq's semantics, its type system leverages novel annotations to reject unphysical programs.
Our experimental evaluation demonstrates that Silq programs are not only easier to read and write, but also significantly shorter than equivalent programs in other quantum languages (on average -46% for Q#, -38% for Quipper), while using only half the number of quantum primitives.
Get full access to this Publication
Purchase, subscribe or recommend this publication to your librarian.
Already a Subscriber?Sign In
References
- Matthew Amy, Martin Roetteler, and Krysta M. Svore. 2017. Verified Compilation of Space-Efficient Reversible Circuits. In CAV’17. Vol. 10427. Cham, 3–21. Google Scholar
- Charles H Bennett. 1973. Logical Reversibility of Computation. IBM Journal of Research and Development 17, 6 (Nov. 1973), 525–532. Google Scholar
- Andrew M. Childs and Robin Kothari. 2011. Quantum query complexity of minor-closed graph properties. In STACS’11 (Dagstuhl, Germany, 2011) (Leibniz International Proceedings in Informatics (LIPIcs)), Vol. 9. 661–672. Google Scholar
- Vedran Dunjko, Jacob M. Taylor, and Hans J. Briegel. 2016. Quantum-Enhanced Machine Learning. Physical Review Letters 117, 13 (Sept. 2016).Google Scholar
- Timon Gehr, Sasa Misailovic, and Martin Vechev. 2016. Psi: Exact symbolic inference for probabilistic programs. In CAV’16. 62–83.Google Scholar
- Alexander S. Green, Peter LeFanu Lumsdaine, Neil J. Ross, Peter Selinger, and Benoît Valiron. 2013. Quipper: a scalable quantum programming language. In PLDI’13. ACM Press, Seattle, Washington, USA. Google Scholar
- Lov K Grover. 1996. A fast quantum mechanical algorithm for database search. In Proceedings of the twenty-eighth annual ACM symposium on Theory of computing. ACM, 212–219.Google Scholar
- Aram W. Harrow, Avinatan Hassidim, and Seth Lloyd. 2009. Quantum Algorithm for Linear Systems of Equations. Phys. Rev. Lett. 103 (Oct 2009), 150502. Issue 15. 150502 Google Scholar
- Steve Klabnik and Carol Nichols. 2018. The Rust programming language. No Starch Press, San Francisco.Google Scholar
- Emmanuel Knill. 1996. Conventions for quantum pseudocode. Technical Report. Citeseer.Google Scholar
- Seth Lloyd, Masoud Mohseni, and Patrick Rebentrost. 2014. Quantum principal component analysis. Nature Physics 10, 9 (July 2014), 631–633. Google Scholar
- Guang Hao Low, Theodore J. Yoder, and Isaac L. Chuang. 2014. Quantum inference on Bayesian networks. Phys. Rev. A 89, 6 (June 2014), 062315.Google Scholar
- F. Magniez, M. Santha, and M. Szegedy. 2007. Quantum Algorithms for the Triangle Problem. 37, 2 (2007), 413–424. 1137/050643684 Google Scholar
- Microsoft. 2018. Public submissions of the Microsoft Q# Coding Contest - Summer 2018. (2018).Google Scholar
- https://codeforces.com/contest/1002/Google Scholar
- Microsoft. 2019. Public submissions of the Microsoft Q# Coding Contest - Winter 2019. (2019).Google Scholar
- https://codeforces.com/contest/1116/Google Scholar
- Mariia Mykhailova and Martin Roetteler. 2018. Microsoft Q# Coding Contest - Summer 2018 - Main Contest July 6-9, 2018. (2018).Google Scholar
- https: //assets.codeforces.com/rounds/997-998/main-contest-editorial.pdfGoogle Scholar
- Mariia Mykhailova and Martin Roetteler. 2019. Microsoft Q# Coding Contest - Winter 2019 - Main Contest March 1-4, 2019. (2019).Google Scholar
- https: //assets.codeforces.com/rounds/1116/contest-editorial.pdfGoogle Scholar
- Peter Müller and Arnd Poetzsch-Heffter. 1999. Universes: a type system for controlling representation exposure.Google Scholar
- Daniel Nagaj, Or Sattath, Aharon Brodutch, and Dominique Unruh. 2016. An Adaptive Attack on Wiesner’s Quantum Money. Quantum Info. Comput. 16, 11-12 (Sept. 2016), 1048–1070. http://dl.acm.org/ citation.cfm?id=3179330.3179337Google Scholar
- Michael A. Nielsen and Isaac L. Chuang. 2010. Quantum computation and quantum information (10th anniversary ed ed.). Cambridge University Press, Cambridge ; New York.Google Scholar
- Jennifer Paykin, Robert Rand, and Steve Zdancewic. 2017. QWIRE: a core language for quantum circuits. In POPL’17. ACM Press, Paris, France. Google Scholar
- Robert Rand, Jennifer Paykin, Dong-Ho Lee, and Steve Zdancewic. 2019. ReQWIRE: Reasoning about Reversible Quantum Circuits. Electronic Proceedings in Theoretical Computer Science 287 (Jan. 2019), 299– 312. arXiv: 1901.10118.Google Scholar
- Patrick Rebentrost, M Mohseni, and Seth Lloyd. 2013. Quantum Support Vector Machine for Big Data Classification. Physical Review Letters 113 (2013).Google Scholar
- Steven Roman. 2008. Advanced Linear Algebra. New York, NY. http: //site.ebrary.com/id/10230315 OCLC: 730328666.Google Scholar
- Neil J. Ross and Peter LeFanu Lumsdaine. 2015. Algorithms.TF.Main. https://www.mathstat.dal.ca/~selinger/quipper/doc/Algorithms-TFMain.html.Google Scholar
- Peter Selinger. 2004. Towards a Quantum Programming Language. Mathematical. Structures in Comp. Sci. 14, 4 (Aug. 2004), 527–586. Google Scholar
- Peter Selinger and Benoit Valiron. 2006. A lambda calculus for quantum computation with classical control. Mathematical Structures in Computer Science 16, 03 (June 2006), 527. S0960129506005238 Google Scholar
- Damian S. Steiger, Thomas Häner, and Matthias Troyer. 2018. ProjectQ: an open source software framework for quantum computing. Quantum 2 (Jan. 2018), 49. Google Scholar
- Krysta Svore, Martin Roetteler, Alan Geller, Matthias Troyer, John Azariah, Christopher Granade, Bettina Heim, Vadym Kliuchnikov, Mariia Mykhailova, and Andres Paz. 2018. Q#: Enabling Scalable Quantum Computing and Development with a High-level DSL. In Proceedings of the Real World Domain Specific Languages Workshop 2018 on - RWDSL2018. ACM Press, Vienna, Austria. 1145/3183895.3183901 Google Scholar
- Google AI Quantum Team. 2017. Cirq. (2017). https://github.com/ quantumlib/CirqGoogle Scholar
- Dave Wecker and Krysta M Svore. 2014. LIQUi|>: A software design architecture and domain-specific language for quantum computing. arXiv preprint arXiv:1402.4467 (2014).Google Scholar
- Nathan Wiebe, Daniel Braun, and Seth Lloyd. 2012. Quantum Algorithm for Data Fitting. Physical Review Letters 109, 5 (Aug. 2012).Google Scholar
- Stephen Wiesner. 1983. Conjugate Coding. SIGACT News 15, 1 (Jan. 1983), 78–88. Google Scholar
Index Terms
Silq: a high-level quantum language with safe uncomputation and intuitive semantics





Comments