# High-accuracy Hamiltonian learning via delocalized quantum state evolutions

Davide Rattacaso<EMAIL_ADDRESS>Dipartimento di Fisica “E.
Pancini”, Università di Napoli Federico II, Complesso di Monte Sant’Angelo,
via Cinthia, Napoli 80126, Italy  Gianluca Passarelli  CNR-SPIN, c/o Complesso
di Monte Sant’Angelo, via Cinthia, Napoli 80126, Italy  Procolo Lucignano
Dipartimento di Fisica “E. Pancini”, Università di Napoli Federico II,
Complesso di Monte Sant’Angelo, via Cinthia, Napoli 80126, Italy

###### Abstract

Learning the unknown Hamiltonian governing the dynamics of a quantum many-body
system is a challenging task. In this manuscript, we propose a possible
strategy based on repeated measurements on a single time-dependent state. We
prove that the accuracy of the learning process is maximized for states that
are delocalized in the Hamiltonian eigenbasis. This implies that
delocalization is a quantum resource for Hamiltonian learning, that can be
exploited to select optimal initial states for learning algorithms. We
investigate the error scaling of our reconstruction with respect to the number
of measurements, and we provide examples of our learning algorithm on
simulated quantum systems.

##  1 Introduction

Thanks to the enormous progress in manufacturing and controlling quantum
devices made out of an increasingly large number of qubits, we are now
entering the era of Noisy Intermediate-Scale Quantum technology [1]. Relevant
progresses have been made in controlling quantum degrees of freedom on
different platforms [2, 3, 4]. However, to some extent the true Hamiltonian,
governing the dynamics of these systems is often (at least) partially unknown.
In this context, the major challenge is then to infer a realistic Hamiltonian
model of the quantum system that can match the experimental data, guided by
physical intuition. By querying the device (assumed a black box), one can
measure the time evolution of several observables in order to learn the system
Hamiltonian. This process, known as Hamiltonian learning, has been fundamental
over the years for the validation of theoretical models, where the observation
of the system evolution aims to characterize the unknown parameters of the
model and establish its plausibility, and is now centralizing the attention of
the scientific community due to its relevance for quantum technologies and
quantum computation [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28]. Applications of Hamiltonian learning
range from the verification of the performances of quantum devices [29, 30,
31, 32, 33], to quantum error correction [34], to the design, characterization
and calibration of quantum devices [34, 26, 27].

Figure 1: The larger is the capability of the state $\rho(t)$ to explore the
space of states $S$, the larger is the amount of information obtained through
the learning process, and, consequently, the smaller is the uncertainty in
reconstructing the Hamiltonian.

The performance of a Hamiltonian learning algorithm is determined by the
scaling of the relative uncertainty of the reconstructed Hamiltonian as a
function of the computational effort required, which, in many relevant
situations, is given by the number $N_{S}$ of experiments, or shots. Each shot
begins with a state preparation and ends with a measurement in the
computational basis. To fully reconstruct a quantum Hamiltonian, its action on
a basis of the Hilbert space must be known. As a result, a number of initial
states that is exponential in the systems size is needed for a full process
tomography, leading to an exponential overhead in the number of shots required
for learning.

When the Hamiltonian is the span of local interactions, it has been proven
that a polynomial number of experiments is sufficient to fully reconstruct its
couplings [35]. Significant examples in this direction are the reconstruction
of the system Hamiltonian from short-time evolutions [25] and taking advantage
from the exploitation of symmetries of the unknown Hamiltonian [26]. In these
works, locality is a resource for the learning process.

In this paper, we focus on properties of the state (rather than the
Hamiltonian) and we propose a novel algorithm that requires measurements of a
single time-dependent quantum state. The main idea is to take benefit of
quantum superposition. As depicted in Figure 1, indeed, some states are able
to explore a significant portion of the space of states $S$ during their time
evolution and therefore encode enough information to completely reconstruct
the Hamiltonian generating their dynamics. Using analytical arguments and
numerical examples, we show that the accuracy of the method proposed is
related to the delocalization of the initial state in the Hamiltonian
eigenstates. To this aim, we prove an analytical relationship between the
inverse participation ratio (IPR) [36, 37, 38] of the initial state, and the
information matrix that measures the amount of information acquired in the
learning process. Equally weighted superpositions of the Hamiltonian
eigenstates explore a large sample of the space of states and provide the
maximum amount of information about the system Hamiltonian. In other words,
delocalization is a resource for Hamiltonian learning. This opens a new
perspective on the application of quantum information theory to the study of
out-of-equilibrium quantum systems [36, 39]. As a proof of concepts, we apply
our method to learn the Hamiltonian of systems of few superconducting qubits,
highlighting its relevance to gate-based quantum computation. In this setting,
we exploit state tomography to define a simple algorithm that clarifies the
relationship between delocalization and learning. Full state tomography
requires an exponential amount of resources in the system size. However,
scaling to large system sizes is out of the purposes of this manuscript.

##  2 Hamiltonian learning algorithm

To fully represent the information content of the system state, we define a
basis $\mathcal{B}=\\{O_{\alpha}\\}$ for the space of Hermitian operators,
orthonormal with respect to the Hilbert-Schmidt product
$(A,B)=\operatorname{Tr}(AB)$. In this basis, the system density matrix
$\rho(t)$ can be expanded as $\rho(t)=\sum_{\alpha}r_{a}(t)O_{\alpha}$ where
$r_{\alpha}(t)\equiv\operatorname{Tr}(O_{\alpha}\rho(t))$ are the components
of $\rho(t)$ over $\mathcal{B}$ and are the expectation values of the
observables $O_{\alpha}$ over the state $\rho(t)$. If we measured the
coefficients $r_{\alpha}(t_{n})$ at a collection of $N_{T}$ times
$\\{t_{n}\\}\equiv\\{0,\delta t,\dots,(N_{T}-1)\delta t\\}$, we would have a
time-dependent state tomography. Repeating each measurement $N_{M}$ times, the
uncertainty on each observables is
$\sigma(r_{\alpha}(t_{n}))=\sqrt{\operatorname{Tr}(O_{\alpha}^{2}\rho(t_{n}))/N_{M}}$.
In superconducting quantum processing units, measurements are always performed
in the computational basis, i. e., in the basis of simultaneous eigenstates of
the single-qubit operators $\sigma_{i}^{z}$. Measuring observables that do not
commute with $\sigma_{i}^{z}$, such as $\sigma_{i}^{x,y}$, can be done by
first rotating the system state so that $\sigma_{i}^{x,y}\to\sigma_{i}^{z}$.
This means that we need to perform $3$ measurements per qubit in order to have
full information about the system state. As a consequence, in a system of
$N_{q}$ qubits the number experiment shots needed for a full state tomography
is $N_{S}=3^{N_{q}}N_{T}N_{M}$.

In general, the unknown Hamiltonian is a Hermitian operator that can be
expanded in the (exponentially large in the system size) basis $\mathcal{B}$.
However, realistic Hamiltonians often have symmetries and/or locality
constraints that can be identified resorting to first-principle theoretical
models [40]. Hence, we can write the unknown Hamiltonian as the span of a set
of local Hermitian and traceless operators $\mathcal{B}_{L}=\\{L_{i}\\}$ that
represent the relevant interactions between the constituents of the system:
$H=\sum_{i}h_{i}L_{i}$. Remarkably, the locality constraint implies that the
number of $L_{i}$ in $\mathcal{B}_{L}$ is at most polynomial in the system
size [28].

We want to exploit the information extracted from the state evolution via a
full tomography to learn the couplings $h_{i}$ of the system Hamiltonian $H$.
Assuming that the system evolves unitarily according to the Liouville-von
Neumann equation $\dot{\rho}=-i[H,\rho]$ (here and in the following
$\hbar=1$), the system state at a time $t_{n+1}$ is related to $\rho(t_{n})$
via the equation

$\frac{\rho(t_{n+1})-\rho(t_{n})}{\delta
t}+i\sum_{i}h_{i}[L_{i},\rho(t_{n})]=R_{n}\delta t,$ (1)

where $R_{n}=\frac{-[H,[H,\rho(t^{*})]]}{2}$ is the remainder of the Taylor
expansion at the first order of $\rho(t_{n+1})$, for
$t^{*}\in[t_{n},t_{n+1}]$.

In an ideal experiment, $\delta t$ could be made arbitrarily small and the
uncertainty on the states $\rho(t_{n})$ would vanish as well. As a
consequence, the optimal couplings $h_{i}^{\text{(opt)}}$ are the ones that
minimize the Frobenius norm of the LHS of Eq. (1) at each time, that is:

