Improving Performance of an Analog Electronic Device Using Quantum Error Correction

The use of analog classical systems for computation is generally thought to be a difficult proposition due to the susceptibility of these devices to noise and the lack of a clear framework for achieving fault-tolerance. We present experimental results for the application of quantum error correction (QEC) techniques to a prototype analog computational device called a quantum emulation device. It is shown that for the gates tested (transversal $Z$, $X$ and $SH$) there is a marked improvement in the performance characteristics of the gate operations following error correction using the 5-Qubit Perfect code. In the case of the $Z$ gate, the median fidelity improved from 0.995 to 0.99998, a reduction in the gate error by over two orders of magnitude. Other transverse gates similarly show strong improvements.


Introduction
Quantum information processing techniques provide an optimistic path towards the development of computational devices that can address problems for which no known efficient classical approaches are known to exist. Underlying the usefulness of quantum systems for information processing is the ability to scale up what are now small laboratory scale prototype devices to the sizes necessary for addressing problems that cannot already be tackled with classical hardware. Before the discovery of techniques for performing quantum error-correction (QEC), it was thought that the inherent fragility of quantum coherent systems would make scaling up to these sizes virtually impossible in practice. This was not unlike the situation in the early days of digital computing, when real-time error correction techniques were first contemplated [1]. Beginning with the discovery of Shor's famous 9qubit code in 1994, and followed by subsequent advances within the field of QEC a path towards large-scale, fault-tolerant quantum computers now exists [2,3].
Experimental implementations of many of the components that go into the performance of QEC protocols have been tested for most of the potential candidate platforms for quantum computing. Ion-trap quantum computing experiments have been performed that tested the performance of a three-qubit stabilizer code using a system comprised of the hyperfine levels of three trapped beryllium atoms with intentionally induced errors and found a reduction in the gate error by as much as 0.3 for large error probabilities [4]. Further ion-trap experiments have looked at multiple rounds of QEC using the three-qubit phase-flip code on a system of three calcium ions under the influence of intentionally induced errors between each round, which found a degradation in fidelity consistent with first-order insensitivity to induced errors [5]. Experiments performed using logical qubit states encoded as "catstates" of a superconducting quantum oscillator reported a 10% enhancement in coherence time using QEC over the longest lived physical qubit comprising the composite system and a factor of 20 times longer than the shortest lived component (a transmon qubit) [6]. A demonstration of a universal set of one-qubit gate operations acting on logically encoded qubit states in a superconducting quantum oscillator has shown an average fidelity for logical gate operations of 0.985 [7]. For superconducting transmon qubits experimental tests have verified first-order insensitivity to induced phase-flip and bit-flip errors using three-qubit repetition codes; however those same experiments also found that for low error probability the overhead of QEC actually reduced overall performance [8]. Experiments on transmons have also demonstrated the implementation of stabilizer measurements of the type necessary for the fault-tolerant implementation of QEC with stabilizer codes [9]. Recent experiments on transmon qubits have also demonstrated a reduction in the failure rate of input state retrieval by as much as a factor of 8.5 using multiple rounds of QEC as compared to rates for unencoded qubits [10].
In nuclear magnetic resonance (NMR) systems, experimental tests of logical operations on a system of five nuclear spins encoded in the 5-qubit Perfect code in the presence of induced errors found that the average gate performance was enhanced relative to what would be expected for an unencoded qubit subject to the same noise [11]. Furthermore, experiments on NMR systems have also demonstrated an improvement using QEC for a system subjected to phase noise and encoded in a 3-qubit phase-flip repetition code [12].
In nitrogen vacancy center qubits, an experimental implementation of the 3-qubit phase-flip code under the influence of induced noise found a reduction in error for large induced-error probabilities [13]. Finally, in photonic systems, tests have been performed using both singlephoton and continuous-variable (CV) settings. In the CV setting, an experimental test of a CV generalization of the Shor 9-qubit code in the presence of induced noise found an enhancement using QEC for each of the induced error modes [14]. In the single-photon setting experimental tests of a simple code for protection from coherence loss from spurious Z basis measurements was found to recover the original state following intentionally induced measurements with a fidelity of 0.98 [15]. Additionally, an experiment using a 4-qubit code designed to protect from photon loss errors in a single photon system recovered from induced photon loss errors with a fidelity of 0.80 [16].
A number of analogies are often drawn between quantum mechanical systems and classical analog systems [17]. A key distinction made with regard to computing is that, under certain assumptions, a scalable quantum computer is capable of satisfying the threshold theorem for fault tolerance [18]. In previous work we have shown how one may explicitly embed the same Hilbert space structure found in a gate-based quantum computer directly into a signal processing framework in which information is represented using complex, basebanded analog voltage signals [19]. This analogy allows for a rich set of connections to be drawn between problems in both signal processing and quantum computing applications. In a separate work, for example, we have shown how this mathematical connection can be leveraged to incorporate techniques developed for QEC to solve problems in digital wireless communications [20]. A prototype quantum emulation device (QED) that utilizes this embedding and physically performs the operations described in hardware has been developed and tested [21]. A natural question to ask given this device is whether it is possible to utilize techniques from QEC to enhance the performance of what is otherwise a purely classical analog device. On a practical level this is an interesting question for multiple reasons. Firstly it is believed that error correction in analog devices is very difficult, and the difficulty of this problem has long stymied advances in technologies that rely on analog data processing and collection [22]. Secondly, it is not clear that QEC should work on a classical analog device at all. Regardless of our embedding scheme, the device dynamics are governed purely by classical physics and, as such, the assumptions inherent in QEC's formulation, such a linearity of errors, are not necessarily justified. In section 2 we discuss a simple example (additive white Gaussian noise) where it is possible to directly express the classical errors in the quantum formalism. In this work we demonstrate that in practice, despite the above caveats, QEC protocols do in fact provide additional robustness to noise in our system and improve its performance overall.

