††thanks: These two authors contributed equally to this work.††thanks: These
two authors contributed equally to this work.

# Machine learning of quantum channels on NISQ devices

Giovanni Cemin  Max Planck Institute for the Physics of Complex Systems,
Nöthnitzer Str. 38, 01187 Dresden, Germany  Marcel Cech  Institut für
Theoretische Physik, Universität Tübingen, Auf der Morgenstelle 14, 72076
Tübingen, Germany  Erik Weiss  Institut für Theoretische Physik, Universität
Tübingen, Auf der Morgenstelle 14, 72076 Tübingen, Germany  Stanislaw Soltan
Institut für Theoretische Physik, Universität Tübingen, Auf der Morgenstelle
14, 72076 Tübingen, Germany  Daniel Braun  Institut für Theoretische Physik,
Universität Tübingen, Auf der Morgenstelle 14, 72076 Tübingen, Germany  Igor
Lesanovsky  Institut für Theoretische Physik, Universität Tübingen, Auf der
Morgenstelle 14, 72076 Tübingen, Germany  School of Physics and Astronomy and
Centre for the Mathematics and Theoretical Physics of Quantum Non-Equilibrium
Systems, The University of Nottingham, Nottingham, NG7 2RD, United Kingdom
Federico Carollo  Institut für Theoretische Physik, Universität Tübingen, Auf
der Morgenstelle 14, 72076 Tübingen, Germany

###### Abstract

World-wide efforts aim at the realization of advanced quantum simulators and
processors. However, despite the development of intricate hardware and pulse
control systems, it may still not be generally known which effective quantum
dynamics, or channels, are implemented on these devices. To systematically
infer those, we propose a neural-network algorithm approximating generic
discrete-time dynamics through the repeated action of an effective quantum
channel. We test our approach considering time-periodic Lindblad dynamics as
well as non-unitary subsystem dynamics in many-body unitary circuits.
Moreover, we exploit it to investigate cross-talk effects on the ibmq_ehningen
quantum processor, which showcases our method as a practically applicable tool
for inferring quantum channels when the exact nature of the underlying
dynamics on the physical device is not known a priori. While the present
approach is tailored for learning Markovian dynamics, we discuss how it can be
adapted to also capture generic non-Markovian discrete-time evolutions.

Figure 1: Learning quantum channels. (a) A general quantum system evolving in
discrete time is described by an update rule for its density matrix,
$\rho(t)\to\rho(t+1)$. Here, we infer an optimal quantum channel
$\mathcal{E}$, approximating the evolution as
$\rho(t+1)=\mathcal{E}[\rho(t)]$. (b) Machine learning the effective discrete-
time subsystem dynamics (gray box) in a unitary circuit. In the shown example,
the circuit consists of single-qubit rotations around the $x$-axis (rotation
angle $\varphi_{x}$) and controlled phase gates on adjacent qubits (phase
$\varphi_{nn}$). (c) The quantum channel (gray box) is learned by exploiting a
collision model, which describes the system dynamics as emerging from a
unitary interaction, $U$, with an environmental particle having Hilbert space
dimension $d_{\mathrm{E}}$.

Introduction.— As large-scale fault-tolerant quantum machines may still be
years away [1, 2, 3, 4, 5], quantum simulation and computation tasks can
nowadays be only performed on noisy intermediate-scale quantum (NISQ) devices
[6, 7]. The latter are unavoidably affected by noise and errors, which
ultimately limit their applicability [8, 9, 10, 11, 12, 13]. Moreover, it is
not often fully clear which quantum dynamics, be it unitary or non-unitary, is
actually implemented on these machines. Given their intricate structure and
their coupling with the surroundings, a complete characterization accounting
for all of the microscopic degrees of freedom is prohibitively complex. An
effective description, which solely considers their “logical” degrees of
freedom, may thus prove valuable in shedding light on the nature of the
effective dynamical behavior of quantum devices. For example, a time-
independent Lindblad master equation, encoding a simple instance of open
quantum dynamics [14, 15, 16, 17], can provide insights into different error
mechanisms [18, 19, 20, 21]. An additional difficulty stems from the fact that
digital quantum processors exploit fast time-dependent pulses to optimize the
speed and the fidelity of their logical gates [22, 23, 24, 20]. Therefore it
is unclear whether an effective (time-dependent) Lindblad master equation even
exists [25, 26, 27, 28, 29, 30]. As such, characterizing the dynamics in NISQ
devices is still, to a large extent, an open problem.

In this work, we propose a simple method capable of approximating a generic
discrete-time dynamics [cf. Fig. 1(a,b)] through the repeated application of
an effective quantum channel [31]. Here, the channel is constructed by
considering a unitary interaction between the system of interest and
fictitious auxiliary degrees of freedom [32, 33, 12], as sketched in Fig.
1(c). We then employ machine-learning techniques to infer the appropriate
structure of this interaction. Such a representation of a quantum channel
allows us to encode physical constraints directly into the neural-network
ansatz and significantly facilitate the learning process [34, 31, 35, 36, 37,
38, 39, 40, 41, 42]. To illustrate its effectiveness, we benchmark our
approach with two different settings: a periodic open-system dynamics
generated by a time-dependent Lindblad generator and the reduced dynamics of a
subsystem embedded in a unitary many-body circuit, shown in Fig. 1(a,b)
respectively. The first scenario allows us to unambiguously demonstrate the
power of our method while the second one allows us to explore its capability
to infer non-Markovian circuit dynamics.

Finally, we show an application to the ibmq_ehningen quantum processor. In
contrast to idealized frameworks, this entails dealing with practical aspects,
including imperfect knowledge of the quantum state due to limited number of
measurements, i.e., shot noise. Using data generated by the NISQ device, we
can nevertheless efficiently infer a quantum channel, which accurately
captures qubit cross-talk in the inspected circuit. These findings demonstrate
the usefulness of our approach for characterizing quantum dynamics on existing
devices. In these settings, the learned channel may find applications in the
development of error mitigation strategies [43, 44, 45, 46, 19, 47].

Quantum channels and machine learning.— Let us consider a generic quantum
system, with finite Hilbert-space dimension $d$, evolving in discrete time.
The state of the system is described in terms of a density matrix $\rho$,
providing the expectation value of any quantum observable $O$, as $\langle
O\rangle={\rm Tr}\left(\rho\,O\right)$. Assuming the system to be subject to a
Markovian discrete-time dynamics [25, 48, 49, 50, 17], the density matrix
evolves according to the iterative equation $\rho(t+1)=\mathcal{E}[\rho(t)]$,
with solution $\rho(t)=\mathcal{E}^{t}[\rho(0)]$ [31]. The quantum channel
$\mathcal{E}$, encoding, e.g., a genuine dynamics or a generic quantum
operation, must have the form [31]

$\displaystyle\mathcal{E}[\rho]=\sum_{k=0}^{d_{\mathrm{E}}-1}K_{k}\rho
K_{k}^{\dagger}\,,$ (1)

with the $d_{\rm E}$ operators $\\{K_{k}\\}_{k=0}^{d_{\mathrm{E}}-1}$ being
the so-called Kraus operators. The structure in Eq. (1) ensures that
$\mathcal{E}$ is completely positive, while the additional condition
$\sum_{k=0}^{d_{\mathrm{E}}-1}K_{k}^{\dagger}K_{k}=\mathds{1}$ guarantees
preservation of the trace, i.e., ${\rm Tr}\left(\mathcal{E}[\rho]\right)={\rm
Tr}\left(\rho\right)$. Both properties are required for $\mathcal{E}$ to
represent a physical quantum evolution [31, 51, 17, 29, 35]. Note that, for
$d_{\mathrm{E}}=1$, Eq. (1) can only describe unitary operations, while any
possible physical (open-system) dynamics can be represented by considering, at
most, $d_{\rm E}=d^{2}$ Kraus operators [31, 17]. The minimal $d_{\rm E}$
required to represent a given quantum channel is the so-called Kraus rank
[31].

The Stinespring dilation theorem [32] states that a completely positive and
trace-preserving quantum channel can be written as

$\displaystyle\mathcal{E}[\rho]=\Tr_{\mathrm{E}}\left[U(\rho\otimes\rho_{\mathrm{E}})U^{\dagger}\right]\,.$
(2)

