Practical verification protocols for analog quantum simulators

Analog quantum simulation is expected to be a significant application of near-term quantum devices. Verification of these devices without comparison to known simulation results will be an important task as the system size grows beyond the regime that can be simulated classically. We introduce a set of experimentally-motivated verification protocols for analog quantum simulators, discussing their sensitivity to a variety of error sources and their scalability to larger system sizes. We demonstrate these protocols experimentally using a two-qubit trapped-ion analog quantum simulator and numerically using models of up to five qubits.


INTRODUCTION
Quantum simulation has long been proposed as a primary application of quantum information processing 1 . In particular, analog quantum simulation, in which the Hamiltonian evolution of a particular quantum system is directly implemented in an experimental device, is projected to be an important application of near-term quantum devices 2 , with the goal of providing solutions to problems that are infeasible for any classical computer in existence. Because the obtained solutions to these problems cannot always be checked against known results, a key requirement for these devices will be the ability to verify that the desired interactions are being carried out faithfully [3][4][5] . If a trusted analog quantum simulator is available, then one can certify the behavior of an untrusted analog quantum simulator 6 . But in the absence of a trusted device, provable verification is essentially intractable for systems of interest that are too large to simulate classically 3 . Therefore, in the near-term, we see a need to develop pragmatic techniques to verify these devices and thus increase confidence in the results obtained.
Many experimental platforms have been used to perform analog quantum simulations of varying types, including devices based on neutral atoms [7][8][9] , trapped ions [10][11][12] , photons 13 , and superconducting circuits 14 . In such works, validation of simulation results is typically performed by comparison to results calculated analytically or numerically in the regime where such calculation is possible. In addition, a technique for self-verification has been proposed and demonstrated 12 which measures the variance of the energy to confirm that the system has reached an eigenstate of the Hamiltonian. However, this technique does not verify whether the desired Hamiltonian has been implemented faithfully.
One method which has been proposed for analog simulation verification is to run the dynamics forward and backward for equal amounts of time 3 , commonly known as a Loschmidt echo 15,16 , which ideally returns the system to its initial state. Such a method is not able to provide confidence that the parameters of the simulation are correct, nor can it detect some common sources of experimental error such as slow environmental fluctuations or crosstalk between various regions of the physical device. However, it is naturally scalable and is straightforward to implement experimentally, provided that a time-reversed version of the analog simulation can be implemented. An extension of this method similar to randomized benchmarking has also been proposed 17 , although this suffers from the same shortcomings just mentioned.
Another natural candidate for verification of analog simulations is to build multiple devices capable of running the same simulation and to compare the results across devices, which is a technique that has been demonstrated for both gate-based devices 18 and analog simulators 19 . This technique has the obvious difficulty of requiring access to additional hardware, in addition to the fact that it may be difficult to perform the same analog simulation across multiple types of experimental platforms.
Experimentalists building analog quantum simulators are in need of practical proposals for validating the performance of these devices. Ideally such a protocol can be executed on a single device, can provide confidence that the target Hamiltonian is correctly implemented, and can be scaled to large systems. In this work, we aim to address these goals by introducing a set of experimentally practical approaches to the task of validating the performance of analog quantum simulators.

