Characterizing and mitigating coherent errors in a trapped ion quantum processor using hidden inverses

Quantum computing testbeds exhibit high-fidelity quantum control over small collections of qubits, enabling performance of precise, repeatable operations followed by measurements. Currently, these noisy intermediate-scale devices can support a sufficient number of sequential operations prior to decoherence such that near term algorithms can be performed with proximate accuracy (like chemical accuracy for quantum chemistry). While the results of these algorithms are imperfect, these imperfections can help bootstrap quantum computer testbed development. Demonstrations of these algorithms over the past few years, coupled with the idea that imperfect algorithm performance can be caused by several dominant noise sources in the quantum processor, which can be measured and calibrated during algorithm execution or in post-processing, has led to the use of noise mitigation to improve computational results. Conversely, benchmark algorithms coupled with noise mitigation can help diagnose the nature of noise, whether systematic or purely random. Here, we outline the use of coherent noise mitigation techniques as a characterization tool in trapped-ion testbeds. We perform model-fitting of the noisy data to determine the noise source based on realistic noise models and demonstrate that systematic noise amplification coupled with error mitigation schemes provides useful data for noise model deduction. Further, in order to connect lower level noise model details with application specific performance of near term algorithms, we experimentally construct the loss landscape of a variational algorithm under various injected noise sources coupled with error mitigation techniques. This type of connection enables application-aware hardware codesign, in which the most important noise sources in specific applications, like quantum chemistry, become foci of improvement in subsequent hardware generations.


Introduction
Small algorithms on quantum computing testbed devices can help diagnose performance problems when the resulting data is viewed within the context of dominant low-level noise sources. In nearterm pre-fault-tolerant devices, coherent noise (such as over-or under-rotation errors) can lead to an array of incorrect results at the algorithmic level, including incorrect expectation values in time evolution simulations or slow convergence and incorrect parameter determination in variational algorithms. Here, we use prototypical variational quantum chemistry calculations as a diagnostic algorithm to probe coherent noise on a trapped ion testbed platform. Two methods of noise mitigation -randomized compiling [1] and the application of hidden inverse gates [2] are used to both characterize and mitigate timedependent coherent noise in test circuits. We present simulations of one and two-qubit noise models on trapped ion quantum devices, validated by experimental data, to verify this hypothesis.
Quantum errors in a quantum computer can be thought of as any evolution of the qubits that differs from the ideal intended operation. There are different ways one may categorize quantum errors, but for the purpose of this work we limit our discussion to two distinct types of errors: incoherent error and coherent error. Incoherent errors map pure states to mixed states resulting in loss of purity often caused by classical noise. Some well known quantum channels such as depolarization and dephasing are examples of incoherent errors. Conversely, coherent error can be represented as a single unitary operator and maps pure states to pure states. Such an error usually comes from miscalibration or drift out of calibration of the control system used to drive the qubit operations. If one has a good understanding of the system interaction Hamiltonian, it is often possible to describe coherent errors as additive or multiplicative terms in the control parameters. This allows one to use targeted characterization procedures to learn about the error parameters which in turn can be used for better calibration. While fault tolerant protocols using a quantum error correction (QEC) code have been demonstrated recently [3][4][5], noisy intermediate scale quantum (NISQ) devices are unable to take advantage of QEC because of high noise levels and small system sizes. For NISQ devices, one can try to mitigate these errors to minimize their impact on the quantum computer's output; such protocols are collectively knows as EM (error mitigation) protocols. Multiple quantum characterization, verification, and validation (QCVV) protocols exist for characterizing the noise channels and error models discussed here, including gate set tomography [6], randomized benchmarking [7], generalized model fitting [8], and many others. While these frameworks are very general, typically allowing for deduction of a diverse array of noise models, a large quantity of experimental data can be required to learn the models in some cases. The exclusive access to many quantum computing platforms required to obtain the data is not always readily available. Recent applications of various EM techniques in the NISQ era provide a promising middle ground approach [9][10][11][12][13][14][15][16][17]. Zero noise extrapolation (ZNE) and probabilistic error cancellation (PEC) [18,19] are two other error mitigation protocols that have been used in various applications run on superconducting qubit devices. ZNE and PEC are more well suited for incoherent errors but coherent noise can be twirled into Pauli noise and these protocols can be effectively used as demonstrated in [19] for PEC. Essentially, the efficacy of an EM routine is an indicator of the presence of a specific type of noise present in the machine, and with sufficient a priori information these techniques can be used to characterize noise in a quantum processor.

