ProjectQ: an open source software framework for quantum computing

Damian S. Steiger, Thomas Häner, and Matthias Troyer

Institute for Theoretical Physics, ETH Zurich, 8093 Zurich, Switzerland

Find this paper interesting or want to discuss? Scite or leave a comment on SciRate.

Abstract

We introduce ProjectQ, an open source software effort for quantum computing. The first release features a compiler framework capable of targeting various types of hardware, a high-performance simulator with emulation capabilities, and compiler plug-ins for circuit drawing and resource estimation. We introduce our Python-embedded domain-specific language, present the features, and provide example implementations for quantum algorithms. The framework allows testing of quantum algorithms through simulation and enables running them on actual quantum hardware using a back-end connecting to the IBM Quantum Experience cloud service. Through extension mechanisms, users can provide back-ends to further quantum hardware, and scientists working on quantum compilation can provide plug-ins for additional compilation, optimization, gate synthesis, and layout strategies.

► BibTeX data

► References

[1] IBM Quantum Experience. http:/​/​research.ibm.com/​quantum/​.
http:/​/​research.ibm.com/​quantum/​

[2] Thomas Häner, Damian S. Steiger, Krysta Svore, and Matthias Troyer. A software methodology for compiling quantum programs. Quantum Science and Technology, 2018. https:/​/​doi.org/​10.1088/​2058-9565/​aaa5cc.
https:/​/​doi.org/​https:/​/​doi.org/​10.1088/​2058-9565/​aaa5cc

[3] pybind. https:/​/​github.com/​pybind.
https:/​/​github.com/​pybind

[4] Thomas Häner, Damian S. Steiger, Mikhail Smelyanskiy, and Matthias Troyer. High performance emulation of quantum circuits. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC '16, pages 74:1–74:9, Piscataway, NJ, USA, 2016. IEEE Press. ISBN 978-1-4673-8815-3. 10.1109/​SC.2016.73.
https:/​/​doi.org/​10.1109/​SC.2016.73

[5] Alexander S. Green, Peter LeFanu Lumsdaine, Neil J. Ross, Peter Selinger, and Benoit Valiron. Quipper: a scalable quantum programming language. In ACM SIGPLAN Notices, volume 48, pages 333–342. ACM, 2013. 10.1145/​2499370.2462177.
https:/​/​doi.org/​10.1145/​2499370.2462177

[6] Ali JavadiAbhari, Shruti Patil, Daniel Kudrow, Jeff Heckey, Alexey Lvov, Frederic T. Chong, and Margaret Martonosi. Scaffcc: a framework for compilation and analysis of quantum computing programs. In Proceedings of the 11th ACM Conference on Computing Frontiers, page 1. ACM, 2014. 10.1145/​2597917.2597939.
https:/​/​doi.org/​10.1145/​2597917.2597939

[7] Dave Wecker and Krysta M. Svore. LIQ$Ui|>$: A software design architecture and domain-specific language for quantum computing. arXiv preprint arXiv:1402.4467, 2014.
arXiv:1402.4467

[8] ProjectQ website. www.projectq.ch.
http:/​/​www.projectq.ch

[9] Peter W. Shor. Algorithms for quantum computation: Discrete logarithms and factoring. In Foundations of Computer Science, 1994 Proceedings., 35th Annual Symposium on, pages 124–134. IEEE, 1994. 10.1109/​SFCS.1994.365700.
https:/​/​doi.org/​10.1109/​SFCS.1994.365700

[10] Stephane Beauregard. Circuit for shor's algorithm using 2n+ 3 qubits. Quantum Information and Computation, 3 (2): 175–185, 2003.

[11] Yasuhiro Takahashi, Seiichiro Tani, and Noboru Kunihiro. Quantum addition circuits and unbounded fan-out. Quantum Information and Computation, 10 (9&10): 0872–0890, 2010.

[12] Thomas Häner, Martin Roetteler, and Krysta M. Svore. Factoring using 2n+2 qubits with Toffoli based modular multiplication. Quantum Information and Computation, 17 (7&8): 0673–0684, 2017. 10.26421/​QIC17.7-8.
https:/​/​doi.org/​10.26421/​QIC17.7-8

[13] Thomas G. Draper. Addition on a quantum computer. arXiv preprint quant-ph/​0008033, 2000.
arXiv:quant-ph/0008033

[14] Adriano Barenco, Charles H. Bennett, Richard Cleve, David P. DiVincenzo, Norman Margolus, Peter Shor, Tycho Sleator, John A. Smolin, and Harald Weinfurter. Elementary gates for quantum computation. Physical Review A, 52 (5): 3457, 1995. 10.1103/​PhysRevA.52.3457.
https:/​/​doi.org/​10.1103/​PhysRevA.52.3457

