Formal Constraint-based Compilation for Noisy Intermediate-Scale Quantum Systems

Abstract Noisy, intermediate-scale quantum (NISQ) systems are expected to have a few hundred qubits, minimal or no error correction, limited connectivity and limits on the number of gates that can be performed within the short coherence window of the machine. The past decade’s research on quantum programming languages and compilers is directed towards large systems with thousands of qubits. For near term quantum systems, it is crucial to design tool flows which make efficient use of the hardware resources without sacrificing the ease and portability of a high-level programming environment. In this paper, we present a compiler for the Scaffold quantum programming language in which aggressive optimization specifically targets NISQ machines with hundreds of qubits. Our compiler extracts gates from a Scaffold program, and formulates a constrained optimization problem which considers both program characteristics and machine constraints. Using the Z3 SMT solver, the compiler maps program qubits to hardware qubits, schedules gates, and inserts CNOT routing operations while optimizing the overall execution time. The output of the optimization is used to produce target code in the OpenQASM language, which can be executed on existing quantum hardware such as the 16-qubit IBM machine. Using real and synthetic benchmarks, we show that it is feasible to synthesize near-optimal compiled code for current and small NISQ systems. For large programs and machine sizes, the SMT optimization approach can be used to synthesize compiled code that is guaranteed to finish within the coherence window of the machine.

[1]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[2]  H. Neven,et al.  Digitized adiabatic quantum computing with a superconducting circuit. , 2015, Nature.

[3]  Umesh V. Vazirani,et al.  Quantum Complexity Theory , 1997, SIAM J. Comput..

[4]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

[5]  Vikram S. Adve,et al.  LLVM: a compilation framework for lifelong program analysis & transformation , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[6]  John Preskill,et al.  Quantum Computing in the NISQ era and beyond , 2018, Quantum.

[7]  Ronald L. Rivest,et al.  Introduction to Algorithms, third edition , 2009 .

[8]  Andrew W. Cross,et al.  Open Quantum Assembly Language , 2017, 1707.03429.

[9]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[10]  P ? ? ? ? ? ? ? % ? ? ? ? , 1991 .

[11]  Robert Wille,et al.  Look-ahead schemes for nearest neighbor optimization of 1D and 2D quantum circuits , 2016, 2016 21st Asia and South Pacific Design Automation Conference (ASP-DAC).

[12]  Margaret Martonosi,et al.  ScaffCC: a framework for compilation and analysis of quantum computing programs , 2014, Conf. Computing Frontiers.

[13]  Jens Koch,et al.  Coupling superconducting qubits via a cavity bus , 2007, Nature.

[14]  N. Mermin Quantum Computer Science: An Introduction , 2007 .

[15]  J. Gambetta,et al.  Superconducting qubit in a waveguide cavity with a coherence time approaching 0.1 ms , 2012, 1202.5533.

[16]  J. Cirac,et al.  Quantum Computations with Cold Trapped Ions. , 1995, Physical review letters.

[17]  Matthias Troyer,et al.  ProjectQ: An Open Source Software Framework for Quantum Computing , 2016, ArXiv.

[18]  N. Linke,et al.  High-Fidelity Preparation, Gates, Memory, and Readout of a Trapped-Ion Quantum Bit. , 2014, Physical review letters.

[19]  Teofilo F. Gonzalez,et al.  Complexity of pairwise shortest path routing in the grid , 2004, Theor. Comput. Sci..

[20]  Tsuyoshi Murata,et al.  {m , 1934, ACML.

[21]  Jonathan A. Jones,et al.  Implementation of a quantum search algorithm on a quantum computer , 1998, Nature.

[22]  Lov K. Grover A fast quantum mechanical algorithm for database search , 1996, STOC '96.

[23]  Naser MohammadZadeh,et al.  Quantum circuit physical design flow for 2D nearest‐neighbor architectures , 2017, Int. J. Circuit Theory Appl..

[24]  Massoud Pedram,et al.  Minimizing the latency of quantum circuits during mapping to the ion-trap circuit fabric , 2012, 2012 Design, Automation & Test in Europe Conference & Exhibition (DATE).

[25]  R. Schoelkopf,et al.  Superconducting Circuits for Quantum Information: An Outlook , 2013, Science.

[26]  Stefan Frehse,et al.  RevKit: An Open Source Toolkit for the Design of Reversible Circuits , 2011, RC.

[27]  Kae Nemoto,et al.  Requirements for fault-tolerant factoring on an atom-optics quantum computer , 2012, Nature Communications.

[28]  Koen Bertels,et al.  An Experimental Microarchitecture for a Superconducting Quantum Processor , 2017, 2017 50th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[29]  Jeremy Frank,et al.  Compiling quantum circuits to realistic hardware architectures using temporal planners , 2017, ArXiv.

[30]  Gian Giacomo Guerreschi,et al.  Two-step approach to scheduling quantum circuits , 2018, Quantum Science and Technology.

[31]  Margaret Martonosi,et al.  Compiler Management of Communication and Parallelism for Quantum Computation , 2015, ASPLOS.

[32]  Nikolaj Bjørner,et al.  νZ - An Optimizing SMT Solver , 2015, TACAS.

[33]  L. Vandersypen,et al.  NMR techniques for quantum control and computation , 2004, quant-ph/0404064.