Hidden inverses protocol to mitigate coherent errors
Hidden inverses (HI) [2,20,21] is an EM protocol that addresses coherent errors via noise cancellation. HI does not require any additional gates or any post processing. The key idea behind HI is that a few of the common unitaries used in quantum computing are self-adjoints. These selfadjoint unitary operators are constructed from primitive gates which themselves are not selfadjoints. As an example if we want to apply a certain gate G = ABC, we can either apply G = ABC or G † = C † B † A † . While in the absence of noise, G and G † implement the same physical operation; this is not true in general when A, B, C, A † , B † and C † are subjected to errors. Given the freedom to apply G or G † , a compiler needs to choose which one to apply based on other gates in the vicinity within a quantum circuit along with an understating of the noise process. Developing compiler logic for picking the optimal configuration given an arbitrary circuit and a noise model is an open problem and one that we will not discuss in this paper. Instead, we focus our attention on demonstrating hidden inverses's performance with hand-crafted circuits. It has been shown theoretically that hidden inverses can improve circuit performance for arbitrary circuit sizes as long as the right configuration is chosen based on the noise model. Choosing the right configuration is a local optimization problem as such the complexity is inde-  pendent of the circuit size. We refer interested readers to [2] for more theoretical and simulation results of the hidden inverses protocol. Hadamard (H) and controlled-NOT (CNOT) are two self-inverse unitary operations widely used in quantum computing. We can decompose their standard or native configurations into trapped-ion native single qubit gates and Mølmer-Sørensen (MS) interactions (Fig 1, 2).

