UREQA: Leveraging Operation-Aware Error Rates for Effective Quantum Circuit Mapping on NISQ-Era Quantum Computers

Tirthak Patel Baolin Li Rohan Basu Roy Devesh Tiwari Quantum Computing is Coming! What is a Qubit (Quantum Bit)? A classical bit has two states:

A quantum bit or qubit can be in a superposition of the two basis states:

Upon measurement, the qubit superposition collapses, and the qubit can be found in one of the two basis states. Manipulating Qubit States

A qubit can be put in a desired superposition by applying quantum operations which can be represented as rotations on the Bloch sphere. Manipulating Qubit States

A qubit can be put in a desired superposition by applying quantum operations which can be represented as rotations on the Bloch sphere.

Initially, the qubit is in the ground state. Then, it first gets manipulated by an H gate in an equal

superposition state, then by a Rz gate. Multi-qubit Gate Operations Basis states of a two-qubit system can be expressed as Multi-qubit Gate Operations

Two qubits can be entangled using two-qubit gates. E.g., Bell State

In 2-qubit gates (CH, CRx, CRy and CRz), one qubit is the control qubit and the other is the target qubit. The respective 1-qubit gate is applied to the target qubit depending on the superposition of the control qubit. All quantum algorithm circuits can be broken down into one- and two- qubit basis gates. Engineering a Quantum Computing Device

Readout/Control Resonators

Coupling Resonators

Qubits NISQ Devices are Highly Erroneous!