Modeling Classical Errors as Quantum Operations
In order to effectively make use of QEC techniques in our alternative setting we first need to recast the modeling of our system's error dynamics into the same mathematical framework used in the quantum mechanical setting. Quantum operations provide one such framework and are used to model the evolution of noisy quantum system dynamics. The quantum operations formalism provides the tools needed to describe the evolution of open quantum systems, those coupled to external environmental degrees of freedom, along with the apparent non-unitary system evolution that can occur. The mapping ρ → E(ρ) is a superoperator that maps the input density operator ρ acting on a Hilbert space H to the final density operator E(ρ), here taken to be also acting on H, and is called the quantum operation or, for trace-preserving maps, the quantum channel [23].
Quantum operations can be described using the operator-sum representation in which the evolution of the system is specified by a discrete set {E k } of operators on the Hilbert space, called the Kraus operators [24]. In this formulation, the quantum operation takes the form where, for a trace-preserving quantum channel, k E k E † k = I is the identity. Operators from the Pauli group are an example of Kraus operators. The Pauli group for a system of n qubits is given by the set of all n-fold tensor products of the one-qubit Pauli matrices σ 0 = I, σ 1 = X, σ 2 = Y, σ 3 = Z. The Pauli group on n qubits forms a complete basis for 2 n × 2 n matrices, so it is always possible to rewrite the operator-sum representation of a quantum operation in a canonical form by rewriting the operation elements as linear combinations of Pauli group elements [23].
The depolarizing channel is a prototypical channel within the QEC literature. Correcting depolarizing errors on a number of qubits is as hard as correcting arbitrary errors on those qubits and, so, it is a simple and useful stand-in [23]. For the purposes of error correction in classical analog systems, the depolarizing channel is of particular interest because it can be shown to directly correspond to the presence of additive Gaussian white noise (AWGN) in a system [25]. The depolarizing channel is a noise process in which with some probability p we lose all information about the state of our system and it is replaced with the maximally mixed state I/N where N = 2 n is the dimension of the system. As a quantum operation we can write the generalized depolarizing channel as follows: Making use of the identity the depolarizing channel can be written in the operator-sum representation. For the onequbit case, this is given by where p = 3p/4. To see the connection to AWGN suppose the quantum state |ψ is represented by the time-domain signal ψ given by where x = x n−1 2 n−1 + · · · + x 0 2 0 and ω k = 2 k ω 0 for some ω 0 > 0. Additive noise produces a stochastic signalψ = ψ + w, where w is a zero-mean complex white Gaussian noise process with spectral density , where E represents an expectation value. Note thatψ is outside the Hilbert space of ψ since w is a broadband signal. Projectingψ back into this space, which is done by narrowband filtering, yields a quantum state of the form |ψ ∝ |ψ + |ν . Here, |ν is represented by a stochastic signal given by where T is a multiple of 2π/ω 0 , {z x } x are independent standard complex Gaussian random variables, and we have used the inner product definition The corresponding quantum channel may be found by taking the expectation value of the outer product |ψ ψ |. Since we deduce that the quantum channel is given by which is of the same form as equation 2. This shows how a classical noise process, in this case additive white Gaussian noise, can be described by an equivalent quantum operation. |ψ