Experimental implementation of quantum circuits on a trapped ion processor
We investigate these hidden inverse protocols on the Quantum Scientific Computing Open User Testbed (QSCOUT), a room-temperature quantum processor based on trapped ions [22] housed at Sandia National Laboratories. This investigation consisted of either one or two qubits, in which the qubit states comprise the hyperfine 'clock' transition of a 171 Yb + ion, 2 S 1/2 |F=0, m F = 0 (|0 ) and |F=1, m F = 0 (|1 ) [23]. The ions are trapped in a radio-frequency (RF) pseudopotential generated on a microfabricated surface electrode trap, the Sandia High Optical Access (HOA2.1) trap [24], with radial frequencies, ω r,i /2π = 2.2 and 2.5 MHz, and an axial frequency, ω a /2π = 700 kHz. This axial frequency sets the spacing of the ions, 4.5 µm, to match the spacing of the individual addressing beams. Each ion is then imaged in a separate core of a multicore fiber array via magnification optics to match the fiber core spacing to the 4.5 µm separation. The ions are cooled and detected along their 2 S 1/2 to 2 P 1/2 transition using 370 nm light.
All gates performed in the system are based on Raman transitions from a pulsed 355 nm laser [25] with beams in a counter-propagating configuration, consisting of a wide 'global' beam illuminating all ions and individual-ion addressing beams generated via a multi-channel acoustooptic modulator (AOM) [26] counter to the global beam. Both the multi-channel AOM and the single-channel AOM for the global beam are driven by a custom coherent control system, Octet, providing two tones for each AOM channel.
Gates are fully parameterized within the QS-COUT system, providing both arbitrary phase and rotation angle for single-and two-qubit gates. Single-qubit gates are driven using two Raman tones on the appropriate individual beam in a co-propagating Raman configuration. Our two-qubit MS gate is generated with two tones on each participating ion's individual beam and another tone on the global beam. The three tones are required to form the appropriate Raman transitions symmetrically detuned from a red and blue motional sideband. The MS gate as implemented in QSCOUT additionally has a series of single-qubit basis transformations to eliminate phase instabilities between the counter-vs. co-propagating configurations. The bare MS(θ) gate is an XX interaction, XX(θ) = e −i θ 2 σ X ⊗σ X , that exists in a counter-propagating basis. By surrounding the two-qubit gate with the appropriate counter-propagating single-qubit gates, we transform the XX interaction into a ZZ interaction to eliminate phase instabilities with the co-propagating single-qubit gates [27]. The gate is then further surrounded with co-propagating single-qubit gates to complete the transformation back into an XX interaction within the copropagating basis.
The physical single-qubit gates' (R X and R Y ) amplitudes are square-pulsed and gapless, meaning there is no "off" period between single-qubit gates. Their rotation angle is determined by the duration of the pulse. R Z gates are virtual, treated as cumulative phase shifts by Octet.
The MS gate amplitude is Gaussian-shaped, and the angle of rotation is controlled by the global beam amplitude while accounting for distortions and saturation in the amplifier and AOM. A MS gate with a negative rotation angle is achieved by flipping the phase on one of the two qubits by π radians. For all gates, phases are set by the relative phase difference between two of the RF tones applied to the ion. The MS gate also incurs an AC Stark shift which is cancelled through a dynamically evolving virtual Z rotation applied throughout the duration of the MS gate pulse. This ability to fully control both the phase and rotation angle for single-and two-qubit gates is needed for these investigations to intentionally introduce static coherent rotation and phase errors. Typical physical singlequbit gate fidelities for a rotation angle of π/2 are estimated to be 99.5±0.3%, while two-qubit XX(π/2) are 97±1%.
Additionally, to cool the ions to near the motional ground state, the ions are both Doppler cooled and resolved-sideband cooled [28]. Typically, 60 loops of cooling are performed on all relevant sidebands to reach the minimum motional state; however, the number of cooling loops can be reduced so the ion will begin the desired circuit in a higher motional mode, inducing additional errors. These errors include an overall static coherent under-rotation error and shot-toshot coherent errors. At very small numbers of cooling loops ( 10 loops), there is an increase in the population of non-desirable qubit states -i.e. for a state beginning in |00 , an MS gate ideally creates a state somewhere within the |00 and |11 basis, but instead there are nonzero populations in the |10 and |01 states. These unwanted populations can be as large as ∼ 5% when no cooling loops are applied.
The gate sequences are all programmed using Just Another Quantum Assembly Language (Jaqal), a flexible programming language designed to support the underlying hardware of the QSCOUT system [29]. Since Jaqal contains the fully parameterized gateset, we can introduce intentional coherent errors directly at the Jaqal level as different rotation angles or phases, rather than underlying waveforms, described by JaqalPaw (Pulses and Waveforms), the pulselevel counterpart to Jaqal [30]. On the other hand, errors introduced by insufficient cooling of the ion are instituted by adapting the cooling cycle in the waveform language JaqalPaw.  (2) H − H † (inverted circuit) under coherent noise model that inverts with the inverse of the gate, we find circuit (2) will result in error cancellation while circuit (1) will amplify the error. In order to investigate different sources of coherent errors in the system, we inject parameterized single qubit rotations in between the gates as follows (1) When we sweep over {Θ, Φ}, we will amplify or cancel various types of coherent errors in the native and inverted circuits. For some choices of {Θ, Φ} the inverse circuits will outperform the native circuits, while for others the native circuits will be a better choice. Aided with numerical simulations, patterns in the fidelity (or population) plots of the various circuits in phase space of {Θ, Φ} will reveal the underlying noise process.
There are two stages in this experiment (i) data collection stage and (ii) data analysis stage. In the data collection stage, the circuits were run 100 times before a measurement, i.e. (1)  Z(Φ) − H † ] 100 to amplify any effects of cancellation. 21 equally spaced points were chosen in between − π 36 ≤ (Θ, Φ) ≤ π 36 for a total of 441 points in a 2D-grid for each circuit. Each data set was taken with random ordering in Θ and φ to average out effect of any long term drift. Outcomes were averaged over 200 shots taken back-to-back for a given (Θ, Φ). 200 shots were chosen for sufficient averaging without significant impacts from system drift. This data was taken without dynamical decoupling or composite pulses.
In order to characterize system parameter drift and verify the model, was also run multiple times back to back for four different cases (1) natural drift: no recalibration was performed between experiments (2) re-calibration: re-calibration was performed between experiments (3) intentional amplitude noise injection (4) intentional phase noise injection.

Classical simulation and noise model
Outcomes from stage (1) were first converted into fidelity. To calculate fidelity, we performed noisy and ideal simulations of the quantum circuits. For the noisy simulation, we assume a physicsfocused, single-qubit, ion-trap noise model parameterized by over-rotation error ( ), phase error (φ), and detuning error (δ). In this model, ideal where Ω is the Rabi frequency, become:

Result
We found the best noise parameters by curve fitting the experimental data with noisy simu- We find the variance of the parameter estimate from the curve-fit to be in the order of 10 −4 , hence they are omitted in the plots. Long term drifts in while φ and δ approximately stays constant. Interleaved re-calibration routine largely stabilizes . With the addition of intentional amplitude and phase noise injection over many runs, we find the protocol is able to accurately track the error parameters.
5 Hidden inverses as an error mitigation protocol for applications: variational quantum eigensolvers