$f(\vec{h})=C-2\sum_{i}h_{i}B_{i}+\sum_{ij}V_{ij}h_{i}h_{j},$ (2)

where

$V_{ij}=-\sum_{n}\operatorname{Tr}\left([L_{i},\rho(t_{n})][L_{j},\rho(t_{n})]\right)\;,$
(3)

$B_{j}=\sum_{n}\operatorname{Tr}\left(-i[L_{j},\rho(t_{n})](\rho(t_{n+1})-\rho(t_{n}))/\delta
t\right)$, and
$C=\sum_{n}\operatorname{Tr}\left((\rho(t_{n+1})-\rho(t_{n}))^{2}/\delta
t^{2}\right)$. We call the matrix $V_{ij}$ the Total Quantum Covariance Matrix
(TQCM).

The optimal couplings are such that the gradient of $f(\vec{h})$ is null. When
the TQCM is invertible these couplings can be written as

$h_{i}^{\text{(opt)}}=\sum_{j}(V^{-1})_{ij}B_{j},$ (4)

Eq. (4) can serve to our goal if the kernel of $V_{ij}$ is empty, otherwise,
the experimental data are insufficient to specify the system Hamiltonian,
meaning that different Hamiltonians can produce the same observables.

##  3 Uncertainty estimation

In real experiments, the expectation values $r_{\alpha}(t_{n})$ are affected
by statistical uncertainties. Moreover, the time interval $\delta t$ between
measurements cannot be reduced to zero, and the remainder $R_{n}$ has to be
considered as a systematic source of error for the estimated derivatives
$\left(\rho(t_{n+1})-\rho(t_{n})\right)/\delta t$. These contributions
determine a total uncertainty $\delta B_{i}$ on the vector $B_{i}$. As a
consequence, the Hamiltonian couplings are known up to an uncertainty $\delta
h_{i}$ and any Hamiltonian $H=\sum_{i}h_{i}L_{i}$ with $\lvert
h_{i}-h_{i}^{\text{(opt)}}\rvert<\delta h_{i}$ is compatible with the dynamics
observed through the measurement of the local expectation values
$r_{\alpha}(t_{n})$. Remarkably, since we perform tomography even at the
initial time, state preparation errors do not directly affect the uncertainty
on the reconstructed Hamiltonian.

As we show in Appendix A, both the statistical and the systematic part of the
uncertainty $\delta B_{i}$ can be upper-bounded by a function that does not
depend on the specific evolution of the system, but only on the Hamiltonian
norm, the total number of repetitions $N_{M}$, time steps $N_{T}$ and the
number of qubits $N_{q}$. Relating the uncertainty $\delta B_{i}$ to the
uncertainty $\delta h_{i}$ through Eq. (4) and considering the relationship
between the vector norm of the exact couplings $\lVert\vec{h}\rVert$ and the
operator norm $\lVert H\rVert_{\text{op}}$, we can extend this bound to the
relative error

$\varepsilon\equiv\lVert\vec{h}^{\text{(opt)}}-\vec{h}\rVert/\lVert\vec{h}\rVert$
(5)

on the reconstructed Hamiltonian:

$\displaystyle\varepsilon\leq$
$\displaystyle\sqrt{l\operatorname{Tr}\left[\left(\frac{V_{ij}}{\lVert
L\rVert_{\text{op}}^{2}N_{T}}\right)^{-2}\right]}$
$\displaystyle\times\left(16\frac{{(3/2)}^{\frac{N_{q}}{2}}}{\sqrt{N_{S}}}+4\lVert
H\rVert_{\text{op}}\delta t\right),$ (6)

where $l$ is the number of couplings of the Hamiltonian and, without loss of
generality, we suppose that $\lVert L_{i}\rVert_{\text{op}}=\lVert
L\rVert_{\text{op}}\forall i$. Remarkably, this reconstruction error is not
affected by the derivative uncertainty, inversely proportional to the time
step, which decreases the accuracy of the learning protocols based on short-
time evolution[25]. This feature can represent a significant advantage in
characterizing devices with a high temporal resolution.

In Eq. (3), the upperbound on the relative error only depends on the system
evolution through the eigenvalues of the TQCM. In particular, the larger are
these eigenvalues, the larger is the amount of information about the system
Hamiltonian that we gain by observing the state evolution. Conversely, when
some eigenvalue of the TQCM goes to zero and the matrix is not invertible, the
uncertainty diverges, signaling that the information acquired during the
experiment is not sufficient for Hamiltonian learning. We can clearly see the
statistical meaning of the TQCM: Eq. (3) is analogous to a Cramer-Rao bound on
the error on the estimated Hamiltonian [41, 27], where the TQCM takes the role
of an information matrix. While the spectrum of $V_{ij}$ estimates the total
amount of information about the Hamiltonian that we have gained by observing
the state during its evolution, at any fixed time $t_{n}$, the spectrum of

$V_{ij,n}\equiv-\operatorname{Tr}\left([L_{i},\rho(t_{n})][L_{j},\rho(t_{n})]\right)$
(7)

estimates the amount of information about the Hamiltonian gained by observing
the short-time evolution around $t_{n}$. Both $V_{ij}$ and $V_{ij,n}$ depend
on the initial state preparation and on the consequent evolution. The quantum
state preparation of the initial state is crucial to the success of the
algorithm, optimal initial states are those maximizing the amount of
information gained by observing the evolution, hence, minimizing the
uncertainty on the reconstructed Hamiltonian.

##  4 Information and inverse participation ratio

Schrodinger’s evolution often delocalizes states in the Hilbert space. In this
section, we show that the more the state samples the Hilbert space, the more
information we gain about the system Hamiltonian.

As shown in Eq. (3), the largest contribution to the relative error comes from
the minimum eigenvalue of the TQCM. The TQCM is the sum over the different
time steps of the covariance matrices $V_{ij,n}$. Following the definition of
Eq. (7), these are positive semi-definite. Evolution of highly delocalized
states generates very different covariance matrices at different times. In
this case, we speculate that the eigenvalues of the TQCM exponentially
increase for an initial transient, corresponding to the time spent by the
state $\rho(t)$ in exploring the space of states before returning close to its
previous orbit. The larger is the sample of the space of states explored by
$\rho(t)$ during its evolution, the larger will be the amount of information
on the system Hamiltonian gained by observing the evolution of $\rho(t)$.

Quantitatively, we show that a good estimation of the information obtained in
the learning process is the IPR of the initial state in the Hamiltonian
eigenstates [36, 37, 38]. If the system Hamiltonian is
$H=\sum_{\alpha}E_{\alpha}\lvert\alpha\rangle\langle\alpha\rvert$ and the
initial state of the system is
$\lvert\psi\rangle=\sum_{\alpha}a_{\alpha}\lvert\alpha\rangle$, the IPR is
defined as $\text{IPR}(\psi,H)=\sum_{\alpha}|a_{\alpha}|^{4}$. Therefore, the
IPR measures the spreading of the initial state in the Hamiltonian
eigenstates: the lower is the IPR, the more the initial state spreads out.
This is also an estimation of the capability of the state of sampling the
Hilbert space uniformly during the evolution, in analogy with the ergodic
hypothesis. Indeed, the time average of an observable $A$ during the evolution
is $\bar{A}=\operatorname{Tr}(\bar{\rho}A)$, where
$\bar{\rho}=\sum|a_{\alpha}|^{2}\lvert\alpha\rangle\langle\alpha\rvert$ is the
dephased state. As a consequence, when the IPR is minimum
($\text{IPR}_{\text{min}}=1/2^{N_{q}}$) all the populations of $\bar{\rho}$
are equal and the time average becomes an average on the energy eigenstates
with equal weights.

The relationship between the uncertainty on the reconstructed Hamiltonian and
the IPR will be clear in the numerics that follow. However, a simple general
argument is given here, showing that the states with a small IPR are
associated with large eigenvalues of the TQCM and, due to Eq. (3), with a
small error of the reconstructed Hamiltonian.

Please note that the in order to calculate the IPR, one needs to know the
Hamiltonian eigenstates $\lvert\alpha\rangle$. This may sound odd, as the
Hamiltonian itself is unknown in general. However, in our examples we apply
our method to learn “known” Hamiltonians, and we can explicitly calculate the
IPR. In possible practical applications, this is not the case, but one could
resort to adaptive learning approaches as in Ref. [27]. Starting from a state
minimizing the IPR over the eigenstates of a guessed Hamiltonian, one can
iteratively obtain better estimates of the target Hamiltonian.