This relation provides a useful interpretation of $\mathcal{E}$ in terms of a
collision model: the system dynamics emerges from the unitary interaction of
the latter with an auxiliary environmental particle, having Hilbert space
dimension $d_{\rm E}$ [32, 31, 33, 12]. The auxiliary particle can be
initialized in a reference pure state, $\rho_{\mathrm{E}}=\outerproduct{0_{\rm
E}}{0_{\rm E}}$, and the unitary operator $U$ acts on both the system and the
auxiliary particle. The trace ${\rm Tr_{E}}$ over the environmental degrees of
freedom, represented, e.g., through the basis $\\{{\ket{k_{\rm
E}}}\\}_{k=0}^{d_{\rm E}-1}$, provides the reduced state of the system after
the collision, and generates the Kraus operators $K_{k}=\bra{k_{\rm
E}}U\ket{0_{\rm E}}$ appearing in Eq. (1).

The question that we address in the following is whether, given a generic
discrete-time dynamics, it is possible to infer the form of an optimal quantum
channel $\mathcal{E}$ approximating it. In our approach, we learn
$\mathcal{E}$ by representing the unitary operator $U$ [cf. Fig. 1(c) and Eq.
(2)] with a simple neural network (single layer perceptron) and training the
latter using dynamical trajectories (see Ref. [52][53, 54, 55, 56, 57, 25, 27,
58, 26, 59, 60] for details). Such a parameterization of the problem allows us
to encode the physical constraints directly into the algorithm architecture.
For the training process, we generate data by considering $M$ random initial
states, evolving them with the dynamics we aim to infer (see examples below),
and computing the density matrix at the relevant discrete times. We then
define the loss function $\propto\mathds{E}\\{{\rm
Tr}\left[(\rho_{\mathrm{ML}}(t)-\rho(t))^{2}\right]\\}$, quantifying an
average square-distance between the exact density matrix $\rho(t)$ and the one
predicted by the neural network, $\rho_{\mathrm{ML}}(t)$. The symbol
$\mathds{E}$ denotes the average over the generated data. Finally, we use the
Adam optimizer [57] to minimize the loss function and learn an optimal $U$.
The environmental dimension $d_{\rm E}$ effectively acts as a hyper-parameter
of the algorithm and may thus be different from the Kraus rank required by the
exact dynamics. By varying this parameter we can thus explore how this impacts
the learning process [61, 62, 63]. After the training, we validate the learned
channel against data generated from $r=10$ additional initial conditions, and
calculating the error

$\displaystyle\epsilon=\frac{1}{r}\sum_{j=1}^{r}\frac{1}{T}\sum_{t=1}^{T}\frac{{\rm
Tr}\left[(\rho_{\mathrm{ML}}^{j}(t)-\rho^{j}(t))^{2}\right]}{{\rm
Tr}\left[(\rho^{j}(t))^{2}\right]}\,.$ (3)

Here, the superscript $j$ denotes trajectories from different initial
conditions while $T$ is the considered final time.

In the following, we focus on qubit systems for which the density matrix is
fully characterized by the expectation values of Pauli strings
$\sigma_{\alpha_{1}}\otimes\sigma_{\alpha_{2}}\dots\otimes\sigma_{\alpha_{n}}$
[54, 55, 56]. We consider dynamics starting from pure initial product states
[52].

Before we proceed, we comment on our underlying assumption of Markovianity
[see also sketch in Fig. 1(a)]. On the one hand, while we can train the
network using any dynamics, this assumption clearly represents a limitation on
its ability to capture generic evolutions. In return, however, compared to
less constrained representations [34, 31, 35, 36, 37, 38, 39, 40, 41, 42], the
structure in Eq. (2) offers enhanced interpretability of the learned channel,
whose effects are encoded in the unitary interaction $U$. Moreover, our method
can be adapted to include the learning of non-Markovian discrete-time
dynamics. Instead of learning a single channel $\mathcal{E}$ implementing
single-time updates, one could learn the different quantum channels mapping
the system from the initial time to each later time $t$. The knowledge of this
family of channels, which must all have the form given in Eqs. (1)-(2) due to
physical constraints, permits the analysis of whether the dynamics is time
dependent and of whether or not it is divisible in terms of completely
positive channels [26, 48, 49, 50, 18].

Figure 2: Time-periodic Lindblad dynamics. (a) Error measure, as defined in
Eq. (3), associated with the inferred Lindblad approximation,
$\mathcal{L}_{\mathrm{F}}$, obtained with the method of Ref. [56]. The right
panel shows the inferred (black crosses) and the exact (blue circles) dynamics
for a representative expectation value. (b) Error measure [cf. Eq. (3)],
associated with the learned quantum channel $\mathcal{E}$, as a function of
the number $M$ of considered initial conditions [as in panel (a)] and of the
dimension $d_{\rm E}$ of the environmental particle. The right panel shows the
inferred (black crosses) and the exact (blue circles) dynamics for a
representative expectation value. The stroboscopic time is given in units of
$2\pi/\omega$ (see main text).

Time-periodic Lindblad dynamics.— As a first benchmark, we consider a single
qubit evolving through the master equation
$\dot{\rho}(s)=\mathcal{L}(s)\left[\rho(s)\right]$, governed by the time-
periodic Lindblad generator [27]

$\displaystyle\mathcal{L}(s)[\rho]=-i[H(s),\rho]+\gamma\left(J\rho
J^{\dagger}-\frac{1}{2}\\{J^{\dagger}J,\rho\\}\right)\,.$ (4)

The system Hamiltonian is $H(s)=E_{z}\sigma_{z}+E_{x}\cos(\omega
s)\sigma_{x}$, and we consider $E_{x}=E_{z}/2$, $\omega=E_{z}$,
$\gamma=0.01\,E_{z}$ and $J=\outerproduct{0}{1}$. Since we want to learn an
effective discrete-time dynamics, we focus on the stroboscopic evolution
generated by the one-period map
$\mathcal{E}=\mathcal{T}e^{\int_{0}^{2\pi/\omega}{\rm d}s\,\mathcal{L}(s)}$,
with $\mathcal{T}$ being the time-ordering operator [16]. A general question
in these settings is whether or not the stroboscopic dynamics can be obtained
by means of an effective time-independent Floquet Lindblad generator
$\mathcal{L}_{\mathrm{F}}$, as
$\mathcal{E}=e^{{\frac{2\pi}{\omega}\mathcal{L}_{\mathrm{F}}}}$ [64, 25, 26,
50, 27, 29, 65]. To explore this aspect and its impact on the learning of the
effective dynamics, we also employ the Lindblad approximator of Ref. [56] to
infer a Floquet generator $\mathcal{L}_{\mathrm{F}}$ from the stroboscopic
evolution.

In Fig. 2(a), we observe, both from the error measure $\epsilon$ [cf. Eq. (3)]
and from the time-evolution of $\expectationvalue{\sigma_{z}}$, a discrepancy
between the exact dynamics and the one associated with the learned Floquet
generator $\mathcal{L}_{{\rm F}}$. This occurs even though the considered
parameters are such that a well-defined $\mathcal{L}_{{\rm F}}$ exists. Fig.
2(b) displays results on the learned quantum channel $\mathcal{E}$. As shown,
for sufficiently large training data sets and auxiliary dimension
$d_{\mathrm{E}}\geq 3$, the dynamics is accurately inferred. Here, we note
that $d_{\mathrm{E}}$ can stabilize the training process even for small
training data sets (see $d_{\mathrm{E}}=4,5$, $M=5$). In the Supplemental
Material [52], we show additional results demonstrating how the learned
channel is very accurate in all parameter regimes.

Figure 3: Reduced subsystem dynamics. Reduced dynamics of a two-qubit
subsystem embedded in a circuit of $L=14$ qubits, as shown in Fig. 1(b). (a)
Error measure, as defined in Eq. (3), associated with the learned quantum
channel $\mathcal{E}$ approximating the subsystem dynamics. The error is given
as a function of the number $M$ of considered initial conditions and of the
dimension $d_{\rm E}$ of the environmental particle. The circuit parameters
are $(\varphi_{x},\varphi_{nn})=(0.1,0.1)$. The right plots provide the
inferred (black crosses) and the exact dynamics (blue circles) for
representative expectation values. (b) Same as in panel (a) for circuit
parameters $(\varphi_{x},\varphi_{nn})=(0.5,1)$.

Reduced subsystem dynamics.— The previous example establishes that our
approach can accurately infer quantum channels within a controlled Markovian
setting. Next, we investigate whether it can provide an accurate approximation
in the case of non-Markovian dynamics [50, 65]. We focus on the time evolution
of a subsystem embedded in a many-body system. The dynamics of the full system
is described by a unitary quantum circuit, depicted in Fig. 1(b), built from
the unitary gates