Description of the QEC Protocol
For our experiment we used the 5-qubit Perfect code, which is the smallest code capable of correcting an arbitrary error on a single physical qubit [26]. The 5-qubit code is a stabilizer code with the generators given in table 1.
To encode the logical single-qubit state |ψ = α |0 + β |1 into the physical state |ψ = α |0 + β |1 , we use the code words where a little endian qubit numbering convention (0 to 4, read right to left) is adopted. The encoding circuit is given in figure 1.
In addition to the encoding circuit, we also need the corresponding syndrome detection circuit. To perform syndrome detection we use a fault-tolerant circuit construction introduced by DiVincenzo and in the form presented by Mermin [2,27]. The circuit diagram for this is given in figure 2. This circuit construction, which uses four additional ancillary qubits, is not the most qubit-resource efficient fault-tolerant syndrome detection scheme but is easy to implement and understand. (For a more resource-efficient scheme, see [28,29].) Table 2 gives the correspondence between the measurement results on the ancilla qubits in figure 2 and the error that was measured. Each controlled operation in figure 2 projects the system into the ±1 eigenspace of each of the stabilizer group generators, and the measurement on the corresponding ancilla tells into which of the two eigenspaces the state was projected. Since all of the Pauli operators are involutions, the correction operation is simply to apply the same Pauli operation indicated by the syndrome measurement.
Transverse (i.e., separable) gates are needed in order to implement fault-tolerant encoded gates on the encoded states. The 5-qubit Perfect code has transversal Pauli gates, with σ m = σ ⊗5 m , as well as a set of Clifford operations given by that are also transversal, withK sx,sy,sz = K ⊗5 sx,sy,sz [30]. This gives an easy way to implement a set of test gates with which to evaluate improved performance on our device. In the performance experiments described in section 4, the system is benchmarked using the Pauli Z and X gates as well as the Clifford SH gate. The SH gate is given by the product of the phase gate S = √ Z and the Hadamard gate H = (X + Z)/ (2) and corresponds to K +,+,+ in equation 11. Thus, K +,+,+ = e iπ/4 SH = 1 2

Experiments
To evaluate the performance of our hardware device we performed a series of tests to determine performance with and without the use of QEC protocols. We then compared the single-gate fidelity in each of the two cases using a random set of logical input states.