We consider $\rho(t)$ as a pure state
$\rho(t)=\lvert\psi(t)\rangle\langle\psi(t)\rvert$, where
$\lvert\psi(0)\rangle=\sum_{\alpha}a_{\alpha}\lvert\alpha\rangle$ and
$\lvert\alpha\rangle$ are the eigenstates of the unknown system Hamiltonian.
The eigenvalues $\omega_{i}$ of the TQCM can be written as
$\omega_{i}=\sum_{jj^{\prime}}V_{jj^{\prime}}a^{(i)}_{j}a^{(i)}_{j^{\prime}}$,
in terms of the corresponding normalized eigenvectors $a^{(i)}_{j}$. Defining
the local operators $A_{i}\equiv\sum_{j}a^{(i)}_{j}L_{j}$, the eigenvalues
$\omega_{i}$ of the TQCM of Eq. (3) read:

$\displaystyle\omega_{i}$
$\displaystyle=-\sum_{n}^{N_{T}}\operatorname{Tr}\left([A_{i},\rho(t_{n})][A_{i},\rho(t_{n})]\right)$
$\displaystyle=2\sum_{n}^{N_{T}}\left(\langle\psi(t_{n})|A_{i}^{2}|\psi(t_{n})\rangle-\langle\psi(t_{n})|A_{i}|\psi(t_{n})\rangle^{2}\right).$

If the time-step $\delta t$ is sufficiently small, this sum can be
approximated by an integral: Considering that
$\lvert\psi(t)\rangle=\sum_{\alpha}a_{\alpha}\lvert\alpha\rangle
e^{-iE_{\alpha}t}$, for $\delta t\to 0$ these eigenvalues can be written as
integrals of local correlations:

$\displaystyle\omega_{i}$
$\displaystyle\approx\frac{2N_{T}}{T}\int_{0}^{T}dt\left(\langle\psi(t)|A_{i}^{2}|\psi_{n}\rangle-\langle\psi(t)|A_{i}|\psi(t)\rangle^{2}\right)$
$\displaystyle=\frac{2N_{T}}{T}\int_{0}^{T}dt\Big{(}\sum_{\alpha\beta}a_{\alpha}a_{\beta}^{*}\langle\alpha|A_{i}^{2}|\beta\rangle
e^{-it(E_{\alpha}-E_{\beta})}$
$\displaystyle-\sum_{\alpha\beta\gamma\delta}a_{\alpha}a_{\beta}^{*}a_{\gamma}a_{\delta}^{*}\langle\alpha|A_{i}|\beta\rangle\langle\gamma|A_{j}|\delta\rangle$
$\displaystyle\times
e^{-it(E_{\alpha}-E_{\beta}+E_{\gamma}-E_{\delta})}\Big{)}.$ (8)

At this point we impose a non-degeneracy and non-resonance condition on the
system Hamiltonian $H$. The non-resonance condition consists in the fact that
$E_{\alpha}-E_{\beta}+E_{\gamma}-E_{\delta}=0$ if and only if
$E_{\alpha}=E_{\beta}$ and $E_{\gamma}=E_{\delta}$ or $E_{\beta}=E_{\gamma}$
and $E_{\alpha}-E_{\delta}$. This condition is automatically satisfied by any
Hamiltonian that is not fine-tuned, so we can assume its validity for the real
unknown Hamiltonian. In this way, after a time transient $T_{e}$ that is the
equilibration time of the system [36], the oscillating terms vanish and the
previous equation becomes

$\displaystyle\omega_{i}$ $\displaystyle\approx
2N_{T}\Big{[}\sum_{\alpha}|a_{\alpha}|^{2}\langle\alpha|A_{i}^{2}|\alpha\rangle$
$\displaystyle-\sum_{\alpha\beta}|a_{\alpha}|^{2}|a_{\beta}|^{2}\Big{(}\langle\alpha|A_{i}|\alpha\rangle\langle\beta|A_{i}|\beta\rangle+\lvert\langle\alpha|A_{i}|\beta\rangle\rvert^{2}\Big{)}\Big{]}.$
(9)

or, equivalently,

$\omega_{i}\approx
2N_{T}[\operatorname{Tr}(\bar{\rho}A_{i}^{2})-(\operatorname{Tr}^{2}(\bar{\rho}A_{i})+\operatorname{Tr}(\bar{\rho}^{2}A_{i}^{2}))].$
(10)

After the equilibration time these eigenvalues become linear in the number of
time steps, with a coefficient
$[\operatorname{Tr}(\bar{\rho}A_{i}^{2})-(\operatorname{Tr}^{2}(\bar{\rho}A_{i})+\operatorname{Tr}(\bar{\rho}^{2}A_{i}^{2}))]$
that corresponds to a measure of variance for $A_{i}$ in the dephased state
$\bar{\rho}$. The positive contribution to this variance comes from the term
$\operatorname{Tr}(\bar{\rho}A_{i}^{2})$, while the negative contributions
come from $\operatorname{Tr}^{2}(\bar{\rho}A_{i})$ and
$\operatorname{Tr}(\bar{\rho}^{2}A_{i}^{2})$. When the IPR of the system state
is near to its minimum, the dephased state is well approximated by the totally
mixed state and, since the $L_{i}$’s are traceless, the term
$\operatorname{Tr}^{2}(\bar{\rho}A_{i})$ vanishes. The remaining negative
contribution also decreases in magnitude with the IPR, that can be written as
$\operatorname{Tr}(\bar{\rho}^{2})$. We can conclude that minimizing the IPR
is a good strategy to generate larger eigenvalues $\omega_{i}$ of the TQCM.

The optimal initial states, minimizing the IPR and therefore optimizing the
learning process, are thus

$\lvert\psi_{\text{opt}}\rangle=\sqrt{2^{-N_{q}}}\sum_{\alpha}e^{i\phi_{\alpha}}\lvert\alpha\rangle$
(11)

where the $\phi_{\alpha}$’s are arbitrary phases that we can fix to zero.

Due to the beneficial effect of delocalization, one could wonder if mixed
states can also be considered a resource for learning algorithms. However,
since the TQCM in Eq. (3) is related to the trace of $\rho^{2}$, we expect
states with smaller purity to have a smaller TQCM and to determine a worse
accuracy.

##  5 Simulations

We have applied our Hamiltonian learning method to some few-qubit problems, in
order to verify our predictions about the error scaling in Eq. (3) and the
relationship between the TQCM and the IPR in Eq. (10). After focusing on a
simple two-qubit problem, we discuss a three-qubit model with random couplings
and we use Qiskit [42] to show how to apply our method to a real quantum
processor.

In order to apply out learning procedure, we first choose a Hamiltonian $H$
and generate the evolution of the expectation values of the basis elements
$\\{O_{\alpha}\\}$ by numerically integrating the Liouville equation for a set
of initial states, corresponding to different initial configurations for the
experiment with different IPRs. The effect of the statistical error is
simulated by adding a uniform random noise with amplitude
$1/\sqrt{2^{N_{q}}N_{M}}$ to each expectation value. Then, given the simulated
expectation values $r_{\alpha}(t_{n})$, we apply our method to find the
optimal Hamiltonian $H^{\text{(opt)}}=\sum_{i}h_{i}^{\text{(opt)}}L_{i}$. The
success of the learning procedure can be checked comparing $H$ with
$H^{\text{(opt)}}$. In particular we analyze the relative error $\varepsilon$
and the TQCM for each initial state and for different numbers of times steps
$N_{T}$, corresponding to different total observation times. We also estimate
the relationship between the IPR and the information gained in the experiment,
measured by the eigenvalues of the TQCM. Finally, we also calculate the
optimal initial state $\lvert\psi_{\text{opt}}\rangle$ for each Hamiltonian
and exploit it for an optimal learning.

###  5.1 Cross-resonance gate

We focus on a quantum system representing a two-qubit device governed by the
typical Hamiltonian of a cross-resonance gate [43, 44, 45, 40]. The
implementation of this gate, consisting in two transmon qubits coupled by a
bus resonator, is fundamental to realize the CNOT gate for universal quantum
computation. The Hamiltonian that we want to reconstruct is

$\displaystyle H$
$\displaystyle=-1.548\,\mathds{1}\otimes\sigma_{x}-0.004\,\mathds{1}\otimes\sigma_{y}+0.006\,\mathds{1}\otimes\sigma_{z}$
$\displaystyle\quad+9.578\,\sigma_{z}\otimes\mathds{1}+5.316\,\sigma_{z}\otimes\sigma_{x}$
$\displaystyle\quad-0.225\,\sigma_{z}\otimes\sigma_{y}-0.340\,\sigma_{z}\otimes\sigma_{z},$
(12)