Errors in applying microwave pulses cause 1-qubit gate errors. Coupling resonators can be highly erroneous causing 2-qubit gate errors. The readout resonators are also highly error-prone and cause readout errors. T1 coherence time: energy decay to the ground state. T2 coherence time: phase damping due to env. factors. Execution Flow on a Quantum Computer quantum algorithm. For example, if the estimated er- Table 1: IBM QX quantum computers. ror rate of each qubit is significantly different than the Online Date ComputersQuantum (Num. Qubits) Circuit Maps Nov 06, 2018 Melbourne (14), Yorktown (5) actual error rate when the circuit map is executed, then Every quantum computers is composed of multiple qubits – each with Jul 03, 2019 (5), (5) quantum algorithm. For example, ifthese the differences estimated add uper- over the circuit map executionTable 1: IBM QX quantumpotentially computers. different number of qubits and topological structure and result in a significantly inaccurate outcome. There- Online Date Computers (Num. Qubits) ror rate of each qubit is significantlyfore, different previous works than have the focused on estimating the error actual error rate when the circuit maprates is accurately executed, and then using that to find the optimalNov circuit 06, 2018 MelbourneMelbourne (14), YorktownYorktown (5) Ourense & Vigo map [3, 15, 18, 25, 26, 28]. Jul 03, 2019 Figure 2:Ourense LayoutA of single (5), IBM quantum Vigo quantum (5) algorithm computers. can be The “mapped” circles in rep- different ways on the these differences add up over the circuit map execution resent qubits. Thesame arrows quantum show computer possible – each 2-qubit mapping gates: is referred the di- as “circuit map”. What is Missing from Existing Solutions? Current ap- and result in a significantly inaccurate outcome. There- rection points fromCircuit control map toA target qubit. proaches use a single number to characterize the error for a 3-qubit Circuit map B fore, previous works have focused on estimatingrate of a given the qubit error irrespective of the different quantum mized circuit mapalgorithm selection achieves up to 15% reduc- rates accurately and using that to findoperations the optimal being circuit performed on the qubit [25, 26,Melbourne 28, 31]. tion in error rateYorktown for a quantumOurense algorithm, & Vigo compared to For the first time, we show that error rate is not only the current approaches which rely on a single aggregated map [3, 15, 18, 25, 26, 28]. qubit-specific, but also operation-specificFigure 2: (as Layout explained of IBMnumber quantum for error computers. rate estimation The based circles on historical rep- data. in Sec. 2, a 1-qubit gate can performresent different qubits. types The of arrows show possible 2-qubit gates: the di- UREQA’s quantum error prediction model and What is Missing from Existing Solutions?quantum operationsCurrent on ap- a single qubit). We show that rection points from controlcircuit to target mapping qubit. framework is open-sourced at quantum error rates can vary significantly depending on proaches use a single number to characterize the error https://github.com/GoodwillComputingLab/UREQA. rate of a given qubit irrespective of thethe different specific quantum quantum operation thatmized is being circuit performed, map selection achieves up to 15% reduc- even if other conditions are kept constant (i.e., the phys- 2UREQA: The Solution operations being performed on the qubitical qubit [25, and 26, the 28, machine). 31]. Sometion qubits in error with low rate ag- for a quantum algorithm, compared to For the first time, we show that errorgregate rate average is not error only rate mightthe experience current high approaches error Background. which relyThis on study a is single performed aggregated on the IBM Quan- rate for specific quantum operations. Hence, these qubits tum Experience (QX) - a public cloud service. We use qubit-specific, but also operation-specificshould (asbe avoided explained for a circuit-mapnumber selection for if a error partic- ratethe estimation IBM QX machines based listed on historical in Table 1. They data. cover a in Sec. 2, a 1-qubit gate can performular different circuit consists types of of many such specific quantum op- diverse range of quantum architectures in terms of error- UREQA’s quantumrates, topology, error and prediction time of introduction model (Fig. and 2). quantum operations on a single qubit).erations. We The show reason that for this phenomena is the unstable nature of current NISQ technologycircuit where qubits mapping are erro- frameworkQuantum operations is on open-sourced these computers include at both quantum error rates can vary significantly depending on the gate and readout operations. Primary 1-qubit gates neous and do not have consistenthttps://github.com/GoodwillComputingLab/UREQA properties as different . the specific quantum operation that isqubits being interact performed, differently with external control and the include the Hadamard (H) gate which puts the two ba- sis states into equal superposition and the x-, y-, and z- even if other conditions are kept constantenvironmental (i.e., the features. phys-This is the first work to discover and leverage the above insight2U to chooseREQA better circuit: Therotation Solution gates (Rx, Ry, and Rz, respectively) which rotate ical qubit and the machine). Some qubitsmaps that with lower low the impact ag- of quantum errors, and push the qubit about the x-axis, y-axis and z-axis on the Bloch the state-of-the-art in improvingBackground. the efficiency of quan-This studySphere, is respectively. performed The on Bloch the Sphere IBM is Quan- a unit sphere gregate average error rate might experience high error with the 0 state represented as a vector pointing toward tum algorithm execution on NISQ computers. | i rate for specific quantum operations. Hence, these qubits tum Experience (QX)the - positive a public z-axis cloud and the service.1 state is represented We use on the 1 | i UREQA Solution. UREQA buildsthe a IBM data driven QX model machinesnegative listed z-axis. in The Table other 1. two They axis represent cover the a qubit should be avoided for a circuit-map selectionfor correctly if estimating a partic- the error rates of operations on diverse range of quantumphase. The architectures qubit state vector in terms can point of anywhere error- on the ular circuit consists of many such specificdifferent quantum qubits of a quantum op- computer, and then, lever- Bloch Sphere, but upon readout, it collapses to the posi- ages this information to find therates, most optimized topology, circuit and timetive ( 0 of) or introduction negative ( 1 ) z-axis. (Fig. As 2). an example, Fig. 3 erations. The reason for this phenomena is the unstable | i | i for a quantum algorithm. UREQA builds its error rate uses the Bloch Sphere to show the state changes after ap- nature of current NISQ technology whereprediction qubits model are by erro- performing aQuantum large number operations of ex- on these computers include both plying a H gate followed by a Rz gate with p rotation to a neous and do not have consistent propertiesperiments as on real different IBM NISQ computers.the gate Our and evaluation readoutsingle operations. qubit. When Primary the H gate is 1-qubit applied, the gates qubit state qubits interact differently with externalshows control that these and error the rate predictioninclude methods the are Hadamard more vector (H points) gate toward which the positive puts the x-axis two and the ba- qubit is accurate than current state-of-the-art approaches of sim- equally probable to be measured as 0 or 1 . This prob- ply using a general error rate numbersis states periodically into pub- equal superposition and the x-,| y-,i and| i z- environmental features. This is the first work to discover ability of measurement remains the same even after a Rz and leverage the above insight to chooselished by better the quantum circuit computingrotation platform provider. gates (Rx, Ryrotation, and isR applied,z, respectively) except the qubit which has a negative rotate phase. To demonstrate UREQA’s effectiveness, we evaluate the qubit about the x-axis,All 1-qubit y-axis gates and have z-axis 2-qubit on variants the ( BlochCH, CRx, CRy maps that lower the impact of quantumUREQA errors,for a and diverse push set of quantum benchmarks, con- and CRz) where one qubit is the control and the other is the state-of-the-art in improving the efficiencyducting experiments of quan- over more thanSphere, 50 days respectively. on four dif- the The target. Bloch The respective Sphere 1-qubit is a unit gate is sphere applied to the ferent quantum computers in thewith IBM the QX cloud.0 state Our representedtarget qubit depending as a vector on the pointing superposition toward of the control tum algorithm execution on NISQ computers.results show that our operation-aware solution achieves | i qubit. In Fig. 1, the connection between qubit 0 and Rz a small median prediction errorthe rate of positive 1%. Using z-axis these and the 1 state is represented on the UREQA Solution. UREQA1 builds a data driven model gate of qubit| i 1 means it is a CRz gate with qubit 0 as operation error-rate prediction models,negative UREQA z-axis.’s opti- Thecontrol other and two qubit axis 1 as target. represent the qubit for correctly estimating the error rates of operations on 1UREQA (Eureka) stands for utilizingphase. operation-aware Thee qubitrror rate stateThese vector qubit can operations point can anywhere be erroneous. on IBM’s the qubits different qubits of a quantum computer,predictions and (for then, better circuit lever- mapping) onBlochquantum Sphere, computers. but uponare fixed-frequency readout, it collapses superconducting to the Transmon posi- qubits ages this information to find the most optimized circuit tive ( 0 ) or negative ( 1 ) z-axis. As an example, Fig. 3 | i | i for a quantum algorithm. UREQA builds its error rate uses the Bloch Sphere to show the state changes after ap- prediction model by performing a large number of ex- plying a H gate followed by a Rz gate with p rotation to a periments on real IBM NISQ computers. Our evaluation single qubit. When the H gate is applied, the qubit state shows that these error rate prediction methods are more vector points toward the positive x-axis and the qubit is accurate than current state-of-the-art approaches of sim- equally probable to be measured as 0 or 1 . This prob- ply using a general error rate number periodically pub- | i | i ability of measurement remains the same even after a Rz lished by the quantum computing platform provider. rotation is applied, except the qubit has a negative phase. To demonstrate UREQA’s effectiveness, we evaluate All 1-qubit gates have 2-qubit variants (CH, CRx, CRy UREQA for a diverse set of quantum benchmarks, con- and CRz) where one qubit is the control and the other is ducting experiments over more than 50 days on four dif- the target. The respective 1-qubit gate is applied to the ferent quantum computers in the IBM QX cloud. Our target qubit depending on the superposition of the control results show that our operation-aware solution achieves qubit. In Fig. 1, the connection between qubit 0 and Rz a small median prediction error rate of 1%. Using these gate of qubit 1 means it is a CRz gate with qubit 0 as operation error-rate prediction models, UREQA’s opti- control and qubit 1 as target.

1UREQA (Eureka) stands for utilizing operation-aware error rate These qubit operations can be erroneous. IBM’s qubits predictions (for better circuit mapping) on quantum computers. are fixed-frequency superconducting Transmon qubits quantum algorithm.quantum For algorithm. example, if For the example, estimated if er- the estimated er-Table 1: IBM QXTable quantum 1: IBM computers. QX quantum computers. ror rate of eachror qubit rate is of significantly each qubit is different significantly than the different than theOnline Date ComputersOnline Date (Num.Computers Qubits)Quantum (Num. Circuit Qubits) Map Selection actual error rateactual when error the circuit rate when map the is executed, circuit map then is executed, thenNov 06, 2018 MelbourneNov 06, 2018 (14), YorktownMelbourneQuantum circuit (5) (14),map selection Yorktown is affected by the (5) error rate of different Jul 03, 2019 JulOurense 03, 2019 (5), Vigo (5)Ourensequantum gates, readout (5), Vigomeasurements, (5) and qubit connectivity. these differencesthese add differences up over the add circuit up over map the execution circuit map execution Circuit map A Circuit map B

