# Qubit Placement to Minimize Communication Overhead in 2

- Slides: 23

Qubit Placement to Minimize Communication Overhead in 2 D Quantum Architectures Alireza Shafaei, Mehdi Saeedi, Massoud Pedram Department of Electrical Engineering University of Southern California http: //atrak. usc. edu/ Supported by the IARPA Quantum Computer Science Program

Outline �Introduction � Quantum Computing Technologies �Geometric Constraints � Nearest Neighbor Architectures �Proposed Solution � MIP-based Qubit Placement � Force-directed Qubit Placement �Results �Conclusion 2

Quantum Computing �Motivation: Faster Algorithms http: //math. nist. gov/quantum/zoo/ � Shor’s factoring algorithm (Superpolynomial) � Grover’s search algorithm (Polynomial) � Quantum walk on binary welded trees (Superpolynomial) � Pell's equation (Superpolynomial) � Formula evaluation (Polynomial) �Representation Quantum Algorithm Quantum Circuit Physical Realization (PMD) PMD: Physical Machine Description 3

Quantum Circuits �Qubits � Data is carried by quantum bits or qubits � Physical objects are ions, photons, etc. �Quantum Gates � Single-qubit: H (Hadamard), X (NOT) H q 0 � Two-qubit: CNOT (Controlled NOT), SWAP q 1 �Quantum Circuit q 0 q 1 q 2 q 3 4 X X q 0 q 1 q 0

Quantum PMDs �Move-based PMDs � Explicit move instruction � There are routing channels for qubit routing � Examples: Ion-Trap, Photonics, Neutral Atoms �SWAP-based PMDs � No move instruction � There are no routing channels � Qubit routing via SWAP gate insertion � Examples: Quantum Dot, Superconducting �Focus of this presentation is on SWAP-based 5 PMDs

Geometric Constraints �Limited Interaction Distance � Adjacent qubits can be involved in a two-qubit gate � Nearest neighbor architectures �Route distant qubits to make them adjacent � Move-based: MOVE instruction 1 2 3 � SWAP-based: insert SWAP gates 2 1 6 3 2 1 1 3 4 1 4

SWAP-based PMDs �SWAP insertion � Objective � Ensure that all two-qubit gates perform local operations (on adjacent qubits) � Side effects � More gates, and hence more area � Higher logic depth, and thus higher latency and higher error rate � Minimize the number of SWAP gates by placing frequently interacting qubits as close as possible on the fabric � This paper: MIP-based qubit placement � Future work: Force-directed qubit placement (a more scalable solution) 7 MIP: Mixed Integer Programming

Example on Quantum Dot �Simple qubit placement: place qubits considering only their immediate interactions and ignoring X their future interactions CNOT q 0 X q 1 CNOT q 2 q 3 q 4 Two SWAP gates 8 CNOT

Example on Quantum Dot (cont’d) �Improved qubit placement: place qubits by considering their future interactions CNOT q 0 X q 1 CNOT q 2 q 3 q 4 No SWAP gate 9 X CNOT

Qubit Placement � Assign each qubit to a location on the 2 D grid such that frequently interacting qubits are placed close to one another (1) 10

Kaufmann and Broeckx’s Linearization (2) R. E. Burkard, E. ela, P. M. Pardalos, and L. S. Pitsoulis. The Quadratic Assignment Problem. Handbook of Combinatorial Optimization, Kluwer Academic Publishers, pp. 241 -338, 1998. 11