where the couplings are taken from Ref. [46] and the energies are expressed in
$\mathrm{M}\mathrm{H}\mathrm{z}$. The optimal Hamiltonian is then found as the
span of the operators
$\\{L_{i}\\}=\\{\mathds{1}\otimes\sigma_{x},\mathds{1}\otimes\sigma_{y},\mathds{1}\otimes\sigma_{x},\sigma_{z}\otimes\mathds{1},\sigma_{z}\otimes\sigma_{x},\sigma_{z}\otimes\sigma_{y},\sigma_{z}\otimes\sigma_{z}\\}$.
This choice is justified by first-principles studies [45].

The Hamiltonian learning algorithm is performed with a time step $\delta
t=0.01$, $N_{M}=1000$ measurement repetitions and a total number of shots
$N_{S}=3\times 10^{6}$, for four initial states with different IPR. The
reconstructed Hamiltonian couplings for each initial state (with its IPR) are
shown in Table 1. We observe that when the initial state has a small IPR, the
accuracy is maximized.

Figure 2: (a) relative reconstruction error and (b) Frobenius norm of the
inverse TQCM multiplied by $N_{T}$, as a function of $N_{S}$ for the cross-
resonance gate Hamiltonian in Eq. (5.1), with $\delta t=0.01$, $N_{M}=1000$
and $N_{S}=9\times N_{M}\times N_{S}$, for different initial states with
different IPR. (c) IPR and Frobenius norm of the inverse TQCM for a collection
of random states at large final time for the cross-resonance gate Hamiltonian,
with $N_{T}=300$. Table 1: Estimated Hamiltonian coupling for different
initial states with the corresponding IPR in parentheses, with $\delta
t=0.01$, $N_{M}=1000$ and $N_{S}=3\times 10^{6}$. We define
$\lvert\rightarrow\rightarrow\rangle\equiv(\lvert\uparrow\rangle+\lvert\downarrow\rangle)\otimes(\lvert\uparrow\rangle+\lvert\downarrow\rangle)/2$
and
$\lvert\psi_{\text{Bell}}^{+}\rangle\equiv(\lvert\uparrow\uparrow\rangle+\lvert\downarrow\downarrow\rangle)/\sqrt{2}$.

Term | Target | $\lvert\uparrow\uparrow\rangle$ | $\lvert\rightarrow\rightarrow\rangle$ | $\lvert\psi_{\text{Bell}}^{+}\rangle$ | $\lvert\psi_{\text{opt}}\rangle$
---|---|---|---|---|---
|  | ($0.503$) | ($0.498$) | ($0.251$) | ($0.25$)
$\mathds{1}\otimes\sigma_{x}$ | $-1.548$ | $2.142$ | $-1.143$ | $-1.543$ | $-1.542$
$\mathds{1}\otimes\sigma_{y}$ | $-0.004$ | $1.021$ | $-0.024$ | $-0.011$ | $0.000$
$\mathds{1}\otimes\sigma_{z}$ | $0.006$ | $1.073$ | $-0.017$ | $-0.009$ | $0.023$
$\sigma_{z}\otimes\mathds{1}$ | $9.578$ | $-1.418$ | $9.748$ | $9.556$ | $9.553$
$\sigma_{z}\otimes\sigma_{x}$ | $5.316$ | $1.627$ | $5.089$ | $5.301$ | $5.295$
$\sigma_{z}\otimes\sigma_{y}$ | $-0.225$ | $-1.254$ | $-0.218$ | $-0.216$ | $-0.237$
$\sigma_{z}\otimes\sigma_{z}$ | $-0.340$ | $-1.409$ | $-0.328$ | $-0.324$ | $-0.357$

In Fig. 2(a) we show the behavior of the relative reconstruction error as a
function of the number of experiment shots $N_{S}$. $N_{S}$ is increased by
increasing the number of time steps $N_{T}$ and, consequently, the observation
time. Different curves represent states with different IPR. The numerical
simulations confirm our predictions: after a transient in which the error
decreases exponentially in the number of time steps, the final error converges
to values that are smaller for states with a smaller IPR. Optimal results are
obtained when the initial state is $\lvert\psi_{\text{opt}}\rangle$. In Fig.
2(b), we show the behavior of the Frobenius norm of the inverse TQCM times the
number of time steps, as a function of the experiment shots. We observe a
correlation between the exponential decrease of the reconstruction error and
the exponential decrease of this quantity, which saturates to a value
proportional to the IPR. This is consistent with our theoretical predictions.

The relationship between IPR and information is shown in Fig. 2(c), where, for
a set of random initial states, we represent the IPR and the Frobenius norm of
the inverse TQCM at the final time. We observe that these functions are
positively correlated for small values of the TQCM, confirming the predictions
of Eq. (10): to improve the performance of the learning algorithm, we have to
prepare initial states with a small IPR. In particular, the best possible
performance corresponds to the minimum IPR, which, for a $2$-qubit system, is
$\text{IPR}_{\text{min}}=1/4$.

###  5.2 Random 2-body Hamiltonian

Here we test the learning algorithm on a system evolving with a random
Hamiltonian

$H=\sum_{i}h_{i}L_{i},$ (13)

where $h_{i}\in[-5,5]$ and the $L_{i}$ are all the two-spins interactions
acting on a three-spins system, represented by tensor products of two Pauli
operators and the identity operator. The Hamiltonian learning algorithm is
performed with a time step $\delta t=0.01$, $N_{M}=1000$ measurement
repetitions and a maximum number of $370$ time steps.

The relative error of the reconstruction and the behaviour of the TQCM are
shown in Figure 3 Panels (a) and (b). In Figure 3 Panel (c) we show the IPR
and the Frobenius norm of the inverse TQCM for a collection of random states
at large final time. The validity of theoretical predictions about the
optimality of low IPR states is particularly evident in Panels (b) and (c),
where the statistical and systematic contributions to uncertainty are not
considered.

Figure 3: (a) relative reconstruction error and (b) Frobenius norm of the
inverse TQCM multiplied by $N_{T}$, as a function of $N_{S}$, with $\delta
t=0.01$, $N_{M}=1000$ and $N_{S}=27\times N_{M}\times N_{S}$. The initial
states are: an equal weighted superposition of two Hamiltonian eigenstates
with $\text{IPR}=0.5$, the GHZ state with $\text{IPR}\approx 0.231$,
$\lvert\uparrow\uparrow\uparrow\rangle$ with $\text{IPR}\approx 0.234$, and
$\lvert\psi_{\text{opt}}\rangle$ with $\text{IPR}=0.125$. (c) IPR and
Frobenius norm of the inverse TQCM for a collection of random states at large
final time, $N_{T}=370$.

###  5.3 IBM Q FakeAthens processor

We test the learning algorithm on a simulated quantum processor, the
FakeAthens processor, using Qiskit [42]. Our approach, from state preparation
to the final measurements, can be identically extended to any quantum
processor. The present simulator considers a two qubits system and take into
account errors in state preparation and in measurements. We remark that, due
to preparation errors, the starting state is not a pure state, nevertheless
our method is applicable.

We execute a time-dependent unitary gate, represented in the computational
basis as

$U(t)=\left(\begin{array}[]{cccc}\cos(4\pi t)&-i\sin(4\pi t)&0&0\\\
-i\sin(4\pi t)&\cos(4\pi t)&0&0\\\ 0&0&1&0\\\ 0&0&0&1\\\ \end{array}\right).$
(14)

We know that this gate is obtained through the cross-resonance mechanism
illustrated in our first example, hence we look at a parent Hamiltonian that
is spanned by the same operators:

$\displaystyle\\{L_{i}\\}=\\{$
$\displaystyle\mathds{1}\otimes\sigma_{x},\mathds{1}\otimes\sigma_{y},\mathds{1}\otimes\sigma_{x},\sigma_{z}\otimes\mathds{1},\sigma_{z}\otimes\sigma_{x},$
$\displaystyle\sigma_{z}\otimes\sigma_{y},\sigma_{z}\otimes\sigma_{z}\\}.$
(15)

Since in this case we do not know a priori the real system Hamiltonian, in
Figure 4 Panels (a) and (b) we show, for increasing total observation time
corresponding to an increasing number of shots, the Hamiltonian couplings
learned with different initial states, respectively the states
$\lvert\downarrow\downarrow\rangle$ and the Bell state
$(\lvert\uparrow\uparrow\rangle+\lvert\downarrow\downarrow\rangle)/\sqrt{2}$.
Looking at Panel 4(c) we can see that a smaller uncertainty, and therefore a
more reliable Hamiltonian reconstruction is obtained when the starting state
is the Bell state, with smaller IPR [Panel (b)].

