skip to main content

Tower: data structures in Quantum superposition

Published:31 October 2022Publication History
Skip Abstract Section

Abstract

Emerging quantum algorithms for problems such as element distinctness, subset sum, and closest pair demonstrate computational advantages by relying on abstract data structures. Practically realizing such an algorithm as a program for a quantum computer requires an efficient implementation of the data structure whose operations correspond to unitary operators that manipulate quantum superpositions of data.

To correctly operate in superposition, an implementation must satisfy three properties --- reversibility, history independence, and bounded-time execution. Standard implementations, such as the representation of an abstract set as a hash table, fail these properties, calling for tools to develop specialized implementations.

In this work, we present Core Tower, the first language for quantum programming with random-access memory. Core Tower enables the developer to implement data structures as pointer-based, linked data. It features a reversible semantics enabling every valid program to be translated to a unitary quantum circuit.

We present Boson, the first memory allocator that supports reversible, history-independent, and constant-time dynamic memory allocation in quantum superposition. We also present Tower, a language for quantum programming with recursively defined data structures. Tower features a type system that bounds all recursion using classical parameters as is necessary for a program to execute on a quantum computer.

Using Tower, we implement Ground, the first quantum library of data structures, including lists, stacks, queues, strings, and sets. We provide the first executable implementation of sets that satisfies all three mandated properties of reversibility, history independence, and bounded-time execution.

Skip Supplemental Material Section

Supplemental Material

