# NOT ALL QUBITS ARE CREATED EQUAL Variability Aware

NOT ALL QUBITS ARE CREATED EQUAL Variability Aware Policies for NISQ Computers ASPLOS 2019 Swamit Tannu Moinuddin Qureshi

2 Quantum Computers are Here! Execution Time Quantum computers can speedup hard problems 100+ Years Days Classical Computer Quantum Computer Problem Size Recent demonstrations Quantum Machine Google IBM Intel Rigetti Ion. Q Number of Qubits* 72 50 49 19 11 * Under test , fabricated, or announced QC with 10+ qubits are here, QC with 100+ qubits expected soon

3 Quantum Computing: Background QC operates on principles of entanglement and superposition Error State - 1 1 Single Qubit gate 50% Error State - 0 0 50% State of qubit Two Qubit gate (cnot) Entangled state State of qubit is a superposition of state “ 0” and state “ 1” Gate operations modulate state of the qubit

4 NISQ Programming Model v Quantum Error Correction is expensive (20 x-50 x qubits) v Noisy Intermediate Scale Quantum Computer (NISQ) [Preskill’ 18] - Run program without any error correction Error free outcome Input Program Compile Executable Execute Output Log Erroneous outcome Repeat for N Trials Figure of Merit: Probability of Successful Trial (PST)

5 The Problem of Limited Connectivity CNOT A, B SWAP B, C CNOT A, B Not Possible no link between A and B, CNOT can be performed A B C Q 1 Q 2 Q 3 Q 6 Q 5 Q 4 SWAP facilitate data movement Compiler insert SWAPs are extra instructions which can also fail

[1] Zulehner+, (TCAD’ 18) [2] Siraichi+, (CGO’ 18) [3] Li+, (ASPLOS’ 19) NISQ Compiler Policies Compiler responsible for qubit allocation and movement A SWAPs = 4 1 SWAPs = 2 2 3 A 1 2 B B 6 5 3 4 6 5 4 Qubit movement policy minimizing SWAPs Existing compiler policies solely focus on minimizing SWAPs 6

7 Not All Qubits Are Created Equal v Variability: Some qubits and links fail with higher probability than others v Avoiding certain links can improve reliability significantly Best SWAP 6% probability of Failure Worst SWAP 40% Chance of Failure Q 1 Q 2 Q 3 Q 6 Q 5 Q 4 Goal: Exploit variation in error rates to improve reliability (assign more operations on reliable qubits/links)

8 OUTLINE v Background v Error Characterization Data v Variability Aware Policies: VQA + VQM v Implementation v Evaluations

9 Characterization Methodology v Gate operations require analog pulses Gate Pulse v Quantum computers require frequent calibration to get the best pulse v IBM calibrates machines multiple times a day and generate the report contains error rates for each qubit and link v We analyzed calibration 100+ reports over 52 days for IBMQ-20

Single Qubit Gate Error Rates Average error rate 0. 26% Single Qubit Gate errors have limited effect on the reliability 10

Two Qubit Gate Error Rate Average error rate 4% 90 th Percentile: Link Error 10% Two qubit error rate is high and show significant variability 11

12 Spatial Variation in Two Qubit (Link) Error Rates Worst link: 15% cnot error Link Error Rate > 7% 3% < Link Error Rate < 7% Link Error Rate < 3% Best Link: 2% cnot error Average link error rate for 76 links in IBM-Q 20 machine Some links are consistently more error prone than others

13 OUTLINE v Background v Error Characterization Data v Variability Aware Policies: VQA + VQM v Implementation v Evaluations

14 Variation-Aware Policy Input Program Connectivity Map Variation-aware Compiler Variation-aware Qubit Allocation (VQA) Variation-aware Qubit Movement (VQM) Noise Characteristics We propose variation-aware policy , to generate initial assignment and operation schedule that maximize the reliability, not just SWAP count

15 Qubit Movement cnot A, B A 1 2 3 6 5 4 SWAPs = 2 B SWAPs = 2 Multiple possible paths to entangle two qubits with identical SWAP cost B

16 Variation-aware Qubit Movement (VQM) A 1 0. 95 2 0. 9 3 0. 95 6 0. 8 5 4 0. 95 Movement Path Probability of Success 1 -6 -5 40% 1 -2 -3 50% 1 -2 -5 60% B cnot A, B Chose a sequence of swaps that maximizes the reliability