Experimental Design
The details of the hardware are described elsewhere [21]. Two of the five encoding qubits were represented in the frequency domain using signals with four narrowband tonals at ±1000 Hz and ±3000 Hz. The other three qubits were represented in the time domain using a wavetrain of eight such signals. (The classical signal representation requires time-frequency resources that will, of course, scale exponentially with the number of qubits.) Gate operations on frequency domain qubits were performed in hardware using analog filters, operational amplifiers, and four-quadrant multipliers. Likewise, the signal multiplication operations necessary for performing gates on the time-domain qubits was performed in hardware with the reordering operations handled digitally following an analog-to-digital converter (ADC). The configuration was chosen such that qubits 0 and 1 were represented in the frequency domain, while qubits 2 through 4 were represented in the time domain. The choice was arbitrary, and other configurations give similar results. For more information regarding the time domain encoding scheme and the corresponding gate operations see [31]. The general workflow of the experiments is detailed in the flowchart in figure 3. The first stage of each of the experiments is a software pre-processing step in which we generate a set of 100 pure state inputs uniformly at random according to the Haar measure [23]. Each of these states is synthesized digitally and, in software, encoded into the 5-qubit code using the circuit given in figure 1. After this pre-processing stage, the physical analog signals are generated with a digital-to-analog converter (DAC), and a selected transversal gate is applied in hardware using analog electronics. The transformed signals are then sampled digitally using an ADC and buffered in memory. This digitized signal is converted back to the corresponding quantum state, upon which syndrome measurements  may be performed using measurements based on the Born rule. Finally, a software-based post-processing stage occurs in which the transformed states have the syndrome detection circuit of figure 2 applied, along with the appropriate correction gate based on the syndrome measurement results as given in table 2. The decoding circuit is then applied (The circuit given in figure 1 but in reverse order) and the fidelity between the measured output state and the correct result is calculated. Note that only the encoded gate is performed in hardware -all encoding, error correction, and decoding is performed in software.
In addition to the encoded and error-corrected gate operations, a set of control runs was performed for each of the gates using the same set of input states and the same number of repetitions. This control run was performed directly on the one-qubit input states encoded in the frequency domain rather than on the logically encoded states.

Performance Metrics
A common metric used to quantify the performance of a quantum gate is the gate fidelity. Let |ψ denote the notional input state for our gate, and let U denote the gate that we intend to apply. In practice what is actually implemented is a noisy version of U , which may be described by a quantum operation E. The gate fidelity for a particular input state, defined as measures how closely the noisy implementation of U approximates the desired one. A more general (input-independent) measure of the performance is the median gate fidelity, denoted F , which is taken over an ensemble random input states and, for each one, several repetitions of a given gate operation. A median is preferred over the mean in order to characterize typical behavior in highly skewed data. Since fidelity is bounded above by 1, changes in the fidelity as a result of error-correction can be very small in absolute terms. The performance of a system in the long-term often has an exponential sensitivity to the infidelity (1 − F ) of the operations and, so, we define a metric that reflects this sensitivity, which we call the log-fidelity, denoted f , and define it as The choice of base 10 for the logarithm in equation 14 gives the log fidelity a simple interpretation in terms of a more common colloquial measure, the number of nines in the fidelity. As defined, the log-fidelity is equal to the number of nines plus an interpolation between an integer number of nines. We note that the definition of this measure draws analogy between the log-fidelity and the decibel scale used in classical systems for characterizing performance in terms of the signal-to-noise ratio (SNR). Use of the median fidelity also has the desirable property that median log-fidelity,f , is equal to − log 10 (1 −F ), a property not shared by the mean fidelity.

Results
Starting with the Z gate we find that without QEC implemented, the median fidelity over the entire set of 100 input state randomizations and 1000 experimental runs was 0.99463 with an approximate 95% confidence interval of (0.99460, 0.99467) obtained by bootstrapping over 10 4 random samples. Also useful for visualization of the performance statistics is the cumulative distribution function (cdf), which allows one to more easily compare the spread of the distributions. The results for the Z gate with QEC implemented tell a more interesting story. In figure 4 we compare the cdf and corresponding probability density functions (pdf) for the corrected and uncorrected Z gates. After error correction, it was found that the median fidelity for the Z gate increased to 0.9999764 (0.9999761, 0.9999768). This was true despite the fact that the experimental error correction procedure tended to broaden the tail on the fidelity distribution, resulting in several outliers. This can be observed in the appearance of a bimodal clustering of low fidelity results that can be seen in the inset plot of figure 4. The reasons behind this tail broadening behavior will be expanded on further in section 5. Looking at the log-fidelities given in figure 4 shows, however, that despite the fact that QEC has a tendency to broaden the tails by periodically causing low fidelity outcomes, most of the time the procedure substantially improves the performance. This is further evidenced by looking at the change in the median log-fidelity, where we find, without error correction, the median log-fidelity for the Z gate is 2.270 (2.267, 2.273) and, with error-correction, it improves to 4.628 (4.622, 4.634).
The X and SH gate results are similar to those found for the Z gate, and a summary of the results can be found in figures 5 and 6 respectively. In figure 5 it can be seen in both cases that we again have a tail broadening effect in the error-corrected results with a similar bimodal clustering of the low-fidelity outcomes. However, the vast majority of events demonstrate a substantial improvement. For the X gate, despite the tail broadening, the median fidelity after error correction, 0.999426 (0.999423, 0.999429), was significantly higher

