# ProjectQ: an open source software framework for quantum computing

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

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.

### ► 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 (beta)

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

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

[3] Julien Ross, "The dawn of quantum programming", Quantum Views 2, 4 (2018).

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

(The above data is from Crossref's cited-by service. Unfortunately not all publishers provide suitable and complete citation data so that some citing works or bibliographic details may be missing.)