(Ebook) Quantum Computing: Circuits, Systems, Automation and Applications by Himanshu Thapliyal, Travis Humble ISBN 9783031379659, 3031379659
(Ebook) Quantum Computing: Circuits, Systems, Automation and Applications by Himanshu Thapliyal, Travis Humble ISBN 9783031379659, 3031379659
com
https://ebooknice.com/product/quantum-computing-circuits-
systems-automation-and-applications-53788302
OR CLICK HERE
DOWLOAD EBOOK
ebooknice.com
ebooknice.com
https://ebooknice.com/product/sat-ii-success-
math-1c-and-2c-2002-peterson-s-sat-ii-success-1722018
ebooknice.com
ebooknice.com
(Ebook) Cambridge IGCSE and O Level History Workbook 2C -
Depth Study: the United States, 1919-41 2nd Edition by
Benjamin Harrison ISBN 9781398375147, 9781398375048,
1398375144, 1398375047
https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044
ebooknice.com
ebooknice.com
ebooknice.com
ebooknice.com
Himanshu Thapliyal
Travis Humble Editors
Quantum
Computing
Circuits, Systems, Automation and
Applications
Quantum Computing
Himanshu Thapliyal • Travis Humble
Editors
Quantum Computing
Circuits, Systems, Automation
and Applications
Editors
Himanshu Thapliyal Travis Humble
University of Tennessee Oak Ridge National Laboratory
Knoxville, TN, USA Oak Ridge, TN, USA
© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Switzerland
AG 2024
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether
the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse
of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and
transmission or information storage and retrieval, electronic adaptation, computer software, or by similar
or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication
does not imply, even in the absence of a specific statement, that such names are exempt from the relevant
protective laws and regulations and therefore free for general use.
The publisher, the authors, and the editors are safe to assume that the advice and information in this book
are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or
the editors give a warranty, expressed or implied, with respect to the material contained herein or for any
errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
This book offers readers an overview of the latest research and technological
advancements in the field of quantum computing. The field has grown tremendously
since the initial ideas were formulated in the 1980s, and the increasing sophis-
tication brought by years of research and development have propelled quantum
computing into a new regime. We organized an international symposium/workshop
on “Quantum Computing: Circuits Systems Automation and Applications (QC-
CSAA)” that focused on advancements in quantum computing hardware, software,
and algorithms at a time when progress is rapidly increasing. The contributions
aimed at facilitating discussion on practical and novel quantum computing oper-
ations and applications through transformative research. Researchers from the
symposium/workshop were then invited to contribute their work to this book. This
book delves into various design paradigms associated with quantum computing. The
topics covered in this book encompass:
• The Lagrange interpolation approach applied to the general parameter-shift rule.
• Multi-programming mechanisms for near-term quantum computing.
• Architecture-aware decomposition techniques for quantum circuits.
• Software solutions designed for massively parallel quantum computing.
• The integration of machine learning into quantum annealing processors.
• Real-world applications of quantum annealing in machine learning.
• Queuing theory models tailored for (fault-tolerant) quantum circuits.
• The use of machine learning for assessing the reliability of quantum circuits.
• Examination of side-channel leakage in Suzuki stack circuits.
In summary, this book provides an in-depth exploration of a wide range of topics
at the forefront of quantum computing research and technology.
vii
Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
ix
Lagrange Interpolation Approach for
General Parameter-Shift Rule
1 Introduction
V. T. Hai
University of Information Technology, Ho Chi Minh City, Vietnam
Vietnam National University, Ho Chi Minh City, Vietnam
e-mail: haivt@uit.edu.vn
L. B. Ho (O)
Frontier Research Institute for Interdisciplinary Sciences, Tohoku University, Sendai, Japan
Department of Applied Physics, Graduate School of Engineering, Tohoku University, Sendai,
Japan
e-mail: binho@fris.tohoku.ac.jp
Fig. 1 A variational quantum algorithm consists of a quantum and a classical part. In the quantum
part, let .|ψ> be the initial quantum state, it evolves under a parameterized ansatz .U (θ) before being
subject to measurement. The cost function .C (θ) is defined and optimized in the classical part. The
new parameters .θ are derived and updated for each iteration to the quantum part. The scheme is
repeated until it converts
tions [4]. The main task of VQAs is to optimize a trainable parameterized circuit by
using a hybrid quantum-classical scheme, as shown in Fig. 1. Here, one measures
the cost function of interest .C(θ) in the quantum part and iteratively optimize it in
the classical part until it converts. The optimization can use either gradient-free or
gradient-based methods.
A critical technique for the VQAs to compute analytic derivatives of the cost
function is known as the “parameter-shift rule” [5, 6], which is often required for
the gradient-based optimization. The method was first introduced by Mitarai et al.
[5] and then extended to a so-call two-term parameter-shift rule [6]. This approach
gives the exact gradient (first-order derivative) of the cost function by subtracting
the two cost functions with different shifts. It is, however, only applicable for single-
qubit quantum gates, whose generators have two distinguished eigenvalues, such as
the rotation gates [7, 8]. So far, Anselmetti et al. introduced a four-term parameter-
shift rule that applies to generators with three distinguished eigenvalues .{−1, 0, 1},
such as the controlled-rotation gates [9]. In this case, the derivative is given in the
linear combination of four cost functions with different shifts. Recently, various
attempts were devoted to generalizing the parameter-shift rule for any assigned
quantum gates [10–12]. Remarkably, strategies for generalizing using polynomial
expansion were proposed [11, 12]. Apart from that, Wierichs et al. introduced a
general parameter-shift rule based on the finite Fourier series of the cost function
[10]. However, this method heavily consumes cost of computation to evaluate all
Fourier coefficients. So far, higher-order parameter-shift rule is also derived [13],
such as the second-order derivative can reduce to the Hessian formula of the finite
differential.
In this work, we introduce the Lagrange interpolation approach [14, 15] to derive
the general parameter-shift rule. We expand a quantum gate having a generator
.G into a polynomial .P (G) of degree .n − 1, where n is the number of distinct
parameter-shift rule. Higher-order derivatives of the cost function are also discussed.
We finally numerically evaluate the accuracy of the method via the mean-square
error and demonstrate the variational quantum eigensolver for a many-body system.
So far, our approach can be applied to trapped atomic ions quantum gates, such as
collective quantum gates, whose generators have linear eigenvalues as number of
particles [16, 17].
For convenience, in Table 1, we present the major symbols used in this work.
2 Preliminary
x
Let us consider a parameterized quantum gate with a general form .U (x) = e−i 2 G
where .G is the generator and assume the cost function of interest is the expectation
value of a measured observable .B as
where .|ψ> is the initial circuit’s state. The derivative w.r.t the parameter x yields
∂ i [ ]
. C(x) = − <ψ|U † (x) B, G U (x)|ψ>. (2)
∂x 2
4 V. T. Hai and L. B. Ho
For generators that obey .G2 = I , such as the standard rotation gates based on Pauli
matrices .G = {σx , σy , σz } or .G2 = G, such as projective operators, we have
[ ] i [ † ]
.B, G = U (α)BU (α) − U † (−α)BU (−α) , (3)
sin(α)
∂ 1 [ ]
. C(x) = C(x + α) − C(x − α) , (4)
∂x 2 sin(α)
where the gradient is proportional to the linear combination in the cost functions
with different shifts .+α and .−α. It is summarized in a scheme below:
This is the well-known parameter-shift rule used in various VQA approaches [4]. In
the following, we derive the parameter-shift rule for general quantum gates by using
the Lagrange interpolation.
x E
n−1
x | |
n−1
G − λl I
e−i 2 G =
. e−i 2 λk , (5)
λk − λl
k=0 l=0,l/=k
where .I is an identity matrix having the same dimension as .G. In the following, we
explicitly derive the general two-term, four-term, and multiple-term parameter-shift
rule from Eq. (5).
We first consider case .n = 2. Let .λ0 and .λ1 be two distinguished eigenvalues of .G.
Equation (5) explicitly yields
x
e−i 2 G = Λ0 I + Λ1 G,
. (6)
where
x x
λ0 e−i 2 λ1 − λ1 e−i 2 λ0
. Λ0 = ,
λ0 − λ1
x x
e−i 2 λ0 − e−i 2 λ1
Λ1 = ,
λ0 − λ1
are the zero- and first-order coefficients of the Lagrange polynomial. Set a super-
operator
∂ λ [ ]
. C(x) = C(x + α) − C(x − α) . (9)
∂x 4 sin( 21 αλ)
x
For example, let .U (x) be a Pauli rotation gate, such as .Rx (x) = e−i 2 σx , .Ry (x) =
−i x2 σy x
e , .Rz (x) = e−i 2 σz , where .G = {σx , σy , σz } are Pauli matrices. These gener-
ators have two eigenvalues as .λ0 = −1, λ1 = 1. Then, Eq. (9) straightforwardly
deduces to Eq. (4). Besides these standard notations for superconducting-based
qubits, quantum computing with trapped ions uses spin-1/2 particle as a qubit. In
6 V. T. Hai and L. B. Ho
this case, a spin rotation gate is given in the terms of spin-1/2 operators, such as
S x = σx /2, S y = σy /2, S z = σz /2. The derivative reads
.
∂ 1 [ ]
. C(x) = C(x + α) − C(x − α) . (10)
∂x 4 sin( 12 α)
For .n = 3, i.e., .G has three distinguished eigenvalues .λ0 , λ1 , and .λ2 , we explicitly
recast Eq. (5) as [15]
x
e−i 2 G = Λ0 I + Λ1 G + Λ2 G2 ,
. (11)
−1 E x
Λ0 = | | e−i 2 λk λl λm (λl − λm ),
{i,j } (λi − λj ) {k,l,m}
1 E x
Λ1 = | | e−i 2 λk (λ2l − λ2m ),
{i,j } (λi − λj ) {k,l,m}
E
2
x | |
2
1
Λ2 = e−i 2 λk ,
λk − λl
k=0 l=0,l/=k
where .{i, j } takes .{0, 1}, {1, 2}, {2, 0}, and .{k, l, m} takes .{0, 1, 2}, {1, 2, 0}, {2, 0, 1}.
Apply the super-operator .U twice for the arbitrary shifts .α1 and .α2 , we get the four-
term parameter-shift rule as
∂ i{ [ ]
. C(x) = − d1 C(x + α1 ) − C(x − α1 )
∂x 2
[ ]}
+ d2 C(x + α2 ) − C(x − α2 ) , (12)
x [ ]
e−i 2 G = I − i sin(x/2)G + cos(x/2) − 1 G2 ,
. (13)
⎧
⎪d1 sin(α1 /2) + d2 sin(α2 /2) = 1
⎨
.
4 (14)
⎪ 1
⎩d1 sin(α1 ) + d2 sin(α2 ) = .
2
√
We can choose .α1 = π/2 and .α2 = π , then .d1 = i and .d2 = i(1 − 2)/2.
where all .Λ terms are solvable. Explicitly, the super-operator .U (α)[B] in Eq. (7)
yields
n−1 [
E ] [ ]
.U (α)[B] = Λ∗k (α)Λl (α)Gk BGl = Tr M(α) · FT , (16)
k,l=0
where the superscript T denotes the transpose, .M(α) and .F are .(n × n)-matrices
⎛ ⎞
Λ∗0 (α)Λ0 (α)
Λ∗0 (α)Λ1 (α) · · · Λ∗0 (α)Λn−1 (α)
⎜ Λ∗1 (α)Λ1 (α) · · · Λ∗1 (α)Λn−1 (α) ⎟
Λ∗1 (α)Λ0 (α)
⎜ ⎟
.M(α) = ⎜ .. .. .. .. ⎟, (17)
⎝ . . . . ⎠
∗ ∗ ∗
Λn−1 (α)Λ0 (α) Λn−1 (α)Λ1 (α) · · · Λn−1 (α)Λn−1 (α)
⎛ ⎞
G0 BG1 · · · G0 BGn−1
G0 BG0
⎜ G1 BG1 · · · G1 BGn−1 ⎟
G1 BG0
⎜ ⎟
.F = ⎜ ..
.. .. .. ⎟. (18)
⎝ .. . . ⎠
G BG G BG · · · G BG
n−1 0 n−1 1 n−1 n−1
We next compute
[( ) ]
.U (α)[B] − U (−α)[B] = Tr M(α) − M(−α) · FT
[ ]
= Tr ΔM(α) · FT . (19)
8 V. T. Hai and L. B. Ho
obeys
E
m ( )
. dk U (αk )[B] − U (−αk )[B] = ℘[B, G]. (20)
k=1
E
m
[ ]
℘=
. dk ΔM(αk ) 01 . (21)
k=1
We normalize .dk by .dk /℘. Finally, by substituting Eq. (20) into Eq. (2), we get the
multiple-term parameter-shift rule as
i E [ ]
m
∂
. C(x) = − dk C(x + αk ) − C(x − αk ) . (22)
∂x 2
k=1
the symmetry set of .{λk }, we obtain .m = L2n /4. − 1 for .n ≥ 4. We summarize all
cases of m in Table 2.
4 Higher-Order Derivative
In this section, we compute higher-order derivatives of the cost function using the
parameter-shift rule. Let a variational circuit is governed by a set of quantum gates
U (θ ) = V M U M (θM ) · · · V 1 U 1 (θ1 ),
. (23)
( )
where .θ = θ1 , · · · , θM is an M-tuple of classical parameters, and .{V k } are
arbitrary constant gates. The derivative of an arbitrary order .τ is defined by
∂ τ C(θ)
∂θτ1 ,θ2 ,··· ,θτ C(θ) =
. . (24)
∂θ1 ∂θ2 · · · ∂θτ
The first-order derivative of the cost function is given in the terms of parameter-
shift rule as in Eq. (22)
Lagrange Interpolation Approach 9
i E [ ]
mj
∂C(θ)
. =− dk C(θ + αk ej ) − C(θ − αk ej ) , (25)
∂θj 2
k=1
where .ej is the unit vector along the .θj axis. We next derive for higher-order
derivatives.
(αk− )
[ ]}
− dr C(αk− + βr el ) − C(αk− − βr el ) ,
(26)
where .αk± = θ ± αk ej .
10 V. T. Hai and L. B. Ho
For the two-term parameter shift rule, we have .mj = ml = 1. From Eq. (9), if
(α1± )
λ = −2 (such as Pauli generators), then . d1 = i/ sin(α1 ), and .d1
. = i/ sin(β1 ).
The second-order derivative explicitly gives
∂ 2 C(θ) 1 [ ( ) ( )
. = 2
C θ + α(ej + el ) − C θ + α(ej − el )
∂θj ∂θl 4 sin (α)
( ) ( )]
− C θ − α(ej − el ) + C θ − α(ej + el ) , (27)
Similarly, one can extend the second-order derivatives for the general multiple-term
parameter-shift rule.
between the two quantum states. For pure quantum states, the metric tensor
associates with the Fisher information matrix or the Bures metric tensor [18].
Mathematically, for a pure state .|ψ(θ )> = U (θ)|ψ>, the metric is defined in terms
of the second-order derivative as
1 ∂ 2 |||| |2 ||
gij (θ ) = −
. | <ψ(θ ' )|ψ(θ)>| | ' . (29)
2 ∂θi ∂θj θ =θ
| |2
Here, the cost function is .C(θ) = |<ψ(θ ' )|ψ(θ)>| , which is the transition
probability from .|ψ(θ )> to .|ψ(θ ' )>, under the action of .U † (θ ' )U (θ ) on the initial
state .|ψ>. In other words, .C(θ) is the probability of finding the outcome state .|ψ>
when measuring the final state .|ψ(θ ' , θ )> = U † (θ ' )U (θ)|ψ>:
| |2
C(θ) ≡ p = |<ψ(θ ' )|ψ(θ)>|
.
| |2
= |<ψ|ψ(θ ' , θ )>| (30)
where p is the probability of obtaining the outcome state .|ψ>. Notable that in
Eq. (29), we set .θ ' = θ after the partial derivatives. However, in the quantum circuit
using the parameter-shift rule, we first apply .U (θ ± shift) onto .|ψ> according with
Eqs. (27) and (28), then apply .U † (θ ), and measure the final circuit’s state.
Concretely, let us consider the example shown in Fig. 2. The circuit consists
of two qubits, which is initially prepared in the state .|ψ> = |00>. The evaluation
operator .U (θ) is parameterized by two single-qubit rotation gates .Rx (θx ) and
.Rz (θz ), and a controlled-rotation gate .CRy (θy ). Here, the parameters are given in
( )
the order as .θ = θx , θz , θy . The state evolves to .|ψ(θ)> = U (θ)|00>.
Conventionally, we can derive .U (θ ) into two layers: one with the two single-
qubit rotation gates and one with the controlled-rotation gate. Then, the Fubini-
Study is a tensor of .(2 × 2)-matrix and .(1 × 1)-matrix, i.e., becomes a .(3 × 3)-matrix
[19]. Nevertheless, here we can directly apply the above method and get the same
result
Fig. 2 An example quantum circuit for evaluating the Fubini-Study tensor metric. The initial state
is .|ψ>
( = |00>. )It evolves to .|ψ(θ)> = U (θ)|00>, where .U (θ) = CRy (θy ) · Rx (θx ) ⊗ Rz (θz ), and
.θ = θx , θz , θy
12 V. T. Hai and L. B. Ho
⎛ ⎞ ⎛1 ⎞
gxx gxz gxy 4 0 0
.g = ⎝ ⎠ ⎝
gzx gzz gzy = 0 0 0 ⎠, (31)
1 2 θx
gyx gyz gyy 00 4 sin ( 2 )
where .gj l , ∀j, l ∈ {x, z, y} are given in Eq. (29) and computed from the parameter-
shift rule as described in Eq. (30).
5 Numerical Simulations
In this section, we first revisit the finite-difference gradient and quantify the mean-
square error (MSE) as the figure of merit for evaluating different estimators (finite-
difference and parameter-shift rule estimators). We later demonstrate the numerical
evaluation of the MSE. Afterward, we also examine a variational quantum circuit to
find the ground state of a many-body system.
For a given step size .h > 0, the finite-difference gradient of a function .f (θ ) gives
∂f 2 (θ ) 1 [ ( ) ( )
. = 2 f θ + h(ej + el ) − f θ + h(ej − el )
∂xj ∂xl 4h
( ) ( )]
− f θ − h(ej − el ) + f θ − h(ej + el ) . (33)
Following Ref. [13], we consider the mean-square error (MSE) as the figure of merit
to evaluate the accuracy of different estimators. The MSE of an estimator <
.∂
τ
θ1 ,θ2 ,··· ,θτ
is given as
[( )2 ]
Δ(<
. ∂θτ1 ,θ2 ,··· ,θτ ) = E <
∂θτ1 ,θ2 ,··· ,θτ − ∂θτ1 ,θ2 ,··· ,θτ , (34)
Lagrange Interpolation Approach 13
where .∂θτ1 ,θ2 ,··· ,θτ is the analytical derivative equation (24), the estimator <
.∂
τ
θ1 ,θ2 ,··· ,θτ
is either given by the parameter-shift rule or the finite-difference approximation.
We investigate the precision of the two estimators based on the parameter-shift rule
and finite-difference approximation for the first-order derivatives. Let us consider
the example circuit shown in Fig. 2 and measure the expectation value .<Z ⊗ Z> as
For the finite-difference estimator, we compute the partial derivatives .{< ∂θj f (θ)}
by using Eq. (32) and investigate the MSE (34) as a function of the step size h. For
the parameter-shift estimator, < .∂θx f (θ) and <
.∂θz f (θ) are given by the two-term (9)
<
while .∂θy f (θ ) is given by the four-term (12). We choose the shift .α of the two-term
the same as step size h and fix the four-term coefficients as above. The simulation
runs in Qiskit’s Aer simulator, and the expectation values are given after .103 shots,
and other .103 repetitions are used to determine the average of the MSE.
The results are shown in the main Fig. 3. The MSE for the parameter-shift
estimator gradually reduces and saturates at the optimal value when increasing
the step size. Similarly, the finite-difference curve reduces, then matches with the
parameter-shift curve, and finally deviates from the expected behavior since the
Taylor expansion is no longer viable for large step sizes [13]. For small step sizes,
the two estimators do not coincide because their < .∂θy f (θ ) are different, i.e., one is
varied with h, and one is fixed. Details are shown in the inset Fig. 3.
Fig. 3 Log-log plot of the mean-square error (MSE) versus the step size h for two estimators
parameter-shift and finite-difference. The shaded areas show the standard deviation, and the solid
lines represent the average MSE over .103 repetitions. For each MSE, we perform .103 shots to
compute the expectation value. Insets: the plot of MSE for partial differences <
.∂θx f (θ) and <
.∂θy f (θ)
Fig. 4 (a) The LMG model with N spin-1/2 particles that obeys the infinite-range interaction and
is placed under the magnetic field along the z axis. (b) The learning circuit used in VQE consists
of .(RX − RZ − RX)×L gates. The expectation value .<H > is measured and be the cost function.
(c) The cost function versus iterations for .γ = 0, −0.05, −0.1 and the theoretical bounds are
.{−0.10583, −0.269744, −0.509973}, respectively. (d) The minimum energy for .γ from .−0.1 to
.0.1. The solid curve is the exact result from theoretical analysis by diagonalizing the Hamiltonian
(37), and the dotted curve is obtained from the generalize parameter-shift rule
Lagrange Interpolation Approach 15
2λ ( 2 )
H = −2γ Jz −
. Jx − Jy2 , (37)
N
where .γ is an effective magnetic field, .λ is the spin-spin exchange coupling, and
Jk , (k = x, y, z) is a collective angular momentum
.
1E
N
(l)
. Jk = I ⊗ · · · ⊗ σk ⊗ · · · ⊗ I , (38)
2
l=1
(l)
where .σk is a Pauli matrix at the site l. The purpose is to find the ground state of
the Hamiltonian (37) by using the VQE and compare it with the theoretical result.
The learning circuit is shown in Fig. 4b with the initial state is .ρ = q1 ⊗ q2 ⊗
· · · ⊗ qN . The training ansatz .U (θ ) reads
( )×L
U (θ ) = RX(θ3 )RZ(θ2 )RX(θ1 )
. , (39)
with several layers L. Here, RX and RZ are collective rotation gates [17] that
(are sufficient to generate ) any quantum state in the Bloch sphere, and .θ =
θ1 , θ2 , θ3 , · · · , θ3L are training parameters. The quantum state evolves to .ρ(θ ) =
U (θ)ρU † (θ ) under the action of .U (θ). Finally, we measure the expectation value
of the Hamiltonian and define the cost function as
[ ]
C(θ) = <H > = Tr H · ρ(θ ) ,
. (40)
from which its minimum value is the lowest energy, and the corresponding state
ρ(θ ) becomes the ground state.
.
where learning rate is .η = 0.4, and .∇θ C(θ) is calculated via the generalize
parameter-shift rule (see detailed in the Appendix).
Figure 4c displays the cost function versus the number of iterations, where
it moves toward the theoretical bound after a certain number of iterations. The
minimum energy given by the VQE and a comparison with the theoretical result
are shown in Fig. 4d. The plots are given for different .γ from -0.1 to +0.1, offering
an excellent match between these two approaches.
16 V. T. Hai and L. B. Ho
6 Conclusion
Appendix
We compute the generalized parameter-shift rule for two quantum gates RX and
RZ in the circuit Fig. 4b. They read
Since both .Jx and .Jz have the same eigenvalues, hereafter, we derive for RZ
while RX can be done the same. The eigenvalues of .Jz for .N = 5 include
.λ = {−5/2, −3/2, −1/2, 1/2, 3/2, 5/2}. Hence, .n = 6 and .m = L2 /4. − 1 = 15.
n
Apply Algorithms 1 with random .{αk }k=1 ∈ [0, 2π ], we find the corresponding
15
∂ E [15 ]
. RZ(x) = −i dk RZ(x + αk ) − RZ(x − αk ) . (43)
∂x
k=1
Note that here we replace .−i/2 from Eq. (22) by .−i because RZ contains parameter
x instead of .x/2. Doing similarly for RX, and finally, we obtain .∂θ <H >.
References
3. J. Preskill, Quantum Computing in the NISQ era and beyond, Quantum 2 (2018) 79.
doi:10.22331/q-2018-08-06-79. URL https://doi.org/10.22331/q-2018-08-06-79
4. M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, J. R. McClean,
K. Mitarai, X. Yuan, L. Cincio, P. J. Coles, Variational quantum algorithms, Nature Reviews
Physics 3 (9) (2021) 625–644. doi:10.1038/s42254-021-00348-9. URL https://doi.org/10.
1038/s42254-021-00348-9
5. K. Mitarai, M. Negoro, M. Kitagawa, K. Fujii, Quantum circuit learning, Phys. Rev. A
98 (2018) 032309. doi:10.1103/PhysRevA.98.032309. URL https://link.aps.org/doi/10.1103/
PhysRevA.98.032309
6. M. Schuld, V. Bergholm, C. Gogolin, J. Izaac, N. Killoran, Evaluating analytic gradients on
quantum hardware, Phys. Rev. A 99 (2019) 032331. doi:10.1103/PhysRevA.99.032331. URL
https://link.aps.org/doi/10.1103/PhysRevA.99.032331
7. C. P. Williams, Explorations in Quantum Computing, Springer London, 2011.
8. M. A. Nielsen, I. L. Chuang, Quantum Computation and Quantum Information, Cambridge,
2010.
9. G.-L. R. Anselmetti, D. Wierichs, C. Gogolin, R. M. Parrish, Local, expressive, quantum-num-
ber-preserving VQE ansätze for fermionic systems, New Journal of Physics 23 (11) (2021)
113010. doi:10.1088/1367-2630/ac2cb3. URL https://doi.org/10.1088/1367-2630/ac2cb3
10. D. Wierichs, J. Izaac, C. Wang, C. Y.-Y. Lin, General parameter-shift rules for quantum
gradients, Quantum 6 (2022) 677. doi:10.22331/q-2022-03-30-677. URL https://doi.org/10.
22331/q-2022-03-30-677
11. O. Kyriienko, V. E. Elfving, Generalized quantum circuit differentiation rules, Phys. Rev.
A 104 (2021) 052417. doi:10.1103/PhysRevA.104.052417. URL https://link.aps.org/doi/10.
1103/PhysRevA.104.052417
12. A. F. Izmaylov, R. A. Lang, T.-C. Yen, Analytic gradients in variational quantum algorithms:
Algebraic extensions of the parameter-shift rule to general unitary transformations, Phys. Rev.
A 104 (2021) 062443. doi:10.1103/PhysRevA.104.062443. URL https://link.aps.org/doi/10.
1103/PhysRevA.104.062443
13. A. Mari, T. R. Bromley, N. Killoran, Estimating the gradient and higher-order derivatives on
quantum hardware, Phys. Rev. A 103 (2021) 012405. doi:10.1103/PhysRevA.103.012405.
URL https://link.aps.org/doi/10.1103/PhysRevA.103.012405
14. C. Moler, C. Van Loan, Nineteen dubious ways to compute the exponential of a matrix, SIAM
Review 20 (4) (1978) 801–836. arXiv:https://doi.org/10.1137/1020098, doi:10.1137/1020098.
URL https://doi.org/10.1137/1020098
15. L. B. Ho, N. Imoto, Full characterization of modular values for finite-dimensional systems,
Physics Letters A 380 (25) (2016) 2129–2135. doi:https://doi.org/10.1016/j.physleta.2016.05.
005. URL https://www.sciencedirect.com/science/article/pii/S0375960116301773
16. S. Debnath, N. M. Linke, C. Figgatt, K. A. Landsman, K. Wright, C. Monroe, Demonstration
of a small programmable quantum computer with atomic qubits, Nature 536 (7614) (2016)
63–66. doi:10.1038/nature18648. URL https://doi.org/10.1038/nature18648
17. N. T. Viet, N. T. Chuong, V. T. N. Huyen, L. B. Ho, tqix.pis: A toolbox for quantum dynamics
simulation of spin ensembles in dicke basis, Computer Physics Communications 286 (2023)
108686. doi:https://doi.org/10.1016/j.cpc.2023.108686. URL https://www.sciencedirect.com/
science/article/pii/S0010465523000310
18. J. Liu, H. Yuan, X.-M. Lu, X. Wang, Quantum fisher information matrix and multiparameter
estimation, Journal of Physics A: Mathematical and Theoretical 53 (2) (2019) 023001.
doi:10.1088/1751-8121/ab5d4d. URL https://doi.org/10.1088/1751-8121/ab5d4d
19. V. T. Hai, L. B. Ho, Universal compilation for quantum state tomography, Scientific Reports
13 (1) (2023) 3750. doi:10.1038/s41598-023-30983-4. URL https://doi.org/10.1038/s41598-
023-30983-4
20. I. A. S. Milton Abramowitz, Handbook of Mathematical Functions: with Formulas, Graphs,
and Mathematical Tables, Courier Corporation, 1965.
21. H. Lipkin, N. Meshkov, A. Glick, Validity of many-body approximation methods for a solvable
model: (i). exact solutions and perturbation theory, Nuclear Physics 62 (2) (1965) 188–
198. doi:https://doi.org/10.1016/0029-5582(65)90862-X. URL https://www.sciencedirect.
com/science/article/pii/002955826590862X
Multi-Programming Mechanism on
Near-Term Quantum Computing
1 Introduction
S. Niu (O)
LIRMM, University of Montpellier, Montpellier, France
e-mail: siyuan.niu@lirmm.fr
A. Todri-Sanial
Eindhoven University of Technology, Eindhoven, Netherlands
e-mail: a.todri.sanial@tue.nl
error rates, the multi-programming mechanism was introduced by Das et al. [3] and
Liu and Dou [4] to address this issue, also is referred as parallel circuit execution.
The utilization (usage/throughput) of NISQ hardware can be enhanced by executing
several circuits at the same time. However, results show that the activity of one
circuit can negatively impact the fidelity of others when executing several circuits
simultaneously, due to the difficulty of allocating reliable regions to each circuit,
higher chance of crosstalk error, etc. Previous works [3, 4] have left these issues
largely unexplored and have not addressed the problem holistically such that the
circuit fidelity reduction cannot be ignored for multi-programming mechanism.
Crosstalk is a non-negligible error source in NISQ hardware. It can corrupt the
qubit state when multiple quantum operations are executed in parallel. Detrimental
crosstalk impact on parallel instructions has been reported in [5–7] by using
Simultaneous Randomized Benchmarking (SRB) [8]. In the presence of crosstalk,
gate error can be increased by an order of magnitude. Ash-Saki et al. [6] proposed a
fault-attack model using crosstalk in a multi-programming environment. Moreover,
the impact of crosstalk is considered in the multi-programming framework [9].
Multi-programming, if done in an ad-hoc way would be detrimental to fidelity,
but if done carefully, it can be a very powerful technique to enable parallel
execution for important quantum algorithms such as Variational Quantum Algo-
rithms (VQAs) [10]. For example, the multi-programming mechanism can enable
to execute several ansatz states in parallel in one quantum processor, such as
in Variational Quantum Eigensolver (VQE) [11, 12], Variational Quantum Linear
Solver (VQLS) [13], or Variational Quantum Classifier (VQC) [14] with reliability.
It is also general enough to be applied to other quantum circuits regardless of
applications or algorithms. More importantly, it can build the bridge between NISQ
devices and large-scale fault-tolerant devices.
In this work, we evaluate the influence of crosstalk on NISQ devices and then
present two quantum multi-programming compilers, taking the impact of hardware
topology, calibration data, and crosstalk into consideration. We also investigate
how multi-programming mechanism can be useful for NISQ computing. Our major
contributions can be listed as follows:
• We perform crosstalk injection experiment on IBM quantum devices to analyze
its impact on circuit fidelity and evaluate the crosstalk mitigation methods to
demonstrate the fidelity improvement.
• We propose a Quantum Multi-programming Compiler (QuMC), including two
different qubit partition algorithms with consideration of crosstalk, and an
improved mapping transition algorithm.
• We improve our QuMC algorithm and introduce a Quantum Crosstalk-aware
Parallel Circuit execution method (QuCP) without the overhead of crosstalk
characterization.
• We apply multi-programming mechanism to variational quantum eigensolver
(VQE) and zero noise extrapolation (ZNE) to demonstrate its applications on
NISQ algorithm and error mitigation technique.
Multi-Programming Mechanism on Near-Term Quantum Computing 21
The rest of the chapter is organized as follows. First, we introduce the background
of multi-programming mechanism and its state of the art in Sect. 2. Second, we
analyze the crosstalk error in NISQ computing, including characterization and
error mitigation in Sect. 3. Third, we present our proposed QuMC algorithm
in Sect. 4. Fourth, we explain our QuCP method in Sect. 5. Fifth, we demonstrate the
applications of applying multi-programming to NISQ computing in Sect. 6. Finally,
we discuss the future works and conclude the chapter in Sects. 7 and 8.
2 Background
(b)
22 S. Niu and A. Todri-Sanial
Crosstalk is one of the major noise sources in near-term quantum devices. There
are two types of crosstalk. The first one is quantum crosstalk, which is caused by
the always-on-ZZ interaction [16, 17]. The second one is classical crosstalk caused
by the incorrect control of the qubits. The calibration data provided by IBM do
not include the crosstalk error. Different protocols were proposed in [8, 18, 19]
to detect and characterize crosstalk in quantum devices. After assessing crosstalk,
there are two types of methods to mitigating it. The first one is based on hardware
strategies, such as tunable coupling [16], or frequency allocation [20]. The second
method is from the software perspective, where crosstalk can be mitigated by
making simultaneous CNOT operations with high crosstalk execute sequentially
while trading off the increase of the decoherence error [5].
In this section, we first introduce how to characterize the crosstalk properties
of a quantum device using protocol Simultaneous Randomized Benchmarking
(SRB) [8]. Second, we present various state-of-the-art crosstalk mitigation meth-
ods. Third, we inject crosstalk on IBM quantum devices to show its impact on
Multi-Programming Mechanism on Near-Term Quantum Computing 23
output fidelity. Finally, we evaluate the crosstalk mitigation method using several
benchmarks to demonstrate the fidelity improvement.
in this device as in other devices such as IBM Q 20 Poughkeepsie, where the gate
error grows up to 11 times caused by crosstalk [5]. However, the error rate is still
amplified up to 3 times in IBM Q Casablanca. Sometimes the ratios are less than
one, which is probably due to the limits of crosstalk metric in SRB protocol [21].
After characterizing the crosstalk effect, the next challenge is how to mitigate it. The
hardware-oriented crosstalk mitigation strategies have several physical constraints.
For example, the tunable coupling [16] is only applicable for tunable coupling
superconducting devices, whereas the frequency allocation [20] is mainly designed
for fixed-frequency transmon qubit devices. Despite hardware-oriented approaches
to reduce crosstalk, there are also software methods to address crosstalk. Here, we
report on hardware-agnostic software crosstalk mitigation approaches.
An intuitive approach for software crosstalk mitigation is to make simultane-
ous CNOTs execute serially to avoid crosstalk occurring on parallel operations.
However, serial instructions can increase the circuit depth and introduce deco-
herence errors. Murali et al. [5] proposes a crosstalk-adaptive scheduler (labeled
as XtalkSched) that inserts barriers between the simultaneous CNOTs with a
significant crosstalk effect to avoid parallel instructions while considering the
decoherence error.
Benchmarks First, We use a 3-qubit CSWAP gate circuit and inject a different
number of simultaneous CNOTs to show the impact of crosstalk on the output
fidelity of a quantum circuit. An example of demonstrating crosstalk injection
by enabling two simultaneous CNOTs is shown in Fig. 3. Then, we examine
q0 X T
q1 X T† T T† T
q2 H T T† H
q3
q4
Fig. 3 Crosstalk injection of CSWAP circuit. We introduce two other qubits (q3 , q4 ) and
apply CNOT operations on them. Barriers are inserted to make sure the CNOTs are executed
simultaneously. Note that, crosstalk injection are performed on CNOT pairs with strong crossalk
error
Multi-Programming Mechanism on Near-Term Quantum Computing 25
Fig. 4 The output state probability distribution of CSWAP gate circuit. The right output state
should be “101”. We inject a different number of simultaneous CNOTs to this circuit. The baseline
circuit has zero simultaneous CNOT
benchmarks collected from the previous works [5, 22], including SWAP circuits,
Bell state circuit, etc., to show the performance of XtalkSched. For each benchmark,
we set its mapping carefully to ensure it includes at least one pair of CNOTs with a
high crosstalk effect.
Algorithm Configuration For crosstalk characterization of IBM Q Casablanca,
we set the crosstalk threshold to 2, and w used in XtalkSched is set to 0.5 to trade-
off circuit depth and crosstalk mitigation. The Qiskit version is 0.23.6.
Comparison We compare XtalkSched [5] with ParSched, which is the default
scheduler used in Qiskit [23] to make instructions execute in parallel without
considering crosstalk.
The experimental results of crosstalk injection are shown in Fig. 4. The probabil-
ity of obtaining the right output state is reduced with the increase of simultaneous
CNOTs due to the injected crosstalk error. In the worst case, the fidelity is decreased
by 33.3% compared to the non-crosstalk case.
The comparison between XtalkSched with ParSched in terms of output fidelity
and circuit depth is shown in Fig. 5. The fidelity is improved by 9.4%, whereas the
circuit depth increased by 39.1%. Although XtalkSched enhances the circuit output
fidelity, the circuit depth increase is not negligible. Moreover, since XtalkSched is
based on SMT solver, it is not scalable for large quantum circuit. This raises the
need for more effective and practical crosstalk mitigation methods.
26 S. Niu and A. Todri-Sanial
Fidelity
0.6
20 0.4
0.2
0 0
4)
)
n4
n4
n4
n4
4
ll n
ll n
(1,
(1,
der
hs
der
hs
be
be
ad
ad
Benchmarks Benchmarks
(a) (b)
Fig. 5 (a) Fidelity. (b) Circuit depth. Note that (1,4) represents the SWAP circuit which aims to
realize a connection between q0 and q4 through SWAP operations
Our proposed QuMC workflow is schematically shown in Fig. 6, which includes the
following steps:
• Input layer. It contains a list of small quantum circuits written in OpenQASM
language [24], and the quantum hardware information, including the hardware
topology, calibration data, and crosstalk effect.
• Parallelism manager. It can determine whether executing circuits concurrently or
separately. If the simultaneous execution is allowed, it can further decide the
number of circuits to be executed on the hardware at the same time without
losing fidelity based on the fidelity metric included in the hardware-aware multi-
programming compiler.
Multi-Programming Mechanism on Near-Term Quantum Computing 27
Selected shared
workloads
Hardware-aware
Quantum circuit
Multi-programming
workloads Compiler
Quantum
hardware
Reduce the number of
Parallelism shared workloads Output
Scheduler
Quantum hardware Manager Circuits
information Independent
workloads
Fig. 6 Overview of our proposed QuMC framework. The input layer includes the quantum
hardware information and multiple quantum circuit workloads. The parallelism manager decides
whether to execute circuits simultaneously or independently. For simultaneous executions, it works
with the hardware-aware multi-programming compiler to select an optimal number of shared
workloads to be executed in parallel. These circuits are allocated to reliable partitions and then
passed to the scheduler. It makes all the circuits executable on the quantum hardware and we can
obtain the results of the output circuits
In order to determine the optimal number of circuits that can be executed on the
hardware in parallel without losing fidelity, here, we introduce the parallelism
manager, shown in Fig. 7a.
Suppose we have a list of n circuit workloads with .ni qubits for each of
them, that are expected to be executed on N -qubit hardware. We define the circuit
density metric as the number of CNOTs divided by the qubit number of the circuit,
.#CN OT s/ni , and the circuit with higher density is considered to be more subject to
28 S. Niu and A. Todri-Sanial
Fig. 7 Process flow of each block that constitutes our QuMC approach. (a) The parallelism
manager selects K circuits according to their densities and passes them to the hardware-aware
multi-programming compiler. (b) The qubit partition algorithms allocate reliable regions to
multiple circuits. .AS is the difference between partition scores when partitioning independently
and simultaneously, which is the fidelity metric. .δ is the threshold set by the user. The fidelity
metric helps to select the optimal number of simultaneous circuits to be executed. (c) The scheduler
performs mapping transition algorithm and makes quantum circuits executable on real quantum
hardware
errors. Firstly, the circuits are ordered by their “density” metric. Note that, the users
can also customize the order of circuits if certain circuits are preferred to have higher
fidelities. Then, we pick K circuits as the maximum
E number of circuits that can be
executed on the hardware at the same time, . K n=1 i ≤ N. If K is equal to one,
n
then all the circuits should be executed independently. Otherwise, these circuits are
passed to the hardware-aware multi-programming compiler. It works together with
the parallelism manager to decide an optimal number of simultaneous circuits to be
executed.
P1 P3
6 17
1.9 1.2
0.7 1.6 1.4 1.0 0.8 1.1 1.9 1.0 1.5
0 1 4 7 10 12 15 18 21 23
0.8 2.4 2.3
2 13 24
1.2 1.1 0.7
1.4 0.7 0.8 0.9 0.7 0.7 0.9 1.1 1.0
3 5 8 11 14 16 19 22 25 26
1.0 1.1
9 20
(a)
P2 P3
6 17
1.9 1.2
0.7 1.6 1.4 1.0 0.8 1.1 1.9 1.0 1.5
0 1 4 7 10 12 15 18 21 23
0.8 2.4 2.3
2 13 24
1.2 1.1 0.7
1.4 0.7 0.8 0.9 0.7 0.7 0.9 1.1 1.0
3 5 8 11 14 16 19 22 25 26
1.0 1.1
9 20
(b)
Fig. 8 A motivational example of qubit partition problem. (a) No crosstalk between partition P1
and partition P2. (b) Crosstalk exists between partition P2 and partition P3
quantum circuits. Second, qubits can be moved only inside of their circuit partition
during the routing process, in other words, qubits can be swapped within the same
partition only. Note that, in this work, we performed routing inside of the reliable
partition but other approaches can be applied as well such as to route to other
neighboring qubits that are outside of the reliable partition.
Finding reliable partitions for multiple circuits is an important step in the multi-
programming problem. We choose IBM Q 27 Toronto to demonstrate an example.
The CNOT error rate of each link is shown in Fig. 8 and the unreliable links with
high CNOT error rates and qubits with high readout error rates are highlighted in
red. In order to illustrate the impact of partitions with different operational errors
(including CNOT error and readout error) on the output fidelity, first, we execute a
small circuit alu-v0_27 (the information of this circuit can be found in Table 2)
on three different partitions independently: (1) Partition P1 with reliable qubits
and links. (2) Partition P2 with unreliable links. (3) Partition P3 with unreliable
links and qubits with high readout error rate. Second, we execute two of the same
circuits simultaneously to show the crosstalk effect: (1) P1 and P3 without crosstalk
(Fig. 8a). (2) P2 and P3 with crosstalk (Fig. 8b). For the sake of fairness, each
partition has the same topology. It is important to note that if we have different
30 S. Niu and A. Todri-Sanial
Fig. 9 Results of the motivational example. (a) No crosstalk corresponds to Fig. 8a where no
crosstalk exists between P1 and P3. (b) Crosstalk corresponds to Fig. 8b where crosstalk exists
between P2 and P3. Note that “only P1” means the fidelity of the circuit when it is executed
independently on P1, whereas “P1|P3” means the fidelity of circuit on P1 when two circuits are
executed on P1 and P3 simultaneously
topologies, the circuit output fidelity will also be different since the number of
additional gates is strongly related to the hardware topology.
The result of the motivational example is shown in Fig. 9. The fidelity is
calculated using PST metric explained in Sect. 4.5.1 and higher is better. For
independent execution, we have P1 > P2 > P3 in terms of fidelity, which shows
the influence of operational error on output fidelity. For simultaneous execution,
the circuit fidelities are approximately the same for the two partitions P1 and P3
compared with the independent execution in the case of no crosstalk. Whereas, the
fidelities are decreased by 36.8 and 23.1% respectively for P2 and P3 when the two
circuits are executed simultaneously due to crosstalk.
We validate the crosstalk impact on the motivational example by performing SRB
on the target quantum device. However, performing SRB requires a large overhead
of circuit executions. Hence, we characterize crosstalk properties of IBM Q 27
Toronto followed by the optimization methods presented in [5]. On IBM quantum
devices, the crosstalk effect is significant only at one hop distance between CNOT
pairs [5], such as (.CX0,1 |CX2,3 ) shown in Fig. 10a, when the control pulse of one
qubit propagates an unwanted drive to the nearby qubits that have similar resonate
frequencies. Therefore, we perform SRB only on CNOT pairs that are separated
by one-hop distance. For those pairs whose distance is greater than one hop, the
crosstalk effects are very weak and we ignore them. It allows us to parallelize SRB
experiments of multiple CNOT pairs when they are separated by two or more hops.
For example, in IBM Q 27 Toronto, the pairs (.CX0,1 |CX4,7 ), (.CX12,15 |CX17,18 ),
(.CX5,8 |CX11,14 ) can be characterized in parallel. As demonstrated in some previous
works [5, 6, 25] that, although the absolute gate errors vary every day, the pairs
that have strong crosstalk effect remain the same across days. We confirm that
observation by performing the crosstalk characterization on IBM Q 27 Toronto
Multi-Programming Mechanism on Near-Term Quantum Computing 31
6 17
0 1 4 7 10 12 15 18 21 23
2 13 24
0 1 2 3 4
(a) 3 5 8 11 14 16 19 22 25 26
9 20
(b)
Fig. 10 Characterization of crosstalk effect. (a) Crosstalk pairs separated by one-hop distance.
The crosstalk pairs should be able to be executed at the same time. Therefore, they cannot share the
same qubit. One-hop is the minimum distance between crosstalk pairs. (b) Crosstalk effect results
of IBM Q 27 Toronto using SRB. The arrow of the red dash line points to the CNOT pair that
is affected significantly by crosstalk effect, e.g., .CX7,10 and .CX12,15 affect each other when they
are executed simultaneously. In our experiments, .E (CX10,12 |CX4,7 ) > 3 × E (CX10,12 ), whereas
.E (CX4,7 |CX10,12 ) ≈ 1.5 × E (CX4,7 ). As we choose 3 as the factor to pick up pairs with strong
crosstalk effect, there is no arrow at pair .CX4,7
twice and we get the similar behavior. The crosstalk effect characterization is
expensive and time costly. Some of the pairs do not have crosstalk effect whereas
others are strongly influenced by crosstalk. Therefore, we extract the pairs with
significant crosstalk effect, i.e., .E(gi |gj ) > 3 × E(gi ) and only characterize
these pairs when crosstalk properties are needed. We choose the same factor 3 to
quantify the pairs with strong crosstalk error like [5]. The result of crosstalk effect
characterization on IBM Q 27 Toronto is shown in Fig. 10b. Since pair .CX7,10
(included in P2) and .CX12,15 (included in P3) have significant crosstalk impact
on each other, we confirm that the fidelity lose of the simultaneous execution in the
motivational example is caused by additional crosstalk.
E
Scoreg = L + AvgCN OT × #CNOT s +
. RQi (1)
Qi ∈P
The graph diameter L is always prioritized in this equation, since it is more than
one order of magnitude larger than the other two factors. The partition with the
smallest fidelity score is selected. It is supposed to have the best connectivity and the
lowest error rate. Moreover, the partition algorithm prioritizes the quantum circuit
with a large density because the input circuits are ordered by their densities during
the parallelism manager process. The partition algorithm is then called for each
circuit in order. However, GSP algorithm is expensive and time costly. For small
circuits, GSP algorithm gives the best choice of partition. It is also useful to use it
as a baseline to compare with other partition algorithms. For beyond NISQ, a better
approach should be explored to overcome the complexity overhead.
Qj are the neighbour qubits connected to .Qi , E is the CNOT error matrix which
.
by (2) are shown in Table 1. Suppose the largest logical node degree is three.
Therefore, .Q1 is selected as the starting point since it is the only physical qubit that
has the same physical node degree as the largest logical node degree. It has three
neighbour qubits: .Q0 , .Q2 , and .Q3 . .Q3 is merged into the sub-partition because it
has the highest fidelity degree among neighbour qubits. The sub-partition becomes
.{Q1 , Q3 }. As the fidelity degree of .Q1 is larger than .Q3 , the algorithm will again
select the left neighbour qubit with the largest fidelity degree of .Q1 , which is .Q0 .
The sub-partition becomes .{Q1 , Q3 , Q0 }. .Q1 is still the qubit with the largest
Multi-Programming Mechanism on Near-Term Quantum Computing 35
fidelity degree in the current sub-partition, its neighbour qubit – .Q2 is merged.
The final sub-partition is .{Q1 , Q3 , Q0 , Q2 } and it can be considered as a partition
candidate. The merging process is shown in Fig. 11b.
Let n be the number of hardware qubits (physical qubits) and k the number of
circuit qubits (logical qubits) to be allocated a partition. GSP algorithm selects
36 S. Niu and A. Todri-Sanial
{Q1 }
Q0 Q1 Q2
0.85 1.25
3.5 3.4 3.3
1.59
{Q1 , Q3 }
Q3 3.3
{Q1 , Q3 , Q0 }
1.54
Q4 1.5
{Q1 , Q3 , Q0 , Q2 }
(a)
(b)
Fig. 11 Example of qubit partition on IBM Q 5 Valencia for a four-qubit circuit using QHSP.
Suppose the largest logical node degree of the target circuit is three. (a) The topology and
calibration data of IBM Q 5 Valencia. The value inside of the node represents the readout error
rate (in%), and the value above the link represents the CNOT error rate (in%). (b) Process of
constructing a partition candidate using QHSP
Table 1 The physical node Qubit .Q0 .Q1 .Q2 .Q3 .Q4
degree and the fidelity degree
of each qubit on IBM Q 5 Fidelity degree .1.96 .3.93 .1.95 .2.94 .1.97
all the combinations of k subgraphs from n-qubit hardware and takes .O(C(n, k))
time, which is .O(n choose k). For each subgraph, it computes its fidelity score
including calculating the longest shortest path, which scales at .O(k 3 ). It ends up
being equivalent to .O(k 3 min(nk , nn−k )). In most cases, the number of circuit qubits
is less than the number of hardware qubits, thus the time complexity becomes
3 k
.O(k n ). It increases exponentially as the number of circuit qubits augments.
The scheduler includes the mapping algorithm to make circuits executable on real
quantum hardware.
Two steps are needed to make circuits hardware-compliant: initial mapping and
mapping transition. The initial mapping of each circuit is created while taking
into account swap error rate and swap distance, and the initial mapping of the
simultaneous mapping transition process is obtained by merging the initial mapping
of each circuit according to its partition. We improve the mapping transition
algorithm proposed in [26] by modifying the heuristic cost function to better select
the inserted gate. We also introduce the Bridge gate to the simultaneous mapping
transition process for multi-programming.
First, each quantum circuit is transformed into a more convenient format –
Directed Acyclic Graph (DAG) circuit, which represents the operation dependencies
of the circuit without considering the connectivity constraints. Then, the compiler
traverses the DAG circuit and goes through each quantum gate sequentially. The
gate that does not depend on other gates (i.e., all the gates before execution) is
allocated to the first layer, denoted F . The compiler checks if the gates on the
first layer are hardware-compliant. The hardware-compliant gates can be executed
on the hardware directly without modification. They are added to the scheduler,
removed from the first layer and marked as executed. If the first layer is not empty,
which means some gates are non-executable on hardware, a SWAP or Bridge gate
is needed. We collect all the possible SWAPs and Bridges, and use the cost function
H (see (5)) to find the best candidate. The process is repeated until all the gates are
marked as executed.
38 S. Niu and A. Todri-Sanial
A SWAP gate requires three CNOTs and inserting a SWAP gate can change the
current mapping. Whereas a Bridge gate requires four CNOTs and inserting a Bridge
gate does not change the current mapping. It can only be used to execute a CNOT
when the distance between the control and the target qubits is exactly two. Both
gates need three supplementary CNOTs. A SWAP gate is preferred when it has a
positive impact on the following gates, allocated in the extended layer E, i.e., it
makes these gates executable or reduces the distance between control and target
qubits. Otherwise, a Bridge gate is preferred.
A cost function H is introduced to evaluate the cost of inserting a SWAP or
Bridge. We use the following distance matrix (see (4)) as in [26] to quantify the
impact of the SWAP or Bridge gate,
D = α1 × S + α2 × E
. (4)
where S is the swap distance matrix and .E is the swap error matrix. We set .α1 and
α2 to 0.5 to equally consider the swap distance and swap error rate. In [26], only
.
the impact of a SWAP and Bridge on other gates (first and extended layer) was
considered without considering their impact on the gate itself. As each of them is
composed of either three or four CNOTs, their impact cannot be ignored. Hence,
in our simultaneous mapping transition algorithm, we take self impact into account
and create a list of both SWAP and Bridge candidates, labeled as “tentative gates”.
The heuristic cost function is as:
1 E E
H = ( D[π(g.q1 )][π(g.q2 )] + D[π(g.q1 )][π(g.q2 )])
|F + NT ent |
g∈F g∈T ent
1 E
.
+W × D[π(g.q1 )][π(g.q2 )]
|E|
g∈E
(5)
where W is the parameter that weights the impact of the extended layer, .NT ent is the
number of gates of the tentative gate, T ent represents a SWAP or Bridge gate, and
.π represents the mapping. SWAP gate has three CNOTs, thus .NT ent is three and
we consider the impact of three CNOTs on the first layer. The mapping is the new
mapping after inserting a SWAP. For Bridge gate, .NT ent is four and we consider
four CNOTs on the first layer, and the mapping is the current mapping as Bridge
gate does not change the current mapping. We weight the impact on the extended
layer to prioritize the first layer. This cost function can help the compiler select the
best gate to insert between a SWAP and Bridge gate.
Our simultaneous mapping transition algorithm outperforms HA [26] thanks to
the modifications of the cost function while not changing its asymptotic complexity.
Let n be the number of hardware qubits, g the CNOT gates in the circuit.
Multi-Programming Mechanism on Near-Term Quantum Computing 39
”Tända krut
dra wärjan ut.
Supa slut
förutan prut”,
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com