3% 3% 3% 3% and result in aand significantly result in inaccurate a significantly outcome. inaccurateThere- outcome. There- 4% 5% 4% 5% 2% 4% 5% 2% 4% 5% fore, previous worksfore, previous have focused works on have estimating focused the on error estimating the error 1% 3% 1% 3% rates accuratelyrates and accurately using that to and find using the optimal that to find circuit the optimal circuit Melbourne MelbourneYorktown OurenseYorktown & Vigo Ourense & Vigo map [3, 15, 18, 25,map 26, [3, 28]. 15, 18, 25, 26, 28]. Figure 2: LayoutFigure of IBM 2: quantum Layout of computers. IBM quantum The circles computers. rep- The circles rep- resent qubits. Theresent arrows qubits. show The possible arrows 2-qubit show gates:possible the 2-qubit di- gates: the di- What is MissingWhat from is Existing Missing fromSolutions? ExistingCurrent Solutions? ap- Currentrection points ap- fromrection control points to target from qubit. control to target qubit. proaches use aproaches single number use a single to characterize number to the characterize error the error rate of a given qubitrate of irrespective a given qubit of the irrespective different of quantum the differentmized quantum circuit mapmized selection circuit achieves map selection up to achieves 15% reduc- up to 15% reduc- operations beingoperations performed being on the performed qubit [25, on 26, the 28, qubit 31]. [25, 26,tion 28, in 31]. error ratetion for in a error quantum rate algorithm, for a quantum compared algorithm, to compared to For the first time,For we the show first time, that error we show rate that is not error only rate isthe not current only approachesthe current which approaches rely on a which single rely aggregated on a single aggregated qubit-specific, butqubit-specific, also operation-specific but also operation-specific (as explained (asnumber explained for errornumber rate estimation for error rate based estimation on historical based data. on historical data. in Sec. 2, a 1-qubitin Sec. gate 2, can a 1-qubit perform gate different can perform types different of types of UREQA’s quantumUREQA error’s quantum prediction error model prediction and model and quantum operationsquantum on a operations single qubit). on a single We show qubit). that We show that circuit mappingcircuit framework mapping is framework open-sourced is open-sourced at at quantum error ratesquantum can varyerror significantly rates can vary depending significantly on depending on https://github.com/GoodwillComputingLab/UREQAhttps://github.com/GoodwillComputingLab/UREQA. . the specific quantumthe specific operation quantum that is operation being performed, that is being performed, even if other conditionseven if other are kept conditions constant are (i.e., kept the constant phys- (i.e.,2U the phys-REQA:2U The SolutionREQA: The Solution ical qubit and theical machine). qubit and Somethe machine). qubits with Some low qubits ag- with low ag- gregate averagegregate error rate average might error experience rate might high experience error Background. high error ThisBackground. study is performedThis study on is the performed IBM Quan- on the IBM Quan- rate for specificrate quantum for specific operations. quantum Hence, operations. these qubits Hence, thesetum qubits Experiencetum (QX) Experience - a public (QX) cloud - a service. public cloud We use service. We use should be avoidedshould for a be circuit-map avoided for selection a circuit-map if a partic- selectionthe if a IBM partic- QX machinesthe IBM listed QX machines in Table listed 1. They in Table cover 1. a They cover a ular circuit consistsular circuit of many consists such specific of many quantum such specific op- quantumdiverse op- range ofdiverse quantum range architectures of quantum in architectures terms of error- in terms of error- erations. The reasonerations. for The this reason phenomena for this is the phenomena unstable is therates, unstable topology,rates, and time topology, of introduction and time of (Fig. introduction 2). (Fig. 2). nature of currentnature NISQ of technology current NISQ where technology qubits are where erro- qubits areQuantum erro- operationsQuantum on these operations computers on these include computers both include both neous and do notneous have and consistent do not have properties consistent as different properties asthe different gate and readoutthe gate operations. and readout Primary operations. 1-qubit Primary gates 1-qubit gates qubits interactqubits differently interact with differently external control with external and the controlinclude and the the Hadamardinclude ( theH) Hadamard gate which (H puts) gate the which two ba- puts the two ba- environmental features.environmentalThis is features. the firstThis work is to the discover first work tosis discover states into equalsis states superposition into equal and superposition the x-, y-, and and the z- x-, y-, and z- and leverage theand above leverage insight the to above choose insight better to circuit choose betterrotation circuit gates (Rrotationx, Ry, and gatesRz, (R respectively)x, Ry, and Rz which, respectively) rotate which rotate maps that lowermaps the impact that lower of quantum the impact errors, of quantum and push errors,the and qubit push aboutthe the qubit x-axis, about y-axis the and x-axis, z-axis y-axis on the and Bloch z-axis on the Bloch the state-of-the-artthe state-of-the-art in improving the in efficiency improving of the quan- efficiencySphere, of quan- respectively.Sphere, The respectively. Bloch Sphere The is Bloch a unit Sphere sphere is a unit sphere with the 0 statewith represented the 0 state as a represented vector pointing as a vector toward pointing toward tum algorithm executiontum algorithm on NISQ execution computers. on NISQ computers. | i | i the positive z-axisthe and positive the z-axis1 state and is represented the 1 state on is represented the on the 1 1 | i | i UREQA Solution.UREQAUREQASolution.buildsU aREQA data drivenbuilds model a data drivennegative model z-axis.negative The other z-axis. two The axis other represent two the axis qubit represent the qubit for correctly estimatingfor correctly the error estimating rates of the operations error rates on of operationsphase. The on qubitphase. state The vector qubit can state point vector anywhere can point on the anywhere on the different qubitsdifferent of a quantum qubits computer, of a quantum and then, computer, lever- and then,Bloch lever- Sphere, butBloch upon Sphere, readout, but it upon collapses readout, to the it collapses posi- to the posi- ages this informationages this to information find the most to optimized find the most circuit optimizedtive circuit( 0 ) or negativetive ( 0 ( 1) or) z-axis. negative As ( an1 ) example, z-axis. As Fig. an 3 example, Fig. 3 | i | |i i | i for a quantumfor algorithm. a quantum UREQA algorithm.builds U itsREQA errorbuilds rate itsuses error the rate Bloch Sphereuses the to Bloch show Sphere the state to changes show the after state ap- changes after ap- prediction modelprediction by performing model by a large performing number a of large ex- number of ex- plying a H gateplying followed a H bygate a R followedz gate with byp arotationRz gate with to a p rotation to a periments on realperiments IBM NISQ on real computers. IBM NISQ Our computers. evaluation Oursingle evaluation qubit. Whensingle the qubit.H gate When is applied, the H gate the qubit is applied, state the qubit state shows that theseshows error that rate these prediction error rate methods prediction are more methodsvector are more points towardvector the points positive toward x-axis the positive and the qubit x-axis is and the qubit is accurate than currentaccurate state-of-the-art than current state-of-the-art approaches of sim- approachesequally of sim- probableequally to be measured probable to as be0 measuredor 1 . This as prob-0 or 1 . This prob- ply using a generalply using error a rate general number error periodically rate number pub- periodically pub- | i | i | i | i ability of measurementability of remains measurement the same remains even after the same a Rz even after a Rz lished by the quantumlished by computing the quantum platform computing provider. platform provider.rotation is applied,rotation except is applied, the qubit except has a negative the qubit phase. has a negative phase. To demonstrateTo UREQA demonstrate’s effectiveness, UREQA’s we effectiveness, evaluate we evaluate All 1-qubit gatesAll have 1-qubit 2-qubit gates variants have 2-qubit (CH, CR variantsx, CRy (CH, CRx, CRy UREQA for a diverseUREQA setfor of a quantum diverse set benchmarks, of quantum con- benchmarks, con- and CRz) whereand oneCR qubitz) where is the one control qubit and is the the control other is and the other is ducting experimentsducting over experiments more than over 50 days more on than four 50 dif- days onthe four target. dif- Thethe respective target. The 1-qubit respective gate is 1-qubit applied gate to the is applied to the ferent quantumferent computers quantum in the computers IBM QX in cloud. the IBM Our QX cloud.target qubit Our dependingtarget qubit on the depending superposition on the of superposition the control of the control results show thatresults our operation-aware show that our operation-aware solution achieves solution achieves qubit. In Fig. 1,qubit. the connection In Fig. 1, the between connection qubit 0 between and Rz qubit 0 and Rz a small mediana prediction small median error prediction rate of 1%. error Using rate these of 1%. Using these gate of qubit 1gate means of qubit it is a 1CR meansz gate it with is a CR qubitz gate 0 as with qubit 0 as operation error-rateoperation prediction error-rate models, prediction UREQA models,’s opti- UREQAcontrol’s opti- and qubitcontrol 1 as target. and qubit 1 as target.