$\displaystyle\leavevmode\hbox to29.45pt{\vbox
to15.23pt{\pgfpicture\makeatletter\hbox{\hskip 0.5pt\lower-7.61319pt\hbox
to0.0pt{\pgfsys@beginscope\pgfsys@invoke{
}\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{
}\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox
to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{ \par{}{{}}{}
{}{}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@setlinewidth{1.0pt}\pgfsys@invoke{
}{}\pgfsys@moveto{0.0pt}{0.0pt}\pgfsys@lineto{28.45276pt}{0.0pt}\pgfsys@stroke\pgfsys@invoke{
} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope\par{}{{}}{}
{}{{}}{}{}{}{}{{}}{}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@setlinewidth{1.0pt}\pgfsys@invoke{
}\definecolor{pgffillcolor}{rgb}{0.503125,0.68828125,0.82890625}\pgfsys@color@rgb@fill{0.503125}{0.68828125}{0.82890625}\pgfsys@invoke{
}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@invoke{
}{}\pgfsys@moveto{7.11319pt}{-7.11319pt}\pgfsys@moveto{7.11319pt}{-7.11319pt}\pgfsys@lineto{7.11319pt}{7.11319pt}\pgfsys@lineto{21.33957pt}{7.11319pt}\pgfsys@lineto{21.33957pt}{-7.11319pt}\pgfsys@closepath\pgfsys@moveto{21.33957pt}{7.11319pt}\pgfsys@fillstroke\pgfsys@invoke{
} \pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope{{}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{
{}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} {
}{{{{}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{9.35527pt}{-1.18056pt}\pgfsys@invoke{
}\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\varphi_{x}$}}
}}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} {}{{}}{}
{}{{}}{}{}{}{}{{}}{}\pgfsys@moveto{0.0pt}{-7.11319pt}\pgfsys@moveto{0.0pt}{-7.11319pt}\pgfsys@lineto{0.0pt}{7.11319pt}\pgfsys@lineto{28.45276pt}{7.11319pt}\pgfsys@lineto{28.45276pt}{-7.11319pt}\pgfsys@closepath\pgfsys@moveto{28.45276pt}{7.11319pt}\pgfsys@clipnext\pgfsys@discardpath\pgfsys@invoke{
}\par} \pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope{}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}=e^{-i\sigma_{x}\varphi_{x}}\,,\hskip
28.45274pt\leavevmode\hbox to29.45pt{\vbox
to25.19pt{\pgfpicture\makeatletter\hbox{\hskip 0.5pt\lower-4.0566pt\hbox
to0.0pt{\pgfsys@beginscope\pgfsys@invoke{
}\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{
}\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox
to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{ \par \par{}{{}}{}
{}{}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@setlinewidth{1.0pt}\pgfsys@invoke{
}{}\pgfsys@moveto{0.0pt}{0.0pt}\pgfsys@lineto{28.45276pt}{0.0pt}\pgfsys@stroke\pgfsys@invoke{
} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}
{}{}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@setlinewidth{1.0pt}\pgfsys@invoke{
}{}\pgfsys@moveto{0.0pt}{17.07182pt}\pgfsys@lineto{28.45276pt}{17.07182pt}\pgfsys@stroke\pgfsys@invoke{
} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}
{}{{}}{}{}{}{}{{}}{}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@setlinewidth{1.0pt}\pgfsys@invoke{
}\definecolor{pgffillcolor}{rgb}{0.9953125,0.81015625,0.52734375}\pgfsys@color@rgb@fill{0.9953125}{0.81015625}{0.52734375}\pgfsys@invoke{
}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@invoke{
}{}\pgfsys@moveto{7.11319pt}{-3.5566pt}\pgfsys@moveto{7.11319pt}{-3.5566pt}\pgfsys@lineto{7.11319pt}{20.62842pt}\pgfsys@lineto{21.33957pt}{20.62842pt}\pgfsys@lineto{21.33957pt}{-3.5566pt}\pgfsys@closepath\pgfsys@moveto{21.33957pt}{20.62842pt}\pgfsys@fillstroke\pgfsys@invoke{
} \pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope{{}}{{}}\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{
}{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}}{}{}{}{}{} {
}{{{{}}\pgfsys@beginscope\pgfsys@invoke{
}\pgfsys@transformcm{0.0}{-1.0}{1.0}{0.0}{13.04582pt}{15.16805pt}\pgfsys@invoke{
}\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{
}\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\varphi_{nn}$}}
}}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}}
\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \par{}{{}}{}
{}{{}}{}{}{}{}{{}}{}\pgfsys@moveto{0.0pt}{-3.5566pt}\pgfsys@moveto{0.0pt}{-3.5566pt}\pgfsys@lineto{0.0pt}{17.07182pt}\pgfsys@lineto{28.45276pt}{17.07182pt}\pgfsys@lineto{28.45276pt}{-3.5566pt}\pgfsys@closepath\pgfsys@moveto{28.45276pt}{17.07182pt}\pgfsys@clipnext\pgfsys@discardpath\pgfsys@invoke{
}\par} \pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope{}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope
}\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}=e^{i({n}\otimes{n})\varphi_{nn}}\,,$
(5)

with ${n}=(\mathds{1}-\sigma_{z})/2=\outerproduct{1}{1}$. A single time-update
consists in the application of the rotation $\varphi_{x}$ around the $x$-axis
(angle $\varphi_{x}$) on each qubit followed by the application of the
controlled phase gate $\varphi_{nn}$ (phase $\varphi_{nn}$) on each pair of
neighboring qubits [cf. Fig. 1(b)] [66, 67, 68, 69].

The task is to learn the reduced dynamics of two adjacent qubits embedded in a
quantum circuit of $L$ qubits (with periodic boundary conditions) [cf. Fig.
1(b)]. The two qubits are initialized in a random state while the remainder of
the circuit in state $\ket{0}$. For generic values of the parameters
$\varphi_{x}$ and $\varphi_{nn}$, such dynamics is not expected to be
Markovian. Nonetheless, an optimal channel $\mathcal{E}$, which approximates
the discrete-time evolution, can be obtained. We train the network for times
$t=1,...10$ and validate the learned dynamics up to $T=20$. Validating over a
longer time window allows us to better probe whether the dynamics is well
approximated by a time-independent channel $\mathcal{E}$.

The results are reported in Fig. 3. We consider two parameter regimes:
$(\varphi_{x},\varphi_{nn})=(0.1,0.1)$ and
$(\varphi_{x},\varphi_{nn})=(0.5,1)$. A direct comparison shows that the
dynamics in the latter case [cf. Fig. 3(b)] is not accurately captured by the
Markovian approximation, even at short times. Conversely, for the first
parameter pair, a discrepancy between the learned and the exact dynamics
primarily arises at later times [cf. Fig. 3(a)]. This suggests that for
$(\varphi_{x},\varphi_{nn})=(0.5,1)$ non-Markovian effects are more pronounced
than for $(\varphi_{x},\varphi_{nn})=(0.1,0.1)$. This may seem obvious, at
first, due to a larger coupling $\varphi_{nn}$ of the system with the rest of
the circuit. However, we observed that for even larger values of
$\varphi_{nn}$, the approximation through the inferred Markovian model can
improve again, which may be due to faster mixing effects in the unitary
circuit dynamics (see discussion in Ref. [52]).

Figure 4: Parallel $\sqrt{X}$ dynamics on ibmq_ehningen. (a) Error measure, as
defined in Eq. (3), associated with the learned quantum channel $\mathcal{E}$,
for different numbers of initial conditions $M$ and dimensions of the
environmental particle $d_{\rm E}$. (b,c) We show the learned (black crosses)
and the exact (blue circles) evolution of the Pearson correlation coefficient
[cf. Eq. (7)] for two different pairs of observables. The exact dynamics is
derived by running the circuit (see main text) on the quantum computer and
estimating the density matrix from a finite measurement statistics. The solid
(yellow) line and the shaded region provide the Pearson correlation
coefficient for the model in Eq. (6), with $V\in(-0.003,-0.001)$.

Application to IBM quantum processor.— In the following, we explore quantum
channels that are implemented on the 27-qubit ibmq_ehningen NISQ processor. In
this setting, the system state is not perfectly known but can only be
estimated from a finite number of measurements. Going beyond synthetic data,
which can be generated on a classical computer with arbitrary precision, thus
demonstrates that our method is capable to cope with shot noise, inherent to
any real device [22, 23].

We consider a simple circuit, consisting of the repeated application of the
native $\sqrt{X}$ gate —corresponding to the case in Fig. 1(b) with
$\varphi_{x}=\pi/4$ and $\varphi_{nn}=0$— on two neighboring qubits (namely
qubit $4$ and qubit $7$), while leaving the remaining ones idle. This dynamics
should map product states into product states [31, 20]. However, it has been
observed that cross-talk effects between neighboring qubits lead to the
emergence of a spurious $ZZ$-coupling [70, 71, 72, 73], responsible for the
generation of correlations between the otherwise uncoupled qubits. Even though
the ideal circuit only consists of $\sqrt{X}$ gates, the one occurring on the
quantum computer is thus approximately described by the gate