Figure 4: Panels (a) and (b): reconstructed Hamiltonian couplings at
increasing number of shots, corresponding to longer observation time, for
$N_{M}=1000$, $\delta t=0.01$ and maximum number of time steps
$N_{T,\text{max}}=100$. Panel (a): initial state
$\lvert\downarrow\downarrow\rangle$, Panel (b): initial state is the Bell
state. Panel (c): Frobenius norm of the inverse TQCM multiplied by $N_{T}$, as
a function of $N_{S}$ for the two initial states.

##  6 Conclusions and outlook

We have introduced a Hamiltonian learning algorithm whose global accuracy
depends on the IPR of the starting state in the Hamiltonian eigenstates. The
reconstruction error decays exponentially at short times and equilibrate to a
value proportional to the IPR. Our results establish a direct connection
between state delocalization and Hamiltonian learning. We conclude that
delocalization can be exploited to drastically improve the efficiency of
Hamiltonian learning algorithms. Moreover, since the TQCM can be interpreted
as an information matrix on the space of states, the relationship between the
time evolution of the QCM and the IPR of the state opens a new perspective on
the information-geometric approach to the investigation of many-body quantum
systems [47, 48, 49, 50]: the equilibration and ergodicity of a closed quantum
system [39] can reflect on its out-of-equilibrium geometry [51].

Remarkably, our method is designed to reconstruct the system Hamiltonian from
a generic quantum state, either pure or mixed. This feature is appealing for
the application to real devices, where the preparation of the initial state
can be affected by SPAM noise. In this regard, a natural extension of the
methods described in this paper is the design of Lindbladian learning
algorithms to deal with open quantum systems.

After the initial time transient, the errors on the learning is negligible and
our results show an excellent agreement between the true Hamiltonian used to
generate the dynamics and our optimal reconstructed Hamiltonian. The price to
pay is to perform a complete tomography of the state at different times,
obtained by measuring all the observables in $\\{O_{\alpha}\\}$. The number of
these observables increases exponentially in the system size, rendering our
approach too demanding for large systems. This great effort in collecting
expectation values is partially rewarded by an exponentially decreasing
relative error [Eq. (3)]. In perspective, we could perform a partial
tomography and only measure the expectation values of the polynomial set of
observables that optimizes the accuracy. These observables, as well as optimal
initial states, could be selected through adaptive learning strategies, in
analogy with Ref. [27], where the role of the TQCM is taken by the Fisher
Information Matrix.

We thank G. Acanfora, A. Dutt, R. Fazio, A. Mezzacapo, and A. Russomanno for
useful discussions and support. This work has been funded by project code
PIR01_00011 “IBiSCo”, PON 2014-2020, for all three entities (INFN, UNINA and
CNR).