MIP Optimization Framework � GUROBI Optimizer 5. 5 (http: //www. gurobi. com) � Commercial solver with parallel algorithms for large- scale linear, quadratic, and mixed-integer programs (free for academic use) � Uses linear-programming relaxation techniques along with other heuristics in order to quickly solve largescale MIP problems � Qubit placement (the MIP formulation) does not guarantee that all two-qubit gates become localized; Instead, it ensures the placement of qubits such that the frequently interact qubits are as close as possible to one another � SWAP insertion 12

SWAP Insertion 7 2 9 3 7 9 3 1 6 2 1 6 1 2 6 4 5 8 CNOT CNOT 13 1, 5, 3, 2, 6, 1, 2, 2 8 7 4 8 3 6 CNOT SWAP CNOT 1, 5, 3, 2, 2, 2, 6, 1, 2, 2 8 7 7 3 4 8 3 6 PQRE for Quantum Dot PMD CNOT SWAP CNOT 1, 5, 3, 2, 2, 2, 6, 1, 1, 2, 2 8 7 7 3 4 8 2 3 6

Solution Improvement (1) � 14

Solution Improvement (2) � 15

Improved Qubit Placement Intra-set communication distance Inter-set communication distance (3) 16

Force-directed Qubit Placement � 17

Results (1) 3_17 4_49 4 gt 10 4 gt 11 4 gt 12 4 gt 13 4 gt 4 4 gt 5 4 mod 5 4 mod 7 aj-e 11 alu decod 24 ham 7 hwb 4 hwb 5 hwb 6 hwb 7 hwb 8 hwb 9 mod 5 adder mod 8 -10 rd 32 rd 53 rd 73 18 Our Method Best 1 D # of qubits # of gates Grid Size #SWAPs Imp. (%) Ref. 3 4 5 5 5 5 4 5 4 7 4 5 6 7 8 9 6 5 4 7 10 13 30 36 7 52 16 43 22 24 40 59 31 9 87 23 106 146 2659 16608 20405 81 108 8 78 76 2 x 2 3 x 2 2 x 3 3 x 2 3 x 3 2 x 3 2 x 2 3 x 3 3 x 2 2 x 3 3 x 3 4 x 3 3 x 2 3 x 3 2 x 3 5 x 2 4 x 4 6 13 16 2 19 2 17 8 11 13 24 10 3 48 9 45 79 1688 11027 15022 41 45 2 39 37 4 12 20 1 35 6 34 12 9 21 36 18 3 68 10 63 118 2228 14361 21166 51 72 2 66 56 -50 -8 20 -100 46 67 50 33 -22 38 33 44 0 29 10 29 33 24 23 29 20 38 0 41 34 [1] [1] [1] [1] [1] [1] [1]

Results (2) sym 9 sys 6 urf 1 urf 2 urf 5 QFT 6 QFT 7 QFT 8 QFT 9 QFT 10 cnt 3 -5 cycle 10_2 ham 15 plus 127 mod 8192 plus 63 mod 4096 plus 63 mod 8192 rd 84 urf 3 urf 6 Shor 3 Shor 4 Shor 5 Shor 6 19 Our Method Best 1 D # of qubits # of gates Grid Size #SWAPs Imp. (%) Ref. 10 10 9 8 9 5 6 7 8 9 10 16 12 15 13 12 13 15 10 12 14 16 4452 62 57770 25150 51380 10 15 21 28 36 45 1212 458 65455 29019 37101 112 132340 53700 2076 5002 10265 18885 4 x 4 3 x 3 2 x 4 3 x 3 3 x 2 2 x 3 5 x 2 4 x 2 3 x 3 5 x 3 3 x 6 3 x 4 5 x 3 5 x 3 4 x 3 3 x 6 5 x 4 4 x 6 2363 31 38555 16822 34406 5 6 18 18 34 53 69 839 328 53598 22118 29835 54 94017 43909 1710 4264 8456 20386 3415 59 44072 17670 39309 6 12 26 33 54 70 127 2304 715 151794 61556 82492 148 154672 88900 1816 4339 10760 20778 31 47 13 5 12 17 50 31 45 37 24 46 64 54 65 64 64 64 39 51 6 4 21 2 [1] [1] [1] [2] [2] [2] [3] [3] On average 27

Results (3) Improvement over best 1 D solution 20

Conclusion �Qubit placement methods for 2 D quantum architectures � Directly applicable to Quantum Dot PMD � 27% improvement over best 1 D results �Future work: force-directed qubit placement � Better results by considering both intra- and inter-set SWAP gates in the optimization problem 21

References [1] A. Shafaei, M. Saeedi, and M. Pedram, “Optimization of quantum circuits for interaction distance in linearest neighbor architectures, ” Design Automation Conference (DAC), 2013. [2] M. Saeedi, R. Wille, R. Drechsler, “Synthesis of quantum circuits for linearest neighbor architectures, ” Quantum Information Processing, 10(3): 355– 377, 2011. [3] Y. Hirata, M. Nakanishi, S. Yamashita, Y. Nakashima, “An efficient conversion of quantum circuits to a linearest neighbor architecture, ” Quantum Information & Computation, 11(1– 2): 0142– 0166, 2011. 22

Thank you! 23