Overview of verification protocols
The task of analog quantum simulation involves configuring a quantum system in some initial state, allowing it to evolve according to some target Hamiltonian for a particular time duration, and then analyzing one or more observables of interest. A verification protocol for this process should provide some measure of how faithfully the device implements the target Hamiltonian.
We claim that a useful protocol for verification of analog quantum simulators should have the following attributes: Independent of numerical calculations of the system dynamics. We should not need to rely on comparison of the analog simulation results to numerically-calculated dynamics of the full system, since simulations of interest will be performed in regimes where numerical calculation is infeasible.
Efficient to measure. Verification protocols should leave the system in or near a basis state, rather than in some arbitrary state. This allows characterization of the final state by making only a small number of measurements. This allows us to circumvent the need for more intensive procedures such as full state tomography, which in turn reduces the experimental overhead.
Sensitive to many experimental error sources. The main objective of a verification protocol is to measure experimental imperfections. If a protocol is not sensitive to some potential sources of experimental error in the simulation, it cannot give us maximal confidence in the results.
Applicable to near-term analog quantum simulators. Unlike many benchmarking protocols for digital, gate-based quantum computers, we are not seeking a protocol which can give fine-grained information about the fidelity of a particular operation, but rather an approach which can give us coarse-grained information about the reliability of a noisy simulation.
Scalable to large systems. Many interesting near-term analog quantum simulations will likely be performed in regimes where the system size is relatively large (many tens or hundreds of qubits). A useful verification protocol for such devices should be efficiently scalable to these system sizes, given reasonable assumptions.
In this work, we propose a set of three verification protocols for analog quantum simulators which exhibit many of these attributes. These are illustrated in Fig. 1. The overarching strategy for each protocol, inspired by the Loschmidt echo procedure, involves asking the simulator to evolve a system from some known initial state through a closed loop in state space, eventually returning to its initial state. By using a basis state as the initial (and final) state, we can efficiently measure the success of this procedure. A number of strategies exist to construct such a closed loop, with varying pros and cons. We use a few of these strategies to construct the proposed verification protocols. These protocols are summarized in Table 1, including some types of experimental noise to which each protocol is sensitive, the hardware requirements for implementing each protocol, and the scalability constraints of each protocol.
First, we propose a time-reversal analog verification protocol, in which the simulation is run both forward and backward in time. As illustrated in Fig. 1a, this approach simply performs a Loschmidt echo to reverse the time dynamics of the simulation and then verifies that the system has returned to its initial state. However, because the system traverses the same path in state space in the forward and backward directions, it is insensitive to many types of experimental errors, including systematic errors such as miscalibrations in the Hamiltonian parameters or crosstalk between sites.
To increase the susceptibility to systematic errors, we propose a multi-basis analog verification protocol, as shown in Fig. 1b. This is a variant of the time-reversal protocol in which a global rotation is performed on the system after the completion of the forward evolution, and the backward evolution is then performed in the rotated basis. Because this requires a physical implementation of the analog simulation in an additional basis, it will provide sensitivity to any systematic errors that differ between the two bases. For example, errors due to some types of shot-to-shot noise may be enhanced and not cancel out as in the previous protocol.
However, we note that the previous two protocols may still be insensitive to many types of errors, such as miscalibration or the presence of unwanted constant interaction terms. To address this, we introduce a randomized analog verification protocol, which consists of running randomized analog sequences of subsets of the target Hamiltonian terms, as depicted in Fig. 1c. In particular, we choose a set of unitary operators consisting of short, discrete time steps of each of the terms of the Hamiltonian to be simulated, which may be in either the forward or backward direction. We randomly generate long sequences of interactions, each consisting of a subset of these unitary operators, which evolves the system to some arbitrary state. We then use a Markov chain Monte Carlo search technique to approximately compile an inversion sequence using the same set of unitary operators, such that after the completion of the sequence, the system is measured to be in a basis state with high probability. This scheme is an adaptation of traditional gate-based randomized benchmarking techniques 20,21 for use in characterizing an analog quantum simulator. A key difference is that for a general set of Hamiltonian terms, finding a non-trivial exact inversion of a random sequence is difficult, which is why we instead find an approximate inversion sequence. In principle, this approximation is a limitation on the precision with which this protocol can be used to verify device performance. However, in practice, the search technique can be used to produce inversion sequences that return a large percentage (e.g., 99% or more) of the population to a particular basis state, which is enough for the protocol to be useful on noisy Running a random sequence of subsets of the Hamiltonian terms (denoted as H rand ), followed by an inversion sequence of subsets of the Hamiltonian terms which has been calculated to return the system approximately to a basis state.
near-term devices, since even the most accurate analog quantum simulations typically have fidelities that decay far below this level 22 .
Each verification protocol can then be executed for varying lengths of time, and the measurement results will provide the success probability of each protocol as a function of time. For a system that implements the target Hamiltonian perfectly, one expects this probability to remain constant, with a small offset from unity due to state preparation and measurement errors, as well as the approximation error for the inversion sequence in the randomized protocol. But if the system dynamics are not perfect, one expects the success probability to decrease as a function of time.
For standard randomized benchmarking protocols, the shape of the decay curve provides additional information about the errors, for example, allowing one to distinguish whether the dominant error source affecting the dynamics is Markovian or non-Markovian. For typical incoherent noise, one expects this to be an exponential decay, but for noise that is non-Markovian 23,24 or low-frequency 25 , the decay curve may be non-exponential.
However, in general, we make no strong claim about the shape of the decay curves resulting from the analog verification protocols. In particular, randomized benchmarking requires that the gate set must form an ϵ-approximate 2-design, which is true not only of the Clifford group but also of any universal gate set, given that the randomly generated sequences are long enough 26 . However, the time-evolution operator generated by a fixed Hamiltonian cannot approach a 2-design without adding a disorder term 17 , which means that we cannot directly apply randomized benchmarking theory for the time-reversal or multibasis analog verification protocols. And even the randomized analog verification protocol, which is conceptually more similar to randomized benchmarking, does not require that the Hamiltonian terms actually generate a universal gate set or that the generated sequences are long enough to approximate a unitary 2-design.
Nonetheless, the decay curves still contain potentially useful information about the reliability of the analog quantum simulator. The protocols could be used as a tool to assist in calibrating an analog simulation by attempting to minimize the decay. Also, since each protocol has different sensitivities to errors, comparing decay curves from the various protocols may give clues to an experimentalist about the types of errors that are present.
In this work, we treat noise sources in an analog quantum simulation as modifications of the target Hamiltonian. Physically, these could be caused by variations in quantities such as laser intensity, microwave intensity, magnetic fields, or other terms which could create undesired interactions with the system. We can then represent the full Hamiltonian implemented by the system as where H is the target Hamiltonian to be simulated, which we assume is time-independent, and represents any unwanted time-dependence and other miscalibrations present in the physical system. We assume that each λ k (t) varies on some characteristic timescale t k . For example, if λ k (t) is a stationary Gaussian process, then t k may be the decay time of the autocorrelation function RðtÞ ¼ λ k ð0Þλ k ðtÞ h i . We note that there are several distinct regimes: where N is the number of repetitions performed in a quantum simulation experiment, and τ is the total runtime of each repetition. This regime corresponds to miscalibrations, unwanted interactions, and other noise that varies on a very slow timescale.
Slow noise. Nτ > t k > τ. This corresponds to noise that causes fluctuations from one run of the experiment to the next, but is roughly constant over the course of a single experiment, i.e., shotto-shot noise.
Fast noise. t k ≪ τ. This is the type of fluctuation that is most commonly referred to as "noise", i.e., fluctuations in parameters that are much faster than the timescale of a single experiment.
We design verification protocols to detect different subsets of these noise types: the time-reversal analog verification protocol for detecting fast noise, the multi-basis analog verification protocol for additionally detecting some types of slow noise, and finally the randomized analog verification protocol for detecting miscalibrations and other unwanted interactions. These protocols are described and demonstrated in the remainder of this work.