## References

  * Preskill [2018] John Preskill.  Quantum computing in the nisq era and beyond.  _Quantum_ , 2:79, Aug 2018.  ISSN 2521-327X.  doi: 10.22331/q-2018-08-06-79.  URL http://dx.doi.org/10.22331/q-2018-08-06-79.
  * Ebadi et al. [2021] Sepehr Ebadi, Tout T. Wang, Harry Levine, Alexander Keesling, Giulia Semeghini, Ahmed Omran, Dolev Bluvstein, Rhine Samajdar, Hannes Pichler, Wen Wei Ho, Soonwon Choi, Subir Sachdev, Markus Greiner, Vladan Vuletić, and Mikhail D. Lukin.  Quantum phases of matter on a 256-atom programmable quantum simulator.  _Nature_ , 595(7866):227–232, Jul 2021.  ISSN 1476-4687.  doi: 10.1038/s41586-021-03582-4.  URL https://doi.org/10.1038/s41586-021-03582-4.
  * Chen et al. [2021] Zijun Chen, Kevin J. Satzinger, Juan Atalaya, Alexander N. Korotkov, Andrew Dunsworth, Daniel Sank, Chris Quintana, Matt McEwen, Rami Barends, Paul V. Klimov, Sabrina Hong, Cody Jones, Andre Petukhov, Dvir Kafri, Sean Demura, et al.  Exponential suppression of bit or phase errors with cyclic error correction.  _Nature_ , 595(7867):383–387, Jul 2021.  ISSN 1476-4687.  doi: 10.1038/s41586-021-03588-y.  URL https://doi.org/10.1038/s41586-021-03588-y.
  * Scholl et al. [2021] Pascal Scholl, Michael Schuler, Hannah J. Williams, Alexander A. Eberharter, Daniel Barredo, Kai-Niklas Schymik, Vincent Lienhard, Louis-Paul Henry, Thomas C. Lang, Thierry Lahaye, Andreas M. Läuchli, and Antoine Browaeys.  Quantum simulation of 2d antiferromagnets with hundreds of rydberg atoms.  _Nature_ , 595(7866):233–238, jul 2021.  doi: 10.1038/s41586-021-03585-1.  URL https://doi.org/10.1038%2Fs41586-021-03585-1.
  * Granade et al. [2012] Christopher E Granade, Christopher Ferrie, Nathan Wiebe, and D G Cory.  Robust online hamiltonian learning.  _New Journal of Physics_ , 14(10):103013, oct 2012\.  doi: 10.1088/1367-2630/14/10/103013.  URL https://doi.org/10.1088/1367-2630/14/10/103013.
  * Wang et al. [2015] Sheng-Tao Wang, Dong-Ling Deng, and L-M Duan.  Hamiltonian tomography for quantum many-body systems with arbitrary couplings.  _New Journal of Physics_ , 17(9):093017, sep 2015\.  doi: 10.1088/1367-2630/17/9/093017.  URL https://doi.org/10.1088/1367-2630/17/9/093017.
  * Anshu et al. [2021] Anurag Anshu, Srinivasan Arunachalam, Tomotaka Kuwahara, and Mehdi Soleimanifar.  Sample-efficient learning of interacting quantum systems.  _Nature Physics_ , 17(8):931–935, Aug 2021.  ISSN 1745-2481.  doi: 10.1038/s41567-021-01232-0.  URL https://doi.org/10.1038/s41567-021-01232-0.
  * Burgarth et al. [2011] Daniel Burgarth, Koji Maruyama, and Franco Nori.  Indirect quantum tomography of quadratic hamiltonians.  _New Journal of Physics_ , 13(1):013019, jan 2011\.  doi: 10.1088/1367-2630/13/1/013019.  URL https://doi.org/10.1088/1367-2630/13/1/013019.
  * Ma et al. [2017] Ruichao Ma, Clai Owens, Aman LaChapelle, David I. Schuster, and Jonathan Simon.  Hamiltonian tomography of photonic lattices.  _Phys. Rev. A_ , 95:062120, Jun 2017.  doi: 10.1103/PhysRevA.95.062120.  URL https://link.aps.org/doi/10.1103/PhysRevA.95.062120.
  * Cole et al. [2005] Jared H. Cole, Sonia G. Schirmer, Andrew D. Greentree, Cameron J. Wellard, Daniel K. L. Oi, and Lloyd C. L. Hollenberg.  Identifying an experimental two-state hamiltonian to arbitrary accuracy.  _Phys. Rev. A_ , 71:062312, Jun 2005.  doi: 10.1103/PhysRevA.71.062312.  URL https://link.aps.org/doi/10.1103/PhysRevA.71.062312.
  * Cole et al. [2006] Jared H. Cole, Andrew D. Greentree, Daniel K. L. Oi, Sonia G. Schirmer, Cameron J. Wellard, and Lloyd C. L. Hollenberg.  Identifying a two-state hamiltonian in the presence of decoherence.  _Physical Review A_ , 73(6), Jun 2006.  ISSN 1094-1622.  doi: 10.1103/physreva.73.062333.  URL http://dx.doi.org/10.1103/PhysRevA.73.062333.
  * Burgarth and Yuasa [2012] Daniel Burgarth and Kazuya Yuasa.  Quantum system identification.  _Phys. Rev. Lett._ , 108:080502, Feb 2012.  doi: 10.1103/PhysRevLett.108.080502.  URL https://link.aps.org/doi/10.1103/PhysRevLett.108.080502.
  * Wiebe et al. [2014] Nathan Wiebe, Christopher Granade, Christopher Ferrie, and D.G. Cory.  Hamiltonian learning and certification using quantum resources.  _Physical Review Letters_ , 112(19), May 2014.  ISSN 1079-7114.  doi: 10.1103/physrevlett.112.190501.  URL http://dx.doi.org/10.1103/PhysRevLett.112.190501.
  * Wang et al. [2017] Jianwei Wang, Stefano Paesani, Raffaele Santagati, Sebastian Knauer, Antonio A. Gentile, Nathan Wiebe, Maurangelo Petruzzella, Jeremy L. O’Brien, John G. Rarity, Anthony Laing, and et al.  Experimental quantum hamiltonian learning.  _Nature Physics_ , 13(6):551–555, Mar 2017.  ISSN 1745-2481.  doi: 10.1038/nphys4074.  URL http://dx.doi.org/10.1038/nphys4074.
  * Bairey et al. [2019] Eyal Bairey, Itai Arad, and Netanel H. Lindner.  Learning a local hamiltonian from local measurements.  _Physical Review Letters_ , 122(2), Jan 2019.  ISSN 1079-7114.  doi: 10.1103/physrevlett.122.020504.  URL http://dx.doi.org/10.1103/PhysRevLett.122.020504.
  * Qi and Ranard [2019] Xiao-Liang Qi and Daniel Ranard.  Determining a local Hamiltonian from a single eigenstate.  _Quantum_ , 3:159, July 2019.  ISSN 2521-327X.  doi: 10.22331/q-2019-07-08-159.  URL https://doi.org/10.22331/q-2019-07-08-159.
  * Chertkov and Clark [2018] Eli Chertkov and Bryan K. Clark.  Computational inverse method for constructing spaces of quantum models from wave functions.  _Phys. Rev. X_ , 8:031029, Jul 2018.  doi: 10.1103/PhysRevX.8.031029.  URL https://link.aps.org/doi/10.1103/PhysRevX.8.031029.
  * Greiter et al. [2018] Martin Greiter, Vera Schnells, and Ronny Thomale.  Method to identify parent hamiltonians for trial states.  _Phys. Rev. B_ , 98:081113, Aug 2018.  doi: 10.1103/PhysRevB.98.081113.  URL https://link.aps.org/doi/10.1103/PhysRevB.98.081113.
  * Hou et al. [2020] Shi-Yao Hou, Ningping Cao, Sirui Lu, Yi Shen, Yiu-Tung Poon, and Bei Zeng.  Determining system hamiltonian from eigenstate measurements without correlation functions.  _New Journal of Physics_ , 22(8):083088, Sep 2020\.  ISSN 1367-2630.  doi: 10.1088/1367-2630/abaacf.  URL http://dx.doi.org/10.1088/1367-2630/abaacf.
  * Cao et al. [2020] Chenfeng Cao, Shi-Yao Hou, Ningping Cao, and Bei Zeng.  Supervised learning in hamiltonian reconstruction from local measurements on eigenstates.  _Journal of Physics: Condensed Matter_ , 33(6):064002, Feb 2020.  ISSN 1361-648X.  doi: 10.1088/1361-648x/abc4cf.  URL http://dx.doi.org/10.1088/1361-648X/abc4cf.
  * Turkeshi et al. [2019] X. Turkeshi, T. Mendes-Santos, G. Giudici, and M. Dalmonte.  Entanglement-guided search for parent hamiltonians.  _Phys. Rev. Lett._ , 122:150606, Apr 2019.  doi: 10.1103/PhysRevLett.122.150606.  URL https://link.aps.org/doi/10.1103/PhysRevLett.122.150606.
  * Turkeshi and Dalmonte [2020] Xhek Turkeshi and Marcello Dalmonte.  Parent Hamiltonian Reconstruction of Jastrow-Gutzwiller Wavefunctions.  _SciPost Phys._ , 8:42, 2020.  doi: 10.21468/SciPostPhys.8.3.042.  URL https://scipost.org/10.21468/SciPostPhys.8.3.042.
  * Dumitrescu and Lougovski [2020] Eugene F. Dumitrescu and Pavel Lougovski.  Hamiltonian assignment for open quantum systems.  _Phys. Rev. Research_ , 2:033251, Aug 2020.  doi: 10.1103/PhysRevResearch.2.033251.  URL https://link.aps.org/doi/10.1103/PhysRevResearch.2.033251.
  * Bairey et al. [2020] Eyal Bairey, Chu Guo, Dario Poletti, Netanel H Lindner, and Itai Arad.  Learning the dynamics of open quantum systems from their steady states.  _New Journal of Physics_ , 22(3):032001, Mar 2020\.  ISSN 1367-2630.  doi: 10.1088/1367-2630/ab73cd.  URL http://dx.doi.org/10.1088/1367-2630/ab73cd.
  * Zubida et al. [2021] Assaf Zubida, Elad Yitzhaki, Netanel H. Lindner, and Eyal Bairey.  Optimal short-time measurements for hamiltonian learning, 2021.  URL https://arxiv.org/abs/2108.08824.
  * Hangleiter et al. [2021] Dominik Hangleiter, Ingo Roth, Jens Eisert, and Pedram Roushan.  Precise hamiltonian identification of a superconducting quantum processor, 2021.  URL https://arxiv.org/abs/2108.08319.
  * Dutt et al. [2021] Arkopal Dutt, Edwin Pednault, Chai Wah Wu, Sarah Sheldon, John Smolin, Lev Bishop, and Isaac L. Chuang.  Active learning of quantum system hamiltonians yields query advantage, 2021.  URL https://arxiv.org/abs/2112.14553.
  * Rattacaso et al. [2021] Davide Rattacaso, Gianluca Passarelli, Antonio Mezzacapo, Procolo Lucignano, and Rosario Fazio.  Optimal parent hamiltonians for time-dependent states.  _Physical Review A_ , 104(2), Aug 2021.  ISSN 2469-9934.  doi: 10.1103/physreva.104.022611.  URL http://dx.doi.org/10.1103/PhysRevA.104.022611.
  * Gheorghiu et al. [2018] Alexandru Gheorghiu, Theodoros Kapourniotis, and Elham Kashefi.  Verification of quantum computation: An overview of existing approaches.  _Theory of Computing Systems_ , 63(4):715–808, Jul 2018.  ISSN 1433-0490.  doi: 10.1007/s00224-018-9872-3.  URL http://dx.doi.org/10.1007/s00224-018-9872-3.
  * Eisert et al. [2020] Jens Eisert, Dominik Hangleiter, Nathan Walk, Ingo Roth, Damian Markham, Rhea Parekh, Ulysse Chabaud, and Elham Kashefi.  Quantum certification and benchmarking.  _Nature Reviews Physics_ , 2(7):382–390, Jun 2020.  ISSN 2522-5820.  doi: 10.1038/s42254-020-0186-4.  URL http://dx.doi.org/10.1038/s42254-020-0186-4.
  * Šupić and Bowles [2020] Ivan Šupić and Joseph Bowles.  Self-testing of quantum systems: a review.  _Quantum_ , 4:337, September 2020.  ISSN 2521-327X.  doi: 10.22331/q-2020-09-30-337.  URL https://doi.org/10.22331/q-2020-09-30-337.
  * Carrasco et al. [2021] Jose Carrasco, Andreas Elben, Christian Kokail, Barbara Kraus, and Peter Zoller.  Theoretical and experimental perspectives of quantum verification.  _PRX Quantum_ , 2:010102, Mar 2021.  doi: 10.1103/PRXQuantum.2.010102.  URL https://link.aps.org/doi/10.1103/PRXQuantum.2.010102.
  * Kliesch and Roth [2021] Martin Kliesch and Ingo Roth.  Theory of quantum system certification.  _PRX Quantum_ , 2:010201, Jan 2021.  doi: 10.1103/PRXQuantum.2.010201.  URL https://link.aps.org/doi/10.1103/PRXQuantum.2.010201.
  * Valenti et al. [2019] Agnes Valenti, Evert van Nieuwenburg, Sebastian Huber, and Eliska Greplova.  Hamiltonian learning for quantum error correction.  _Physical Review Research_ , 1(3), Nov 2019.  ISSN 2643-1564.  doi: 10.1103/physrevresearch.1.033092.  URL http://dx.doi.org/10.1103/PhysRevResearch.1.033092.
  * da Silva et al. [2011] Marcus P. da Silva, Olivier Landon-Cardinal, and David Poulin.  Practical characterization of quantum devices without tomography.  _Phys. Rev. Lett._ , 107:210404, Nov 2011.  doi: 10.1103/PhysRevLett.107.210404.  URL https://link.aps.org/doi/10.1103/PhysRevLett.107.210404.
  * Gogolin and Eisert [2016] Christian Gogolin and Jens Eisert.  Equilibration, thermalisation, and the emergence of statistical mechanics in closed quantum systems.  _Reports on Progress in Physics_ , 79(5):056001, Apr 2016.  ISSN 1361-6633.  doi: 10.1088/0034-4885/79/5/056001.  URL http://dx.doi.org/10.1088/0034-4885/79/5/056001.
  * Neuenhahn and Marquardt [2012] Clemens Neuenhahn and Florian Marquardt.  Thermalization of interacting fermions and delocalization in fock space.  _Physical Review E_ , 85(6), Jun 2012.  ISSN 1550-2376.  doi: 10.1103/physreve.85.060101.  URL http://dx.doi.org/10.1103/PhysRevE.85.060101.
  * Canovi et al. [2011] Elena Canovi, Davide Rossini, Rosario Fazio, Giuseppe E. Santoro, and Alessandro Silva.  Quantum quenches, thermalization, and many-body localization.  _Phys. Rev. B_ , 83:094431, Mar 2011.  doi: 10.1103/PhysRevB.83.094431.  URL https://link.aps.org/doi/10.1103/PhysRevB.83.094431.
  * Polkovnikov et al. [2011] Anatoli Polkovnikov, Krishnendu Sengupta, Alessandro Silva, and Mukund Vengalattore.  Colloquium: Nonequilibrium dynamics of closed interacting quantum systems.  _Reviews of Modern Physics_ , 83(3):863–883, Aug 2011.  ISSN 1539-0756.  doi: 10.1103/revmodphys.83.863.  URL http://dx.doi.org/10.1103/RevModPhys.83.863.
  * Magesan and Gambetta [2020] Easwar Magesan and Jay M. Gambetta.  Effective hamiltonian models of the cross-resonance gate.  _Phys. Rev. A_ , 101:052308, May 2020.  doi: 10.1103/PhysRevA.101.052308.  URL https://link.aps.org/doi/10.1103/PhysRevA.101.052308.
  * Cover and Thomas [2006] Thomas M. Cover and Joy A. Thomas.  _Elements of Information Theory 2nd Edition (Wiley Series in Telecommunications and Signal Processing)_.  Wiley-Interscience, July 2006.  ISBN 0471241954.
  * ANIS et al. [2021] MD SAJID ANIS, Héctor Abraham, AduOffei, Rochisha Agarwal, Gabriele Agliardi, Merav Aharoni, Ismail Yunus Akhalwaya, Gadi Aleksandrowicz, Thomas Alexander, Matthew Amy, Sashwat Anagolum, Eli Arbel, Abraham Asfaw, Anish Athalye, Artur Avkhadiev, et al.  Qiskit: An open-source framework for quantum computing, 2021.
  * Rigetti and Devoret [2010] Chad Rigetti and Michel Devoret.  Fully microwave-tunable universal gates in superconducting qubits with linear couplings and fixed transition frequencies.  _Phys. Rev. B_ , 81:134507, Apr 2010.  doi: 10.1103/PhysRevB.81.134507.  URL https://link.aps.org/doi/10.1103/PhysRevB.81.134507.
  * Chow et al. [2011] Jerry M. Chow, A. D. Córcoles, Jay M. Gambetta, Chad Rigetti, B. R. Johnson, John A. Smolin, J. R. Rozen, George A. Keefe, Mary B. Rothwell, Mark B. Ketchen, and M. Steffen.  Simple all-microwave entangling gate for fixed-frequency superconducting qubits.  _Phys. Rev. Lett._ , 107:080502, Aug 2011.  doi: 10.1103/PhysRevLett.107.080502.  URL https://link.aps.org/doi/10.1103/PhysRevLett.107.080502.
  * Sheldon et al. [2016] Sarah Sheldon, Easwar Magesan, Jerry M. Chow, and Jay M. Gambetta.  Procedure for systematically tuning up cross-talk in the cross-resonance gate.  _Phys. Rev. A_ , 93:060302, Jun 2016.  doi: 10.1103/PhysRevA.93.060302.  URL https://link.aps.org/doi/10.1103/PhysRevA.93.060302.
  * [46] Hamiltonian tomography.  URL https://qiskit.org/textbook/ch-quantum-hardware/hamiltonian-tomography.html.  Accessed: 2022-03-29.
  * Zanardi et al. [2007a] Paolo Zanardi, Paolo Giorda, and Marco Cozzini.  Information-theoretic differential geometry of quantum phase transitions.  _Phys. Rev. Lett._ , 99:100603, Sep 2007a.  doi: 10.1103/PhysRevLett.99.100603.  URL https://link.aps.org/doi/10.1103/PhysRevLett.99.100603.
  * Campos Venuti and Zanardi [2007] Lorenzo Campos Venuti and Paolo Zanardi.  Quantum critical scaling of the geometric tensors.  _Phys. Rev. Lett._ , 99:095701, Aug 2007.  doi: 10.1103/PhysRevLett.99.095701.  URL https://link.aps.org/doi/10.1103/PhysRevLett.99.095701.
  * Abasto et al. [2008] Damian F. Abasto, Alioscia Hamma, and Paolo Zanardi.  Fidelity analysis of topological quantum phase transitions.  _Phys. Rev. A_ , 78:010301, Jul 2008.  doi: 10.1103/PhysRevA.78.010301.  URL https://link.aps.org/doi/10.1103/PhysRevA.78.010301.
  * Zanardi et al. [2007b] Paolo Zanardi, Lorenzo Campos Venuti, and Paolo Giorda.  Bures metric over thermal state manifolds and quantum criticality.  _Phys. Rev. A_ , 76:062318, Dec 2007b.  doi: 10.1103/PhysRevA.76.062318.  URL https://link.aps.org/doi/10.1103/PhysRevA.76.062318.
  * Rattacaso et al. [2020] Davide Rattacaso, Patrizia Vitale, and Alioscia Hamma.  Quantum geometric tensor away from equilibrium.  _Journal of Physics Communications_ , 4(5):055017, 2020.  doi: 10.1088/2399-6528/ab9505.  URL https://doi.org/10.1088/2399-6528/ab9505.