Discussion
One of the key issues raised by the experimental results with the application of QEC to the QED is the tail broadening effect that is observed on the fidelity. In order for QEC to be useful it is important to understand the conditions and noise processes which contribute this behavior. The device itself is subject to a myriad of classical noise sources including everything from Johnson noise, inherent to finite-temperature operation, to phase and frequency drift resulting from signal filtering in the gate and measurement operations. For the purposes of higher level modeling, however, it suffices to conceptually model the errors in the system as resulting from two main types of error. The first error source is gate errors caused by the imperfect implementation of the gate operations, and the second is due to general imperfections in the circuit construction, which puts a floor on the fidelity of our state representation even in the absence of any gate operation. Gate operations on the QED are implemented using analog multiplication operations with gate coefficients defined by a corresponding set of analog DC voltage values. The DC values that define the coefficients are inherently imperfect, however. Due to a combination of quantization error caused by the finite resolution of the digital-to-analog converters (DACs) and stochastic noise sources such as thermal noise, these DC values will fluctuate and be randomly distributed about the desired values. We suspect that different gates will have different fidelities due to the differing DC voltages needed to realize each in the hardware implementation. The Z gate, for example, has similiar DC voltages to an identity gate and would therefore be expected to perform better.
A key feature of all of the above noise processes is that they are inherently continuous, whereas the QEC corrections we apply are inherently discrete. In particular, codes such as the 5-qubit perfect code are constructed with a model in mind that is based on the idea that errors act on qubits within the state locally and independently. In cases where too many qubits are hit by the noise process it is possible to misidentify the error syndrome and in the correction process transform the state of the system into one nearly orthogonal to the original. From this we can see a likely candidate for the source of the bimodal clustering of low fidelity values in the experimental results presented in section 4.3. We can see a clear example of this in figure 4, where there are two modes of the QEC pdf at log-fidelities of about 3.5 and 5. This leaves open an interesting possibility for improving the performance of the QEC protocols in the device by designing decoding procedures which leverage the additional information we have access to from having an explicit representation of the state of the system and which performs corrections in a continuous manner. We explore this idea more directly in the context of applying QEC to wireless communication applications, and it is likely the ideas developed in that context would be similarly applicable to the QED device [20].

Conclusions
We have shown that the techniques of quantum error correction can be successfully applied in domains seemingly far removed from standard quantum mechanical systems. The QED device implements a classical representation of quantum states based on pairs of analog voltage signals to perform its information processing. As a classical device it is in principle subject to a whole myriad of errors, some of which, as in the case of AWGN, are representable as quantum operations. Yet, in practice, it is found that QEC nonetheless yields a practical performance boost. All three gates studied -the X, Z and SH gates -showed marked improvement in their operating characteristics, with an average increase in log-fidelity over the three gates of about 1.57. Given the general effectiveness of QEC at improving the device's performance it seems reasonable to suppose that in the above experiments the device is operating in a regime in which the errors are dominated by those in which there is a quantum analogue amenable to QEC, even if our models have not fully captured the details of those analogues yet. The results of this work may have applicability beyond computing and could serve as a basis for advanced techniques in robust, fault-tolerant classical communication through the use of quantum error correction protocols on classical messages.