Time-reversal verification protocol
The time-reversal analog verification protocol consists of the following steps, repeated for various values of τ, which should range over the characteristic time scale of the simulation to be tested: Step 1. Initialize the system state to an arbitrarily-chosen basis state i j i.
Step 2. Apply the analog simulation for time τ, that is, apply the unitary operator e −iHτ , which ideally takes the system to the state ψ j i. (We use the convention h = 1 here and throughout this work.) Step 3. Apply the analog simulation with reversed time dynamics for time τ, that is, apply the operator e +iHτ , which ideally takes the system to the state i j i.
Step 4. Measure the final state in the computational basis. Record the probability that the final state is measured to be i j i. After repeating these steps for various values of τ, a decay curve can be plotted which indicates the success probability of finding the system in the desired state as a function of simulation time.
We first note that this protocol does not provide validation of the values of any time-independent Hamiltonian parameters, because ifH is time-independent, e iHτ e ÀiHτ ¼ 1 regardless of whetherH is actually the desired Hamiltonian. It does, however, provide sensitivity to fast, incoherent noise that affects the system on a timescale shorter than the simulation time, and it also will detect imperfections in the implementation of the time-reversal itself.
More formally, the forward time-evolution operator from time 0 to τ can then be written explicitly in terms of a Dyson series as where T is the time-ordering operator. The reverse time-evolution operator from time τ to 2τ is then It is apparent that if the noise terms in the Hamiltonian are constant between times 0 and 2τ, i.e., if δH(t) = δH, then we have U rev ðτ; 2τÞ U fwd ð0; τÞ ¼ e þiτðHþδHÞ e ÀiτðHþδHÞ ¼ 1 (5) and thus applying the forward and reverse time-evolution operators will return the system to its initial state. However, this is not true in general if the noise terms have timedependence. We can illustrate this by making a simplifying assumption that the noise is piecewise constant between times 0 and 2τ as where δH 1 and δH 2 are non-commuting in general. We then perform a first-order Baker-Campbell-Hausdorff approximation, which shows that % e þiτðδH2ÀδH1þ½HþδH1;HþδH2=2Þ : In the general case where δH 1 ≠ δH 2 , this quantity will not be equal to the identity. A similar argument also holds if the noise terms vary on faster timescales. That is, if δH(t) contains one or more noise terms such that λ k (t) has a correlation time t k ≪ τ, then the product of the forward and reverse time-evolution operators will not be equal to the identity in general, and the system will not return to its initial state. The time-reversal analog verification protocol requires only that the analog quantum simulator is capable of implementing the time-reversed dynamics of the desired simulation, that is, the signs of each of the Hamiltonian terms can be negated. Because there are no numerical calculations required, the protocol is independent of the size of the system, and its scalability has no inherent limitations, outside of any physical limitations involved in implementing the analog simulation itself in both directions.

