Overview and Comparison of Gate Level Quantum Software Platforms Ryan Larose1,2
Total Page:16
File Type:pdf, Size:1020Kb
Overview and Comparison of Gate Level Quantum Software Platforms Ryan LaRose1,2 1Department of Computational Mathematics, Science, and Engineering, Michigan State University. 2Department of Physics and Astronomy, Michigan State University March 22, 2019 Quantum computers are available to use over A Cirq 18 the cloud, but the recent explosion of quan- tum software platforms can be overwhelming for B Other Quantum Software 19 those deciding on which to use. In this pa- per, we provide a current picture of the rapidly C Testing Simulator Performance 20 evolving quantum computing landscape by com- paring four software platforms—Forest (pyQuil), D Example Programs: The Teleportation Qiskit, ProjectQ, and the Quantum Developer Circuit 21 Kit (Q#)—that enable researchers to use real and simulated quantum devices. Our analysis References 21 covers requirements and installation, language syntax through example programs, library sup- port, and quantum simulator capabilities for 1 Introduction each platform. For platforms that have quantum computer support, we compare hardware, quan- Quantum programming languages have been thought tum assembly languages, and quantum compil- of at least two decades ago [1,2,3,4,5,6], but these ers. We conclude by covering features of each were largely theoretical and without existing hardware. and briefly mentioning other quantum comput- Quantum computers are now a reality, and there are ing software packages. real quantum programming languages that let anyone with internet access use them. A critical mass of ef- Contents fort from researchers in industry and academia alike has produced small quantum devices that operate on the 1 Introduction1 circuit model of quantum computing. These comput- ers are small, noisy, and not nearly as powerful as cur- 2 The Software Platforms2 rent classical computers. But they are nascent, steadily 2.1 Forest . 4 growing, and heralding a future of vast computational 2.2 Qiskit . 6 power for problems in chemistry [7,8], machine learn- 2.3 ProjectQ . 8 ing [9, 10], optimization [11], finance [12], and more 2.4 Quantum Development Kit . 9 [13]. These devices are a testbed for preparing the next generation of quantum software engineers to tackle cur- arXiv:1807.02500v2 [quant-ph] 20 Mar 2019 3 Comparison 11 rent classically intractable computational problems. In- 3.1 Library Support . 11 deed, cloud quantum computing has already been used 3.2 Quantum Hardware . 11 to calculate the deuteron binding energy [14] and test 3.3 Quantum Compilers . 12 subroutines in machine learning algorithms [15, 16]. 3.4 Simulator Performance . 14 Recently, there has been an explosion of quantum 3.5 Features . 15 computing software over a wide range of classical com- puting languages. A list of open-source projects, num- 4 Discussion and Conclusions 16 bering well over fifty, is available at [17], and a list of quantum computer simulators is available at [18]. This 5 Acknowledgements 16 sheer number of programs, while positively reflecting the growth of the field, makes it difficult for students References 16 and researchers to decide on which software platform Accepted in Quantum 2019-03-15, click title to verify 1 to use, getting lost in documentation or being too over- computers by companies like Google, IBM, and Intel whelmed to know where to start. which have been announced but are not currently avail- In this paper, we hope to provide a succinct overview able. and comparison of major general-purpose gate-level The technology of quantum hardware is rapidly quantum computing software platforms. From the long changing. It is very likely that new computers will be list, we have selected four in total: three that provide available by the end of the year, and in two or three the user with the ability to connect to real quantum years this list may be completely outdated. What will devices| Forest from Rigetti [19], Qiskit from IBM [20], remain, however, is the software used for connecting to and ProjectQ from ETH Zurich [21, 22]|and one with this technology. It will be very simple to use these new similar functionality but no current capability to con- quantum computers by changing just a few lines of code nect to a quantum computer|the Quantum Develop- without changing the actual syntax used for generating ment Kit from Microsoft [23]. The ability to connect or running the quantum circuit. For example, in Qiskit, to a real quantum device has guided our selection of one could just change the name of the backend when ex- these platforms. Because of this, and for the sake of ecuting the circuit: succinctness, we are intentionally omitting a number of 1 execute(quantum circuit , backend=...) respectable platforms and languages. We briefly men- Listing 1: The backend specifies which computer (real or tion a few of these in AppendixA and AppendixB. simulated) to run quantum programs on using Qiskit. As future For now, our major goal is to provide a picture of quantum computers get released, running on new hardware will the quantum computing landscape governed by these be as easy as changing the backend. four platforms. In Section2, we cover each platform in turn, discussing requirements and installation, docu- Although the software is changing as well with new ver- mentation and tutorials, language syntax, and quantum sion releases2, these are, for the most part, relatively hardware. In Section3, we provide a detailed compari- minor syntactical changes that do not alter significantly son of the platforms. This includes quantum algorithm the software functionality. library support in 3.1, quantum hardware support in At the lowest level of the quantum computing stack, 3.2, quantum circuit compilers in 3.3, and quantum a language must instruct the computer which physical computer simulators in 3.4. We conclude in Section operations to perform on which qubits. We refer to 4 with discussion and some subjective remarks about these languages, such as Quil in Forest and OpenQASM each platform. AppendixA and AppendixB discuss in Qiskit, as quantum assembly/instruction languages, other quantum software, AppendixC includes details on or occasionally as quantum languages for brevity3. On testing the quantum circuit simulators, and Appendix top of quantum languages sit quantum programming D shows code for the quantum teleportation circuit in languages, which are used to manipulate quantum lan- each of the four languages for a side by side comparison. guages in a more natural and readable way for program- mers. Examples of quantum programming languages include pyQuil, which is embedded into the classical 2 The Software Platforms \host" Python programming language, or Q#, a stan- dalone quantum programming language resembling the An overview of various quantum computers and the classical C# language. We refer to the collection of a software needed to connect to them is shown in Fig- quantum programming language with other tools such ure1. At the time of writing, these four software plat- as compilers and simulators as a quantum software plat- forms allow one to connect to four different quantum form, or simply a platform. In this paper, we focus computers|one by Rigetti, an 8 qubit quantum com- on gate level quantum software platforms which are de- puter which can be connected to via pyQuil; and three by IBM, the largest openly available being 16 qubits, tum Benchmark, QC Ware, Q-CTRL, Cambridge Quantum Com- which can be connected to via Qiskit or ProjectQ. There puting (CQC), and 1QBit. North Carolina State University is the first American university to be a member of the IBM is also a fourth 20 qubit quantum computer by IBM, but Q Hub, which also includes the University of Oxford and the this device is only available to members of the IBM Q University of Melbourne. For a complete and updated list, see Network, a collection of companies, universities, and na- https://www.research.ibm.com/ibm-q/network/. tional laboratories interested in and investing in quan- 2The programs included in this paper can be found at tum computing1. Also shown in Figure1 are quantum https://github.com/rmlarose/qsoftware-code for the most recent version of each platform. 3 1Members of the IBMQ network include those announced in To avoid bias towards IBM (which uses the terminology quan- December 2017—JP Morgan Chase, Daimler, Samsung, Honda, tum assembly language) or Rigetti (which uses the terminology Oak Ridge National Lab, and others—and those announced in quantum instruction language), we abbreviate to quantum lan- April 2018–Zapata Computing, Strangeworks, QxBranch, Quan- guage. Accepted in Quantum 2019-03-15, click title to verify 2 Connecting to Gate Level Quantum Hardware Not Currently Available to General Users Tangle Lake IBMQX5 49 Qubits IBMQX4 16 Qubits Bristlecone 72 Qubits 5 Qubits QS1_1 Intel/ 20 Qubits QuTech Google Acorn Agave IBM Quantum IBMQX2 50 Qubit 20 Qubits 8 Qubits Experience ibmq_20_tokyo Prototype 5 Qubits 20 Qubits Member of HPC Simulator IMBQ Network Rigetti Azure Currently Request 30 Qubits Offline Forest access Cloud Local Simulator Local Simulator QVM Simulator ~2030 Qubits ~2030 Qubits Simulator 30+ Qubits 40+ Qubits Register Register for Paid subscription for API API key service key QISKit Project Q (IBM) (ETH Zurich) Quantum pyQuil Development Kit (Rigetti) (Microsoft) Local Simulator Local Simulator ~2030 Qubits ~2030 Qubits Figure 1: A schematic diagram showing the paths to connecting a personal computer to a usable gate-level quantum computer. Starting from the personal computer (bottom center), nodes in green shows software platforms that can be installed on the user’s personal computer. Grey nodes show simulators run locally (i.e., on the user’s computer). Dashed lines show API/cloud connections to company resources shown in yellow clouds. Quantum simulators and usable quantum computers provided by these cloud resources are shown in blue and gold, respectively.