References

  1. Scott Aaronson. 2002. Quantum Lower Bound for Recursive Fourier Sampling. https://doi.org/10.48550/ARXIV.QUANT-PH/0209060 arxiv:0209060. Google ScholarGoogle Scholar
  2. Scott Aaronson, Nai-Hui Chia, Han-Hsuan Lin, Chunhao Wang, and Ruizhe Zhang. 2019. On the Quantum Complexity of Closest Pair and Related Problems. arxiv:1911.01973. Google ScholarGoogle Scholar
  3. Héctor Abraham. 2019. Qiskit: An Open-source Framework for Quantum Computing. Google ScholarGoogle Scholar
  4. Daniel S. Abrams and Seth Lloyd. 1997. Simulation of Many-Body Fermi Systems on a Universal Quantum Computer. Phys. Rev. Lett., 79 (1997), Sep, https://doi.org/10.1103/PhysRevLett.79.2586 Google ScholarGoogle ScholarCross RefCross Ref
  5. T. Altenkirch and J. Grattage. 2005. A Functional Quantum Programming Language. In IEEE Symposium on Logic in Computer Science. https://doi.org/10.1109/LICS.2005.1 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Andris Ambainis. 2003. Quantum walk algorithm for element distinctness. arxiv:0311001. Google ScholarGoogle Scholar
  7. Srinivasan Arunachalam, Vlad Gheorghiu, Tomas Jochym-O’Connor, Michele Mosca, and Priyaa Varshinee Srinivasan. 2015. On the robustness of bucket brigade quantum RAM. New Journal of Physics, 17, 12 (2015), Dec, https://doi.org/10.1088/1367-2630/17/12/123010 Google ScholarGoogle ScholarCross RefCross Ref
  8. Holger Bock Axelsen and Robert Glück. 2013. Reversible Representation and Manipulation of Constructor Terms in the Heap. In Reversible Computation, Gerhard W. Dueck and D. Michael Miller (Eds.). Google ScholarGoogle Scholar
  9. Sumeet Bajaj, Anrin Chakraborti, and Radu Sion. 2016. Practical Foundations of History Independence. IEEE Transactions on Information Forensics and Security, 11, 2 (2016), https://doi.org/10.1109/TIFS.2015.2491309 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Adriano Barenco, André Berthiaume, David Deutsch, Artur Ekert, Richard Jozsa, and Chiara Macchiavello. 1997. Stabilization of Quantum Computations by Symmetrization. SIAM J. Comput., 26, 5 (1997), https://doi.org/10.1137/S0097539796302452 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. S. Bell. 1964. On the Einstein Podolsky Rosen paradox. Physics, 1 (1964), Nov, https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195 Google ScholarGoogle ScholarCross RefCross Ref
  12. C. H. Bennett. 1973. Logical Reversibility of Computation. IBM Journal of Research and Development, 17, 6 (1973), https://doi.org/10.1147/rd.176.0525 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Charles H. Bennett. 1989. Time/Space Trade-Offs for Reversible Computation. SIAM J. Comput., 18, 4 (1989), Aug, https://doi.org/10.1137/0218053 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Charles H. Bennett and Gilles Brassard. 2014. Quantum cryptography: Public key distribution and coin tossing. Theoretical Computer Science, 560 (2014), https://doi.org/10.1016/j.tcs.2014.05.025 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Daniel J. Bernstein, Stacey Jeffery, Tanja Lange, and Alexander Meurer. 2013. Quantum Algorithms for the Subset-Sum Problem. In Post-Quantum Cryptography. Google ScholarGoogle Scholar
  16. Dominic W. Berry, Mária Kieferová, Artur Scherer, Yuval R. Sanders, Guang Hao Low, Nathan Wiebe, Craig Gidney, and Ryan Babbush. 2017. Improved techniques for preparing eigenstates of fermionic Hamiltonians. npj Quantum Information, 4 (2017), https://doi.org/10.1038/s41534-018-0071-5 Google ScholarGoogle ScholarCross RefCross Ref
  17. Benjamin Bichsel, Maximilian Baader, Timon Gehr, and Martin Vechev. 2020. Silq: A High-Level Quantum Language with Safe Uncomputation and Intuitive Semantics. In ACM SIGPLAN Conference on Programming Language Design and Implementation. https://doi.org/10.1145/3385412.3386007 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Aaron Bohannon, J. Nathan Foster, Benjamin C. Pierce, Alexandre Pilkiewicz, and Alan Schmitt. 2008. Boomerang: Resourceful Lenses for String Data. In ACM SIGPLAN Symposium on Principles of Programming Languages. https://doi.org/10.1145/1328438.1328487 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Kyle E. C. Booth, Bryan O' Gorman, Jeffrey Marshall, Stuart Hadfield, and Eleanor Rieffel. 2021. Quantum-accelerated constraint programming. Quantum, https://doi.org/10.22331/q-2021-09-28-550 Google ScholarGoogle ScholarCross RefCross Ref
  20. William Bowman, Roshan James, and Amr Sabry. 2011. Dagger Traced Symmetric Monoidal Categories and Reversible Programming. In Workshop on Reversible Computation. Google ScholarGoogle Scholar
  21. Harry Buhrman, Bruno Loff, Subhasree Patro, and Florian Speelman. 2021. Limits of quantum speed-ups for computational geometry and other problems: Fine-grained complexity via quantum walks. arxiv:2106.02005. Google ScholarGoogle Scholar
  22. Harry Buhrman, Bruno Loff, Subhasree Patro, and Florian Speelman. 2022. Memory Compression with Quantum Random-Access Gates. https://doi.org/10.48550/ARXIV.2203.05599 arxiv:2203.05599. Google ScholarGoogle Scholar
  23. Shantanav Chakraborty, András Gilyén, and Stacey Jeffery. 2019. The Power of Block-Encoded Matrix Powers: Improved Regression Techniques via Faster Hamiltonian Simulation. https://doi.org/10.4230/LIPICS.ICALP.2019.33 arxiv:1804.01973. Google ScholarGoogle ScholarCross RefCross Ref
  24. Lijie Chen and Ramis Movassagh. 2021. Quantum Merkle Trees. https://doi.org/10.48550/ARXIV.2112.14317 arxiv:2112.14317. Google ScholarGoogle Scholar
  25. K-W Cheng and C-C Tseng. 2002. Quantum full adder and subtractor. Electron. Lett., 38 (2002), https://doi.org/10.1049/el:20020949 Google ScholarGoogle ScholarCross RefCross Ref
  26. Mitchell Chiew, Kooper de Lacy, Chao-Hua Yu, Sam Marsh, and Jingbo Wang. 2019. Graph comparison via nonlinear quantum search. Quantum Information Processing, 18 (2019), 08, https://doi.org/10.1007/s11128-019-2407-2 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Andrew M. Childs, Dmitri Maslov, Yunseong Nam, Neil J. Ross, and Yuan Su. 2018. Toward the first quantum simulation with quantum speedup. Proceedings of the National Academy of Sciences, 115, 38 (2018), https://doi.org/10.1073/pnas.1801723115 Google ScholarGoogle ScholarCross RefCross Ref
  28. D. Coppersmith. 1994. An approximate Fourier transform useful in quantum factoring. Google ScholarGoogle Scholar
  29. Yongshan Ding, Xin-Chuan Wu, Adam Holmes, Ash Wiseth, Diana Franklin, Margaret Martonosi, and Frederic T. Chong. 2020. SQUARE: Strategic Quantum Ancilla Reuse for Modular Quantum Programs via Cost-Effective Uncomputation. In International Symposium on Computer Architecture. https://doi.org/10.1109/ISCA45697.2020.00054 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Thomas G. Draper. 2000. Addition on a Quantum Computer. arxiv:quant-ph/0008033. Google ScholarGoogle Scholar
  31. Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. 2014. A Quantum Approximate Optimization Algorithm. https://doi.org/10.48550/ARXIV.1411.4028 arxiv:1411.4028. Google ScholarGoogle Scholar
  32. Edward Fredkin and Tommaso Toffoli. 1982. Conservative logic. International Journal of Theoretical Physics, 21 (1982), https://doi.org/10.1007/BF01857727 Google ScholarGoogle ScholarCross RefCross Ref
  33. Craig Gidney. 2022. Quantum Dictionaries without QRAM. https://doi.org/10.48550/ARXIV.2204.13835 arxiv:2204.13835. Google ScholarGoogle Scholar
  34. Vittorio Giovannetti, Seth Lloyd, and Lorenzo Maccone. 2008. Quantum Random Access Memory. Physical Review Letters, 100, 16 (2008), Apr, https://doi.org/10.1103/physrevlett.100.160501 Google ScholarGoogle ScholarCross RefCross Ref
  35. Oded Goldreich and Rafail Ostrovsky. 1996. Software Protection and Simulation on Oblivious RAMs. J. ACM, 43, 3 (1996), May, https://doi.org/10.1145/233551.233553 Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Alexander S. Green, Peter LeFanu Lumsdaine, Neil J. Ross, Peter Selinger, and Benoît Valiron. 2013. Quipper: A Scalable Quantum Programming Language. In ACM SIGPLAN Conference on Programming Language Design and Implementation. https://doi.org/10.1145/2491956.2462177 Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Lov K. Grover. 1996. A Fast Quantum Mechanical Algorithm for Database Search. In ACM Symposium on Theory of Computing. https://doi.org/10.1145/237814.237866 Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Aram W. Harrow, Avinatan Hassidim, and Seth Lloyd. 2009. Quantum Algorithm for Linear Systems of Equations. Physical Review Letters, 103, 15 (2009), Oct, https://doi.org/10.1103/physrevlett.103.150502 Google ScholarGoogle ScholarCross RefCross Ref
  39. Jason D. Hartline, Edwin S. Hong, Alexander E. Mohr, William R. Pentney, and Emily C. Rocke. 2002. Characterizing History Independent Data Structures. In Algorithms and Computation, Prosenjit Bose and Pat Morin (Eds.). Google ScholarGoogle Scholar
  40. Tue Haulund. 2017. Design and Implementation of a Reversible Object-Oriented Programming Language. https://doi.org/10.48550/ARXIV.1707.07845 arxiv:1707.07845. Google ScholarGoogle Scholar
  41. Md Saiful Islam, Muhammad Mahbubur Rahman, Zerina Begum, and Mohd Z Hafiz. 2009. Low cost quantum realization of reversible multiplier circuit. Information technology journal, 8, 2 (2009), https://doi.org/10.3923/itj.2009.208.213 Google ScholarGoogle ScholarCross RefCross Ref
  42. Stacey Jeffery, Robin Kothari, and Frederic Magniez. 2013. Nested Quantum Walks with Quantum Data Structures. In ACM-SIAM Symposium on Discrete Algorithms. https://doi.org/10.1137/1.9781611973105.106 Google ScholarGoogle ScholarCross RefCross Ref
  43. Ivan Kassal, James D. Whitfield, Alejandro Perdomo-Ortiz, Man-Hong Yung, and Alán Aspuru-Guzik. 2011. Simulating Chemistry Using Quantum Computers. Annual Review of Physical Chemistry, 62, 1 (2011), https://doi.org/10.1146/annurev-physchem-032210-103512 Google ScholarGoogle ScholarCross RefCross Ref
  44. Iordanis Kerenidis and Anupam Prakash. 2016. Quantum Recommendation Systems. https://doi.org/10.48550/ARXIV.1603.08675 arxiv:1603.08675. Google ScholarGoogle Scholar
  45. E Knill. 1996. Conventions for quantum pseudocode. Google ScholarGoogle ScholarCross RefCross Ref
  46. Gushu Li, Li Zhou, Nengkun Yu, Yufei Ding, Mingsheng Ying, and Yuan Xie. 2020. Projection-Based Runtime Assertions for Testing and Debugging Quantum Programs. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. https://doi.org/10.1145/3428218 Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Richard L. Liboff. 1980. Introductory quantum mechanics. Addison-Wesley. Google ScholarGoogle Scholar
  48. Christopher Lutz. 1986. Janus: a time-reversible language. Letter to R. Landauer. Google ScholarGoogle Scholar
  49. Olivia Di Matteo, Vlad Gheorghiu, and Michele Mosca. 2020. Fault-Tolerant Resource Estimation of Quantum Random-Access Memories. IEEE Transactions on Quantum Engineering, 1 (2020), https://doi.org/10.1109/tqe.2020.2965803 Google ScholarGoogle ScholarCross RefCross Ref
  50. Donald R. Morrison. 1968. PATRICIA–Practical Algorithm To Retrieve Information Coded in Alphanumeric. J. ACM, 15, 4 (1968), Oct, https://doi.org/10.1145/321479.321481 Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Moni Naor and Vanessa Teague. 2001. Anti-persistence: History independent data structures. In ACM Symposium on Theory of Computing. https://doi.org/10.1145/380752.380844 Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Michael A. Nielsen and Isaac L. Chuang. 2010. Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Alexandru Paler, Oumarou Oumarou, and Robert Basmadjian. 2020. Parallelizing the queries in a bucket-brigade quantum random access memory. Physical Review A, 102, 3 (2020), Sep, https://doi.org/10.1103/physreva.102.032608 Google ScholarGoogle ScholarCross RefCross Ref
  54. Anouk Paradis, Benjamin Bichsel, Samuel Steffen, and Martin Vechev. 2021. Unqomp: Synthesizing Uncomputation in Quantum Circuits. In ACM SIGPLAN Conference on Programming Language Design and Implementation. https://doi.org/10.1145/3453483.3454040 Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Jennifer Paykin, Robert Rand, and Steve Zdancewic. 2017. QWIRE: A Core Language for Quantum Circuits. In ACM SIGPLAN Symposium on Principles of Programming Languages. https://doi.org/10.1145/3009837.3009894 Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Romain Péchoux, Simon Perdrix, Mathys Rennela, and Vladimir Zamdzhiev. 2020. Quantum Programming with Inductive Datatypes: Causality and Affine Type Theory. In Lecture Notes in Computer Science. Springer International Publishing. https://doi.org/10.1007/978-3-030-45231-5_29 Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. Peter Selinger and Benoît Valiron. 2005. A Lambda Calculus for Quantum Computation with Classical Control. Typed Lambda Calculi and Applications, https://doi.org/10.1017/S0960129506005238 Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. Run-Hua Shi. 2021. Quantum Bloom Filter and Its Applications. IEEE Transactions on Quantum Engineering, https://doi.org/10.1109/TQE.2021.3054623 Google ScholarGoogle ScholarCross RefCross Ref
  59. Peter W. Shor. 1997. Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer. SIAM J. Comput., 26, 5 (1997), Oct, https://doi.org/10.1137/S0097539795293172 Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. 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 Real World Domain Specific Languages Workshop. https://doi.org/10.1145/3183895.3183901 Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Michael Kirkedal Thomsen and Holger Bock Axelsen. 2015. Interpretation and Programming of the Reversible Functional Language RFUN. In Symposium on the Implementation and Application of Functional Programming Languages. https://doi.org/10.1145/2897336.2897345 Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. Carlin Vieri. 1995. Pendulum–a reversible computer architecture. Google ScholarGoogle Scholar
  63. Xiao Shaun Wang, Kartik Nayak, Chang Liu, T-H. Hubert Chan, Elaine Shi, Emil Stefanov, and Yan Huang. 2014. Oblivious Data Structures. In ACM SIGSAC Conference on Computer and Communications Security. https://doi.org/10.1145/2660267.2660314 Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. Dave Wecker, Krysta M. Svore, and Krysta M. Svore. 2014. LIQUi|>: A Software Design Architecture and Domain-Specific Language for Quantum Computing. February. Google ScholarGoogle Scholar
  65. Andrew C. Yao. 1982. Protocols for Secure Computations. In Symposium on Foundations of Computer Science. https://doi.org/10.5555/1382436.1382751 Google ScholarGoogle ScholarDigital LibraryDigital Library
  66. Tetsuo Yokoyama and Robert Glück. 2007. A Reversible Programming Language and Its Invertible Self-Interpreter. In ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation. https://doi.org/10.1145/1244381.1244404 Google ScholarGoogle ScholarDigital LibraryDigital Library
  67. Charles Yuan and Michael Carbin. 2022. Tower: Data Structures in Quantum Superposition. https://doi.org/10.5281/zenodo.6819031 Google ScholarGoogle ScholarDigital LibraryDigital Library
  68. Samee Zahur and David Evans. 2013. Circuit Structures for Improving Efficiency of Security and Privacy Tools. In IEEE Symposium on Security and Privacy. https://doi.org/10.1109/SP.2013.40 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Tower: data structures in Quantum superposition

            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!