Multi-basis analog verification protocol
The multi-basis analog verification protocol consists of the following steps, repeated for various values of τ, which should range over the characteristic time scale of the simulation to be tested: Step 1. Initialize the system state to an arbitrarily-chosen basis state i j i.
Step 2. Apply the analog simulation for time τ, that is, apply the unitary operator e −iHτ , which ideally takes the system to the state ψ j i.
Step 3. Apply a basis transformation R to the system to take it to the state R ψ j i, with R chosen such that both R and the rotated inverse Hamiltonian are implementable. For example, if the target Hamiltonian is if and only if the analog quantum simulator can physically implement the interactions R, H, and Step 4. Apply the analog simulation in the rotated basis and with reversed time dynamics for time τ, that is, apply the operator e þiH 0 τ , which ideally takes the system to the state R i j i.
Step 5. Apply the inverse of the rotation performed in Step 3, that is, apply a global − π/2 rotation R † to the system, which ideally takes the system back to the initial state i j i. Step 6. Measure the final state in the computational basis. Record the probability that the final state is measured to be i j i. After repeating these steps for various values of τ, a decay curve can be plotted which indicates the success probability of finding the system in the desired state as a function of simulation time.
We note that this protocol will detect errors such as miscalibrations or slow fluctuations if the strength of these errors differs in the two bases. Specifically, ifH andH 0 are the implementations in the two bases which contain noise terms δH (t) and δH 0 ðtÞ, respectively, then the forward and reverse timeevolution operators can be written as Then, even in the simplest case where we have time-independent noise terms δH(t) = δH and δH 0 ðtÞ ¼ δH 0 , we see that applying the forward and reverse time-evolution operators and the appropriate basis-change operators R and R † , gives % e þiτðδH 00 ÀδHþ½HþδH;HþδH 00 =2Þ ; where we have defined as the rotation of δH 0 into the original basis, and where we use the fact from Eq. (9) that R y H 0 R ¼ H. We assume here for simplicity that R and R † are implemented ideally. We observe again that the resulting quantity is not equal to the identity in the general case where δH ≠ δH″, as well as in the cases where δH and δH″ are non-commuting with each other or with H. So we can conclude that in the case that the noise terms δH(t) and δH 0 ðtÞ vary independently of each other, even if their correlation times are much longer than the timescale of a single experiment, the system will not return to its initial state when these timeevolution operators are applied.
The multi-basis analog verification protocol requires that the analog quantum simulator implements the desired Hamiltonian in at least two separate bases. For example, a trapped-ion quantum simulator may implement a nearest-neighbor coupling term using both a σ x σ x Mølmer-Sørensen interaction 27 and a σ z σ z geometric phase gate interaction 28 , which are equivalent up to a basis change. Likewise, a simulator based on superconducting qubits could implement entangling interactions in multiple bases, for example, bSWAP interactions using different phases of the microwave drive 29 . (Alternatively, if the device cannot implement the analog simulation in a different basis, but does implement a full universal gate set for quantum computation, the Hamiltonian may be implemented in a digital manner in an alternate basis via Trotterization.) In addition to the multi-basis requirement, the device must also have the ability to perform single-qubit rotations in order to make the necessary basis change. But there are no numerical calculations required in advance, and thus the protocol itself is independent of the size of the system and has no inherent scalability limitations, outside of any limitations in performing the actual analog simulation in the two necessary bases.