$\displaystyle
G=\exp{-i\left[\frac{\pi}{4}(\sigma_{x}\otimes\mathds{1}+\mathds{1}\otimes\sigma_{x})+V\sigma_{z}\otimes\sigma_{z}\right]}\,,$
(6)

with $V$ parametrizing the spurious coupling [74, 18, 75]. In order to
quantify such a cross-talk effect, we compute the Pearson correlation
coefficient between observables pertaining to the different qubits,
$\sigma_{\alpha_{1}}$ and $\sigma_{\alpha_{2}}$, respectively. The coefficient
is defined as [76, 77, 78]

$\displaystyle
C(\sigma_{\alpha_{1}},\sigma_{\alpha_{2}})=\frac{\expectationvalue{\sigma_{\alpha_{1}}\otimes\sigma_{\alpha_{2}}}-\expectationvalue{\sigma_{\alpha_{1}}}\expectationvalue{\sigma_{\alpha_{2}}}}{\sqrt{\expectationvalue{\sigma_{\alpha_{1}}^{2}}-\expectationvalue{\sigma_{\alpha_{1}}}^{2}}\sqrt{\expectationvalue{\sigma_{\alpha_{2}}^{2}}-\expectationvalue{\sigma_{\alpha_{2}}}^{2}}}\,.$
(7)

The data acquisition from the ibmq_ehningen quantum processor was done by
generating $40$ different initial states for the two qubits of interest, by
applying the native $\sqrt{X}$ gates on them 20 times and by performing
measurements for $t=11,12\dots 20$. We run a total of $20\,000$ shots in each
of the $9$ necessary Pauli bases. The number of measurement bases could be
reduced considering mutually unbiased observables [79, 80]. However, this
would require the application of additional two-qubit gates, introducing
further errors in the readout phase [81, 82]. We separate the obtained data
into $M=30$ initial conditions dedicated to the training, and $r=10$ initial
conditions dedicated to validation. To construct the training data set,
instead of averaging over all obtained measurements to get a single estimate
of the density matrix, we partition the entire set into $10$ subsets and then
average within the subsets. As a result, the individual data points are
subject to a larger statistical error but the size of the training set is
effectively “increased”. This procedure proves valuable since the algorithm
can tolerate high shot noise [56] and since a larger data set is beneficial
for the training. To further facilitate the process, we pre-train the
algorithm by estimating the state at $t=10$ and learning in the time window
$t=11,12,\dots 20$. In this way, the learning is more stable due to the fewer
applications of $\mathcal{E}$ needed to propagate to training times.

The validation error, shown in Fig. 4(a), demonstrates that it is possible to
learn a quantum channel that accurately reproduces the circuit dynamics on the
ibmq_ehningen. This is possible even with relatively small data sets, which is
important for applications such as calibration and error mitigation [43, 44,
45, 46, 19, 47]. In particular, the inferred channel captures the weak, yet
evident, cross-talk effects as shown by the nonzero Pearson correlation
coefficient in Fig. 4(b,c). Despite the emergence of the spurious coupling,
the $\sqrt{X}$ gate on the ibmq_ehningen is close to the ideal one (see
Supplemental Material [52]). The large purity of the quantum state observed
from the data of the NISQ device is reflected in the ability of the network to
learn the dynamics with relatively small $d_{\mathrm{E}}$.

Conclusions and outlook.— We have presented a machine-learning algorithm which
is capable of approximating arbitrary discrete-time dynamics. The latter is
based on a collision-model representation of quantum channels, which
guarantees its physical consistency. We have benchmarked the method using
synthetic data obtained from numerical simulations, and we have further shown
its usefulness in understanding effective dynamics on the ibmq_ehningen
quantum processor. This analysis further demonstrates its capability to work
with real devices, for which only a finite number of measurements is
available. In this regard, it would be interesting to explore how our neural-
network method performs when training solely from partial information of the
density matrix, i.e., from measurements on a single or on an incomplete set of
bases. Regarding future works, we also expect our framework to be valuable in
investigating the emergence of non-Markovian dynamics on NISQ devices.

The code and the data that support the findings of this work are available on
Zenodo [83].

###### Acknowledgements.

Acknowledgements.— We thank Mari Carmen Bañuls, Michele Coppola and Zala
Lenarčič for discussions on related topics and for comments on a preliminary
version of the manuscript. We are further grateful to Thomas Wellens, Martin
Koppenhöfer and Michael Krebsbach for fruitful discussions on the
ibmq_ehningen machine. We acknowledge funding from the Deutsche
Forschungsgemeinschaft (DFG, German Research Foundation) under Project No.
435696605 and through the Research Unit FOR 5413/1, Grant No. 465199066, and
through the Research Unit FOR 5522/1, Grant No. 499180199. This project has
also received funding from the European Union’s Horizon Europe research and
innovation program under Grant Agreement No. 101046968 (BRISQ). F.C. is
indebted to the Baden-Württemberg Stiftung for the financial support of this
research project by the Eliteprogramme for Postdocs. This work is funded by
the Ministry of Economic Affairs, Labour and Tourism Baden-Württemberg in the
frame of the Competence Center Quantum Computing Baden-Württemberg (project
‘QORA II’).