Hamiltonian and Ansatz
Variational quantum eigensolvers (VQE) are a successful cornerstone of hybrid quantumclassical algorithms explored on NISQ era machines. For a given system Hamiltonian H, and parameterized ansatz |Ψ(α) , the ground state and its energy are obtained by classically minimizing the energy, Thus they form an ideal platform to explore the efficacy of mitigation algorithms like hidden inverse and randomized compiling. In order to pursue this goal, we explore the VQE in the minimal basis for equilibrium molecular hydrogen. We use 0 5 10   Error parameters as a function of number of runs are plotted. (a) is for the case where system parameters were calibrated in between runs and we find the estimated error parameters stable. (b) is for natural drift where re-calibration steps were skipped. We find signification drift in the estimated over-rotation (red) parameter. We then inject artificial noise in the form of amplitude error (c) and phase error (d). We find good agreement between the trends of the injected noise (solid line) and estimated parameters (dotted line). Offsets between the actual values of the injected noise and the estimated noise parameters are likely due to co-variances amongst the fitting parameters, , φ, and δ.
the Brayvi-Kitaev mapping, along with qubit tapering to yield a spin Hamiltonian of the following form, indicating that energy evaluation requires at most three circuit evaluations for ZZ, XX,and YY expectation values. We test the hidden inverse in this system in a prototypical one parameter twoqubit circuit ansatz in  This circuit is easily decomposed into native ion gates as in Fig 1, where the default compilation uses the same construction for both CNOTs, and the HI implementation uses the CNOT † construction for the second CNOT. For the default and HI circuit, we swept over all angles |α| < π 2 , with 200 shots for each evaluation.

Randomized Compiling
We also wish to compare the benefit of HI method on the VQE ansatz ( Fig. 7) with other methods of coherent error mitigation, namely randomized compiling. Randomized compiling is a powerful tool, where coherent errors of hard gates, typically those of the two-qubit gates, are suppressed by averaging over unitarily equivalent circuits of the two-qubit gates via application of easy "twirling" gates. In [2], we simulated performance of randomized compiling and compared with hidden inverses for a set of noise models. We found hidden inverses can improve overall circuit fidelity in certain noise processes. In order to demonstrate how this fidelity improvement translates to improvement in algorithmic performance experimentally, we compare hidden inverses with randomized compiling for our VQE problem. For application to our problem, we identified the CNOT as our hard gates, and the Pauli operators as our twirling group, yielding a total of 256 unique circuit evaluations. We found that randomly choosing 10 circuits from this grouping was sufficient for converged results. For each of the random circuits, they were repeated 20 times to yield the same number of shots to compare with the default and HI circuits. All three circuit variations (default, HI, and RC) were taken interleaved with one another on the experiment, and 200 shots per variation was chosen to limit system drift while maintaining sufficient averaging to isolate differences in results.

Purification
To further explore mitigation strategies in conjunction with the circuit level strategies already presented, we utilized fermionic density matrix purification first demonstrated in quantum computing in [32]. Here, instead of directly evaluating the energy based on measured Pauli expectations, we note that the 2-dimensional reduced fermionic density matrix, ρ can also be established from the already measured expectation values.
Once measured, this fermionic density matrix contains the effect of noise, and does not represent a pure state. As an effective oneparticle pure state, its eigenvalues should be either zero or one. To project this onto a pure state, we diagonalize ρ, identifying the eigenvector |φ corresponding to the largest eigenvalue, and then establish a new fermionic density matrix ρ p = |φ φ|. This procedure is not scalable for N-fermion problems, but similarly themed attempt have been explored within enforcing N-representability constraints on measured 2-reduced density matrices [33]. Thus purified energies can then be evaluated using ρ p .