Randomized analog verification protocol
It turns out that the previous two protocols cannot detect all types of errors. Most notably, neither protocol verifies that the simulation actually implements the target Hamiltonian H. Errors due to parameter miscalibration or the presence of unwanted constant interaction terms would not be detectable using these schemes.
To address this, we introduce a third protocol, which consists of running randomized analog sequences of subsets of the target Hamiltonian terms. In particular, we choose a set of unitary operators consisting of short, discrete time steps of each of the terms of the Hamiltonian to be simulated. We randomly generate long sequences of interactions, each consisting of a subset of these unitary operators, which evolves the system to some arbitrary state. We then use a stochastic search technique to approximately compile the inverse of these sequences using the same set of unitary operators, which produces another sequence of interactions. When appended to the original sequence the system returns to the initial state (or another basis state) with high probability.
This protocol is inspired by randomized benchmarking (RB) protocols, which are often used for characterization of gate-based devices 20,21,[30][31][32][33][34] . Most commonly, RB involves generating many random sequences of Clifford gates and appending to each sequence an inversion Clifford. Ideally, in the absence of errors, the execution of each sequence should return all of the population to a well-known basis state. Measuring the actual population of the desired basis state after the execution of each sequence allows one to calculate a metric related to the average gate fidelity of the device, which can be used to compare the performance of a wide variety of physical devices.
We note that traditional RB has limited scalability due to the complexity of implementing multi-qubit Clifford gates, and has been demonstrated only for up to three qubits 35 ; however, RB-like protocols have been demonstrated on larger systems 36,37 . Figure 2 contains an illustration comparing the randomized analog verification protocol with the traditional Clifford-based RB protocol. We note that this protocol significantly differs from a recently-proposed technique for benchmarking analog devices 17 in that we construct the approximate inversion sequence independently of the initial randomly-generated sequence, which in general prevents miscalibrations and constant errors from canceling out during the inversion step. We also implement the protocol using subsets of the Hamiltonian terms, which lends itself to scalability.
We write the target Hamiltonian as a sum of terms where we assume that the simulator can enable both the forward and time-reversed version of each H i independently of the others. We note that this protocol, in addition to being sensitive to implementation errors in the time-reversal, will also be affected by experimental errors in the enabling or disabling of the individual Hamiltonian terms. We then repeat the following steps for various values of τ, which is the time scale on which the sequence will operate and should range over the characteristic time scale of the simulation to be tested: Step 1. Randomly choose an initial basis state i j i.
Step 2. Generate n random subsets (e.g., n = 100) of the terms of the target Hamiltonian, and define H rand;k ¼ X i 2 random subset of f1; 2; :::; mg as the sum of the terms in subset k. To increase the randomness of the resulting path, choose also the direction (forward or timereversed) of each subset at random. Apply each of the resulting unitary time-evolution operators, i.e., for k = 1 to n, to the initial state i j i, which evolves the system to an intermediate state ϕ j i.
Step 3. Calculate another sequence of these random unitaries that will approximately invert the process and act on ϕ j i to produce a basis state f j i within some target fidelity, e.g., 0.99. Clifford randomized benchmarking Fig. 2 High-level comparison of traditional randomized benchmarking and the randomized analog verification protocol. Both protocols involve generating a sequence that starts and ends in a known basis state, which is denoted 0 j i in this figure for simplicity, and proceed by simply making a series of random choices. For traditional RB, the inversion Clifford is calculated deterministically based on the preceding sequence of random Cliffords. For randomized analog verification, the inversion sequence is compiled approximately via a stochastic search procedure.