## References

  * Monroe  _et al._ [2012] C. Monroe, R. Raussendorf, A. Ruthven, K. Brown, P. Maunz, L. Duan, and J. Kim, Large-scale modular quantum-computer architecture with atomic memory and photonic interconnects, Phys. Rev. A 89, 022317 (2012).
  * Linke  _et al._ [2017] N. M. Linke, M. Gutierrez, K. A. Landsman, C. Figgatt, S. Debnath, K. R. Brown, and C. Monroe, Fault-tolerant quantum error detection, Sci. Adv. 3, e1701074 (2017).
  * Chao and Reichardt [2018] R. Chao and B. W. Reichardt, Fault-tolerant quantum computation with few qubits, npj Quantum Inf. 4, 42 (2018).
  * Cerezo  _et al._ [2020] M. Cerezo, A. Arrasmith, R. Babbush, S. Benjamin, S. Endo, K. Fujii, J. McClean, K. Mitarai, X. Yuan, L. Cincio, and P. J. Coles, Variational quantum algorithms, Nat. Rev. Phys. 3, 625 (2020).
  * Cohen  _et al._ [2021] L. Z. Cohen, I. H. Kim, S. Bartlett, and B. J. Brown, Low-overhead fault-tolerant quantum computing using long-range connectivity., Sci. Adv. 8 20, eabn1717 (2021).
  * Barratt  _et al._ [2021] F. Barratt, J. Dborin, M. Bal, V. Stojevic, F. Pollmann, and A. G. Green, Parallel quantum simulation of large systems on small NISQ computers, npj Quantum Inf. 7, 79 (2021).
  * Daley  _et al._ [2022] A. J. Daley, I. Bloch, C. Kokail, S. Flannigan, N. Pearson, M. Troyer, and P. Zoller, Practical quantum advantage in quantum simulation, Nature 607, 667 (2022).
  * Preskill [2018] J. Preskill, Quantum Computing in the NISQ era and beyond, Quantum 2, 79 (2018).
  * Bharti  _et al._ [2022] K. Bharti, A. Cervera-Lierta, T. H. Kyaw, T. Haug, S. Alperin-Lea, A. Anand, M. Degroote, H. Heimonen, J. S. Kottmann, T. Menke, W.-K. Mok, S. Sim, L.-C. Kwek, and A. Aspuru-Guzik, Noisy intermediate-scale quantum algorithms, Rev. Mod. Phys. 94, 015004 (2022).
  * Sun  _et al._ [2021] J. Sun, X. Yuan, T. Tsunoda, V. Vedral, S. C. Benjamin, and S. Endo, Mitigating realistic noise in practical noisy intermediate-scale quantum devices, Phys. Rev. Applied 15, 034026 (2021).
  * Brandhofer  _et al._ [2022] S. Brandhofer, D. Braun, V. Dehn, G. Hellstern, M. Hüls, Y. Ji, I. Polian, A. S. Bhatia, and T. Wellens, Benchmarking the performance of portfolio optimization with QAOA, Quantum Inf. Process. 22, 25 (2022).
  * Cech  _et al._ [2023] M. Cech, I. Lesanovsky, and F. Carollo, Thermodynamics of Quantum Trajectories on a Quantum Computer, Phys. Rev. Lett. 131, 120401 (2023).
  * Dalton  _et al._ [2024] K. Dalton, C. K. Long, Y. S. Yordanov, C. G. Smith, C. H. W. Barnes, N. Mertig, and D. R. M. Arvidsson-Shukur, Quantifying the effect of gate errors on variational quantum eigensolvers for quantum chemistry, npj Quantum Inf. 10, 1 (2024).
  * Lindblad [1976] G. Lindblad, On the generators of quantum dynamical semigroups, Comm. Math. Phys. 48, 119 (1976).
  * Gorini  _et al._ [1976] V. Gorini, A. Kossakowski, and E. C. G. Sudarshan, Completely positive dynamical semigroups of N‐level systems, J. Math. Phys. 17, 821 (1976).
  * Breuer  _et al._ [2002] H. Breuer, P. Breuer, F. Petruccione, and S. Petruccione,  _The Theory of Open Quantum Systems_ (Oxford University Press, New York, 2002).
  * Manzano [2020] D. Manzano, A short introduction to the Lindblad master equation, AIP Adv. 10, 025106 (2020).
  * Samach  _et al._ [2022] G. O. Samach, A. Greene, J. Borregaard, M. Christandl, J. Barreto, D. K. Kim, C. M. McNally, A. Melville, B. M. Niedzielski, Y. Sung, D. Rosenberg, M. E. Schwartz, J. L. Yoder, T. P. Orlando, J. I.-J. Wang, S. Gustavsson, M. Kjaergaard, and W. D. Oliver, Lindblad Tomography of a Superconducting Quantum Processor, Phys. Rev. Applied 18, 064056 (2022).
  * van den Berg  _et al._ [2023] E. van den Berg, Z. K. Minev, A. Kandala, and K. Temme, Probabilistic error cancellation with sparse Pauli–Lindblad models on noisy quantum processors, Nat. Phys. 19, 1116 (2023).
  * Di Bartolomeo  _et al._ [2023] G. Di Bartolomeo, M. Vischi, F. Cesa, R. Wixinger, M. Grossi, S. Donadi, and A. Bassi, Noisy gates for simulating quantum computers, Phys. Rev. Research 5, 043210 (2023).
  * Stilck França  _et al._ [2024] D. Stilck França, L. A. Markovich, V. V. Dobrovitski, A. H. Werner, and J. Borregaard, Efficient and robust estimation of many-qubit Hamiltonians, Nat. Comm. 15, 311 (2024).
  * McKay  _et al._ [2018] D. C. McKay, T. Alexander, L. Bello, M. J. Biercuk, L. Bishop, J. Chen, J. M. Chow, A. D. Córcoles, D. Egger, S. Filipp, _et al._ , Qiskit Backend Specifications for OpenQASM and OpenPulse Experiments, arXiv:1809.03452 (2018).
  * Cross  _et al._ [2022] A. Cross, A. Javadi-Abhari, T. Alexander, N. De Beaudrap, L. S. Bishop, S. Heidel, C. A. Ryan, P. Sivarajah, J. Smolin, J. M. Gambetta, and B. R. Johnson, OpenQASM 3: A Broader and Deeper Quantum Assembly Language, ACM Trans. Quantum Comp. 3, 12:1 (2022).
  * Machnes  _et al._ [2018] S. Machnes, E. Assémat, D. Tannor, and F. K. Wilhelm, Tunable, Flexible, and Efficient Optimization of Control Pulses for Practical Qubits, Phys. Rev. Lett. 120, 150401 (2018).
  * Wolf  _et al._ [2008] M. M. Wolf, J. Eisert, T. S. Cubitt, and J. I. Cirac, Assessing Non-Markovian Quantum Dynamics, Phys. Rev. Lett. 101, 150402 (2008).
  * Wolf and Cirac [2008] M. M. Wolf and J. I. Cirac, Dividing Quantum Channels, Commun. Math. Phys. 279, 147 (2008).
  * Schnell  _et al._ [2020] A. Schnell, A. Eckardt, and S. Denisov, Is there a Floquet Lindbladian?, Phys. Rev. B 101, 100301 (2020).
  * Nestmann  _et al._ [2021] K. Nestmann, V. Bruch, and M. Wegewijs, How Quantum Evolution with Memory is Generated in a Time-Local Way, Phys. Rev. X 11, 021041 (2021).
  * Chruściński [2022] D. Chruściński, Dynamical maps beyond Markovian regime, Phys. Rep. Dynamical maps beyond Markovian regime, 992, 1 (2022).
  * Gaikwad  _et al._ [2024] C. Gaikwad, D. Kowsari, C. Brame, X. Song, H. Zhang, M. Esposito, A. Ranadive, G. Cappelli, N. Roch, E. M. Levenson-Falk, and K. W. Murch, Entanglement Assisted Probe of the Non-Markovian to Markovian Transition in Open Quantum System Dynamics, Phys. Rev. Lett. 132, 200401 (2024).
  * Nielsen and Chuang [2010] M. A. Nielsen and I. L. Chuang,  _Quantum Computation and Quantum Information: 10th Anniversary Edition_ (Cambridge University Press, 2010).
  * Stinespring [1955] W. F. Stinespring, Positive Functions on C*-Algebras, Proc. Amer. Math. Soc. 6, 211 (1955).
  * Ciccarello  _et al._ [2022] F. Ciccarello, S. Lorenzo, V. Giovannetti, and G. M. Palma, Quantum collision models: open system dynamics from repeated interactions, Phys. Rep. 954, 1 (2022).
  * Kraus  _et al._ [1983] K. Kraus, A. Böhm, J. Dollard, and W. Wootters,  _States, Effects, and Operations: Fundamental Notions of Quantum Theory_, Lecture Notes in Physics (Springer Berlin Heidelberg, 1983).
  * Ahmed  _et al._ [2023] S. Ahmed, F. Quijandría, and A. F. Kockum, Gradient-Descent Quantum Process Tomography by Learning Kraus Operators, Phys. Rev. Lett. 130, 150402 (2023).
  * Choi [1975] M.-D. Choi, Completely positive linear maps on complex matrices, Linear Algebra Appl. 10, 285 (1975).
  * Audenaert and De Moor [2002] K. Audenaert and B. De Moor, Optimizing completely positive maps using semidefinite programming, Phys. Rev. A 65, 030302 (2002).
  * Kofman and Korotkov [2009] A. G. Kofman and A. N. Korotkov, Two-qubit decoherence mechanisms revealed via quantum process tomography, Phys. Rev. A 80, 042103 (2009).
  * Baldwin  _et al._ [2014] C. H. Baldwin, A. Kalev, and I. H. Deutsch, Quantum process tomography of unitary and near-unitary maps, Phys. Rev. A 90, 012110 (2014).
  * Banchi  _et al._ [2020] L. Banchi, J. Pereira, S. Lloyd, and S. Pirandola, Convex optimization of programmable quantum computers, npj Quantum Inf. 6, 1 (2020).
  * Teo  _et al._ [2020] Y. S. Teo, G. I. Struchalin, E. V. Kovlakov, D. Ahn, H. Jeong, S. S. Straupe, S. P. Kulik, G. Leuchs, and L. L. Sánchez-Soto, Objective compressive quantum process tomography, Phys. Rev. A 101, 022334 (2020).
  * Acharya  _et al._ [2023] A. Acharya, S. Saha, S. Sridharan, Y. Bahroun, and A. M. Sengupta, Learning the eigenstructure of quantum dynamics using classical shadows, arXiv:2309.12631 (2023).
  * Sidi [2003] A. Sidi,  _Practical Extrapolation Methods: Theory and Applications_, Cambridge Monographs on Applied and Computational Mathematics (Cambridge University Press, Cambridge, 2003).
  * Temme  _et al._ [2017] K. Temme, S. Bravyi, and J. M. Gambetta, Error Mitigation for Short-Depth Quantum Circuits, Phys. Rev. Lett. 119, 180509 (2017).
  * Krebsbach  _et al._ [2022] M. Krebsbach, B. Trauzettel, and A. Calzona, Optimization of Richardson extrapolation for quantum error mitigation, Phys. Rev. A 106, 062436 (2022).
  * Rodriguez-Vega  _et al._ [2022] M. Rodriguez-Vega, E. Carlander, A. Bahri, Z.-X. Lin, N. A. Sinitsyn, and G. A. Fiete, Real-time simulation of light-driven spin chains on quantum computers, Phys. Rev. Research 4, 013196 (2022).
  * Kim  _et al._ [2023] Y. Kim, A. Eddins, S. Anand, K. X. Wei, E. van den Berg, S. Rosenblatt, H. Nayfeh, Y. Wu, M. Zaletel, K. Temme, and A. Kandala, Evidence for the utility of quantum computing before fault tolerance, Nature 618, 500 (2023).
  * Breuer  _et al._ [2009] H.-P. Breuer, E.-M. Laine, and J. Piilo, Measure for the Degree of Non-Markovian Behavior of Quantum Processes in Open Systems, Phys. Rev. Lett. 103, 210401 (2009).
  * Benatti and Carollo [2013] F. Benatti and F. Carollo, A non-Markovian Dissipative Maryland Model, Open Syst. Inf. Dyn. 20, 1340001 (2013).
  * Roos  _et al._ [2020] J. Roos, J. I. Cirac, and M. C. Bañuls, Markovianity of an emitter coupled to a structured spin-chain bath, Phys. Rev. A 101, 042114 (2020).
  * Wood  _et al._ [2015] C. J. Wood, J. D. Biamonte, and D. G. Cory, Tensor networks and graphical calculus for open quantum systems, arXiv:1111.6950 (2015).
  * [52] See Supplemental Material, which further contains Refs. [53, 54, 55, 56, 57, 58, 59, 60], for details.
  * Paszke  _et al._ [2019] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, _et al._ , Pytorch: An imperative style, high-performance deep learning library, arXiv:1912.01703 (2019).
  * Mazza  _et al._ [2021] P. P. Mazza, D. Zietlow, F. Carollo, S. Andergassen, G. Martius, and I. Lesanovsky, Machine learning time-local generators of open quantum dynamics, Phys. Rev. Research 3, 023084 (2021).
  * Carnazza  _et al._ [2022] F. Carnazza, F. Carollo, D. Zietlow, S. Andergassen, G. Martius, and I. Lesanovsky, Inferring Markovian quantum master equations of few-body observables in interacting spin chains, New J. Phys. 24, 073033 (2022).
  * Cemin  _et al._ [2024a] G. Cemin, F. Carnazza, S. Andergassen, G. Martius, F. Carollo, and I. Lesanovsky, Inferring interpretable dynamical generators of local quantum observables from projective measurements through machine learning, Phys. Rev. Applied 21, L041001 (2024a).
  * Kingma and Ba [2017] D. P. Kingma and J. Ba, Adam: A Method for Stochastic Optimization, arXiv:1412.6980 (2017).
  * Evans [1977] D. E. Evans, Conditionally Completely Positive Maps on Operator Algebras, Q. J. Math. 28, 271 (1977).
  * Meckes [2019] E. S. Meckes,  _The Random Matrix Theory of the Classical Compact Groups_, Cambridge Tracts in Mathematics (Cambridge University Press, Cambridge, 2019).
  * Aleksandrowicz  _et al._ [2019] G. Aleksandrowicz, T. Alexander, P. Barkoutsos, L. Bello, Y. Ben-Haim, D. Bucher, F. J. Cabrera-Hernández, J. Carballo-Franquis, A. Chen, C.-F. Chen, _et al._ , Qiskit: An Open-source Framework for Quantum Computing, Zenodo 10.5281/zenodo.2562111 (2019).
  * Gross  _et al._ [2010] D. Gross, Y.-K. Liu, S. T. Flammia, S. Becker, and J. Eisert, Quantum State Tomography via Compressed Sensing, Phys. Rev. Lett. 105, 150401 (2010).
  * Flammia  _et al._ [2012] S. T. Flammia, D. Gross, Y.-K. Liu, and J. Eisert, Quantum tomography via compressed sensing: error bounds, sample complexity and efficient estimators, New J. Phys. 14, 095022 (2012).
  * Rodionov  _et al._ [2014] A. V. Rodionov, A. Veitia, R. Barends, J. Kelly, D. Sank, J. Wenner, J. M. Martinis, R. L. Kosut, and A. N. Korotkov, Compressed sensing quantum process tomography for superconducting quantum gates, Phys. Rev. B 90, 144504 (2014).
  * Andersson  _et al._ [2007] E. Andersson, J. D. Cresser, and M. J. W. Hall, Finding the Kraus decomposition from a master equation and vice versa, Journal of Modern Optics 54, 1695 (2007).
  * Bäcker  _et al._ [2024] C. Bäcker, K. Beyer, and W. T. Strunz, Local Disclosure of Quantum Memory in Non-Markovian Dynamics, Phys. Rev. Lett. 132, 060402 (2024).
  * Krantz  _et al._ [2019] P. Krantz, M. Kjaergaard, F. Yan, T. P. Orlando, S. Gustavsson, and W. D. Oliver, A quantum engineer’s guide to superconducting qubits, Appl. Phys. Rev. 6, 021318 (2019).
  * Collodo  _et al._ [2020] M. C. Collodo, J. Herrmann, N. Lacroix, C. K. Andersen, A. Remm, S. Lazar, J.-C. Besse, T. Walter, A. Wallraff, and C. Eichler, Implementation of Conditional Phase Gates Based on Tunable ZZ Interactions, Phys. Rev. Lett. 125, 240502 (2020).
  * Xu  _et al._ [2020] Y. Xu, J. Chu, J. Yuan, J. Qiu, Y. Zhou, L. Zhang, X. Tan, Y. Yu, S. Liu, J. Li, F. Yan, and D. Yu, High-Fidelity, High-Scalability Two-Qubit Gate Scheme for Superconducting Qubits, Phys. Rev. Lett. 125, 240503 (2020).
  * Alexander  _et al._ [2020] T. Alexander, N. Kanazawa, D. J. Egger, L. Capelluto, C. J. Wood, _et al._ , Qiskit pulse: programming quantum computers through the cloud with pulses, Quantum Sci. Technol. 5, 044006 (2020).
  * Murali  _et al._ [2020] P. Murali, D. C. Mckay, M. Martonosi, and A. Javadi-Abhari, Software Mitigation of Crosstalk on Noisy Intermediate-Scale Quantum Computers, in  _Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems_, ASPLOS ’20 (Association for Computing Machinery, New York, NY, USA, 2020) pp. 1001–1016.
  * Sung  _et al._ [2021] Y. Sung, L. Ding, J. Braumüller, A. Vepsäläinen, B. Kannan, M. Kjaergaard, A. Greene, G. O. Samach, C. McNally, D. Kim, _et al._ , Realization of High-Fidelity CZ and ZZ-Free iSWAP Gates with a Tunable Coupler, Phys. Rev. X 11, 021058 (2021).
  * Heunisch  _et al._ [2023] L. Heunisch, C. Eichler, and M. J. Hartmann, Tunable coupler to fully decouple and maximally localize superconducting qubits, Phys. Rev. Applied 20, 064037 (2023).
  * Perrin  _et al._ [2024] H. Perrin, T. Scoquart, A. Shnirman, J. Schmalian, and K. Snizhko, Mitigating crosstalk errors by randomized compiling: Simulation of the BCS model on a superconducting quantum computer, Phys. Rev. Research 6, 013142 (2024).
  * Gambetta  _et al._ [2012] J. M. Gambetta, A. D. Córcoles, S. T. Merkel, B. R. Johnson, J. A. Smolin, J. M. Chow, C. A. Ryan, C. Rigetti, S. Poletto, T. A. Ohki, M. B. Ketchen, and M. Steffen, Characterization of Addressability by Simultaneous Randomized Benchmarking, Phys. Rev. Lett. 109, 240504 (2012).
  * Zhao  _et al._ [2022] P. Zhao, K. Linghu, Z. Li, P. Xu, R. Wang, G. Xue, Y. Jin, and H. Yu, Quantum Crosstalk Analysis for Simultaneous Gate Operations on Superconducting Qubits, PRX Quantum 3, 020301 (2022).
  * Giorgi  _et al._ [2019] G. L. Giorgi, A. Cabot, and R. Zambrini, Transient Synchronization in Open Quantum Systems, in  _Advances in Open Systems and Fundamental Tests of Quantum Mechanics_, edited by B. Vacchini, H.-P. Breuer, and A. Bassi (Springer International Publishing, Cham, 2019) pp. 73–89.
  * Carroll  _et al._ [2022] M. Carroll, S. Rosenblatt, P. Jurcevic, I. Lauer, and A. Kandala, Dynamics of superconducting qubit relaxation times, npj Quantum Inf. 8, 1 (2022).
  * Harper and Flammia [2023] R. Harper and S. T. Flammia, Learning Correlated Noise in a 39-Qubit Quantum Processor, PRX Quantum 4, 040311 (2023).
  * Lawrence  _et al._ [2002] J. Lawrence, v. Brukner, and A. Zeilinger, Mutually unbiased binary observable sets on N qubits, Phys. Rev. A 65, 032320 (2002).
  * Romero  _et al._ [2005] J. L. Romero, G. Björk, A. B. Klimov, and L. L. Sánchez-Soto, Structure of the sets of mutually unbiased bases for N qubits, Phys. Rev. A 72, 062310 (2005).
  * Smith  _et al._ [2019] A. Smith, M. S. Kim, F. Pollmann, and J. Knolle, Simulating quantum many-body dynamics on a current digital quantum computer, npj Quantum Inf. 5, 1 (2019).
  * Leontica  _et al._ [2021] S. Leontica, F. Tennie, and T. Farrow, Simulating molecules on a cloud-based 5-qubit IBM-Q universal quantum computer, Commun. Phys. 4, 1 (2021).
  * Cemin  _et al._ [2024b] G. Cemin, M. Cech, E. Weiß, S. Soltan, D. Braun, I. Lesanovsky, and F. Carollo, Data for “Machine Learning of Quantum Channels on NISQ Devices”, 10.5281/zenodo.11091627 (2024b).