1UREQA (Eureka)1 standsUREQA for(Eureka)utilizing stands operation-aware for utilizingerror oper rateation-awareTheseerror rate qubit operationsThese qubit can be operations erroneous. can IBM’s be erroneous. qubits IBM’s qubits predictions (for betterpredictions circuit mapping) (for better on circuitquantum mapping) computers. on quantum computers.are fixed-frequencyare fixed-frequency superconducting superconducting Transmon qubits Transmon qubits quantum algorithm.quantum For example, algorithm. if the estimated For example, er- if the estimatedTable er- 1: IBM QX quantumTable computers. 1: IBM QX quantum computers. Effect of Circuit Maps on Program Output ror rate of each qubitror is rate significantly of each qubit different is significantly than the different thanOnline the Date ComputersOnline (Num. Date Qubits)Computers (Num. Qubits) Nov 06, 2018 MelbourneNov (14), 06, Yorktown 2018ExecutionMelbourne (5) of a circuit map (14), produces Yorktown the program (5) output. Due to errors in actual error rate whenactual the circuit error rate map when is executed, the circuit then map is executed, then operations, each circuit map suffers from error in its program output. Jul 03, 2019 OurenseJul (5), 03, Vigo 2019 (5) Ourense (5), Vigo (5) these differences addthese up over differences the circuit add map up execution over the circuit map execution Circuit map A Circuit map B