Random
Apply the sequence, which ideally will take the system to the final state f j i with probability of at least the desired target fidelity.
Step 4. Measure the final state in the computational basis. Record the probability that the final state is measured to be f j i. After repeating these steps for various values of τ, the resulting decay curve indicates the success probability of finding the system in the desired state after executing the randomized sequences as a function of effective simulation time.
Calculating an appropriate inversion layer, using only small time steps of the Hamiltonian terms as building blocks, is the most computationally intensive part of this protocol. We cannot directly reverse the random sequence generated, since this would simply be a time-reversal, and errors such as miscalibrations or shot-toshot noise would cancel out. Instead, we generate a new sequence by explicitly calculating the product of the random sequence of unitaries and then building a sequence which inverts it.
Since compiling an exact inversion layer (outside of simply reversing the random sequence) is likely infeasible, we allow the inversion layer to only approximately invert the original sequence, such that we return nearly all of the population to a basis state. We note that the approximate nature still allows us to assess the quality of the simulation with the targeted precision using a single measurement basis.
To construct the inversion layer, we use the STOQ protocol for approximate compilation 38 , which is a stochastic Markov chain Monte Carlo (MCMC) search technique using a Metropolis-like algorithm. This is a randomized approach to compiling an arbitrary unitary into a sequence of "gates" drawn from a finite set of allowed unitaries, similar to the approach used in a proposed technique for quantum-assisted quantum compiling 39 .
Specifically, since the set of allowed unitaries here consists of all possible random subsets of the Hamiltonian terms, we have the following procedure for approximately compiling the inversion layer (illustrated in Fig. 3): 1. Generate n randomized layers, each of which determines a unitary operation U k , as defined in Eq. (20). 2. Calculate the state after applying all n of the randomized layers to the initial state as 3. Build up a new sequence of layers, which will become the inversion layer, by incrementally adding a randomized layer or removing a layer from the beginning or end of the sequence (such that we only have to perform one multiplication per proposed step). Let the product of these layers be U inv . 4. For each proposed addition or removal, look at the basis state of U inv ϕ j i with the largest population fraction to see if it has increased or decreased from the prior state. If it has increased, the system is closer to a basis state, and therefore accept the proposed addition or removal. If it has decreased, usually reject it, but sometimes accept it, based on the value of the MCMC annealing parameter β. 5. Continue until the largest basis state population reaches some desired threshold (e.g., 0.99), which determines the population fraction in the final basis state after executing the compiled sequence.
In order to increase the distinction between this compiled inversion sequence and the original randomly-generated sequence (which seems desirable in order to avoid potentially canceling out any systematic errors), we initialize the MCMC search algorithm with a large value of the annealing parameter β, which increases the randomness in the early part of the compiled sequence. Over time, we linearly decrease the value of β until the process finally converges toward a basis state.
Notice that because this procedure simply takes us approximately to some basis state (not necessarily the initial state), a true inversion sequence would require a final local rotation of the appropriate qubits to take the system back to the initial state. However, since the intention is simply to measure the resulting state, this final rotation is unnecessarywe can just measure the   Running the randomized analog verification protocol on all such subsets will test for errors associated with each interaction term in the Hamiltonian, as well as errors that may be caused by unwanted interaction (e.g., crosstalk) between any two pairs of sites in the system.
state and compare the result to the expected final basis state, rather than comparing to the initial basis state. Because this process is randomized, it is not guaranteed to converge 40 . To account for this, in the implementation used for this work, we launch many tens of MCMC search processes in parallel, which in practice typically allows the search to succeed in reasonable time. For example, in the five-qubit numerical simulation described later in this section, when the original sequence has~100 random layers, one of the MCMC processes will typically converge to the desired accuracy of 98% within a few thousand steps.
The scalability of the randomized analog verification protocol is limited by the approximate compilation of the inversion layer. Performing this compilation requires many explicit multiplications of unitary operators acting on the full Hilbert space of the system being simulated, and thus has at least the same complexity as actually simulating the dynamics of the system. Unless a reliable quantum computer is available 39 , this must be done on a classical computer, and so it is likely infeasible to apply this protocol directly to systems with more than tens of qubits.
To apply this protocol to large-scale simulations, we can break the full system into subsystems 33,41 to reduce the exponential scaling to polynomial scaling. Specifically, if the Hamiltonian is klocal, we can decompose the system into subsystems of size s ≥ 2k (see Fig. 4), and then run this protocol on every subsystem. This will test every interaction term, as well as potential errors such as crosstalk that may occur between any two distant interaction terms in the system. The number of such subsystems grows only polynomially with degree s, not exponentially. Since this is equivalent to testing each subsystem of size s independently, the downside of this approach is the loss of sensitivity to errors that may occur only for subsystems of size larger than s; however, in many systems, it is likely reasonable to assume that such errors are small. Additional work will be needed to understand exactly what claims one can make about the performance of the largescale analog simulation by characterizing the subsystems in this way.

Experimental demonstration with trapped ions
To demonstrate the feasibility of implementing these verification protocols experimentally, we choose a simple two-site Ising model with transverse field and we choose J = 2π × 139 Hz and b = 2π × 227 Hz. We implement this model in a trapped-ion analog quantum simulator containing two 40 Ca + ions. We use the electronic S 1/2 ground orbital and D 5/2 metastable excited orbital as the qubit states, and we drive transitions between these states using a 729 nm laser 42 . In particular, we choose g as the states of the two-level system. We prepare the system in the state eg j i or ge j i by optically pumping the ions to the state gg j i, using a π-pulse with a laser beam localized to a single ion to prepare the state eg j i, and then optionally a π-pulse with a laser beam addressing both ions to prepare the state ge j i. We then implement the Ising model by combining three tones in a laser beam that addresses both ions equally. In particular, we realize the transverse field interaction via a laser tone resonant with the qubit transition frequency with Rabi frequency Ω C . This creates the desired ðb=2Þðσ ð1Þ y þ σ ð2Þ y Þ interaction with b = Ω C . In addition, we implement the site-site coupling via a Mølmer-Sørensen interaction 27 via the axial stretch vibrational mode with ω ax ≈ 2π × 1.514 MHz, where we apply two laser tones detuned from the qubit transition frequency by ±(ω ax + δ MS ), with δ MS = 2π × 80 kHz, and where each tone has Rabi frequency Ω MS .
This creates an effective ðJ=2Þσ ð1Þ x σ ð2Þ x interaction with J ¼ η 2 ax Ω 2 MS =δ MS , where η ax ≈ 0.08 is the Lamb-Dicke parameter indicating the coupling of the laser beam to the axial mode of the ion crystal, and we tune Ω MS to produce the desired value of the coupling strength J.
In addition to designing the analog simulation itself, we must also implement the time-reversed and rotated versions of the simulation in order to implement the desired verification protocols. For the time-reversal analog verification protocol, we take H to −H by shifting the phase of the resonant tone by π, which takes b to −b in the transverse field interaction, and by changing the Mølmer-Sørensen detuning from δ MS to − δ MS (with a small correction to account for a change in AC Stark shift), which takes J to −J in the effective σ ð1Þ x σ ð2Þ x interaction. For the multi-basis analog verification protocol, we choose the basis rotation which is a global π/2 rotation around the z-axis. We implement R physically via a sequence of single-qubit carrier rotations, using the fact that We then must implement RHR † , which is the Hamiltonian in the rotated basis. For the transverse field term, we note that which we implement by simply shifting the phase of the resonant tone by π/2 as compared to the phase used to implement σ ð1Þ y þ σ ð2Þ y . For the coupling term, we note that Rσ ð1Þ x σ ð2Þ which we implement by shifting the phase of the blue-sideband Mølmer-Sørensen tone by π with respect to the red-sideband tone 43 . Finally, for the randomized analog verification protocol, we write the target Hamiltonian from Eq. (22) as where H 1 and H 2 are defined as We then generate 200 random sequences of subsets of these Hamiltonian terms in either the forward or time-reversed direction, such that each step of each sequence is selected from the set and each sequence consists of 10 ≤ n ≤ 50 steps of length 8 μs ≤ t step ≤ 290 μs. For each sequence, we then compile an approximate inversion sequence consisting of steps from the same set H steps . Each sequence has a randomly-chosen initial state from the set f ge j i; eg j ig, and each full sequence ideally leaves the system in some basis state with at least 98% probability. The terms in the set H steps are implemented experimentally by enabling or disabling the corresponding laser tones and by time-reversing the analog simulation as necessary.
To test the behavior of each of these protocols, we execute the time-reversal and multi-basis analog verification protocols for varying simulation times and execute all 200 of the randomized analog verification sequences. The results of these experimental runs are shown in Fig. 5. To produce these results, we executed each protocol under three different sets of experimentallymotivated noise conditions:

No injected noise:
We execute each of the verification protocols after calibrating the individual interactions to approximately match the desired dynamics. 2. Slow noise injected: We introduce shot-to-shot fluctuations by intentionally varying the intensity of each of the three tones in the laser beam using parameters drawn from a Gaussian distribution with relative standard deviation of 3 dB. The parameter variations in the original basis are drawn independently from those in the rotated basis, which emulates the case where the system has independent noise sources in the two bases. 3. Parameter miscalibration: We intentionally miscalibrate the Mølmer-Sørensen detuning to δ MS = 2π × 60 kHz, which has the effect of increasing the coupling strength J by a factor of 1/3.
To provide more insight into the results of these protocols, in Fig. 6 we plot the actual population dynamics of the analog simulation in the absence of injected noise. We observe that the implemented simulation diverges significantly from the ideal simulation after only a few milliseconds, primarily due to miscalibration and dephasing noise. We intentionally allow this divergence as a test case for the various verification protocols, since it is caused by errors that may be typical in experiments. The miscalibration here is due to laser intensities and/or frequencies that have not been optimized to produce the desired dynamics, and the dephasing noise is likely caused by the presence of global magnetic field fluctuations which cause the state to decohere when leaving the subspace f ge j i; eg j ig, which is a decoherencefree subspace with respect to the global magnetic field.
Also plotted in Fig. 6 is a curve showing the fidelity between an ideal evolution of the system state and an approximation of the system state obtained experimentally. For the ideal Hamiltonian H, defined in Eq. (22), we use the target values (J = 2π × 139 Hz, b = 2π × 227 Hz) and perform unitary evolution under the Schrödinger equation to obtain the dynamics of the ideal state ρðtÞ ¼ ψðtÞ j i ψðtÞ h j, where ψðtÞ j i¼ e ÀiHt ψð0Þ j i. For the experimentally-miscalibrated HamiltonianH, we use parameters that approximately match the observed measurements (J = 2π × 250 Hz, b = 2π × 102 Hz) with an appropriate dephasing rate (γ ϕ = 2π × 38 Hz). We then perform non-unitary evolution under the Lindblad master equation, using the Lindblad operator L ¼ ffiffiffiffiffiffiffiffiffi ffi γ ϕ =2 q σ z as the dephasing mechanism, to obtain the approximate dynamics of the experimentally-obtained stateρðtÞ.
The approximate fidelity between the ideal state and the experimentally-obtained state is theñ The fidelity curve plotted in Fig. 6 is this approximate fidelity functionFðtÞ, and we observe that it decays to 50% in~7 ms. Despite this fast decay of the fidelity, we note that in the absence of additional injected noise, both the time-reversal and  multi-basis analog verification protocols in Fig. 5(a) show decay times on the order of tens of milliseconds. Because these protocols are sensitive to fast, incoherent noise, we deduce that the majority of the errors present in the experiment are slower than the timescale of each experiment and are therefore canceled out by these protocols.
Conversely, we consider the results of the randomized analog verification protocol with no injected noise in Fig. 5(a). The success probability decays in~3 ms, which is slightly faster than the fidelity decay observed in Fig. 6. This suggests that the randomized protocol at least detects these experimental miscalibrations or coherent errors that cause the actual simulation dynamics to differ from the ideal dynamics. That is, the randomized analog verification protocol helps to identify imperfections in the simulation with respect to the target Hamiltonian, which is something that the other protocols are unable to do. In addition, the faster decay of the randomized analog verification results as compared to the approximate fidelity curve in Fig. 6 indicates that there are additional sources of experimental error that are not captured by the population dynamics alone. For example, the experimental procedure involves rapidly enabling and disabling the various interaction terms, which may itself introduce imperfections that cause the success probability to decay more rapidly. Indeed, the difference between the randomized analog verification protocol results with no injected noise in Fig. 5a and with injected noise in Fig. 5b and c indicate that the experimental errors in the simulation dwarf the errors caused by the injected noise.
Finally, we note that a number of the experimental data series in Fig. 5 show hints of oscillatory behavior, and that in general the shape of each decay curve is non-exponential. This is evidence supporting the claim that these protocols do not fully twirl coherent errors into incoherent errors, and thus do not produce a fully depolarizing channel that would produce an exponential decay in these results.