SUPPLEMENTAL MATERIAL

Machine learning of quantum channels on NISQ devices

Giovanni Cemin,1,∗ Marcel Cech,2,∗ Erik Weiss,2 Stanislaw Soltan,2

Daniel Braun,2 Igor Lesanovsky,2,3 and Federico Carollo2

1Max Planck Institute for the Physics of Complex Systems, Nöthnitzer Str. 38,
01187 Dresden, Germany
2Institut für Theoretische Physik, Universität Tübingen, Auf der Morgenstelle
14, 72076 Tübingen, Germany
3School of Physics and Astronomy and Centre for the Mathematics and
Theoretical Physics of Quantum Non-Equilibrium Systems, The University of
Nottingham, Nottingham, NG7 2RD, United Kingdom

##  I I. Machine learning algorithm

In this section, we provide details on the machine learning (ML) architecture
we employ to learn quantum channels. Our aim is to parameterize a generic
completely positive and trace-preserving quantum channel $\mathcal{E}$ by
means of a neural network. To this end, we exploit Stinespring dilation
theorem [32] and write $\mathcal{E}$ as in Eq. (2). Accordingly, the only
quantity that needs to be encoded through the neural-network parameters is the
unitary operator $U$. This is a matrix of dimensions
$(d\,d_{E})\times(d\,d_{E})$, where $d$ and $d_{E}$ are the dimension of the
system Hilbert space and environment Hilbert space, respectively. Also in this
case, to avoid unphysical results, we constrain the matrix $U$ to be unitary
by construction. In our implementation using Pytorch [53], we can do this
through the function torch.nn.utils.parametrizations.orthogonal.

