Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

Tower: data structures in Quantum superposition

Published: 31 October 2022 Publication History

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.

Supplementary Material

Auxiliary Archive (oopslab22main-p217-p-archive.zip)
Appendices of paper.

References

[1]
Scott Aaronson. 2002. Quantum Lower Bound for Recursive Fourier Sampling. https://doi.org/10.48550/ARXIV.QUANT-PH/0209060 arxiv:0209060.
[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.
[3]
Héctor Abraham. 2019. Qiskit: An Open-source Framework for Quantum Computing.
[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
[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
[6]
Andris Ambainis. 2003. Quantum walk algorithm for element distinctness. arxiv:0311001.
[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
[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.).
[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
[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
[11]
J. S. Bell. 1964. On the Einstein Podolsky Rosen paradox. Physics, 1 (1964), Nov, https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195
[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
[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
[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
[15]
Daniel J. Bernstein, Stacey Jeffery, Tanja Lange, and Alexander Meurer. 2013. Quantum Algorithms for the Subset-Sum Problem. In Post-Quantum Cryptography.
[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
[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
[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
[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
[20]
William Bowman, Roshan James, and Amr Sabry. 2011. Dagger Traced Symmetric Monoidal Categories and Reversible Programming. In Workshop on Reversible Computation.
[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.
[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.
[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.
[24]
Lijie Chen and Ramis Movassagh. 2021. Quantum Merkle Trees. https://doi.org/10.48550/ARXIV.2112.14317 arxiv:2112.14317.
[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
[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
[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
[28]
D. Coppersmith. 1994. An approximate Fourier transform useful in quantum factoring.
[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
[30]
Thomas G. Draper. 2000. Addition on a Quantum Computer. arxiv:quant-ph/0008033.
[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.
[32]
Edward Fredkin and Tommaso Toffoli. 1982. Conservative logic. International Journal of Theoretical Physics, 21 (1982), https://doi.org/10.1007/BF01857727
[33]
Craig Gidney. 2022. Quantum Dictionaries without QRAM. https://doi.org/10.48550/ARXIV.2204.13835 arxiv:2204.13835.
[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
[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
[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
[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
[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
[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.).
[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.
[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
[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
[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
[44]
Iordanis Kerenidis and Anupam Prakash. 2016. Quantum Recommendation Systems. https://doi.org/10.48550/ARXIV.1603.08675 arxiv:1603.08675.
[45]
E Knill. 1996. Conventions for quantum pseudocode.
[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
[47]
Richard L. Liboff. 1980. Introductory quantum mechanics. Addison-Wesley.
[48]
Christopher Lutz. 1986. Janus: a time-reversible language. Letter to R. Landauer.
[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
[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
[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
[52]
Michael A. Nielsen and Isaac L. Chuang. 2010. Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press.
[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
[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
[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
[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
[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
[58]
Run-Hua Shi. 2021. Quantum Bloom Filter and Its Applications. IEEE Transactions on Quantum Engineering, https://doi.org/10.1109/TQE.2021.3054623
[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
[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
[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
[62]
Carlin Vieri. 1995. Pendulum–a reversible computer architecture.
[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
[64]
Dave Wecker, Krysta M. Svore, and Krysta M. Svore. 2014. LIQUi|>: A Software Design Architecture and Domain-Specific Language for Quantum Computing. February.
[65]
Andrew C. Yao. 1982. Protocols for Secure Computations. In Symposium on Foundations of Computer Science. https://doi.org/10.5555/1382436.1382751
[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
[67]
Charles Yuan and Michael Carbin. 2022. Tower: Data Structures in Quantum Superposition. https://doi.org/10.5281/zenodo.6819031
[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

Cited By

View all
  • (2024)Quantum Representation for Deterministic Push-Down AutomataElectronics10.3390/electronics1322453113:22(4531)Online publication date: 18-Nov-2024
  • (2024)Modular Synthesis of Efficient Quantum UncomputationProceedings of the ACM on Programming Languages10.1145/36897858:OOPSLA2(2097-2124)Online publication date: 8-Oct-2024
  • (2024)Statistical Testing of Quantum Programs via Fixed-Point Amplitude AmplificationProceedings of the ACM on Programming Languages10.1145/36897168:OOPSLA2(140-164)Online publication date: 8-Oct-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Programming Languages
Proceedings of the ACM on Programming Languages  Volume 6, Issue OOPSLA2
October 2022
1932 pages
EISSN:2475-1421
DOI:10.1145/3554307
Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution 4.0 International License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 October 2022
Published in PACMPL Volume 6, Issue OOPSLA2

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. data structures
  2. history independence
  3. quantum programming
  4. quantum random-access memory
  5. reversible programming

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)412
  • Downloads (Last 6 weeks)55
Reflects downloads up to 01 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Quantum Representation for Deterministic Push-Down AutomataElectronics10.3390/electronics1322453113:22(4531)Online publication date: 18-Nov-2024
  • (2024)Modular Synthesis of Efficient Quantum UncomputationProceedings of the ACM on Programming Languages10.1145/36897858:OOPSLA2(2097-2124)Online publication date: 8-Oct-2024
  • (2024)Statistical Testing of Quantum Programs via Fixed-Point Amplitude AmplificationProceedings of the ACM on Programming Languages10.1145/36897168:OOPSLA2(140-164)Online publication date: 8-Oct-2024
  • (2024)The T-Complexity Costs of Error Correction for Control Flow in Quantum ComputationProceedings of the ACM on Programming Languages10.1145/36563978:PLDI(492-517)Online publication date: 20-Jun-2024
  • (2024)Quantum Control Machine: The Limits of Control Flow in Quantum ProgrammingProceedings of the ACM on Programming Languages10.1145/36498118:OOPSLA1(1-28)Online publication date: 29-Apr-2024
  • (2024)Dynamic Transitive Closure-based Static Analysis through the Lens of Quantum SearchACM Transactions on Software Engineering and Methodology10.1145/364438933:5(1-29)Online publication date: 4-Jun-2024
  • (2023)CoqQ: Foundational Verification of Quantum ProgramsProceedings of the ACM on Programming Languages10.1145/35712227:POPL(833-865)Online publication date: 11-Jan-2023

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media