[15] Anders Sørensen and Klaus Mølmer. Quantum computation with ions in thermal motion. Physical Review Letters, 82 (9): 1971, 1999. 10.1103/​PhysRevLett.82.1971.
https:/​/​doi.org/​10.1103/​PhysRevLett.82.1971

[16] Ryan Babbush, Dominic W. Berry, Ian D. Kivlichan, Annie Y. Wei, Peter J. Love, and Alán Aspuru-Guzik. Exponentially more precise quantum simulation of fermions in second quantization. New Journal of Physics, 18 (3): 033032, 2016. 10.1088/​1367-2630/​18/​3/​033032.
https:/​/​doi.org/​10.1088/​1367-2630/​18/​3/​033032

[17] Fermilib. https:/​/​github.com/​projectq-framework/​fermilib.
https:/​/​github.com/​projectq-framework/​fermilib

[18] Ludwig E. de Clercq, Hsiang-Yu Lo, Matteo Marinelli, David Nadlinger, Robin Oswald, Vlad Negnevitsky, Daniel Kienzler, Ben Keitch, and Jonathan P. Home. Parallel transport quantum logic gates with trapped ions. Physical Review Letters, 116 (8): 080502, 2016. 10.1103/​PhysRevLett.116.080502.
https:/​/​doi.org/​10.1103/​PhysRevLett.116.080502

[19] Thomas Häner and Damian S. Steiger. 0.5 petabyte simulation of a 45-qubit quantum circuit. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC '17, pages 33:1–33:10, New York, NY, USA, 2017. ACM. ISBN 978-1-4503-5114-0. 10.1145/​3126908.3126947.
https:/​/​doi.org/​10.1145/​3126908.3126947

[20] Lov K. Grover. A fast quantum mechanical algorithm for database search. In Proceedings of the twenty-eighth annual ACM Symposium on Theory of Computing, pages 212–219. ACM, 1996. 10.1145/​237814.237866.
https:/​/​doi.org/​10.1145/​237814.237866

Cited by

[1] Robert Wille, Rod Van Meter, and Yehuda Naveh, 2019 Design, Automation & Test in Europe Conference & Exhibition (DATE) 1234 (2019) ISBN:978-3-9819263-2-3.

[2] Oscar Higgott, Daochen Wang, and Stephen Brierley, "Variational Quantum Computation of Excited States", Quantum 3, 156 (2019).

[3] Patrick Rebentrost, Brajesh Gupt, and Thomas R. Bromley, "Quantum computational finance: Monte Carlo pricing of financial derivatives", Physical Review A 98 2, 022321 (2018).

[4] Nathan Killoran, Josh Izaac, Nicolás Quesada, Ville Bergholm, Matthew Amy, and Christian Weedbrook, "Strawberry Fields: A Software Platform for Photonic Quantum Computing", Quantum 3, 129 (2019).

[5] Jin-Guo Liu and Lei Wang, "Differentiable learning of quantum circuit Born machines", arXiv:1804.04168, Physical Review A 98 6, 062324 (2018).

[6] Ryan LaRose, "Overview and Comparison of Gate Level Quantum Software Platforms", Quantum 3, 130 (2019).

[7] Aniruddha Bapat, Zachary Eldredge, James R. Garrison, Abhinav Deshpande, Frederic T. Chong, and Alexey V. Gorshkov, "Unitary entanglement construction in hierarchical networks", Physical Review A 98 6, 062328 (2018).

[8] Michael Kühn, Sebastian Zanker, Peter Deglmann, Michael Marthaler, and Horst Weiß, "Accuracy and Resource Estimations for Quantum Chemistry on a Near-Term Quantum Computer", Journal of Chemical Theory and Computation 15 9, 4764 (2019).

[9] Matthew Otten and Stephen K. Gray, "Accounting for errors in quantum algorithms via individual error reduction", npj Quantum Information 5 1, 11 (2019).

[10] Yu Zhang, Haowei Deng, Quanxi Li, Haoze Song, and Leihai Nie, 2019 International Symposium on Theoretical Aspects of Software Engineering (TASE) 184 (2019) ISBN:978-1-7281-3342-3.

[11] Mark Fingerhuth, Tomáš Babej, Peter Wittek, and Leonie Anna Mueck, "Open source software in quantum computing", PLOS ONE 13 12, e0208561 (2018).

[12] Mathias Soeken, Martin Roetteler, Nathan Wiebe, and Giovanni De Micheli, "LUT-Based Hierarchical Reversible Logic Synthesis", IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 38 9, 1675 (2019).

[13] Gian Giacomo Guerreschi and Jongsoo Park, "Two-step approach to scheduling quantum circuits", Quantum Science and Technology 3 4, 045003 (2018).