Given the parametrization of the quantum channel, we aim at building a network
that outputs the updated state of the system. Let us consider a system
composed of $L$ qubits (Hilbert space of dimension $d=2^{L}$). Its state
$\rho$ can be characterized in terms of the expectation values of Pauli
strings
$\\{F_{j}\\}_{j=1}^{d^{2}}=\\{\mathds{1}\otimes...\otimes\mathds{1},...,\sigma_{z}\otimes...\otimes\sigma_{z}\\}$
[54, 55, 56], as $\rho=(\mathds{1}+\sum_{j=2}^{d^{2}}F_{j}v^{j})/d$, where
$v^{j}=\expectationvalue{F_{j}}=\Tr[F_{j}\rho]$. The elements $v^{j}$ are the
entries of the so-called coherence vector
$\mathbf{v}=(v^{j})_{j={1,...,d^{2}}}$. Our neural-network model takes as
input the state at time $t$ (represented via the coherence vector) and
calculates the state at time $t+1$ by providing the updated coherence vector
via the relations

${v}^{i}_{\rm ML}(t+1)=\Tr[F_{i}\mathcal{E}[\rho_{\rm
ML}(t)]\Big{]},\quad\mbox{ with }\quad\rho_{\rm
ML}(t)=\frac{1}{d}\Big{[}\mathds{1}+\sum_{j=2}^{d^{2}}F_{j}v^{j}_{\rm
ML}(t)\Big{]}\,.$ (S1)

The coherence vector ${\bf v}_{\rm ML}(t)$ is thus obtained by propagating the
initial condition using the neural-network model up to the corresponding time.
To train the model, we first estimate (either from numerical simulations or
from measurement outcomes) the coherence vectors ${\bf v}(t)$, associated with
the exact quantum dynamics, for all the considered times and for different
initial conditions. We then utilize the Adam optimizer [57] to minimize the
mean squared error loss function

$\mathbb{L}=\mathds{E}\big{\\{}|\mathbf{v}_{\mathrm{ML}}(t)-\mathbf{v}(t)|^{2}\big{\\}}=d\,\mathds{E}\big{\\{}{\rm
Tr}\left[(\rho_{\mathrm{ML}}(t)-\rho(t))^{2}\right]\big{\\}}\,,$

over the set of generated training data.

Table S1: Parameters used in the training process of the ML model. Model for |  lr |  gamma |  batch_size |  n_epochs
---|---|---|---|---
Time-periodic Lindblad dynamics |  $0.002$ |  $0.999$ |  $128$ |  $400$
Quantum channel without infinitesimal generator |  $0.002$ |  $0.999$ |  $128$ |  $400$
Reduced subsystem dynamics |  $0.002$ |  $0.999$ |  $128$ |  $400$
Parallel $\sqrt{X}$ dynamics on ibmq_ehningen: |  |  |  |
Pre-training |  $0.001$ |  $1.000$ |  $256$ |  $300$
Training |  $0.001$ |  $0.980$ |  $256$ |  $300$

In Table S1, we provide the main parameters used during the training process.
There, lr stands for the learning rate of the Adam optimizer, gamma is the
multiplicative factor for the learning rate decay, batch_size the size of the
batch utilized in each epoch, and n_epochs is the total number of epochs.

##  II II. Time-periodic Lindblad dynamics

Figure S1: Time-periodic Lindblad dynamics. (a) Error measure, as defined in
Eq. (3), related to the inferred effective Lindblad dynamics, obtained using
the method introduced in Ref. [56]. For each combination of $\omega/E_{z}$ and
$E_{x}/E_{z}$ we train on $M=100$ different trajectories and then compute the
error $\epsilon$ using $r=10$ out-of-sample trajectories. The solid black line
separates the regime in which there exists an effective time-independent
Lindblad description of the underlying time-dependent Lindblad in Eq. (4) [25,
27] from the one in which there is no $\mathcal{L}_{\rm F}$. For the
parameters $(E_{x}/E_{z},\omega/E_{z})=(0.5,1)$ used in the main text, we show
the time-evolution (blue circles - exact data, black crosses - learned
dynamics) from an initial state in the validation set. (b) Error measure
associated with the channel learned with the algorithm discussed in the main
text, trained on $M=30$ different trajectories. As apparent, the learned
channel better captures the underlying dynamics in all regimes, including the
region where no time-independent effective Lindblad description is present.
Here, the stroboscopic time $t$ in units of the time-period $2\pi/\omega$.

In this section, we provide additional results on the stroboscopic dynamics
generated by a time-periodic Lindblad generator. Moreover, we investigate the
performance of our algorithm in learning a genuinely discrete quantum channel
which does not possess any infinitesimal generator.

Let us consider the dynamics described by the time-periodic Lindblad generator
in Eq. (4). We can exploit the criteria discussed in Refs. [25, 27] to
determine whether a Floquet Lindblad generator $\mathcal{L}_{\rm F}$ exists or
not. In particular, we check whether a Hermitian logarithm of the quantum
channel

$\displaystyle\mathcal{L}_{\mathrm{F}}=\frac{\omega}{2\pi}\log\left\\{\mathcal{T}\exp{\int_{0}^{2\pi/\omega}ds\,\mathcal{L}(s)}\right\\}\,$
(S2)

is conditionally completely positive [58]. If this is the case, then there
exists a Floquet Lindblad generator $\mathcal{L}_{\mathrm{F}}$ that captures
the dynamics at stroboscopic times, i.e., multiples of the time-period
$2\pi/\omega$. As shown in Fig. S1(a) with a black solid line, there is a
region where a Floquet Lindblad generator exists ($\mathcal{L}_{\rm F}$) and a
region where it does not exist (no $\mathcal{L}_{\rm F}$).

