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] Oscar Higgott, Daochen Wang, and Stephen Brierley, "Variational Quantum Computation of Excited States", Quantum 3, 156 (2019).

[2] Benjamin Bichsel, Maximilian Baader, Timon Gehr, and Martin Vechev, Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation 286 (2020) ISBN:9781450376136.

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

[4] Stefan Hillmich, Alwin Zulehner, and Robert Wille, 2020 25th Asia and South Pacific Design Automation Conference (ASP-DAC) 115 (2020) ISBN:978-1-7281-4123-7.

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

[6] Abdulah Fawaz, Paul Klein, Sebastien Piat, Simone Severini, and Peter Mountney, Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining 1674 (2019) ISBN:9781450362016.

[7] 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.

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

[9] Yipeng Huang and Margaret Martonosi, Proceedings of the 46th International Symposium on Computer Architecture 541 (2019) ISBN:9781450366694.

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

[11] 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).

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

[13] 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).

[14] Matthew Amy and Vlad Gheorghiu, "staq—A full-stack quantum processing toolkit", Quantum Science and Technology 5 3, 034016 (2020).

[15] 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).

[16] 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).

[17] 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.

[18] Haodong Bian, Jianqiang Huang, Runting Dong, Yuluo Guo, and Xiaoying Wang, Lecture Notes in Computer Science 12453, 111 (2020) ISBN:978-3-030-60238-3.

[19] 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).

[20] Will Powell, Jason Riedy, Jeffrey S. Young, and Thomas M. Conte, Proceedings of the Practice and Experience in Advanced Research Computing on Rise of the Machines (learning) 1 (2019) ISBN:9781450372275.

[21] Robert Wille, Austin Fowler, and Yehuda Naveh, Proceedings of the International Conference on Computer-Aided Design 1 (2018) ISBN:9781450359504.

[22] Antonio D. Corcoles, Abhinav Kandala, Ali Javadi-Abhari, Douglas T. McClure, Andrew W. Cross, Kristan Temme, Paul D. Nation, Matthias Steffen, and Jay M. Gambetta, "Challenges and Opportunities of Near-Term Quantum Computing Systems", Proceedings of the IEEE 108 8, 1338 (2020).

[23] 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.

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

[25] 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).

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

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

[28] 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).

[29] 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).

[30] 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.

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

[32] Matthias Möller and Merel Schalkers, Lecture Notes in Computer Science 12142, 451 (2020) ISBN:978-3-030-50432-8.

[33] 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).

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

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

[36] Yongsoo Hwang, Taewan Kim, Chungheon Baek, and Byung-Soo Choi, "Integrated Analysis of Performance and Resources in Large-Scale Quantum Computing", Physical Review Applied 13 5, 054033 (2020).

[37] 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).

[38] Alexander McCaskey, Eugene Dumitrescu, Dmitry Liakh, and Travis Humble, 2018 IEEE International Conference on Rebooting Computing (ICRC) 1 (2018) ISBN:978-1-5386-9170-0.

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

[40] Yongshan Ding and Frederic T. Chong, "Quantum Computer Systems: Research for Noisy Intermediate-Scale Quantum Computers", Synthesis Lectures on Computer Architecture 15 2, 1 (2020).

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

[42] Shaun Miller, 2020 IEEE Computer Society Annual Symposium on VLSI (ISVLSI) 141 (2020) ISBN:978-1-7281-5775-7.

[43] Yongshan Ding, Xin-Chuan Wu, Adam Holmes, Ash Wiseth, Diana Franklin, Margaret Martonosi, and Frederic T. Chong, 2020 ACM/IEEE 47th Annual International Symposium on Computer Architecture (ISCA) 570 (2020) ISBN:978-1-7281-4661-4.

[44] 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.

[45] Tom Krüger and Wolfgang Mauerer, Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops 445 (2020) ISBN:9781450379632.

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

[47] 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.

[48] 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).

[49] Erik Nielsen, Kenneth Rudinger, Timothy Proctor, Antonio Russo, Kevin Young, and Robin Blume-Kohout, "Probing quantum processor performance with pyGSTi", Quantum Science and Technology 5 4, 044002 (2020).

[50] Oumarou Oumarou, Alexandru Paler, and Robert Basmadjian, 2020 IEEE Computer Society Annual Symposium on VLSI (ISVLSI) 126 (2020) ISBN:978-1-7281-5775-7.

[51] 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.

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

[53] 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).

[54] 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).

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

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

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

[58] 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).

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

[60] 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.

[61] 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).

[62] 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.

[63] 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.

[64] 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.

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

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

[67] 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.

[68] Evandro Chagas Ribeiro da Rosa and Bruno G. Taketani, "QSystem: bitwise representation for quantum circuit simulations", arXiv:2004.03560.

[69] Evandro Chagas Ribeiro da Rosa and Rafael de Santiago, "Classical and Quantum Data Interaction in Programming Languages: A Runtime Architecture", arXiv:2006.00131.

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

[71] Peng Fu, Kohei Kishida, Neil J. Ross, and Peter Selinger, "A tutorial introduction to quantum circuit programming in dependently typed Proto-Quipper", arXiv:2005.08396.

The above citations are from Crossref's cited-by service (last updated successfully 2020-10-19 14:48:40) and SAO/NASA ADS (last updated successfully 2020-10-19 14:48:41). 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"