##  Appendix A Details of uncertainty estimation

In this appendix, we illustrate the details of the derivation of the bound in
Eq. (3).

The uncertainty on $B_{i}$ is

$\delta B_{i}=\sqrt{\sum_{\gamma,m}\left(\frac{\partial B_{i}}{\partial
r_{\gamma}(t_{m})}\sigma(r_{\gamma}(t_{m}))\right)^{2}}+\sum_{m}\lvert\operatorname{Tr}\left(-i[L_{i},\rho(t_{m})]R_{m}\right)\rvert$
(16)

We want to find an upper bound on this uncertainty that does not depend on the
states $\\{\rho(t_{m})\\}$.

The first term in the previous equation contains the statistical uncertainty.
In a spin system we can choose basis operators as normalized tensor products
of Pauli operators, hence $O_{\alpha}^{2}=\mathds{1}/2^{N_{q}}$ and
$\sigma(r_{\alpha}(t_{n}))=1/\sqrt{2^{N_{q}}N_{M}}$. It follows that

$\delta
B_{i}=\frac{1}{\sqrt{2^{N_{q}}N_{M}}}\sqrt{\sum_{\gamma,m}\left(\frac{\partial
B_{i}}{\partial
r_{\gamma}(t_{m})}\right)^{2}}+\sum_{m}\lvert\operatorname{Tr}\left(-i[L_{i},\rho(t_{m})]R_{m}\right)\rvert$
(17)

Since

$B_{i}=\sum_{n\alpha\beta}\operatorname{Tr}\left(-i[L_{i},O_{\alpha}]O_{\beta}\right)r_{\alpha}(t_{n})(r_{\beta}(t_{n+1})-r_{\beta}(t_{n}))/\delta
t,$ (18)

we can take the derivative to obtain

$\displaystyle\sum_{\gamma,m}\left(\frac{\partial B_{i}}{\partial
r_{\gamma}(t_{m})}\right)^{2}$
$\displaystyle=\sum_{\gamma,m}\left(\sum_{n,\alpha\beta}\operatorname{Tr}(-i[L_{i},O_{\alpha}]O_{\beta})\Big{[}\delta_{\alpha\gamma}\delta_{nm}\frac{r_{\beta}(t_{n+1})-r_{\beta}(t_{n})}{\delta
t}+r_{\beta n}\delta_{\gamma\alpha}\frac{\delta_{mn}-\delta_{m,n+1}}{\delta
t}\Big{]}\right)^{2}$
$\displaystyle=\sum_{\gamma,m}\left(\sum_{\beta}\operatorname{Tr}(-i[L_{i},O_{\gamma}]O_{\beta})\left[\frac{r_{\beta}(t_{m+1})-r_{\beta}(t_{m})}{\delta
t}+\frac{r_{\beta}(t_{m})-r_{\beta}(t_{m-1})}{\delta
t}\right]\right)^{2}+o(N_{T})$
$\displaystyle\approx\sum_{\gamma,m}\left(\sum_{\beta}\operatorname{Tr}(-i[L_{i},O_{\beta}]O_{\gamma})\left[\frac{r_{\beta}(t_{m+1})-r_{\beta}(t_{m-1})}{\delta
t}\right]\right)^{2}.$ (19)