Numerical demonstration under simulated noise conditions
To further test the sensitivity of each protocol to various types of noise, we numerically simulated the dynamics of the verification protocols using the five-site Heisenberg model y interaction is intended to be turned off, we still include a fraction of that term in the Hamiltonian being simulated.
The numerical simulation results in Fig. 7 demonstrate that certain types of noise, such as fast incoherent noise, can be detected by any of the proposed verification protocols. We see that the multi-basis analog verification protocol is also sensitive to certain slow parameter fluctuations, whereas the randomized analog verification protocol is additionally sensitive to errors such as parameter miscalibration and crosstalk among the interaction terms in the system. Such error sources may cancel out in the forward and backward directions when using more systematic protocols 44,45 , but when using a randomized protocol they are highly unlikely to cancel due to the randomized nature of the sequence and its dependence on the exact parameters of the Hamiltonian. In particular, we see in Fig. 7d that the actual fidelity of the analog simulation is most severely impacted by the parameter miscalibration and crosstalk errors, and only the randomized analog verification protocol is able to detect the presence of these errors.
To gain further insight into the behavior of the randomized analog verification protocol, we also simulated the dynamics under various types of noise using a pair of two-qubit Hamiltonians. First, we use a one-dimensional Ising model with transverse field which is identical to Eq. (22), the Hamiltonian used for the experiment. For the purposes of the randomized analog verification protocol, we treat bðσ ð1Þ y þ σ ð2Þ y Þ as a single term, as was also done in the experiment.
Second, we use a one-dimensional Heisenberg model with transverse field terms along each axis x þ bσ which is a simplified version of the five-qubit Hamiltonian in Eq. (32) used for the earlier simulations. Figure 8 contains the numerical simulation results of applying the randomized analog verification protocol to these two Hamiltonians under various types of noise, where we have chosen b = J x = J y = J z = 2π × 20 kHz such that the effective simulation times are much longer than the timescale of the system dynamics.
We note that the shape of the decay differs significantly between the two Hamiltonians. In particular, we observe that each of the decay curves for the Heisenberg model in Fig. 8b appears to be nearly exponential in shape and decays to~0.25, which is the expected result for a fully mixed two-qubit state. This is not the case for some of the decay curves for the Ising model in Fig. 8a.
As discussed previously, randomized benchmarking protocols produce exponential decay curves in cases where the noise is fully depolarized by the randomized circuits. We note that the "native gate set" obtained from the Heisenberg model in Eq. (34) is a universal set of quantum gates, which forms an approximate 2design in the limit of long sequence length. Here we are in fact operating in the limit of "long sequence length", since the dynamics occur at 20 kHz and the protocol is being performed for an effective simulation time of a few milliseconds. So the nearlyexponential shape of the decay curves in Fig. 8b is a good indication that the various noise sources are indeed being depolarized under these conditions.
In contrast, the behavior of the decay curves in Fig. 8a, which do not decay to 0.25, can be explained by the fact that the interactions do not fully explore the state space of the system. We also observe non-monotonic behavior of these decay curves in the presence of correlated errors such as miscalibration or crosstalk, which suggests that such errors are not being fully