[14] M. P. Madhu and Sunanda Dixit, Lecture Notes on Data Engineering and Communications Technologies 44, 714 (2020) ISBN:978-3-030-37050-3.

[15] Christina Petschnigg, Mathias Brandstotter, Horst Pichler, Michael Hofbaur, and Bernhard Dieber, 2019 International Conference on Robotics and Automation (ICRA) 803 (2019) ISBN:978-1-5386-6027-0.

[16] Alwin Zulehner and Robert Wille, 2019 Design, Automation & Test in Europe Conference & Exhibition (DATE) 90 (2019) ISBN:978-3-9819263-2-3.

[17] Matthew Amy, Lecture Notes in Computer Science 11497, 87 (2019) ISBN:978-3-030-21499-9.

[18] Iskren Vankov, Daniel Mills, Petros Wallden, and Elham Kashefi, "Methods for classically simulating noisy networked quantum architectures", Quantum Science and Technology 5 1, 014001 (2019).

[19] P. Krantz, M. Kjaergaard, F. Yan, T. P. Orlando, S. Gustavsson, and W. D. Oliver, "A quantum engineer's guide to superconducting qubits", Applied Physics Reviews 6 2, 021318 (2019).

[20] Tyson Jones, Anna Brown, Ian Bush, and Simon C. Benjamin, "QuEST and High Performance Simulation of Quantum Computers", Scientific Reports 9 1, 10736 (2019).

[21] Davide Ferrari and Michele Amoretti, "Efficient and effective quantum compiling for entanglement-based machine learning on IBM Q devices", International Journal of Quantum Information 16 08, 1840006 (2018).

[22] Prakash Murali, Ali Javadi-Abhari, Frederic T. Chong, and Margaret Martonosi, "Formal constraint-based compilation for noisy intermediate-scale quantum systems", arXiv:1903.03276, Microprocessors and Microsystems 66, 102 (2019).

[23] Axel Dahlberg and Stephanie Wehner, "SimulaQron—a simulator for developing quantum internet software", Quantum Science and Technology 4 1, 015001 (2018).

[24] Neil J. Ross, "The dawn of quantum programming", Quantum Views 2, 4 (2018).

[25] Nicholas Meinhardt, Bastiaan Dekker, Niels M. P. Neumann, and Frank Phillipson, "Implementation of a Variational Quantum Circuit for Machine Learning with Compact Data Representation", Digitale Welt 4 1, 95 (2020).

[26] Shubham, Prachi Sajwan, and N. Jayapandian, 2019 Third International conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC) 598 (2019) ISBN:978-1-7281-4365-1.

[27] Junyi Liu, Bohua Zhan, Shuling Wang, Shenggang Ying, Tao Liu, Yangjia Li, Mingsheng Ying, and Naijun Zhan, Lecture Notes in Computer Science 11562, 187 (2019) ISBN:978-3-030-25542-8.

[28] Damian S. Steiger, Thomas Häner, and Matthias Troyer, "Advantages of a modular high-level quantum programming framework", Microprocessors and Microsystems 66, 81 (2019).

[29] Yudong Cao, Jonathan Romero, Jonathan P. Olson, Matthias Degroote, Peter D. Johnson, Mária Kieferová, Ian D. Kivlichan, Tim Menke, Borja Peropadre, Nicolas P. D. Sawaya, Sukin Sim, Libor Veis, and Alán Aspuru-Guzik, "Quantum Chemistry in the Age of Quantum Computing", Chemical Reviews 119 19, 10856 (2019).

[30] Pranav Gokhale, Yongshan Ding, Thomas Propson, Christopher Winkler, Nelson Leung, Yunong Shi, David I. Schuster, Henry Hoffmann, and Frederic T. Chong, Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture 266 (2019) ISBN:9781450369381.

[31] Ilya G. Ryabinkin, Tzu-Ching Yen, Scott N. Genin, and Artur F. Izmaylov, "Qubit Coupled Cluster Method: A Systematic Approach to Quantum Chemistry on a Quantum Computer", Journal of Chemical Theory and Computation 14 12, 6317 (2018).

[32] Andrew W. Cross, Lev S. Bishop, John A. Smolin, and Jay M. Gambetta, "Open Quantum Assembly Language", arXiv:1707.03429.

[33] Davide Venturelli, Minh Do, Eleanor Rieffel, and Jeremy Frank, "Compiling quantum circuits to realistic hardware architectures using temporal planners", Quantum Science and Technology 3 2, 025004 (2018).

