Optimal Layout Synthesis for Quantum Computing
Bochen Tan University of California, Los Angeles
Jason of California, Los Angeles
(QC) are inevitable. A classical algorithm is a series of operations on a set of bits; likewise, a quantum algorithm is a series of op- erations, i.e., quantum gates, on a set of quantum bits, i.e., qubits. A realistic quantum computer architecture only supports gates in its gate library. To implement a quantum algorithm, the original quantum gates have to be translated into gates within this library. This process is called logic synthesis for quantum computing. It has been shown that all quantum algorithms can be decomposed to quantum gates acting on a single qubit or two qubits [17], so usually the output of logic synthesis is a list of single-qubit gates and two-qubit gates.
Copyright By PowCoder代写 加微信 powcoder
After logic synthesis, the qubits and quantum gates are still purely logical. Next, a mapping from such logical qubits to the physical qubits on QC architecture and a schedule which decides when every quantum gate is executed have to be provided. (Note that our notion of logical qubit is dierent from that in the quantum error correction.) The task of deriving such information is called layout synthesis for quantum computing (LSQC) [24]. Other names have also been used to refer to this task,1e.g., quantum circuit compilation [1, 8], transpilation (in Qiskit ), placement [14, 20], mapping [6, 13, 15, 26, 29], qubit allocation [22], and routing [23]. We choose to use the term ‘layout synthesis’ as it involves both placement and scheduling. There is an important issue to resolve in LSQC. Every two-qubit gate requires a connection between its two qubits. An algorithm designer may assume the logical qubits to have all-to-all connectivity, but this is not the case for the physical qubits in many QC architectures, e.g., the superconducting QC systems at Google [3]. As a result, every QC architecture comes with a coupling graph specifying which physical qubit pairs are connected. If the pair of logical qubits of a two-qubit gate is mapped to a disconnected physical qubit pair on the coupling graph, this gate will not be executable. Luckily, there is a special type of gate, SWAP, that can exchange the mapping of two logical qubits. Thus, with a series of SWAP gates, two logical qubits can reach two connected physical qubits, but this comes at some additional cost. The decisions of when and where to apply these SWAP gates are made in LSQC.
A recent study [24] revealed large optimality gaps of several lead- ing LSQC tools with a set of benchmarks named QUEKO that have known optimal solutions. Therefore, despite the NP-completeness of the problem [14, 22, 24], optimal approaches to LSQC are still worthy of research because they provide the baseline of measur- ing the available LSQC solutions. There have been a few previous works on exact or optimal LSQC [6, 20, 22, 26, 28]. However, they either just focus on specic coupling graphs, or has some implicit and unnecessary constraints. As for the heuristic approaches [8, 13– 15, 22, 23, 25, 29], the optimality gaps suggest that they still have a lot of room for improvement.
In this paper, we present two layout synthesizers and compare them with leading related works on a comprehensive set of bench- mark quantum programs and architectures. The optimal layout
1 hps://qiskit.org/
Recent years have witnessed the fast development of quantum com- puting. Researchers around the world are eager to run larger and larger quantum algorithms that promise speedups impossible to any classical algorithm. However, the available quantum comput- ers are still volatile and error-prone. Thus, layout synthesis, which transforms quantum programs to meet these hardware limitations, is a crucial step in the realization of quantum computing. In this paper, we present two synthesizers, one optimal and one approxi- mate but nearly optimal. Although a few optimal approaches to this problem have been published, our optimal synthesizer explores a larger solution space, thus is optimal in a stronger sense. In addition, it reduces time and space complexity exponentially compared to some leading optimal approaches. The key to this success is a more ecient spacetime-based variable encoding of the layout synthe- sis problem as a mathematical programming problem. By slightly changing our formulation, we arrive at an approximate synthesizer that is even more ecient and outperforms some leading heuristic approaches, in terms of additional gate cost, by up to 100%, and also delity by up to 10x on a comprehensive set of benchmark pro- grams and architectures. For a specic family of quantum programs named QAOA, which is deemed to be a promising application for near-term quantum computers, we further adjust the approximate synthesizer by taking commutation into consideration, achieving up to 75% reduction in depth and up to 65% reduction in additional cost compared to the tool used in a leading QAOA study.
CCS Concepts: • Computer systems organization ! Quan- tum computing; • Hardware ! Physical synthesis.
Keywords: quantum computing, layout synthesis, allocation, place- ment, scheduling, mapping
ACM Reference Format:
Bochen Tan and . 2020. Optimal Layout Synthesis for Quantum Computing. In . ACM, , NY, USA, 10 pages.
1 Introduction
For years, quantum algorithms have been shown theoretically to hold signicant advantages over classical algorithms on some alge- braic problems like factoring large numbers [21], quantum chem- istry [5], machine learning [7], and so on. Recently, the rst ex- perimental proof of quantum computational advantage on certain sampling problems was published [3].
To implement a quantum algorithm on an actual quantum com- puter, logic synthesis and layout synthesis for quantum computing
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for prot or commercial advantage and that copies bear this notice and the full citation on the rst page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specic permission and/or a fee. Request permissions from
ICCAD ’20, ,
© 2020 Association for Computing Machinery.
arXiv:2007.15671v1 [cs.AR] 30 Jul 2020
ICCAD ’20, ,
Bochen Tan and
synthesizer for quantum computing (OLSQ) formulates LSQC as a satisability modulo theories optimization problem (SMT). This problem is then passed to Z3 SMT solver [9] which guarantees optimal solutions. Compared to Wille et al. [26], a leading opti- mal approach which also formulates LSQC to SMT, we provide exponential reduction on the number of variables, resulting in orders-of-magnitude reductions in runtime and the memory usage. The key to this improvement is to represent the solution space with mapping variables, not with mapping transformation variables as in [22, 26]. Also, by relaxing the gate placement under the depen- dency constraints, OLSQ explores a larger solution space than other gate-by-gate [22, 26] and level-by-level [6] “optimal” approaches, so its results are sometimes even better. Furthermore, by eliminating redundant mapping variables between transitions, i.e., when the mapping changes due to some SWAP gates, we signicantly reduce the number of variables and derive a highly scalable approximate synthesizer, transition-based-OLSQ (TB-OLSQ). Evaluation results show that TB-OLSQ is nearly optimal and is able to increase delity by 1.30x in geomean, compared to TriQ [15], a leading academic work, and reduce cost by 69.2% in geomean, compared to t|keti [23], a leading industry work. Finally, given that quantum approximate optimization (QAOA) [4, 10, 12, 18] is very much in the spotlight due to its feasibility for near-term quantum computers, we study the LSQC of QAOA. The structure of gates in QAOA makes it an excellent showcase for the power of our transition-based model. Moreover, with additional prior knowledge on commutation re- lations in QAOA, we improve TB-OLSQ for QAOA, denoted as QAOA-OLSQ. Compared to t|keti, which was utilized in a leading QAOA experiment study [4], QAOA-OLSQ is able to reduce depth by 70.2% in geomean and cost by 53.8% in geomean.
2 Background
The input to an LSQC problem consists of two parts. The rst part is a quantum program or a quantum circuit which is specied as a list of quantum gates or operations 0 1…