Qwerty: A Basis-Oriented Quantum Programming Language (2404.12603v1)
Abstract: Quantum computers have evolved from the theoretical realm into a race to large-scale implementations. This is due to the promise of revolutionary speedups, where achieving such speedup requires designing an algorithm that harnesses the structure of a problem using quantum mechanics. Yet many quantum programming languages today require programmers to reason at a low level of quantum gate circuitry. This presents a significant barrier to entry for programmers who have not yet built up an intuition about quantum gate semantics, and it can prove to be tedious even for those who have. In this paper, we present Qwerty, a new quantum programming language that allows programmers to manipulate qubits more expressively than gates, relegating the tedious task of gate selection to the compiler. Due to its novel basis type and easy interoperability with Python, Qwerty is a powerful framework for high-level quantum-classical computation.
- Scott Aaronson. 2022. How Much Structure Is Needed for Huge Quantum Speedups? Technical Report arXiv:2209.06930. arXiv. http://arxiv.org/abs/2209.06930 arXiv:2209.06930 [quant-ph].
- Scaffold: Quantum Programming Language. Technical Report. Princeton University Department of Computer Science. 43 pages.
- Sheldon Axler. 2023. Linear Algebra Done Right (4th ed. 2024 edition ed.). Springer, Cham, Switzerland.
- Charles H. Bennett. 1989. Time/Space Trade-Offs for Reversible Computation. SIAM J. Comput. 18, 4 (Aug. 1989), 766–776. https://doi.org/10.1137/0218053 Publisher: Society for Industrial and Applied Mathematics.
- Ethan Bernstein and Umesh Vazirani. 1993. Quantum complexity theory. In Proceedings of the twenty-fifth annual ACM symposium on Theory of Computing (STOC ’93). Association for Computing Machinery, New York, NY, USA, 11–20. https://doi.org/10.1145/167088.167097
- Silq: a high-level quantum language with safe uncomputation and intuitive semantics. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020). Association for Computing Machinery, New York, NY, USA, 286–300. https://doi.org/10.1145/3385412.3386007
- Tight Bounds on Quantum Searching. Fortschritte der Physik 46, 4-5 (1998), 493–505. https://doi.org/10.1002/(SICI)1521-3978(199806)46:4/5<493::AID-PROP493>3.0.CO;2-P
- Gilles Brassard. 1997. Searching a Quantum Phone Book. Science 275, 5300 (Jan. 1997), 627–628. https://doi.org/10.1126/science.275.5300.627 Publisher: American Association for the Advancement of Science.
- The Quantum Effect: A Recipe for QuantumPi. https://doi.org/10.48550/arXiv.2302.01885 arXiv:2302.01885 [quant-ph].
- Quantum algorithms revisited. Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences 454, 1969 (Jan. 1998), 339–354. https://doi.org/10.1098/rspa.1998.0164 Publisher: Royal Society.
- OpenQASM 3: A Broader and Deeper Quantum Assembly Language. ACM Transactions on Quantum Computing 3, 3 (Sept. 2022), 12:1–12:50. https://doi.org/10.1145/3505636
- David Deutsch and Richard Jozsa. 1997. Rapid solution of problems by quantum computation. Proceedings of the Royal Society of London. Series A: Mathematical and Physical Sciences 439, 1907 (Jan. 1997), 553–558. https://doi.org/10.1098/rspa.1992.0167
- David Deutsch and Roger Penrose. 1997. Quantum theory, the Church–Turing principle and the universal quantum computer. Proceedings of the Royal Society of London. A. Mathematical and Physical Sciences 400, 1818 (Jan. 1997), 97–117. https://doi.org/10.1098/rspa.1985.0070 Publisher: Royal Society.
- Transport implementation of the Bernstein–Vazirani algorithm with ion qubits. New Journal of Physics 18, 8 (Aug. 2016), 083030. https://doi.org/10.1088/1367-2630/18/8/083030
- Richard P. Feynman. 1982. Simulating physics with computers. International Journal of Theoretical Physics 21, 6 (June 1982), 467–488. https://doi.org/10.1007/BF02650179
- Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics. Technical Report. arXiv. 193–204 pages. http://arxiv.org/abs/1806.01838 arXiv:1806.01838 [quant-ph].
- Quipper: a scalable quantum programming language. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’13). Association for Computing Machinery, New York, NY, USA, 333–342. https://doi.org/10.1145/2491956.2462177
- Going Beyond Bell’s Theorem. arXiv:0712.0921 [quant-ph] (Dec. 2007). http://arxiv.org/abs/0712.0921 arXiv: 0712.0921.
- 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 (STOC ’96). Association for Computing Machinery, New York, NY, USA, 212–219. https://doi.org/10.1145/237814.237866
- Lov K. Grover. 1997. Quantum Mechanics Helps in Searching for a Needle in a Haystack. Physical Review Letters 79, 2 (July 1997), 325–328. https://doi.org/10.1103/PhysRevLett.79.325 Publisher: American Physical Society.
- Array programming with NumPy. Nature 585, 7825 (Sept. 2020), 357–362. https://doi.org/10.1038/s41586-020-2649-2
- Verified compilation of Quantum oracles. Proceedings of the ACM on Programming Languages 6, OOPSLA2 (Oct. 2022), 146:589–146:615. https://doi.org/10.1145/3563309
- An updated LLVM-based quantum research compiler with further OpenQASM support. Quantum Science and Technology 5, 3 (May 2020), 034013. https://doi.org/10.1088/2058-9565/ab8c2c
- Advancing hybrid quantum–classical computation with real-time execution. Frontiers in Physics 10 (2022), 940293. https://www.frontiersin.org/articles/10.3389/fphy.2022.940293
- Yuri Manin. 1980. Computable and uncomputable. Soviet Radio Publishing House.
- Grand Unification of Quantum Algorithms. PRX Quantum 2, 4 (Dec. 2021), 040203. https://doi.org/10.1103/PRXQuantum.2.040203
- Extending C++ for Heterogeneous Quantum-Classical Computing. ACM Transactions on Quantum Computing 2, 2 (July 2021), 6:1–6:36. https://doi.org/10.1145/3462670
- QCOR: A Language Extension Specification for the Heterogeneous Quantum-Classical Model of Computation. ACM Journal on Emerging Technologies in Computing Systems 16, 2 (March 2020), 22:1–22:17. https://doi.org/10.1145/3380964
- Michele Mosca. 1999. Quantum Computer Algorithms. Ph. D. Dissertation. University of Oxford.
- Michael A. Nielsen and Isaac L. Chuang. 2010. Quantum Computation and Quantum Information: 10th Anniversary Edition (1st edition ed.). Cambridge University Press, Cambridge ; New York.
- Pradeep Niroula and Yunseong Nam. 2021. A quantum algorithm for string matching. npj Quantum Information 7, 1 (Feb. 2021), 1–5. https://doi.org/10.1038/s41534-021-00369-3
- quAPL: Modeling Quantum Computation in an Array Programming Language. In 2023 IEEE International Conference on Quantum Computing and Engineering (QCE). IEEE, Bellevue, WA, USA, 1001–1012. https://doi.org/10.1109/QCE57702.2023.00114
- Bernhard Ömer. 2000. Quantum Programming in QCL. Ph. D. Dissertation. Technical University of Vienna.
- Unqomp: synthesizing uncomputation in Quantum circuits. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2021). Association for Computing Machinery, New York, NY, USA, 222–236. https://doi.org/10.1145/3453483.3454040
- QWIRE: a core language for quantum circuits. ACM SIGPLAN Notices 52, 1 (Jan. 2017), 846–858. https://doi.org/10.1145/3093333.3009894
- Andres Paz. 2023. Aleph. https://github.com/anpaz/aleph
- Sample: Bernstein-Vazirani algorithm. https://github.com/microsoft/qsharp/blob/5a40497f/samples/algorithms/BernsteinVazirani.qs
- Elton Pinto. 2023. Neko: A quantum map-filter-reduce programming language. In Student Research Competition (SRC) (Symposium on Principles of Programming Languages (POPL’23)). Boston, MA, USA. https://www.eltonpinto.me/assets/work/neko-popl23src.pdf
- Python Software Foundation. 2024. fractions — Rational numbers. https://docs.python.org/3/library/fractions.html
- Qiskit contributors. 2023. Qiskit: An Open-source Framework for Quantum Computing. https://doi.org/10.5281/zenodo.2573505
- Rich Rines and Isaac Chuang. 2018. High Performance Quantum Modular Multipliers. https://doi.org/10.48550/arXiv.1801.01081 arXiv:1801.01081 [quant-ph].
- Kenneth Rosen. 2010. Elementary Number Theory and Its Application, 6th Edition (6th edition ed.). Pearson.
- Peter Selinger and Benoit Valiron. 2006. A lambda calculus for quantum computation with classical control. Mathematical Structures in Computer Science 16, 3 (June 2006), 527–552. https://doi.org/10.1017/S0960129506005238 Publisher: Cambridge University Press.
- P.W. Shor. 1994. Algorithms for quantum computation: discrete logarithms and factoring. In Proceedings 35th Annual Symposium on Foundations of Computer Science. 124–134. https://doi.org/10.1109/SFCS.1994.365700
- Peter W. Shor. 1999. Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer. SIAM Rev. 41, 2 (Jan. 1999), 303–332. https://doi.org/10.1137/S0036144598347011 Publisher: Society for Industrial and Applied Mathematics.
- Peter W. Shor. 2003. Why haven’t more quantum algorithms been found? J. ACM 50, 1 (Jan. 2003), 87–90. https://doi.org/10.1145/602382.602408
- D.R. Simon. 1994. On the power of quantum computation. In Proceedings 35th Annual Symposium on Foundations of Computer Science. 116–123. https://doi.org/10.1109/SFCS.1994.365701
- Daniel R. Simon. 1997. On the Power of Quantum Computation. SIAM J. Comput. 26, 5 (Oct. 1997), 1474–1483. https://doi.org/10.1137/S0097539796298637 Publisher: Society for Industrial and Applied Mathematics.
- Q# as a Quantum Algorithmic Language. arXiv:2206.03532 [cs.PL]
- Q#: Enabling Scalable Quantum Computing and Development with a High-level DSL. In Proceedings of the Real World Domain Specific Languages Workshop 2018 (RWDSL2018). Association for Computing Machinery, New York, NY, USA, 1–10. https://doi.org/10.1145/3183895.3183901
- Dmitry Vasilevsky and Cesar Cortes. 2023. Sample: Grover’s search algorithm. https://github.com/microsoft/qsharp/blob/d70b544eb78e43c4ec6a88fe8825192930ff47a0/samples/algorithms/Grover.qs
- Qunity: A Unified Language for Quantum and Classical Computing (Extended Version). Proceedings of the ACM on Programming Languages 7, POPL (Jan. 2023), 921–951. https://doi.org/10.1145/3571225 arXiv:2204.12384 [quant-ph].
- Philip Wadler. 1991. Is there a use for linear logic? ACM SIGPLAN Notices 26, 9 (May 1991), 255–273. https://doi.org/10.1145/115866.115894
- Jacob Watkins. 2023. Continued fractions with Shor’s algorithm: which convergent? Quantum Computing Stack Exchange. https://quantumcomputing.stackexchange.com/a/32182/
- Fixed-Point Quantum Search with an Optimal Number of Queries. Physical Review Letters 113, 21 (Nov. 2014), 210501. https://doi.org/10.1103/PhysRevLett.113.210501 Publisher: American Physical Society.
- Experimental Insights from the Rogues Gallery. In 2019 IEEE International Conference on Rebooting Computing (ICRC). 1–8. https://doi.org/10.1109/ICRC.2019.8914707
- Charles Yuan and Michael Carbin. 2022. Tower: data structures in Quantum superposition. Proceedings of the ACM on Programming Languages 6, OOPSLA2 (Oct. 2022), 134:259–134:288. https://doi.org/10.1145/3563297
- Twist: sound reasoning for purity and entanglement in Quantum programs. Proceedings of the ACM on Programming Languages 6, POPL (Jan. 2022), 30:1–30:32. https://doi.org/10.1145/3498691