[34] Jarrod R. McClean, Kevin J. Sung, Ian D. Kivlichan, Yudong Cao, Chengyu Dai, E. Schuyler Fried, Craig Gidney, Brendan Gimby, Pranav Gokhale, Thomas Häner, Tarini Hardikar, Vojtěch Havlíček, Oscar Higgott, Cupjin Huang, Josh Izaac, Zhang Jiang, Xinle Liu, Sam McArdle, Matthew Neeley, Thomas O'Brien, Bryan O'Gorman, Isil Ozfidan, Maxwell D. Radin, Jhonathan Romero, Nicholas Rubin, Nicolas P. D. Sawaya, Kanav Setia, Sukin Sim, Damian S. Steiger, Mark Steudtner, Qiming Sun, Wei Sun, Daochen Wang, Fang Zhang, and Ryan Babbush, "OpenFermion: The Electronic Structure Package for Quantum Computers", arXiv:1710.07629.

[35] Kanav Setia and James D. Whitfield, "Bravyi-Kitaev Superfast simulation of electronic structure on a quantum computer", Journal of Chemical Physics 148 16, 164104 (2018).

[36] Thomas Häner and Damian S. Steiger, "0.5 Petabyte Simulation of a 45-Qubit Quantum Circuit", arXiv:1704.01127.

[37] Mathias Soeken, Thomas Häner, and Martin Roetteler, "Programming Quantum Computers Using Design Automation", arXiv:1803.01022.

[38] E. Schuyler Fried, Nicolas P. D. Sawaya, Yudong Cao, Ian D. Kivlichan, Jhonathan Romero, and Alán Aspuru-Guzik, "qTorch: The Quantum Tensor Contraction Handler", arXiv:1709.03636, PLoS ONE 13 12, e0208510 (2017).

[39] Alexander McCaskey, Eugene Dumitrescu, Mengsu Chen, Dmitry Lyakh, and Travis Humble, "Validating quantum-classical programming models with tensor network simulations", PLoS ONE 13 12, e0206704 (2018).

[40] Kyle E. C. Booth, Minh Do, J. Christopher Beck, Eleanor Rieffel, Davide Venturelli, and Jeremy Frank, "Comparing and Integrating Constraint Programming and Temporal Planning for Quantum Circuit Compilation", arXiv:1803.06775.

[41] Keith A. Britt, Fahd A. Mohiyaddin, and Travis S. Humble, "Quantum Accelerators for High-Performance Computing Systems", arXiv:1712.01423.

[42] Frederic T. Chong, Diana Franklin, and Margaret Martonosi, "Programming languages and compiler design for realistic quantum hardware", Nature 549 7671, 180 (2017).

[43] Krysta M. Svore, Alan Geller, Matthias Troyer, John Azariah, Christopher Granade, Bettina Heim, Vadym Kliuchnikov, Mariia Mykhailova, Andres Paz, and Martin Roetteler, "Q#: Enabling scalable quantum computing and development with a high-level domain-specific language", arXiv:1803.00652.

[44] Alwin Zulehner and Robert Wille, "Advanced Simulation of Quantum Computations", arXiv:1707.00865.

[45] Hao Tang, Yan-Yan Zhu, Jun Gao, Marcus Lee, Peng-Cheng Lai, and Xian-Min Jin, "FeynmanPAQS: A Graphical Interface Program for Photonic Analog Quantum Computing", arXiv:1810.02289.

[46] Randy Lewis and R. M. Woloshyn, "A qubit model for U(1) lattice gauge theory", arXiv:1905.09789.

[47] X. Fu, M. A. Rol, C. C. Bultink, J. van Someren, N. Khammassi, I. Ashraf, R. F. L. Vermeulen, J. C. de Sterke, W. J. Vlothuizen, R. N. Schouten, C. G. Almudever, L. DiCarlo, and K. Bertels, "An Experimental Microarchitecture for a Superconducting Quantum Processor", arXiv:1708.07677.

[48] Alexander Singh, Konstantinos Giannakis, and Theodore Andronikos, "Qumin, a minimalist quantum programming language", arXiv:1704.04460.

[49] Xiu-Zhe Luo, Jin-Guo Liu, Pan Zhang, and Lei Wang, "Yao.jl: Extensible, Efficient Framework for Quantum Algorithm Design", arXiv:1912.10877.

[50] Seyon Sivarajah, Silas Dilkes, Alexander Cowtan, Will Simmons, Alec Edgington, and Ross Duncan, "t$|$ket$\rangle$ : A Retargetable Compiler for NISQ Devices", arXiv:2003.10611.

The above citations are from Crossref's cited-by service (last updated successfully 2020-03-29 21:26:29) and SAO/NASA ADS (last updated successfully 2020-03-29 21:26:29). The list may be incomplete as not all publishers provide suitable and complete citation data.

3 thoughts on “ProjectQ: an open source software framework for quantum computing

  1. Pingback: Qstarter award for Quantum! – Quantum

  2. Pingback: Qstarter award for Quantum! – Quantum Electronics

  3. Pingback: Perspective in Quantum Views by Neil J. Ross "The dawn of quantum programming"