Optimized Quantum Compilation for Near-Term Algorithms with Openpulse

Optimized Quantum Compilation for Near-Term Algorithms with Openpulse

Optimized Quantum Compilation for Near-Term Algorithms with OpenPulse Pranav Gokhale∗ Ali Javadi-Abhari Nathan Earnest Yunong Shi University of Chicago IBM IBM University of Chicago Frederic T. Chong University of Chicago ABSTRACT Quantum computers are traditionally operated by program- mers at the granularity of a gate-based instruction set. How- ever, the actual device-level control of a quantum computer is performed via analog pulses. We introduce a compiler that ex- ploits direct control at this microarchitectural level to achieve significant improvements for quantum programs. Unlike quantum optimal control, our approach is bootstrapped from existing gate calibrations and the resulting pulses are simple. Our techniques are applicable to any quantum computer and realizable on current devices. We validate our techniques with millions of experimental shots on IBM quantum computers, controlled via the OpenPulse control interface. For represen- tative benchmarks, our pulse control techniques achieve both 1.6x lower error rates and 2x faster execution time, relative to standard gate-based compilation. These improvements are critical in the near-term era of quantum computing, which is bottlenecked by error rates and qubit lifetimes. Figure 1: Like classical programs, quantum programs un- dergo a compilation process from high-level programming 1. INTRODUCTION language to assembly. However, unlike the classical setting, quantum hardware is controlled via analog pulses. In our The present era of quantum computing is characterized work, we optimize the underlying pulse schedule by aug- by the emergence of quantum computers with dozens of menting the set basis gates to match hardware. Our compiler qubits, as well as new algorithms that have innate noise re- automatically optimizes user code, which therefore remains silience and modest qubit requirements. There are promising hardware-agnostic. indications that near-term devices could be used to accel- erate or outright-enable solutions to problems in domains ranging from molecular chemistry [1] to combinatorial opti- from daily calibrations that are already performed for the mization [2] to adversarial machine learning [3]. To realize standard set of basis gates. The resulting pulses form our these practical applications on noisy hardware, it is critical to augmented basis gate set. These pulses are extremely sim- arXiv:2004.11205v2 [quant-ph] 9 May 2020 optimize across the full stack, from algorithm to device. ple, which reduces control error and also preserves intuition Standard quantum compilers operate at the level of gates. about underlying operations, unlike QOC. This technique However, the lowest-level of quantum control is through leads to optimized programs, with mean 1.6x error reduction analog pulses. Pulse optimization has shown promise in and 2x speedup for near-term algorithms. previous quantum optimal control (QOC) work [4,5], but We emphasize the generality of our approach and our com- we found that noisy experimental systems are not ready for piler, which can target any underlying quantum hardware. compilation via QOC approaches. This is because QOC re- We demonstrate our results via OpenPulse [6,7], an inter- quires an extremely accurate model of the machine, i.e. its face for pulse-level control. In particular, our work is the first Hamiltonian. Hamiltonians are difficult to measure experi- experimental demonstration of OpenPulse for optimized com- mentally and moreover, they drift significantly between daily pilation of quantum programs (one prior paper used Open- recalibrations. Experimental QOC papers incur significant Pulse for noise extrapolation [8]). We executed pulse sched- pre-execution calibration overhead to address this issue. By ules on IBM’s 20-qubit Almaden quantum computer, acces- contrast, we propose a technique that is bootstrapped purely sible through the cloud via the IBM Q Experience [9]. Our ∗[email protected] experience-building spanned over 11.4 million experimental 1 shots, 4 million of which are explicitly presented here as con- crete research outcomes. Our results indicate that pulse-level control significantly extends the computational capacity of quantum computers. Our techniques are realizable immedi- ately on existing OpenPulse-compatible devices. To this end, all of our code and notebooks are available on Github [10]. We begin with background on quantum computing in Sec- tion2. Next, Section3 presents an overview of standard quantum compilers and our compiler design (depicted in Fig- ure1). Sections4–7 describe four key optimizations in our compiler, all of which are enabled by pulse-level control: 1. Direct Rotations (Section4). Access to pulse-level control allows us to implement any single-qubit oper- ation directly with high fidelity, circumventing ineffi- Figure 2: The points on the Bloch sphere correspond one-to- ciencies from standard compilation. one with possible qubit states. The green and brown states correspond to j0i and j1i respectively. The blue state is in a 2. Cross-Gate Pulse Cancellation (Section5). Although superposition described by latitude and longitude angles. gates have the illusion of atomicity, the true atomic units are pulses. Our compiler creates new cancellation optimizations that are otherwise invisible. The set of possible multiple-qubit operations is much richer than the set of single-qubit gates, and lacks a clear visualiza- 3. Two-Qubit Operation Decompositions (Section6). tion on the Bloch sphere. Remarkably however, any multiple- We recompile important near-term algorithm primitives qubit operation can be decomposed into single-qubit rotations for two-qubit operations directly down to the two-qubit + an entangling gate such as CNOT [11]. The CNOT gate interactions that hardware actually implements. acts on a control and target qubit, and it applies X to the target iff the control is j1i. In part because the CNOT gate is 4. Qudit Operations (Section7). Quantum systems have easy to understand, most quantum programs are expressed infinite energy levels. Pulse control enables d-level in terms of it. By implementing a small set of gates: single qudit operations, beyond the 2-level qubit subspace. qubit rotations + CNOT, a quantum computer is universal. Accordingly, quantum computers are generally designed with Section8 presents results from application of these tech- this interface in mind. However, the lowest level of hardware niques to full algorithms. We conclude in Section9. control is performed by microwave pulses. Foreshadowing the main message of our paper: this pulse-backed layer ac- 2. BACKGROUND tually provides a richer and “overcomplete” set of gates that We assume some familiarity with the fundamentals of quan- outperforms the standard interface for quantum programs. tum computing. Here we provide a brief review and expand on elements relevant to our work. 2.3 Gate Calibration To implement this standard interface of universal gates, 2.1 The Qubit quantum computers are routinely calibrated to account for The core unit involved in quantum computation is the continuous drift in the experimental setting [12,13]. As a con- ◦ qubit (quantum bit). Unlike a classical bit which is either 0 crete example, for superconducting devices, an Rx(90 ) gate or 1, a qubit can occupy any superposition between the two is calibrated by performing a Rabi experiment [14,15,16] that states, which are now denoted j0i and j1i. The Bloch sphere, determines the necessary underlying pulses. An additional ◦ depicted in Figure2, is a useful visual representation of the DRAG [17, 18, 19] calibration fine-tunes the Rx(90 ) gate by possible states of a qubit. The North Pole is the j0i state, and cancelling out stray components. Calibrations in a similar the South Pole is the j1i state. The state of a qubit can be spirit are also performed for the two-qubit gate(s). An inter- parametrized by two angles, latitude and longitude. Upon esting feature of the two-qubit gate calibrations is that they ◦ measurement, a qubit collapses to either the j0i or j1i state, have the side effect of also calibrating Rx(180 ) pulses on with probabilities dependent only on the latitude. each qubit. We exploit this free calibration in Section4. Typi- cally, RZ(q) rotation gates do not require calibration because 2.2 Quantum Gates they are implemented in software, as described in Section4. The set of valid single-qubit gates correspond to rotations around the Bloch sphere. Arbitrary such rotations are typi- 2.4 Experimental Setup cally decomposed into Rx(q) and Rz(q) rotations around the Our experiments were performed on IBM’s Almaden, a X and Z axes respectively, which are universal for single- 20 qubit device [20]. Almaden is the first cloud-accessible qubit rotations [11]. A prominent single-qubit gate is the OpenPulse device. It comprises 20 transmon qubits, with ◦ X = Rx(180 ) gate, which in Figure2 would rotate the green mean T1 and T2 coherence lifetimes of 94 and 88 ms respec- j0i state 180◦ around the X-axis to the j1i and vice versa. tively. The mean single-qubit and two-qubit (CNOT) error Thus, the X operation implements the NOT gate. rates are 0.14% and 1.78%. The mean measurement (readout) 2 Stage Notes Example assembly is essentially equivalent to the quantum circuit rep- resentation of quantum programs. Prominent examples in- Programming High-level; hardware- qft(qc) clude OpenQASM [6], Rigetti’s pyQuil [26], and TUDelft’s Language unaware; sophisticated cQASM [33]. control flow 3.1.3 Basis Gates Assembly Usually 1- or 2- qubit ar- h q[0] ity gates; minimal con- Basis gates are similar to assembly, but re-expressed in trol flow terms of the gate set that hardware implements. For example, while the well-known Controlled-Z instruction is valid in Basis Gates Like an HDL; hardware- u1(3) q[0] assembly code, it would be re-written in basis gates as a se- aware gate set quence of H and CNOT gates—which hardware natively im- Pulse Schedule Analog waves across plements. The distinction between assembly and basis gates channels; ultimate “at is primarily a conceptual one; in Qiskit, Cirq, and PyQuil, the metal” control the basis gate and assembly layers are expressed in the same software framework.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    15 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us