Noise Injection
To investigate the noise mitigation properties of these diverse approaches, we intentionally introduce errors onto the two-qubit gates in a variety of manners. While the two-qubit gate in the circuit is the CNOT and its inverse, we inject noise on the native gate of the system, the XX(±π/2) MS gate. As described in section 3, to introduce an under-or over-rotation error, we program that error at the circuit level, resulting in a change in the amplitude of the global beam power delivered. We specifically introduce the rotation error symmetrically, so in the CNOT, we utilize XX(π/2 + ) and for the CNOT † , XX(−π/2 − ). This is most akin to the types of rotation errors that would occur naturally in the system, which could be due either to a miscalibration of the overall power necessary, or a drift in the overall system detuning also causing systematic over-or under-rotation. In Fig. 8, we introduce a systematic under-rotation of 0.5 radians (right) in comparison to the nominally fully calibrated approach (left).
Additionally, we can introduce a broader array of errors through reduction in sideband cooling loops as described in section 3. In Fig. 9, we compare full cooling of 60 loops (left) to a reduction in sideband cooling of 12 loops (right). For full cooling, 60 loops, we see the desired rotation and a residual population in |01 and |10 of ∼ 1.5%. However, with only 12 cooling loops applied, we see a static under-rotation of ∼ 0.3 radians and population in the |01 and |10 states of ∼ 2%. Additionally, we expect to see an increase in the stochastic coherent error with a partially cooled ion. In Table 1, we compare the average fidelities of the VQE wave-function (average over all angles) for different error mitigation settings. We find hidden inverses generally outperform randomized compiling for various different injected noise sources.
We performed detailed numerical simulation of the loss landscape with noise injection (solid lines in Fig. 8 and 9). Our error model consist of ideal single qubit gates, no state prep or measurement errors and all the errors are attributed to the MS gate. Reducing the number of cool- ing loops affects the effective Rabi frequency and also amplifies the effect of residual entanglement between spin and motion. We model the effective Rabi-frequency change as a combination of static offset to Rabi frequency and a stochastic reduction in Rabi frequency following Debye-Waller effect [34]. This can be viewed as a shot to shot coherent error. On the other hand, we model residual entanglement as two-qubit depolarizing noise on the spin states. For the noiseless case, our best fit model has average phonon number of 0.05 (motional mode heating), a static coherent over-rotation of 0.09 radians (laser intensity miscalibration) and a two-qubit depolarizing probability of 0.02 (residual entanglement between spin and motion) resulting in a 97.5% MS gate fidelity. Next, for coherent rotation noise injection, we find a static effective under-rotation of 0.45 from the ideal gate while the two other noise parameters stay the same resulting in a 91% MS gate fidelity. Finally, for the case where we limit the number of cooling loops to 10-12, we find the best model has average phonon number of 0.5, a static over-rotation of 0.12 radians and a two qubit depolarizing probability of 0.06 resulting in a 89% MS gate fidelity.

Discussion
The experimental results and corresponding numerical simulations highlight a few key ideas. First, both hidden inverse gates and randomized compiling are effective methods for coherent noise mitigation. They are markedly different in their application; while randomly compiled circuits add extra twirling gates, the use of HI gates preserves the original circuit depth. They have applicability in different scenarios; for example, an inverse CNOT preceded by a CNOT and a large rotation will not provide the desired noise cancellation. In the work outlined here, we showed that in certain applications with small rotational parameters, such as some instances of VQE, the HI method is very effective near the variational minimum. Secondly, noise amplification allows one to test both the efficacy of a noise mitigation technique and also verify hypotheses about the nature of noise present. Here, noise amplification was used to test the capacity of randomized compiling, HI gates, and density matrix purification to mitigate over and under-rotation errors as well as cooling cycle reduction. These error types can all potentially be attributed to a miscalibrated apparatus (or stale calibrations),  which may occur in hardware that has extended up time in between calibration cycles. Third, simulations at the single qubit level were used to fit effective noise model parameters to the experimental data, allowing us to verify hypotheses about the source of the noise as well as the behavior of the noise model under HI circuits. In the experimental device, when calibration cycles were explicitly skipped, the model fits predicted that under-rotation errors would be significant source of coherent noise (see Fig. 6). Explicitly adding under-rotation noise in the experiment further verified the noise model and simulations (and likewise for phase noise), meaning that the noise model adopted here can potentially be used to diagnose potential problems in trapped ion platforms via parameter fitting to a set of data provided by experimentalists. All of the noise mitigation techniques attempted were able to cancel much of the added rotation error as well. Density matrix purification provided a complementary noise mitigation scheme; since it is used in post-processing on classical data provided from measurements, it acts as a "catchall", essentially treating coherent and incoherent noise sources indiscriminately. Because of the method's additional application to stochastic noise and its use in post-processing, it can be effectively used with data provided by either randomly compiled circuits or HI gates. Overall, we find the predictions of our best fit noise model closely align with the experimentally VQE reconstructed loss landscape. Moreover, the parameters of our noise model matches with those estimated in our experimental system. As such, these hidden inverse techniques, in single-and multi-qubit applications, provide a dual purpose, not only error mitigation but also error characterization.

Conclusion
Here, we have explored methods of coherent noise mitigation and characterization on a trapped ion quantum processor. We note that low-level noise characterization schemes, consisting of both modeling and noise amplification, combined with noise mitigation techniques, can be used to estimate the sources of noise in trapped ion platforms. Low level characterization techniques, beyond solely measuring gate fidelities, help to make a connection between noise at the gate and quantum control levels and higher level performance. Here, we motivated the use of VQE for quantum chemistry as a key high level application whose performance is correlated with the noise sources studied here.

Acknowledgments
Authors States Government retains and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes. The Department of Energy will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan (http://energy.gov/downloads/doe-publicaccess-plan). SAND2022-7158O.