3% 3% 3% 3% and result in a significantlyand result inaccurate in a significantly outcome. inaccurateThere- outcome. There- 4% 5% 4% 5% 2% 4% 5% 2% 4% 5% Correct State fore, previous works havefore, focused previous on works estimating have focused the error on estimating the error 1% 3% 1% 3% Probabilities rates accurately and usingrates thataccurately to find and the optimal using that circuit to find the optimal circuitMelbourne YorktownMelbourne Ourense & Vigo Yorktown Ourense & Vigo map [3, 15, 18, 25, 26,map 28]. [3, 15, 18, 25, 26, 28]. Figure 2: Layout of IBMFigure quantum 2: Layout computers. of IBM The quantum circles rep- computers. The circles rep- resent qubits. The arrowsresent show qubits. possible The 2-qubit arrows gates: show the possible di- 2-qubit gates: the di- What is Missing fromWhat Existing is Missing Solutions? fromCurrent Existing ap- Solutions?rectionCurrent points from ap- controlrection to target points qubit. from control to target qubit. proaches use a singleproaches number use to characterize a single number the error to characterize the error rate of a given qubit irrespectiverate of a given of the qubit different irrespective quantum of the differentmized circuit quantum map selectionmized circuit achieves map up selection to 15% reduc- achieves up to 15% reduc- operations being performedoperations on the being qubit performed [25, 26, 28, on 31]. the qubittion [25, in 26, error 28, 31]. rate for ation quantum in error algorithm, rate for a compared quantum algorithm, to compared to For the first time, weFor show the that first error time, rate we show is not that only errorthe rate current is not approaches only the which current rely approaches on a single which aggregated rely on a single aggregated qubit-specific, but alsoqubit-specific, operation-specific but also (as operation-specific explained number (as explained for error ratenumber estimation for based error rate on historical estimation data. based on historical data. in Sec. 2, a 1-qubit gatein Sec. can 2, perform a 1-qubit different gate can types perform of different types of UREQA’s quantumU errorREQA’s prediction quantum model error and prediction model and quantum operations onquantum a single operations qubit). We on a show single that qubit). We show that circuit mapping frameworkcircuit mapping is open-sourced framework at is open-sourced at quantum error rates canquantum vary significantly error rates can depending vary significantly on depending on https://github.com/GoodwillComputingLab/UREQAhttps://github.com/GoodwillComputingLab/UREQA. . the specific quantumthe operation specific that quantum is being operation performed, that is being performed, even if other conditionseven are if kept other constant conditions (i.e., are the kept phys- constant2U (i.e.,REQA the phys-: The2U SolutionREQA: The Solution ical qubit and the machine).ical qubit Some and the qubits machine). with low Some ag- qubits with low ag- gregate average errorgregate rate might average experience error rate high might error experienceBackground. high errorThis studyBackground. is performedThis on study the IBM is performed Quan- on the IBM Quan- rate for specific quantumrate operations. for specific Hence, quantum these operations. qubits Hence,tum Experience these qubits (QX)tum - a Experience public cloud (QX) service. - a public We use cloud service. We use should be avoided forshould a circuit-map be avoided selection for a circuit-map if a partic- selectionthe IBM if a QX partic- machinesthe listed IBM in QX Table machines 1. They listed cover in Table a 1. They cover a ular circuit consists ofular many circuit such consists specific of quantum many such op- specificdiverse quantum range op- of quantumdiverse architectures range of quantum in terms architectures of error- in terms of error- erations. The reasonerations. for this phenomena The reason is for the this unstable phenomenarates, is the topology, unstable and timerates, of topology, introduction and (Fig. time 2). of introduction (Fig. 2). nature of current NISQnature technology of current where NISQ qubits technology are erro- where qubitsQuantum are erro- operations onQuantum these computers operations include on these both computers include both neous and do not haveneous consistent and do properties not have consistent as different propertiesthe gate as different and readoutthe operations. gate and Primary readout operations. 1-qubit gates Primary 1-qubit gates qubits interact differentlyqubits with interact external differently control with and theexternalinclude control the and Hadamard the include (H) gate the which Hadamard puts ( theH) two gate ba- which puts the two ba- environmental features.environmentalThis is the first features. work toThis discover is the firstsis work states to discover into equal superpositionsis states into and equal the superposition x-, y-, and z- and the x-, y-, and z- and leverage the aboveand insight leverage to thechoose above better insight circuit to chooserotation better gates circuit (Rx, Ry,rotation and Rz, gates respectively) (Rx, Ry, andwhichRz, rotate respectively) which rotate maps that lower the impactmaps that of quantum lower the errors, impact and of push quantumthe errors, qubit and about push the x-axis,the qubit y-axis about and the z-axis x-axis, on the y-axis Bloch and z-axis on the Bloch the state-of-the-art inthe improving state-of-the-art the efficiency in improving of quan- the efficiencySphere, of respectively. quan- Sphere, The Bloch respectively. Sphere is The a unit Bloch sphere Sphere is a unit sphere with the 0 state representedwith the as0 astate vector represented pointing toward as a vector pointing toward tum algorithm executiontum on algorithm NISQ computers. execution on NISQ computers. | i | i the positive z-axis andthe the positive1 state z-axis is represented and the 1 onstate the is represented on the 1 1 | i | i UREQA Solution. UUREQAREQAbuildsSolution. a dataUREQA driven modelbuilds a datanegative driven z-axis. model Thenegative other two z-axis. axis represent The other the two qubit axis represent the qubit for correctly estimatingfor the correctly error rates estimating of operations the error on ratesphase. of operations The qubit on statephase. vector The can qubit point state anywhere vector on can the point anywhere on the different qubits of a quantumdifferent computer, qubits of a and quantum then, lever- computer,Bloch and then, Sphere, lever- but uponBloch readout, Sphere, it collapses but upon to readout, the posi- it collapses to the posi- ages this informationages to find this the information most optimized to find circuit the most optimizedtive ( 0 ) or circuit negativetive ( 1 ) ( z-axis.0 ) or negative As an example, ( 1 ) z-axis. Fig. 3 As an example, Fig. 3 | i | i | i | i for a quantum algorithm.for a quantum UREQA builds algorithm. its error UREQA rate buildsuses its the error Bloch rate Sphereuses to show the Bloch the state Sphere changes to show after the ap- state changes after ap- prediction model byprediction performing model a large by number performing of ex- a large number of ex- plying a H gate followedplying by a a RHz gategate followed with p rotation by a Rz togate a with p rotation to a periments on real IBMperiments NISQ computers. on real IBM Our NISQ evaluation computers.single Our evaluation qubit. When thesingleH gate qubit. is applied, When the theH qubitgate state is applied, the qubit state shows that these errorshows rate prediction that these methods error rate are prediction more methodsvector points are more towardvector the positive points x-axis toward and the the positive qubit is x-axis and the qubit is accurate than currentaccurate state-of-the-art than current approaches state-of-the-art of sim- approachesequally probable of sim- to beequally measured probable as 0 toor be1 measured. This prob- as 0 or 1 . This prob- ply using a general errorply using rate number a general periodically error rate pub- number periodically pub- | i | i | i | i ability of measurementability remains of measurement the same even remains after a theRz same even after a Rz lished by the quantumlished computing by the platform quantum provider. computing platformrotation provider. is applied, exceptrotation the is qubit applied, has a except negative the phase. qubit has a negative phase. To demonstrate UREQATo’s demonstrate effectiveness, UREQA we evaluate’s effectiveness, we evaluate All 1-qubit gates haveAll 2-qubit 1-qubit variants gates have (CH, 2-qubitCRx, CR variantsy (CH, CRx, CRy UREQA for a diverseU setREQA of quantumfor a diverse benchmarks, set of quantum con- benchmarks, con- and CRz) where one qubitand CR isz the) where control one and qubit the is other the control is and the other is ducting experiments overducting more experiments than 50 days over on more four dif- than 50the days target. on four The dif- respectivethe target. 1-qubit The gate respective is applied 1-qubit to the gate is applied to the ferent quantum computersferent in quantum the IBM computers QX cloud. in the Our IBMtarget QX cloud. qubit depending Our target on the qubit superposition depending of on the the control superposition of the control results show that ourresults operation-aware show that solution our operation-aware achieves solution achieves qubit. In Fig. 1, the connectionqubit. In Fig. between 1, the qubit connection 0 and R betweenz qubit 0 and Rz a small median predictiona small error median rate of prediction 1%. Using error these rate of 1%. Using these gate of qubit 1 meansgate it is of a qubitCRz 1gate means with it qubit is a CR 0 asz gate with qubit 0 as operation error-rate predictionoperation error-rate models, U predictionREQA’s opti- models,control UREQA and’s qubit opti- 1 ascontrol target. and qubit 1 as target.