At this point we approximate the fraction with the derivative and exploit the
fact that $\\{O_{\alpha}\\}$ is an orthonormal basis:

$\displaystyle\sum_{\gamma,m}\left(\frac{\partial B_{i}}{\partial
r_{\gamma}(t_{m})}\right)^{2}$ $\displaystyle\approx
4\sum_{\gamma,m}\left(\sum_{\beta}\operatorname{Tr}(-i[L_{i},O_{\beta}]O_{\gamma})\partial_{t}r_{\beta}(t_{m})\right)^{2}$
$\displaystyle=4\sum_{\gamma,m}\left(\operatorname{Tr}(-i[L_{i},\partial_{t}\rho(t_{m})]O_{\gamma})\right)^{2}$
$\displaystyle=4\sum_{\gamma,m}\left(\operatorname{Tr}\left(-i[L_{i},\partial_{t}\rho(t_{m})]\right)^{2}\right).$
(20)

Replacing this estimate of the statistical uncertainty and the Taylor
remainder $R_{n}=\frac{-[H,[H,\rho(t_{n}^{*})]]}{2}$ in the total uncertainty
$\delta B_{i}$, we obtain

$\delta
B_{i}\approx\frac{2}{\sqrt{2^{N_{q}}N_{M}}}\sqrt{\sum_{m}\left(\operatorname{Tr}\left(-i[L_{i},\partial_{t}\rho(t_{m})]\right)^{2}\right)}+\frac{\delta
t}{2}\sum_{m}\lvert\operatorname{Tr}\left[\left(-i[L_{i},\rho(t_{m})]\right)\left(-[H,[H,\rho(t_{m}^{*})]]\right)\right]\rvert,$
(21)

where $H$ is the system Hamiltonian.

Considering the Cauchy-Schwarz inequality
$\lvert\operatorname{Tr}(AB)\rvert\leq\sqrt{\operatorname{Tr}(AA)\operatorname{Tr}(BB)}$,
this last estimate can be bounded as

$\delta
B_{i}\leq\frac{2}{\sqrt{2^{N_{q}}N_{M}}}\sqrt{\sum_{m}\left(\operatorname{Tr}\left(-i[L_{i},-i[H,\rho(t_{m})]]\right)^{2}\right)}+\frac{\delta
t}{2}\sum_{m}\sqrt{\operatorname{Tr}\left(\left(i[L_{i},\rho(t_{m})]\right)^{2}\right)\operatorname{Tr}\left([H,[H,\rho(t_{m}^{*})]]^{2}\right)},$
(22)

where we have taken into account that
$\partial_{t}\rho(t_{m})=-i[H,\rho(t_{m})]$.

Now we need to understand how the commutator with an Hermitian operators
changes the Frobenius norm of a given operator. In particular, given a
Hermitian operator $A$ with spectral decomposition $A=\sum_{i}a_{i}\lvert
i\rangle\langle i\rvert$, we define $a_{\text{min}}=\min(a_{i})$,
$a_{\text{max}}=\max(a_{i})$, and $A_{\delta}=A-a_{\text{min}}\mathds{1}$.
Hence we can write

$\displaystyle\operatorname{Tr}[(-i[A,X])^{2}]$
$\displaystyle=\operatorname{Tr}[(-i[A_{\delta},X])^{2}]$
$\displaystyle=2[\operatorname{Tr}(XXA_{\delta}A_{\delta})-\operatorname{Tr}(A_{\delta}XA_{\delta}X)]$
$\displaystyle=2\sum_{ij}(a_{i}-a_{\text{min}})(a_{i}-a_{j})\lvert\langle
i\rvert X\lvert j\rangle\rvert^{2}$ $\displaystyle\leq
2(a_{\text{max}}-a_{\text{min}})^{2}\sum_{ij}\lvert\langle i\rvert X\lvert
j\rangle\rvert^{2}$ $\displaystyle=2\lVert
A_{\delta}\rVert_{\text{op}}^{2}\operatorname{Tr}(X^{2}),$ (23)

where $\lVert A_{\delta}\rVert_{\text{op}}$ is the operator norm of
$A_{\delta}$.

Replacing this bound in our estimate of the uncertainty $\delta B_{i}$ and
considering that the purity of the state $\rho(t)$ is
$\operatorname{Tr}(\rho(t)^{2})\leq 1$ for each value of $t$, we obtain

$\displaystyle\delta B_{i}$ $\displaystyle\leq\frac{2\lVert
L_{i}\rVert_{\text{op}}}{\sqrt{2^{N_{q}}N_{T}}}\sqrt{\sum_{m}2\left(\operatorname{Tr}\left(-i[H,\rho(t_{m})]\right)^{2}\right)}+\lVert
L_{i,\delta}\rVert_{\text{op}}\lVert
H_{\delta}\rVert_{\text{op}}\sum_{m}\sqrt{\operatorname{Tr}\left(\left(-i[H,\rho(t_{m}^{*})]\delta
t\right)^{2}\right)}$ $\displaystyle\leq\frac{4\lVert
H_{\delta}\rVert_{\text{op}}\lVert
L_{i,\delta}\rVert_{\text{op}}}{\sqrt{2^{N_{q}}N_{M}}}\sqrt{N_{T}}+\delta
t\lVert L_{i,\delta}\rVert_{\text{op}}\lVert
H_{\delta}\rVert_{\text{op}}^{2}N_{T},$ (24)

where $\lVert L_{i,\delta}\rVert_{\text{op}}$ and $\lVert
H_{\delta}\rVert_{\text{op}}$ are the difference between the maximum and the
minimum eigenvalues of $H$ and $L_{i}$, respectively.

For a traceless operator $A=\sum_{i}a_{i}\lvert i\rangle\langle i\rvert$ we
have that the maximum eigenvalue is positive and the minimum one is negative,
therefore

$\lVert A_{\delta}\rVert_{\text{op}}=a_{\text{max}}-a_{\text{min}}=\lvert
a_{\text{max}}\rvert+\lvert a_{\text{min}}\rvert\leq 2\text{max}(\lvert
a_{i}\rvert)=2\lVert A\rVert_{\text{op}}.$ (25)

Hence, since both $H$ and $L_{i}$ are traceless and since we can choose
without loss of generality $\lVert L_{i}\rVert_{\text{op}}=\lVert
L\rVert_{\text{op}}\forall i$, the last inequality becomes

$\delta B_{i}\leq\frac{16\lVert H\rVert_{\text{op}}\lVert
L\rVert_{\text{op}}}{\sqrt{2^{N_{q}}N_{M}}}\sqrt{N_{T}}+4\delta t\lVert
L\rVert_{\text{op}}\lVert H\rVert_{\text{op}}^{2}N_{T}.$ (26)

An analogous bound on the uncertainty about the Hamiltonian couplings can be
calculated propagating the uncertainty about $B_{i}$. When $\lVert
V^{-1}\rVert\ll 1$ we obtain

$\delta h_{i}=\sum_{j}(V^{-1})_{ij}\delta B_{j}.$ (27)

and therefore

$\lVert\vec{\delta}h\rVert\leq\sqrt{\operatorname{Tr}\left(V^{-2}\right)}\lVert
L\rVert_{\text{op}}\left(16\lVert
H\rVert_{\text{op}}\sqrt{\frac{N_{T}}{2^{N_{q}}N_{M}}}+4N_{T}\lVert
H\rVert_{\text{op}}^{2}\delta t\right).$ (28)

When $\lVert V^{-1}\rVert\ll 1$ does not hold, this estimate for the
uncertainty fails, but this is the case in which we have an uncertainty that
is so large that finding the exact Hamiltonian is impossible.

Now, we want to derive a bound on the relative uncertainty on the couplings.
Taking into account the triangular inequality and the relationship between
$p$-norms, and defining $l$ as the number of Hamiltonian couplings, we can
write

$\lVert
H\rVert_{\text{op}}=\lVert\sum_{i}h_{i}L_{i}\lVert_{\text{op}}\leq\sum_{i}\lvert
h_{i}\rvert\lVert L_{i}\rVert_{\text{op}}=\lVert
L\rVert_{\text{op}}\sum_{i}\lvert h_{i}\rvert\leq\sqrt{l}\lVert
L\rVert_{\text{op}}\lVert\vec{h}\rVert,$ (29)

from which we finally obtain

$\frac{\lVert\vec{\delta}h\rVert}{\lVert\vec{h}\rVert}\leq\sqrt{l\operatorname{Tr}\left(V^{-2}\right)}\lVert
L\rVert_{\text{op}}^{2}\left(16\sqrt{\frac{N_{T}}{2^{N_{q}}N_{M}}}+4N_{T}\lVert
H\rVert_{\text{op}}\delta t\right).$ (30)