For each combination of $\omega/E_{z}$ and $E_{x}/E_{z}$, we train the
Lindblad dynamics approximator of Ref. [56] (using trajectories from $M=100$
different initial conditions) and the algorithm proposed in the main text
(using trajectories from $M=30$ different initial conditions). We compute the
error $\epsilon$ using $r=10$ out-of-sample trajectories. In both cases, the
initial states are chosen randomly according to the Haar measure [59, 60]. The
results are reported in Fig. S1: panel (a) shows the error function for the
Lindblad approximator [56] while panel (b) the one for the learned quantum
channel. The comparison demonstrates that inferring a faithful Lindblad
description may be challenging. In particular, for the parameters
$(E/E_{z},\omega/E_{z})=(0.5,1)$ considered in the main text, the Lindblad
approximator yields a sub-optimal description, being stuck in a local minimum
of the loss function [see the yellow region in Fig. S1(a) and the discrepancy
between the blue circles and the black crosses in the time-evolution on the
right of panel (a)]. This may be related to the non-convex geometry of the set
of Markovian channels [25]. Conversely, using the algorithm proposed in the
main text, we can learn a quantum channel that captures the dynamics up to a
very high accuracy (despite the smaller training data-set) throughout the
whole parameter regimes.

Figure S2: Quantum channel without infinitesimal generator. (a) Error measure
associated with the Lindblad dynamics approximator of Ref. [56] as a function
of the number $M$ of considered initial conditions. The plots on the right
show a comparison between the predicted expectation values (black crosses) and
the exact simulated data (blue circles). (b) Error measure $\epsilon$
associated with the learned quantum channel as a function of the number $M$ of
considered initial conditions and of the environmental dimension $d_{\rm E}$.
The panels on the right show a comparison between the predicted expectation
values (black crosses) and the exact simulated data (blue circles).

As a further example, we consider the quantum channel

$\displaystyle\mathcal{E}[\rho]=\frac{\Tr[\rho]\mathds{1}+\rho^{T}}{3}\,,$
(S3)

which implements a single-qubit channel, related to the transposition of the
density matrix. As discussed in Refs. [25, 26], this quantum channel cannot be
described by any (time-dependent) Lindblad master equation.

We follow the same approach as before. We train both the Lindblad dynamics
approximator of Ref. [56] [cf. Fig. S2(a)] and the algorithm presented in the
main text [cf. Fig. S2(b)] for different numbers of considered initial
conditions $M$ and, for our new method, for different values of the
environmental dimension $d_{E}$. We then compute the error measure, as defined
in Eq. (3), using $r=10$ out-of-sample trajectories. Both the learned quantum
channel and the Lindblad dynamics approximator show good agreement with the
exact time evolution, as displayed in Fig. S2. Still, the Lindblad
approximator cannot accurately capture the whole time evolution, as witnessed
by a larger value of the error measure. Conversely, the learned channel is
very accurate as soon as $d_{\rm E}\geq 3$, which coincides with the Kraus
rank of the exact dynamics [26], i.e., the minimal number of Kraus operators
required for representing the considered channel.

##  III III. Reduced subsystem dynamics

In this section, we extend the discussion related to the reduced subsystem
dynamics discussed in Fig. 3. We further investigate the behavior of the
algorithm for the two parameter pairs $(\varphi_{x},\varphi_{nn})=(0.1,0.1)$
and $(\varphi_{x},\varphi_{nn})=(0.5,1)$ (already shown in the main text),
together with the pair $(\varphi_{x},\varphi_{nn})=(0.5,2)$. For all these
cases, we choose the initial conditions as a product state of Haar random
states for the subsystem qubits and of states $\ket{0}$ for all other qubits.

Figure S3: Reduced subsystem dynamics. We here report the error measure [Eq.
(3)] and all 15 non-trivial observable for the parameter pairs, (a):
$(\varphi_{x},\varphi_{nn})=(0.1,0.1)$, (b):
$(\varphi_{x},\varphi_{nn})=(0.5,1)$ and (c):
$(\varphi_{x},\varphi_{nn})=(0.5,2)$. Each model is trained on trajectories
from $M=30$ different initial conditions and the error measure is computed
using $r=10$ out-of-sample trajectories, one of which is reported on the right
in each panel. The black crosses represent the prediction of our model, while
blue circles correspond to the simulated data.

Let us first discuss the two parameter pairs in Fig. S3, also investigated in
the main text. For $(\varphi_{x},\varphi_{nn})=(0.1,0.1)$ [panel (a)], the
predicted dynamics accurately reproduces the data up to $t\approx 10$, before
deviating both quantitatively and qualitatively (see, e.g.,
$\expectationvalue{\sigma_{y}\otimes\sigma_{x}}$). In contrast to this, the
dynamics for $(\varphi_{x},\varphi_{nn})=(0.5,1)$ [panel (b)] shows notable
differences already at early times. For the additional parameters
$(\varphi_{x},\varphi_{nn})=(0.5,2)$ [panel (c)], we observe a good agreement
between our prediction and the simulated data. This behavior may be attributed
to a faster scrambling in the circuit which quickly drives the system toward
the fully mixed state. The latter can be accurately mimicked by the learned
quantum channels. However, small deviations from this mixed state are not
fully captured by the learned quantum channel.

##  IV IV. Application to IBM quantum processor.

In this section, we discuss the data obtained from the ibmq_ehningen quantum
processor (accessed on the 3rd of January 2024), and make connections with the
discussion related to Fig. 4 in the main text. The initial conditions
$\rho(0)=\outerproduct{\psi(0)}{\psi(0)}$ are such that all qubits, but the
two composing the subsystem of interest, are initialized in state $\ket{0}$.
The initial states for the two-qubit subsystem are taken in product form and
such that half of the times they are formed by a same random state for the two
qubits, while the other half of the times the two qubits are characterized by
two different random states. Single-qubit random states are sampled from the
Haar measure [59, 60].

Figure S4: Parallel $\sqrt{X}$ dynamics on ibmq_ehningen \- purity and error
measure. (a) Purity $\Tr{(\rho(t))^{2}}$ for all the different trajectories
(here represented with different colors) at all measured times on the
ibmq_ehningen. (b) Error measure for the learned channel as a function of $M$
and $d_{\rm E}$. (c) Using the best learned quantum channel [top right corner
in panel (b)], we compute the error measure $\epsilon$ against $M$ different
single trajectories, shown through the black crosses. We also compute the
error measure in Eq. (3) associated with the ideal $\sqrt{X}$-gate (blue
circles). For reference, in panel (c) we report the color scale corresponding
to the one in Fig. 4. (d) For each of the trajectories in panel (c), we report
the parameter $V$ characterizing the $ZZ$-coupling obtained by fitting the
Pearson correlation coefficients with the ansatz in Eq.(6).

Let us first consider the purity presented in Fig. S4(a). For unitary
dynamics, perfect readout, and infinitely many shots, the purity would be
equal to 1. Here, as we are dealing with dynamics on an actual quantum device,
we observe a decrease of the purity, although the latter remains close to 1
throughout. In Fig. S4(b), we report the error measure as already shown in
Fig. 4. Out of all the learned models, we pick the best (top right corner),
and compute the error measure $\epsilon$ for each simulated initial condition
$M$, shown in panel (c) as black crosses. For comparison, we compute the error
measure using the ideal $\sqrt{X}$ dynamics as quantum channel (blue circles).
Despite the error for the ideal $\sqrt{X}$ gate being quite small for all the
considered initial conditions, our algorithm can better approximate the actual
dynamics. Let us mention, that the model was trained using the first 30
trajectories in panel (c), see the $y$-axis. Despite this, the error measure
does not show an increase for the last 10 trajectories, indicating a good
extrapolation capability of the model. In Fig. S4(d), we provide the
$ZZ$-coupling strength $V$ that we extract by fitting the Pearson correlation
coefficients using the Hamiltonian in Eq. (6). Based on this observation, we
choose $V\in(-0.003,-0.001)$ for the comparison in the main text.

Figure S5: Parallel $\sqrt{X}$ dynamics on ibmq_ehningen \- predicted
trajectories and Pearson correlation coefficient. (a) For the best learned
quantum channel in Fig. 4, top right corner, we compare its prediction (black
crosses) with the measured expectation values (blue circles). (b) We provide
all Pearson correlation coefficients associated with the time-evolution in
(a). In both panels, we also provide the heuristic prediction of Eq. (6) with
$V\in(-0.003,-0.001)$ (yellow shaded region).

In Fig. S5, we provide the full comparison between the prediction of our model
against the measurements on the ibmq_ehningen device. The prediction (black
crosses) agree with dynamics on the device (blue circles) within statistical
errors both for the expectation values [see panel (a)] and for the Pearson
correlation coefficients [see panel (b)]. We note that the $\sqrt{X}$ gate is
already nearly perfect rendering an accurate prediction of the Pearson
correlation coefficient a challenging task for any noise model.