1UREQA (Eureka) stands1 forUREQAutilizing(Eureka) operation-aware stands for uerrortilizing rate operation-awareThese qubiterror rate operationsThese can be qubit erroneous. operations IBM’s can qubits be erroneous. IBM’s qubits predictions (for better circuitpredictions mapping) (for on q betteruantum circuit computers. mapping) on quantumare computers. fixed-frequency superconductingare fixed-frequency Transmon superconducting qubits Transmon qubits Error in the Program Output A real quantum algorithm example! Quantum Phase Estimation (QPE)

QPE algorithm running on three qubits has eight program output states with correct output state probabilities as shown below.

0.6 0.4 0.2 0.0

000 001 010 011 100 101 110 111 | ! | ! | ! | ! | ! | ! | ! | ! An ideal circuit map would produce the program output such that the probability of each output state is the same as error-free execution. Quantum Phase Estimation (QPE)

QPE algorithm running on a low-quality circuit map produces erroneous output probability for each output state. The error is 28%.

0.6 0.4 0.2 0.0

000 001 010 011 100 101 110 111 | ! | ! | ! | ! | ! | ! | ! | ! Optimal Circuit Map Optimal circuit map is the set of operations and qubits which achieve the lowest output error (highest success rate) for a given algorithm (6% here).

Where g is the success rate of gates and m is the success rate of readout (success rate = 1 - error rate)

0.6 0.4 0.2 0.0

000 001 010 011 100 101 110 111 | i | i | i | i | i | i | i | i Figure 5: Choice of circuit map can greatly impact overall out- put error: different circuit maps for the QPE algorithm. Figure 3: A qubit (green arrow tip) on a Bloch sphere. The qubit in (a) first gets manipulated by an H gate to state in (b), ating temperature, or mechanical vibrations) is already then by a Rz gate to state in (c). captured in the operation error rates. Coherence times