17 Variation Aware Qubit Allocation (VQA) cnot A, B cnot B, C cnot C, D A 1 0. 9 B 2 0. 95 A 0. 95 0. 85 6 D 0. 8 SWAPs = 0 5 C 0. 95 1 3 4 PST = 0. 61 0. 95 2 B 0. 9 3 0. 95 0. 85 6 0. 8 5 D SWAPs = 0 0. 95 4 C PST = 0. 77 Choose qubits that maximizes the reliability

18 OUTLINE v Background v Error Characterization Data v Variability Aware Policies: VQA + VQM v Implementation v Evaluations

19 Implementation Example cnot cnot A, B C, D A, C A, D Input Program A B C D Logical Qubit DAG Physical Qubit Connectivity B D 1 2 A C 4 3 Circuit Representation of program L 2 P Map program on the physical qubits to maximize reliability

20 Variation-Aware Movement Design 1 0. 9 4 A L 1 2 A 0. 8 0. 95 3 Form Layers B C D L 3 L 2 P Map for Layer A 1 B 2 A 1 M 1 4 C B 2 A 1 M 3 M 2 3 D 4 C B 2 3 D 4 D 3 C Partition circuit in Layers (L ) & Find L 2 P Map (M )

21 Variation-Aware Movement Design 1 0. 9 L 1 2 4 0. 95 3 A L 3 A 0. 8 0. 9 S 23 L 2 S 12 Form Layers B ? ? C D B C D Input Circuit L 2 P Map for Layer A 1 B 2 S 12 A 1 M 1 4 C B 2 S 23 A 1 M 3 M 2 3 D 4 C 3 D B 2 4 D 3 C Search for set of optimal SWAPs (Si, i+1 ) to transform M i to M i+1

22 Variation-Aware Movement Design v Find set of least number of SWAPs (Si, i+1 ) to transform Mi into Mi+1 using A-star search A 1 0. 9 4 C B 2 0. 8 0. 95 3 D Initial L 2 P Mapping A AB BC D C DA BA C 1 D 4 C Final Schedule with SWAP (VQM) L 3 L 1 L 2 S 12 S 23 ? PST: 0. 65 ? SWAP = 1 B 2 M 1 A 1 PST: 0. 55 M 2 B 2 A 1 B 2 M 3 4 3 Schedule 3 4 with SWAP 3 Final (baseline) D C D D C Variability-aware movement actively avoid unreliable links

23 VQA Design: Balancing Reliability and Connectivity Strongest subgraph with degree > 3 Find strongest subgraph (SGk) by pruning the weak qubits Map program qubits with high activity on strong qubits (nodes)

24 OUTLINE v Background v Error Characterization Data v Variability Aware Policies: VQA + VQM v Implementation v Evaluations

25 Evaluations for IBM-Q 20 Simulator Relative PST 2 1. 5 83% 1 Variation unaware baseline 0. 5 0 ALU BV-16 BV-20 QFT-12 QFT-14 RND-SD RND-LD VQA+VQM improves PST up to 1. 83 x over variation-unaware baseline

26 Evaluations on Real System: IBM-Q 5 Relative PST 2 1. 5 90% Variation unaware baseline 1 0. 5 0 BV-3 BV-4 Tri-SWAP GHZ-3 On IBM-Q 5, VQA+VQM improves the reliability up to 1. 9 x

Conclusion v Reliability is a key challenge for near-term quantum computers v Not all Qubits are created equal: significant variation in error rates v Proposed variation-aware policies improves reliability by actively avoiding error-prone qubits/links v Significant improvement in reliability (up to 90%) 27

28 Thank you Questions?

29 Backup Slides

30 Temporal Variation in Two Qubit Error Rates Weak Link Strong Links Operational error-rates have low temporal variation in a small time window, the error-rates evaluated during calibration can be used by the compiler

31 Comparing VQA+ VQM with IBM’s Native Compiler On simulator with IBM-Q 20 data Our evaluations show up to 7 x improvement in PST over IBM’s native compiler

32 Spatial Variability in SWAP Error Rates on IBM-Q 20 Worst link: 15% cnot error Worst SWAP 40% Chance of Failure Best SWAP 6% probability of Failure Best Link: 2% cnot error Link Error Rate > 7% 3% < Link Error Rate < 7% Link Error Rate < 3% Average link error rate for 76 links in IBM-Q 20 machine SWAP requires 3 CNOT ops, SWAP on weakest link degrade PST by 50%

- Slides: 32