Coupling are also measured immediately after calibration is per- Readout Resonator Resonator formed. Note that regular circuits (jobs) cannot run on Capacitor machines when calibration is being performed. Thus, Qubit 1 Superconducting Josephson Junction it is impractical to constantly keep calibrating the ma- Qubit 0 chines, and hence, this practical constraint forces the cal- Readout Resonator ibration to be performed typically twice daily. Figure 4: Design of IBM’s superconducting qubits technology. Current Efforts in Circuit Mapping. IBM posts a sin- gle error number for all 1-qubit and 2-qubit gates for each based on Josephson Junctions, and the Transmon fre- qubit twice a day. One solution to the aforementioned quency is referred to as the qubit frequency. On IBM’s circuit mapping problem can be to map quantum opera- quantum computers, the qubits are implemented using tions on qubits which have the minimum operation error Josephson Junctions created by separated superconduct- rates according to these posted numbers [10, 25, 26, 28]. ing electrodes and capacitors as shown in Fig. 4. 1- The idea is to maximize the Estimated Success Proba- qubit gates are performed by applying external controls bility (ESP) of a quantum circuit [25]. The ESP is cal- in the form of microwave pulses. Errors in applying these Ngates Nreadout culated as ’ gi ’ m j, where g is the success pulses cause 1-qubit gate errors. Entanglement be- i=1 ⇤ j=1 rate of gates and m is the success rate of readout (suc- tween two qubits is performed using coupling resonators. cess rate = 1 - error rate). The circuit map with highest These coupling resonators can be highly erroneous caus- ESP is the optimal circuit map. Fig. 5 shows the im- ing 2-qubit gate errors. Lastly, readout operation (or pact of choosing a low quality circuit map vs. an optimal qubit state measurement) is performed using readout res- circuit map for executing the quantum phase estimation onators as shown in Fig. 4. The readout resonators are (QPE) algorithm. The correct output of QPE has states also highly error-prone and cause readout errors when 100 , 101 , and 111 with probability 0.125, and state qubit states are measured. In fact, other factors can also | i | i | i 110 with probability 0.625. On real-systems, executing affect error rates. Once initialized, a qubit can only re- | i a circuit map results in state probabilities that are dif- tain its state for a limited time (coherence time). There ferent than the correct probabilities. Using the correct are two types of coherence times: (1) The T1 coher- probabilities as reference, the optimal circuit map has an ence time is associated with amplitude damping due to overall error of 6% (sum of errors of all states divided the qubit’s natural energy decay to the ground state. (2) by 2), while the low quality circuit has an overall error The T2 coherence time is associated with phase damp- of 28%. Thus, estimating the ESP of a circuit map ac- ing due to environmental factors. curately (and hence, in turn estimating the error rate of IBM’s computers are calibrated twice a day, and the quantum operations) is critical for mitigating the side- qubit coherence times change after each calibration. We effects of erroneous quantum operations. However, cur- note that the error rates are determined when calibration rent approach of using the published numbers to estimate tasks are performed for all the operations of a quantum the error rates implicitly assumes that all 1-qubit opera- computer. Calibration is the task of determining qubit tions have uniform errors and that all 2-qubit operations frequency and accordingly, setting the properties of the also have uniform errors. This is far from the actual be- microwave tone which changes the state of a qubit. Dur- havior of errors as we show next. ing calibration, operation characteristics such as the fre- quency of a qubit and the optimal microwave tone am- Different quantum operations exhibit significant plitude are determined based on new properties of the variation in observed error rates. Fig.6 shows that qubit. These characteristics are then used to perform all quantum errors are correlated with the specific type of the operations. These new characteristics determine the operation being performed (on the same qubit; results error rate of the operation. The effect of environmental are averaged over all available qubits and platforms for factors (such as the electromagnetic interference, fluctu- simplicity). For example, on IBM computers Rz is imple- What is Missing from Existing Solutions? Table 1: IBM QX quantumTable 1: computers. IBM QXPrevious quantum solutions determine computers. the optimal circuit map using qubit error quantum algorithm.quantum For example, algorithm. if the For estimated example, er- if the estimated er- rates identified during calibration to calculate circuit map success rate. Online Date ComputersOnline (Num. Date Qubits)Computers (Num. Qubits) ror rate of each qubitror rate is significantly of each qubit different is significantly than the different than the However, these single per-qubit error rates do not distinguish the actual error rate whenactual the error circuit rate map when is the executed, circuit then map is executed, thenNov 06, 2018 MelbourneNov 06, (14), 2018 YorktownMelbournedifference (5) in error (14), rate Yorktown among all the (5) quantum operations that can be Jul 03, 2019 OurenseJul 03, (5), 2019 Vigo (5) Ourense (5),performed Vigo (5) on a given qubit. these differences addthese up differences over the circuit add up map over execution the circuit map execution 4% Rx 1-qubit error rate 2% 1-qubit error rate and result in a significantlyand result inaccurate in a significantly outcome. inaccurateThere- outcome. There- 2% Ry 1-qubit error rate Vs. fore, previous worksfore, have previous focused works on estimating have focused the error on estimating the error 5% 1-qubit error rate 3% Rx 1-qubit error rate rates accurately andrates using accurately that to find and the using optimal that to circuit find the optimal circuitMelbourne MelbourneYorktown Ourense & YorktownVigo Ourense7% Ry 1-qubit & Vigo error rate map [3, 15, 18, 25,map 26, 28]. [3, 15, 18, 25, 26, 28]. Figure 2: Layout ofFigure IBM quantum 2: Layout computers. of IBM quantum The circles computers. rep- The circles rep- resent qubits. The arrowsresent show qubits. possible The arrows 2-qubit show gates: possible the di- 2-qubit gates: the di- What is Missing fromWhat Existing is Missing Solutions? from ExistingCurrent Solutions? ap- rectionCurrent points ap- from controlrection topoints target from qubit. control to target qubit. proaches use a singleproaches number use to a single characterize number the to error characterize the error rate of a given qubitrate irrespective of a given of qubit the irrespective different quantum of the differentmized quantum circuit mapmized selection circuit achieves map selection up to 15% achieves reduc- up to 15% reduc- operations being performedoperations on being the performedqubit [25, 26, on 28, the 31]. qubit [25,tion 26, in 28, error 31]. rate fortion a in quantum error rate algorithm, for a quantum compared algorithm, to compared to For the first time,For we the show first that time, error we rate show is that not only error ratethe is current not only approachesthe current which approaches rely on a single which aggregated rely on a single aggregated qubit-specific, butqubit-specific, also operation-specific but also operation-specific (as explained (asnumber explained for error ratenumber estimation for error based rate on estimation historical based data. on historical data. in Sec. 2, a 1-qubitin gate Sec. can 2, a perform 1-qubit gate different can perform types of different types of UREQA’s quantumUREQA error’s predictionquantum error model prediction and model and quantum operationsquantum on a single operations qubit). on We a single show qubit). that We show that circuit mappingcircuit framework mapping is open-sourcedframework is at open-sourced at quantum error ratesquantum can vary error significantly rates can vary depending significantly on depending on https://github.com/GoodwillComputingLab/UREQAhttps://github.com/GoodwillComputingLab/UREQA. . the specific quantumthe specificoperation quantum that is being operation performed, that is being performed, even if other conditionseven if are other kept conditions constant (i.e., are kept the phys- constant (i.e.,2U theREQA phys- : The2U SolutionREQA: The Solution ical qubit and theical machine). qubit and Some the qubits machine). with Some low ag- qubits with low ag- gregate average errorgregate rate average might experience error rate might high error experienceBackground. high error ThisBackground. study is performedThis study on the is IBM performed Quan- on the IBM Quan- rate for specific quantumrate for operations. specific quantum Hence, operations. these qubits Hence,tum these Experience qubits (QX)tum Experience - a public cloud (QX) service. - a public We cloud use service. We use should be avoidedshould for a circuit-map be avoided selection for a circuit-map if a partic- selectionthe if IBM a partic- QX machinesthe IBM listed QX in machines Table 1. listed They in cover Table a 1. They cover a ular circuit consistsular of circuit many suchconsists specific of many quantum such specificop- diverse quantum range op- of quantumdiverse range architectures of quantum in terms architectures of error- in terms of error- erations. The reasonerations. for this The phenomena reason for is this the phenomena unstable isrates, the unstable topology, andrates, time topology, of introduction and time (Fig. of introduction 2). (Fig. 2). nature of current NISQnature technology of current whereNISQ technology qubits are erro- where qubitsQuantum are erro- operationsQuantum on these operations computers on include these computers both include both neous and do notneous have consistent and do not properties have consistent as different propertiesthe as gate different and readoutthe operations. gate and readout Primary operations. 1-qubit gates Primary 1-qubit gates qubits interact differentlyqubits interact with external differently control with and external the controlinclude and the the Hadamardinclude (H the) gate Hadamard which puts (H) the gate two which ba- puts the two ba- environmental features.environmentalThis is the features. first workThis to is discover the first worksis to states discover into equalsis superposition states into equal and superposition the x-, y-, and and z- the x-, y-, and z- and leverage theand above leverage insight the to choose above insight better circuit to chooserotation better circuit gates (Rx,rotationRy, and gatesRz, respectively) (Rx, Ry, and whichRz, respectively) rotate which rotate maps that lower themaps impact that of lower quantum the impact errors, of and quantum push errors,the qubit and push about thethe x-axis, qubit y-axis about and the x-axis, z-axis on y-axis the Bloch and z-axis on the Bloch the state-of-the-artthe in state-of-the-art improving the efficiency in improving of quan- the efficiencySphere, of quan- respectively.Sphere, The respectively. Bloch Sphere The is a Bloch unit sphere Sphere is a unit sphere with the 0 state representedwith the 0 asstate a vector represented pointing as toward a vector pointing toward tum algorithm executiontum algorithm on NISQ execution computers. on NISQ computers. | i | i the positive z-axisthe and positive the 1 z-axisstate is and represented the 1 state on the is represented on the 1 1 | i | i UREQA Solution.UUREQAREQASolution.builds aU dataREQA drivenbuilds model a datanegative driven model z-axis. Thenegative other z-axis. two axis The represent other two the axis qubit represent the qubit for correctly estimatingfor correctly the error estimating rates of theoperations error rates on of operationsphase. The on qubit statephase. vector The qubitcan point state anywhere vector can on point the anywhere on the different qubits ofdifferent a quantum qubits computer, of a quantum and then, computer, lever- andBloch then, Sphere, lever- butBloch upon readout, Sphere, but it collapses upon readout, to the it posi- collapses to the posi- ages this informationages to this find information the most optimized to find the circuit most optimizedtive ( 0 circuit) or negativetive ( (10)) z-axis. or negative As an ( example,1 ) z-axis. Fig. As 3 an example, Fig. 3 | i || ii | i for a quantum algorithm.for a quantum UREQA algorithm.builds its U errorREQA ratebuildsuses its error the Bloch rate Sphereuses to the show Bloch the Sphere state changes to show after the state ap- changes after ap- prediction modelprediction by performing model a large by performing number of a ex- large number of ex- plying a H gate followedplying a byH agateRz gate followed with p byrotation a Rz gate to awith p rotation to a periments on realperiments IBM NISQ on computers. real IBM NISQ Our evaluation computers. Oursingle evaluation qubit. Whensingle the H qubit.gate is When applied, the H thegate qubit is applied, state the qubit state shows that these errorshows rate that prediction these error methods rate prediction are more methodsvector are points more towardvector the points positive toward x-axis the and positive the qubit x-axis is and the qubit is accurate than currentaccurate state-of-the-art than current approaches state-of-the-art of sim- approachesequally of probable sim- toequally be measured probable as to0 beor measured1 . This as prob-0 or 1 . This prob- ply using a generalply error using rate a general number error periodically rate number pub- periodically pub- | i | i | i | i ability of measurementability remains of measurement the same remains even after the a sameRz even after a Rz lished by the quantumlished computing by the quantum platform computing provider. platformrotation provider. is applied,rotation except the is applied, qubit has except a negative the qubit phase. has a negative phase. To demonstrate UToREQA demonstrate’s effectiveness, UREQA we’s effectiveness, evaluate we evaluate All 1-qubit gates haveAll 1-qubit 2-qubit gates variants have (CH 2-qubit, CRx variants, CRy (CH, CRx, CRy UREQA for a diverseUREQA set offor quantum a diverse benchmarks, set of quantum con- benchmarks, con- and CRz) where oneand qubitCRz) is where the control one qubit and is the the other control is and the other is ducting experimentsducting over more experiments than 50 over days more on four than dif- 50 daysthe on target. four dif- The respectivethe target. 1-qubit The respective gate is applied 1-qubit to gate the is applied to the ferent quantum computersferent quantum in the computers IBM QX cloud. in the IBMOur QXtarget cloud. qubit Our dependingtarget on qubit the superposition depending on of the the superposition control of the control results show that ourresults operation-aware show that our solution operation-aware achieves solution achieves qubit. In Fig. 1, thequbit. connection In Fig. 1, between the connection qubit 0 and betweenRz qubit 0 and Rz a small median predictiona small median error rate prediction of 1%. Using error rate these of 1%. Using these gate of qubit 1 meansgate of it isqubit a CR 1z meansgate with it is qubit a CRz 0gate as with qubit 0 as operation error-rateoperation prediction error-rate models, prediction UREQA’s models, opti- UcontrolREQA’s and opti- qubit 1control as target. and qubit 1 as target.

1UREQA (Eureka) stands1UREQA for utilizing(Eureka) ope standsration-aware for utilizingerror ope rateration-awareTheseerror qubit rate operationsThese can qubit be erroneous. operations canIBM’s be erroneous. qubits IBM’s qubits predictions (for better circuitpredictions mapping) (for better on qu circuitantum mapping) computers. on quantum computers.are fixed-frequencyare superconducting fixed-frequency Transmon superconducting qubits Transmon qubits

UREQA Observation 1: Different Quantum Operations have Different Error Rates Different operations on the same qubit have over 5x different error rates.

8 8 15 1.00 6 0.75 6 10 4 0.50 4 5 2 0.25 2 x Z R 0 0 R 0.00 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 0 1 2 30 41 2 3 4 5 6 7 8 9 10 11 12 13 0 1 2 3 4 UREQA Observation 1I: Operation-Specific Error Rates Vary Significantly Temporally and Spatially

The operation-specific error rates vary across different qubits within the same machine and over time. UREQA Observation 1I: Operation-Specific Error Rates Vary Significantly Temporally and Spatially

The degree of operation-specific error variance is different across quantum computers and exists even on newest quantum computers. Machine-Learning-based Approach to Predict Error Rates of Quantum Operations

The goal of UREQA is to select the best circuit map to execute a quantum algorithm.

Select the circuit Execute map with the lowest quantum error rate algorithm Machine-Learning-based Approach to Predict Error Rates of Quantum Operations

To achieve this goal it needs to be able to estimate the error rates of different circuit maps by predicting the error rates of the underlying operations.

Predict Estimate Select the circuit Execute operation circuit map map with the lowest quantum error rates error rates error rate algorithm UREQA: A Machine-Learning-based Approach to Predict Error Rates of Quantum Operations

Collect qubit coherence Train and Generate models Training times, frequency, and Optimize kNN for gate and readout Phase operation errors data models errors

Predict Estimate Select the circuit Execute Execution operation circuit map map with the lowest quantum Phase error rates error rates error rate algorithm What Predictive Features does UREQA Model Use? UREQA uses the following features for training the kNN models as they are readily available from daily qubit calibration. They account for over 95% of the variance based on PCA. Refer to the paper for model details. UREQA Evaluation Methodology Experimental Platforms Base Method Circuit map is selected using the best estimate when all operations are assumed to have the same error rate.

UREQA Circuit map is selected with KNN models trained without operation- specific information. Benchmarks UREQA++ Circuit map is selected with KNN models trained with operation- specific information. Operation-Aware UREQA++ Achieves the Lowest Deviation from Observed Error

UREQA++ reduces the deviation of the predicted error rate from the observed error rate which can be used for better quantum circuit mapping. Operation-Aware UREQA++ Achieves the Lowest Error Rates Across Algorithms

By reducing the deviation of the predicted error from the observed error, UREQA++ successfully select better circuit maps, which in turn, reduce the output error rates across all algorithms. Thank you!

UREQA is open-sourced at https://github.com/GoodwillComputingLab/UREQA