Quantum Error Mitigation by
Pauli Check Sandwiching
Abstract
We describe and analyze an error mitigation technique that uses multiple pairs of parity checks to detect the presence of errors. Each pair of checks uses one ancilla qubit to detect a component of the error operator and represents one layer of the technique. We build on the results on extended flag gadgets and put it on a firm theoretical foundation. We prove that this technique can recover the noiseless state under the assumption of noise not affecting the checks. The method does not incur any encoding overhead and instead chooses the checks based on the input circuit. We provide an algorithm for obtaining such checks for an arbitrary target circuit. Since the method applies to any circuit and input state, it can be easily combined with other error mitigation techniques. We evaluate the performance of the proposed methods using extensive numerical simulations on 1,850 random input circuits composed of Clifford gates and non-Clifford single-qubit rotations, a class of circuits encompassing most commonly considered variational algorithm circuits. We observe average improvements in fidelity of 34 percentage points with six layers of checks.
I Introduction
Hardware errors or noise arising from qubit imperfections such as unwanted interactions with the environment limit the power of near-term quantum technologies. Since these devices lack the necessary number of qubits and error rates to perform quantum error correction [1, 2, 3], error mitigation is required in order to increase the fidelity of computations. In this work we investigate error mitigation that uses a small number of ancillas to suppress the effect of errors. Various error mitigation techniques have been developed, such as zero-noise extrapolation [4, 5, 6], which uses different error rates to reduce the error in the measurement of an observable; probabilistic error cancellation [4], which uses an ensemble of known noisy circuits to approach the correct expectation value; dynamical decoupling [7, 8, 9], which uses timed control sequences to suppress interactions of the target quantum system with its environment; readout error mitigation [10], which uses classical postprocessing techniques to mitigate measurement errors; and symmetry verification [11, 12, 13, 14], which verifies symmetries in computational problems of interest and discards erroneous computations.
Protocols that improve measurements of an observable have applications in problems such as the estimation of the ground state energy of a given Hamiltonian [15]. In contrast, protocols that improve fidelity generally apply to any problem. A main feature of many techniques aimed at improving measurements of an observable or reducing readout error is that they have no quantum overhead; in other words, they require no extra qubits or quantum operations (gates). Thus, these techniques are ideal for the noisy intermediate-scale quantum (NISQ) era [16] because current state-of-the-art NISQ devices contain few qubits, typically fewer than 50, and a limited number of gate operations because of fast decoherence times.
As quantum technology develops, error mitigation schemes must adapt and take advantage of improvements in qubit count and quality [17, 18]. Qubit count and error rates vary widely depending on the underlying qubit technology. Additionally, many of the current error mitigation techniques such as dynamical decoupling and probabilistic error cancellation require intricate tailoring of the protocol to the noise. Thus, they typically require the added overhead in costly quantum tomography [19].
In this work we theoretically and numerically study a quantum error mitigation technique inspired by stabilizer codes, that aims at improvement in quantum state fidelity. We build on the results of [20], where they first explored the scheme of sandwiching a circuit between pairs of parity checks. Note that they refer to the pairs of checks as extended flag gadgets, inspired by the work in [21, 22]. Our research puts this parity check scheme on a firm theoretical foundation and numerically demonstrates its efficacy on a wide variety of quantum circuits. The main contributions of our work are: (1) extending the analysis to greater than two layers of checks, (2) establishing the theoretical limits of the technique, which culminates in the unit fidelity result of Theorem 1, (3) providing parity checks in Propositions 1 and 2 that saturate this fidelity bound and hence answers an open question in [20] regarding optimal checks to use, (4) providing a protocol that efficiently determines Pauli parity check pairs that can be used for a given input circuit, and (5) providing numerical simulations for a wide variety of random input circuits consisting of varying qubit count, cnot count, non-Clifford gate count, and layer count.
The error mitigation scheme that we study in this paper at its basic level of one layer uses one ancilla and two controlled unitary operations, which we refer to as checks. The parity checks sandwich the input circuit. Consequently, the error operator is conjugated between two controlled parity matrices. We measure the ancilla and postselect the state on the measurement outcomes. The net effect of the checks and the postselection is a transformed error map, where terms of the error map that anticommute with the checks are eliminated in the postselected state. The performance of this technique, measured by the improvement in quantum state fidelity, improves with the depth of the input circuit. Furthermore, this scheme is tunable, meaning that the number of layers and ancillary qubits used can be set by the user.
This protocol shares some similarity to symmetry verification, which also uses stabilizer-style parity checks to improve the fidelity of the quantum state and requires no knowledge of the noise. However, unlike symmetry verification, which requires input states to be restricted to a specific eigenspace, this scheme places no restriction on the input state. Thus, the technique applies to subcircuits directly and can be easily combined with other error mitigation methods.
In Theorem 1, we prove that in a restricted scenario where the noise does not affect the checks (see Figs. 4(a) and 4(b)) there exist checks such that the postselected state is noiseless and the fidelity reaches unity. We provide an example of a randomly generated Clifford circuit with added checks that saturates this fidelity bound.
We also investigate the performance of the scheme with numerical simulations in a more realistic setting where the checks are also noisy. The numerical simulations consist of (unmitigated) randomly generated five- and ten-qubit circuits composed of Clifford + arbitrary diagonal unitary gates. Our technique shows an average fidelity gain of 34 percentage points for random input circuits consisting of CNOTs with six layers of (noisy) checks; see Figs. 10a and 10b. The increase in fidelity comes at a cost of a lower probability of postselecting on the ancillas’ measurement outcomes. We also provide Clifford simulations that give intuition that this technique will perform well for deep circuits.
This paper is organized as follows. In Section II we review relevant background and provide definitions that are used in the paper. In Section III-A we provide the single-layer protocol. In Section III-B we describe the theoretical foundation of the technique. In Section III-C we provide the full multilayer scheme. In Section III-D we prove Theorem 1 and provide bounds on the number of layers required to reach unit fidelity for the restricted scenario where the noise does not affect the checks. In Section III-E we discuss how our results apply in general settings. In Section III-F we introduce techniques for finding checks quickly by using a precalculated table of commutation rules that eliminates the need to perform matrix multiplication. In Section III-G we give the results of our numerical simulations. In Section IV we discuss our results and possible areas for future work.
II Background
We begin with definitions and notation. For a detailed introduction to modeling of noise in quantum computation the reader is referred to Chapter 8 of [23].
The most general evolution of an open quantum system is given by a dynamical map [24]
(1) |
where and are elements of the system Hilbert space . is a subspace of the system and environment Hilbert space , where is the system and is the environment.
In the case of an initially unentangled system and environment, the map is completely positive and trace preserving. It can be derived by taking the partial trace of the global unitary evolution and yields the operator sum representation
(2) |
where is a unitary acting across the system and environment [25, 26]. The operators in Eq. (II) are commonly called Kraus operators [26]. A map is completely positive (CP) if it maps all positive operators to positive operators when extended by the identity map to arbitrary higher dimensions [25], namely,
(3) |
where is the -dimensional identity map and is a density matrix. This extension to higher dimensions is required to ensure that when the input state is part of a higher-dimensional state, the output of the map is still positive. A map is trace preserving if
(4) |
Maps that do not satisfy Eq. (3) are called not completely positive (NCP) maps. NCP maps play a significant role in non-Markovian evolutions [27], where the evolution of the state is often not decomposable into a sequence of completely positive maps. NCP maps have the form
(5) |
where and at least one exists [25].
In this paper we use fidelity as a figure of merit. For two quantum states and , fidelity is defined as
(6) |
Fidelity is symmetric with regard to its inputs.
Let denote the unitary operation implemented by the target circuit that we want to error mitigate. Let be the density matrix representing the ideal, noiseless output of the target circuit, be the density matrix of the noisy quantum state produced by the target circuit, and be the density matrix of the noisy error-mitigated state produced by the error mitigated target circuit.
We denote the fidelity of the noisy state before error mitigation as , and the fidelity of the state after application of error mitigation as .
We define the fidelity gain (improvement due to the technique) as
(7) |
We say that the method “detects all errors" when or equivalently when the error map on the postselected state is identity, in other words, when all the Kraus operators of are proportional to identity.
Next we describe the noise model used in our numerical simulations. The depolarizing channel for dimension is
(8) |
where [23]. For the numerical simulations of noisy circuits the only noiseless gates are a measurement gate or the input state, which is generated by a random circuit. Otherwise, we apply the single-qubit depolarizing channel after each single-qubit gate and the two-qubit depolarizing channel after every two-qubit gate. Throughout this paper, we set the two-qubit error rate to ten times the single-qubit error rate, an assumption that roughly corresponds to noise observed in current NISQ systems [28, 29].
III Methods
In Sections III-A and III-B we describe the single-layer Pauli Check Sandwiching (PCS) technique and show that this protocol leads to a transformation of the error map. In Sections III-C and III-D we describe the multilayer protocol and prove that we can reach a fidelity of one between a noisy-mitigated circuit and a noiseless circuit when the error map is restricted to a subset of qubits. We also provide a small number of checks that achieve this fidelity. In Section III-E we investigate how our techniques apply in a general setting. In Sections III-F and III-G we give the results of numerical experiments across unmitigated random circuits.

III-A Pauli Sandwich Error Mitigation Protocol: Single Layer
We begin by describing the simplest version of the Pauli Check Sandwiching technique that consists of a single pair of parity checks sandwiching the computation (one “layer”). Figure 1 shows a graphical view of the protocol. The unitary operation represents the gates of the computation. The bottom qubit is the single ancilla introduced by this scheme, and we commonly refer to the qubits above as the compute or computation qubits.
Let () be a controlled unitary with control on the ancilla that applies () on the compute target qubits. Mathematically,
(9) | ||||
(10) |
This scheme also requires that
(11) |
Before continuing, we make an important distinction between two protocols: the efficient PCS protocol and the general PCS protocol. For the efficient PCS protocol, we restrict and to be elements of the -qubit Pauli group , where
(12) |
These added conditions are partly due to the difficult problem of determining the optimal circuit that implements from a given and . Note that and can be much more general and still satisfy Eq. (11). Thus, there are no additional constraints on the checks in the general PCS protocol.
In the general PCS protocol and for a given , any unitary can be used because in Eq. (11) we can always pick and solve for . We note in the text if a result holds for a specific case. If no statement is made, then the result holds for both scenarios.
The single-layer protocol is as follows.
-
1.
Initialize the ancilla to and apply a Hadamard gate. Perform with the control on the ancilla qubit and target on the compute qubits.
-
2.
Perform on the compute qubits.
-
3.
Perform with the control on the ancilla qubit and target on the compute qubits.
-
4.
Apply a Hadamard gate to the ancilla. Measure the ancilla in the basis, and discard the results where the outcome is . We keep the result where the outcome is .
III-B Errors Detected by the Pauli Sandwich


We now consider the effect of this scheme on an error map acting on the compute qubits after , as shown in Fig. 2(a). Let . Then the postselected output state of the protocol is
(13) |
As shown in Fig. 2(b), this protocol transforms the error map. We can write the postselected state given in Eq. (III-B) in terms of a new error map ,
(14) |
where has Kraus operators
(15) |
and the factor of comes from multiplying Eq. (III-B) by a convenient form of one, namely, . We can now observe the power of this error mitigation technique. The error operators can be expanded in the Pauli basis. Thus, let
(16) |
where is an element of the Pauli group and is a complex constant. Let . Each term in the expansion of either commutes or anticommutes with . Substituting Eq. (16) into Eq. (15), we see that the elements that anticommute with are eliminated and
(17) |
where is the Pauli group excluding the elements that anticommute with .
The effect of the protocol on the error map shares some similarities to that of twirling [30, 31, 32]. In twirling, the twirling set is used to conjugate the error map:
(18) |
Usually, twirling is performed by using the Pauli or Clifford group as the twirling set. When twirling is performed with a suitable set, it transforms the noise into a Pauli channel. However, the PCS scheme is in some sense more powerful since it completely eliminates the contribution of anticommuting Pauli terms.

III-C Pauli Sandwich Error Mitigation Protocol: Multiple Layers
The suppression of errors from anticommuting Pauli terms in the postselected state can be enhanced by introducing multiple layers of the single-layer error mitigation technique. A graphical view of how this scheme works is given in Fig. 3. There are layers with each layer consisting of controlled operations and , where the second index represents the layer, and one ancilla corresponding to each layer. Each pair of and satisfies
(19) |
The multilayer scheme generalizes the single-layer scheme and is performed as follows.
-
1.
Initialize the ancillas to , and perform Hadamard gates on the ancillas. Perform with control on the ancilla qubit and target on the compute qubits.
-
2.
Perform on the compute qubits.
-
3.
Perform with control on the ancilla qubit and target on the compute qubits.
-
4.
Perform Hadamard gates on the ancillas. Measure all the ancillas in the basis, and discard the results where at least one of the outcomes is . We keep the result where all the outcomes are .
III-D Upper Bounds on Fidelity and Required Number of Checks


Now let us consider a noise map acting after on a subset of qubits as shown in Fig. 4(a). From Eq. (15), in the expansion of in the Pauli basis, we know that the th layer eliminates Pauli terms that anticommute with . This immediately leads to the observation that we can detect all errors under the noise model shown in Fig. 4(a), which we prove in the following theorem. Theorem 1 holds in general for the general PCS protocol and it holds for the efficient PCS protocol when the checks are in the Pauli group, in other words, when is Clifford. Note that we discuss why these results hold for NCP errors as well later at the start of Section III-E.
Theorem 1 (Unit Fidelity).
If errors are restricted to act only on the compute qubits, for any noisy unitary quantum circuit acting on compute qubits, there exist checks (see Fig. 4(a)) such that the fidelity between the post selected state and a noiseless run (noiseless execution of U only) reaches one.
Proof.
First, note that if the error map is the identity map, then the fidelity between the output of the error-mitigated circuit and the output of a circuit with only (a noiseless run) is
(20) |
This directly follows from Eq. (19). Thus, if we can transform all the Kraus operators of the error to identity in the postselected state, then we have the result.
Notice that from Eq. (19), Fig. 4(a) is equivalent to Fig. 4(b) and the error map is conjugated by multiple layers of checks. Expanding the error in the Pauli basis, we have
(21) |
where is an element of the Pauli group and is a complex constant. Let .
We now make the results given in Section III-B recursive. First, we label the check layers from 1 to starting with the innermost layer. Then, Eq. (15) can be written recursively as
(22) |
where represents the layer and is the initial error Kraus operation. This leads to the recursive form of Eq. (17),
(23) |
where is the Pauli group excluding the elements that anticommute with . Letting equal the size of (excluding global phases), namely, , we get . The is a constant that cancels out under renormalization, and the result follows. ∎
Before proceeding, we need to clarify the implications of Theorem 1. In that theorem, if we satisfy the conditions, we will have unit fidelity in the postselected state. However, the probability of postselecting is
(24) |
where the Kraus operators of are given by Eq. (23). In Eq. (23) the checks will eliminate all the Pauli terms that are nonidentity. Thus, we see that if all the Kraus operators of the error map are traceless, in other words, contain no identity term in their expansion in the Pauli basis, all the Kraus operators for the error map in the postselected state will be the zero matrix, and the probability of postselecting is zero. This makes sense because we are not correcting errors, but mitigating errors by post selecting outcomes. The theorem holds trivially in this scenario because there is no post selected state.
Moreover, from Fig. 4(a) and Theorem 1, it seems that we can set , which eliminates , and use only the checks for the implementation of the circuit. While this is certainly true, we must consider the postselection probability. If is traceless, the probability of postselecting is zero.
Next we provide a small number of checks that can reach unit fidelity in the setting of Theorem 1. The following results given in Propositions 1 and 2 are for the general PCS protocol. Propositions 1 and 2 hold for the efficient PCS protocol given that the checks are in the Pauli group, in other words, is Clifford. Propositions 1 and 2 hold for the noise model give in Fig. 4(a). For arbitrary weight-one Kraus errors, that is, the Kraus error operators, act only on a single qubit; there exist two layers, where and are max weight, and we reach unit fidelity in the postselected state.
Proposition 1 (Weight-One Kraus Operators: Two layers of max weight checks are sufficient).
For the noise model given in Fig. 4(a) and for all consisting of only weight-one , there exist two layers of checks such that we have unit fidelity in the postselected state. The part of the checks requires a total of cnot gates, where is the number of compute qubits.
Proof.
Each of the single-qubit errors can be expanded in terms of the single-qubit Pauli gates. Thus,
(25) |
where is the qubit it is acting on, is a Pauli matrix or identity, and is a complex constant. Let our checks be
(26) |
and
(27) |
These checks are inspired by the parity checks used in Shor’s code [33]. The consist of tensors of Pauli X and anticommutes with Pauli Y and Pauli Z errors in Eq. (25). The consist of tensors of Pauli Z and anticommutes with Pauli X errors in Eq. (25). From Theorem 1, the anticommuting terms in the error operators are suppressed. Thus, these two layers of checks are sufficient to reach fidelity one. ∎
The checks given in Proposition 1 can detect all errors that consist of weight-one Kraus operators . This class of errors contains error maps that are more general than just single-qubit error maps. For example, can act on qubit one, and can act on qubit two. and are weight-one errors, but the overall map affects multiple qubits.
Remark.
At least two layers are necessary to reach fidelity one in Proposition 1. To see this, we need only show that a single layer is insufficient for arbitrary weight-one errors. Consider a circuit with only one compute qubit. For an arbitrary single-layer scheme, let be the check. Then let the error map be . The check and the error do not anticommute so the error map in the postselected state is not identity. Thus, a single layer is insufficient to detect all weight-one errors; at least two layers are necessary. Proposition 1 shows that we can always saturate this lower bound on the number of required checks.
We can also reach fidelity one for arbitrary weight errors for the error model given in Fig. 4(a) with a small number of weight-one . These checks are generators of the Pauli group and require layers, but the components of the checks require the same number of cnot gates as in Proposition 1. Thus, generally at the cost of more ancillas, we can detect all errors on the postselected state. Consider two weight-one checks of and on the th compute qubit. All Pauli group elements that are nonidentity on the th qubit anticommute with either or . This leads to the following small set that can reach fidelity one.
Proposition 2 (Any Error: number of weight-one checks are sufficient).
For the noise model given in Fig. 4(a) and arbitrary errors, let be the number of compute qubits. Then there exist number of distinct (ignoring the global phase) weight-one such that we have unit fidelity in the postselected state.
Proof.
Let the th compute qubit have two layers acting on it with and . All Pauli group elements that are nonidentity on the th qubit anticommute with at least one of the checks. Thus, this eliminates all Pauli terms in the expansion of the error Kraus operators that do not have identity on the th qubit for the postselected state. We repeat these checks for the other compute qubits. The same argument holds in general for and the result follows. ∎

Figure 5 shows an example of a random Clifford circuit consisting of two compute qubits and 30 cnot gates that gives unit fidelity for the postselected state. This matches the prediction of Theorem 1. We use a Clifford circuit to guarantee that we can get the desired checks with the efficient PCS protocol. We use the checks provided in Proposition 2. The two checks on each compute qubit are and , and we vary the number of layers from zero to four. Interestingly, at the single-qubit error of , the two-qubit depolarizing channel is maximally depolarizing, but the fidelity remains at one for the postselected state (as predicted).
The gain in fidelity comes at the cost of a lower probability of measuring all zeros for the ancillas. This trade-off is demonstrated in Fig. 5b. The probability of measuring all zeros drops to around 7% for this circuit at the high single-qubit error of . Note that the overhead in the number of runs is .
III-E General Errors and Hardware Considerations


In the preceding sections, we restricted to CP maps, but our results hold also for general linear Hermitian maps, which includes NCP maps. As previously mentioned, NCP maps play a major role in non-Markovian evolutions, where the maps tend to be non-CP divisible. NCP maps have a similar form to CP maps and are written as , where and there exists at least one . The coefficients are not used in any of our proofs, and thus the results hold.
Also, we restricted to act only on the compute qubits. Obviously this is a restricted case, and in physical systems the checks are noisy and the error map would generally act across all the qubits, as shown in Fig. 6(a). In this situation, the checks still conjugate the error, as shown in Fig. 6(b). Consequently, the technique is effective when is dominated by Kraus operators that mainly affect the compute qubits; that is, the majority of the noise is from .
On non fully connected quantum computers, the parity checks may be difficult to perform with resulting minimal noise on the ancillas due to the need for swapping qubits. Thus, applications of this technique likely need to carefully map the circuit to the hardware to minimize the swaps between ancillas and compute qubits or execute the circuits on a fully connected device.
Since single-qubit gates introduce less noise than nonlocal gates, the Pauli group is a good candidate for the part of the checks. Furthermore, when is a deep circuit, the noise it induces will generally act across multiple qubits. In this scenario, low-weight will act nontrivially on these errors. Thus, in general it is better to use low-weight checks in order to avoid introducing too many errors.
Moreover, for some executions of this scheme, the postselection probability may be smaller than desired. The postselection probability can be increased by reducing the number of check layers.
III-F Protocol for Finding Checks Quickly





While checks always exist for a given , in practice it is difficult to directly compute from Eq. (19) for a given . Here we introduce our searching protocol for the efficient PCS protocol for determining the check pairs quickly and without matrix multiplication. Note that this protocol can fail to find any checks or may not find the desired number of checks. This can happen when the circuit contains many non-Clifford gates. We refer to the checks searching protocol as the finding checks protocol. For our implementation, we constrained and to be in the Pauli group. We leave the potential searching protocol of a non-Pauli for future work.
The goal is to determine the gates comprising from a given and a given . Instead of performing matrix multiplication, we transpile the input circuit to an equivalent circuit that uses the gate set and perform lookups of the commutation relations. This method applies to circuits consisting of Clifford arbitrary diagonal gates, which is a universal gate set since diagonal gates contain the gate .
To determine the checks, we use the equality , where and and are unitary. We refer to this technique as “pushing" through . Figure 7 gives a visual example of the pushing of the gates to determine . Figure 8 is the completed error-mitigated circuit. This process is efficient since the cost of each lookup call is constant .
Algorithm 1 is the pseudocode for the main script for finding a desired number of Pauli check pairs. It iterates through the minimum weight Pauli checks first and terminates when a sufficient number of layers of checks have been found. The protocol focuses on using low weight checks to minimize the noise introduced by the checks as discussed previously in Section III-E. The main script calls on Alg. 3 to see whether it is possible to push the current gate through. In Alg. 2 the lookup call is a preset table that has commutation relations. This symbolic “pushing" of Pauli gates through works for all gates in the basis set except for Rz. For Rz, if the gate being pushed is not in , which are operators that commute with an arbitrary diagonal gate, then we skip that Pauli group element.
Note that mathematically, any can be used because can be determined from Eq. (11). Thus, one should be able to expand the current algorithm to allow for finding of general . This problem is nontrivial.
III-G Numerical Results
The analytical results presented above assume perfect checks. Here we numerically investigate the scheme in a more realistic setting where most gates are noisy, including those involved in the parity checks (the only gates that are not noisy are measurements and the circuit that generates the random input state).
Intuitively, given a Clifford circuit and using the efficient PCS protocol, we should be able to perform long computations with high fidelity. For a given Clifford circuit, we can keep the checks constant and independent of the depth of . Thus, the noise induced by our checks should be relatively constant.
The checks depend on , but they are elements of the Pauli group and hence limited in size and complexity. Therefore, the noise induced by the checks should also be limited and independent of the depth of .
We demonstrate this intuition on simulations consisting of 550 randomly generated Clifford circuits with two compute qubits. Note that these Clifford simulations provide only intuition that the protocol is suitable for deep circuits because Clifford circuits can in general be optimized to use cnot gates, where is the number of qubits [34]. Thus, two-qubit Clifford circuits can be optimized to be shallow. It may be possible to prove this performance on Clifford circuits with higher qubit counts.
We considered random circuits with cnot counts that varied from . For each cnot count we generated random circuits, and we used single-qubit depolarizing noise of 0.00126 (0.0126 two-qubit noise). This lies within the range of current noise levels found in state of the art quantum computers [35, 29]. We used four layers of checks; the form of the checks was provided in Proposition 2. As shown in Fig. 9a, we maintained an average fidelity for the postselected state of greater than 90% for circuits consisting of up to 1,024 cnot gates. The average fidelity of the unmitigated circuits drops to 25% at 256 cnots. Note that this comes at the cost of a lower postselection rate of 6.25% as shown in Fig. 9b.
For optimized Clifford circuits, we would likely not want to use all the checks from Proposition 2 because we would probably exceed the cnot count of the input circuit. Still, as shown in Fig. 9a, fewer layers can produce significant fidelity improvement.

These simulations establish the general trend that fidelity is positively correlated with the number of layers up to some value. We suspect that these results also hold for general (non-Clifford) circuits.
We also randomly generated 1,850 input circuits consisting of Clifford + arbitrary diagonal unitary gates. Of these, 1,350 input circuits consist of five qubits with cnot counts of ; 500 input circuits consist of ten qubits with cnot counts of . We varied the single-qubit error from to with 21 equally spaced points in log scale.
For the ten-qubit circuits we also generated circuits with cnot gate counts of 80 to match the max cnot count to qubit ratio of the five qubit case. Each random circuit was generated first as a random Clifford gate, which we truncated to reach the desired cnot count. Next, we inserted Rz gates with random rotation angles and random locations in the circuit. We used Rz gate counts of {5, 10, 15}. Each Rz value for five qubits consists of 450 circuits. This covers a large class of variational quantum eigensolver and quantum approximate optimization algorithm circuits [36].
We achieved an average peak fidelity gain of percentage points for five-qubit circuits with a cnot gate count of 40, five Rz gates, and six layers of checks, as shown in Fig. 10a. For input circuits with a low cnot count, the fidelity gain is negative because the checks introduce more errors than they eliminate in the post selected state. The average postselection probability is given in Fig. 10b.

We also give in Fig. 11a a plot that breaks down this peak fidelity gain. At the peak fidelity gain, the nonmitigated circuit has about 33% fidelity, and the six-layer mitigated circuit has about 67% fidelity.

As shown in Fig. 11a, the mitigated circuits perform significantly and consistently better than the unmitigated circuits. Even for lower-layer counts such as two, the average fidelity gain reached 20 percentage points. Fig. 11b gives the corresponding post selection probabilities and demonstrates that we have significant control over the probabilities by changing the number of layers.
Each additional layer increased the average fidelity provided enough circuit depth. We show this in more detail in Fig. 12a, where we fixed the single-qubit error rate to 0.00251 (0.0251 two-qubit error) the value that gave the peak fidelity gain in Fig. 10a.

Circuits with more than six layers may result in even better performance, but the amount of fidelity gained decreases with subsequent layers. Fig. 12b shows the corresponding post selection probabilities and the minimum post selection probability is about 16%.
As the number of Rz (non-Clifford) gates increases, the number of possible low weight checks for the efficient PCS protocol decreases, and consequently the fidelity gain decreases. As shown in Fig. 13a, at an Rz gate count of 10, the peak fidelity gain is about 25%.

As shown in Fig. 14a, at an Rz gate count of 15, we cannot find six layers of checks for random circuits with 20 cnot gates or higher. Interestingly, as shown in Figs. 10b, 13b and 14b, the post selection curves are relatively unchanged.

Using one layer of checks, we have a peak fidelity gain of about 10 percentage points at 40 cnot gates, as shown in Fig. 15a. Fig. 15b shows the corresponding post selection probabilities.

For the ten-qubit case, as shown in Fig. 16a, we achieved a fidelity gain of about ten percentage points. This occurred at a cnot count to qubit ratio of eight, which matches the scenario of the peak fidelity gain in the five-qubit case. The peak fidelity gain occurred at a single-qubit error of about 0.000891 (0.00891 two-qubit error). Fig. 16b shows the corresponding post selection probabilities.

The preceding simulations focus on using low-weight checks first. We now analyze the performance of high-weight checks. As shown in Figs. 17(a) and 17(b), while the high-weight checks do give a boost in fidelity, they introduce significant amounts of noise compared to the low-weight checks.


IV Conclusions
The quantum error mitigation technique we have studied in this work is novel because (1) it has an adjustable quantum overhead for any input circuit, (2) by adjusting the number of layers of check operators, the technique allows controlling of the post-selection probability and the error from the error mitigation protocol, (3) the method can be applied repeatedly and at any location in the circuit, and works for arbitrary input states, and (4) in the setting of Theorem 1, we prove that we can achieve unit fidelity provided that we use a sufficient number of layers.
We prove in Theorem 1 that if the error is restricted to the compute qubits (see Fig. 4(a)), there exist checks such that the fidelity for the postselected state reaches unity. We also give a small number of checks that reach unit fidelity in this scenario in Propositions 1 and 2.
In Eq. (19), is chosen and can be directly determined through our finding checks protocol given in Section III-F. This algorithm determines the pairs of checks without matrix multiplication. Instead, we perform lookups of predetermined commutation relations. One limitation of our finding checks protocol is that we are able to find only that are in the Pauli group. This limitation does not exist for the general PCS protocol.
The main limitation of the proposed approach is the need to obtain the checks and , with cost exponential in the number of qubits in the subcircuit. This cost can be reduced to exponential in the number of non-Clifford gates (and only polynomial in the number of qubits) by leveraging the extended stabilizer formalism [37].
The performance of the protocol is tested through extensive numerical simulations on random circuits consisting of 550 Clifford and 1,850 non-Clifford circuits. We used the Clifford simulations to provide intuition that the technique is suitable for deep circuits.
For the non-Clifford circuits, we used five- and ten-qubit circuits. We use the difference between the fidelity of the mitigated circuit and the fidelity of the unmitigated circuit as a figure of merit. Under depolarizing noise, the simulations reached an average fidelity gain of percentage points for circuits consisting of five qubits, 40 CNOTs, and six low-weight checks (see Figs. 10a and 10b). It is possible that more layers will provide further boosts in fidelity. The single-qubit noise ranged from to . This coincides with current noise levels found in superconducting quantum computers [35].
In [38], the authors derive an error mitigation scheme based on symmetry verification, which they call the spatio-temporal stabilizer (STS) technique. The STS technique shares many similarities with the PCS scheme, as first introduced in [20], and when there is only one pair of checks, STS is the PCS scheme. An important difference is that when there are multiple pairs of checks, layers are allowed to be partly nested in the STS technique. For example, a possible STS execution is layer one and layer two act on the same compute qubits, but layer two begins before layer one has ended and layer one ends before layer two. Since the STS method also allows the standard layering of checks in PCS, our results also hold for the STS technique.
We also note that while the results of this research are presented in the context of quantum computing, the theoretical results hold in general for settings where the user intends to implement an ideal known unitary on a quantum state. This follows because we placed no restrictions on the unitary. The performance of the scheme in other settings needs to be investigated. Also, since the protocol places no restriction on the input state, one can apply the mitigation technique on subcircuits and easily combine it with other methods. Splitting a large circuit into subcircuits for finding checks or combining the protocol with other techniques have not been studied. Determining the optimal number of check layers also needs to be further investigated.
V Data Availability
The data presented in this paper is available online at https://github.com/alvinquantum/noise_mitigation_symmetry.
VI Code Availability
The code used for numerical experiments in this work is available online at https://github.com/alvinquantum/noise_mitigation_symmetry.
Acknowledgments
This research was supported in part by an appointment to the Intelligence Community Postdoctoral Research Fellowship Program at Argonne National Laboratory, administered by Oak Ridge Institute for Science and Education through an interagency agreement between the U.S. Department of Energy and the Office of the Director of National Intelligence. This work was supported in part by the U.S. Department of Energy (DOE), Office of Science, National Quantum Information Science Research Centers, Office of Advanced Scientific Computing Research AIDE-QC and FAR-QC projects, and by the Argonne LDRD program under contract number DE-AC02-06CH11357. Z.S. thanks Q-NEXT for supporting this project. We gratefully acknowledge the computing resources provided on Bebop, a high-performance computing cluster operated by the Laboratory Computing Resource Center at Argonne National Laboratory.
Author Contributions
AG performed the theoretical analysis with feedback from RS and ZS. RS developed the “finding checks quickly" protocol. ZS suggested using the Pauli expansion of Kraus operators in the theory. AG wrote the code, performed the numerical simulations, and wrote the manuscript with input from RS, ZS, and MS. RS structured multiple sections of the manuscript. RS, ZS, and MS developed the numerical experiments with input from AG. RS, MS, AG, and ZS found numerical optimizations.
Competing Interests
The authors declare no competing interests.
Disclaimer
This paper was prepared for information purposes with contributions from the Global Technology Applied Research group of JPMorgan Chase. This paper is not a product of the Research Department of JPMorgan Chase. or its affiliates. Neither JPMorgan Chase nor any of its affiliates make any explicit or implied representation or warranty and none of them accept any liability in connection with this paper, including, but not limited to, the completeness, accuracy, reliability of information contained herein and the potential legal, compliance, tax or accounting effects thereof. This document is not intended as investment research or investment advice, or a recommendation, offer or solicitation for the purchase or sale of any security, financial instrument, financial product or service, or to be used in any way for evaluating the merits of participating in any transaction.
References
- [1] Emanuel Knill, Raymond Laflamme, and Wojciech H. Zurek. Resilient quantum computation: error models and thresholds. Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences, 454(1969):365–384, Jan 1998.
- [2] Dorit Aharonov and Michael Ben-Or. Fault-tolerant quantum computation with constant error rate. arXiv preprint arXiv:quant-ph/9906129, 1999.
- [3] A. Yu. Kitaev. Quantum Error Correction with Imperfect Gates, pages 181–188. Springer US, Boston, MA, 1997.
- [4] Kristan Temme, Sergey Bravyi, and Jay M. Gambetta. Error mitigation for short-depth quantum circuits. Physical Review Letters, 119:180509, November 2017.
- [5] Abhinav Kandala, Kristan Temme, Antonio D. Córcoles, Antonio Mezzacapo, Jerry M. Chow, and Jay M. Gambetta. Error mitigation extends the computational reach of a noisy quantum processor. Nature, 567(7749):491–495, 2019.
- [6] Tudor Giurgica-Tiron, Yousef Hindy, Ryan LaRose, Andrea Mari, and William J. Zeng. Digital zero noise extrapolation for quantum error mitigation. In 2020 IEEE International Conference on Quantum Computing and Engineering (QCE), pages 306–316, 2020.
- [7] Lorenza Viola and Seth Lloyd. Dynamical suppression of decoherence in two-state quantum systems. Phys. Rev. A, 58:2733–2744, Oct 1998.
- [8] Mark S. Byrd and Daniel A. Lidar. Empirical determination of dynamical decoupling operations. Phys. Rev. A, 67:012324, Jan. 2003.
- [9] Vinay Tripathi, Huo Chen, Mostafa Khezri, Ka-Wa Yip, E. M. Levenson-Falk, and Daniel A. Lidar. Suppression of crosstalk in superconducting qubits using dynamical decoupling. arXiv preprint arXiv:2108.04530, 2021.
- [10] Benjamin Nachman, Miroslav Urbanek, Wibe A. de Jong, and Christian W. Bauer. Unfolding quantum computer readout noise. npj Quantum Information, 6(1):84, Sept. 2020.
- [11] X. Bonet-Monroig, R. Sagastizabal, M. Singh, and T. E. O’Brien. Low-cost error mitigation by symmetry verification. Phys. Rev. A, 98:062339, Dec 2018.
- [12] Sam McArdle, Xiao Yuan, and Simon Benjamin. Error-mitigated digital quantum simulation. Physical Review Letters, 122(18):180501, 2019.
- [13] Ruslan Shaydulin and Alexey Galda. Error mitigation for deep quantum optimization circuits by leveraging problem symmetries. arXiv preprint arXiv:2106.04410, 2021.
- [14] Zhenyu Cai. Quantum error mitigation using symmetry expansion. Quantum, 5:548, September 2021.
- [15] Alberto Peruzzo, Jarrod McClean, Peter Shadbolt, Man-Hong Yung, Xiao-Qi Zhou, Peter J. Love, Alán Aspuru-Guzik, and Jeremy L. O’Brien. A variational eigenvalue solver on a photonic quantum processor. Nature Communications, 5(1):4213, Jul 2014.
- [16] John Preskill. Quantum Computing in the NISQ era and beyond. Quantum, 2:79, Aug 2018.
- [17] Jay Gambetta, Ishmael Faro, and Karl Wehden. IBM’s roadmap for building an open quantum software ecosystem. https://research.ibm.com/blog/quantum-development-roadmap, Feb 2021. Accessed: 4-18-2022.
- [18] Peter Chapman. Scaling IonQ’s quantum computers: The roadmap. https://ionq.com/posts/december-09-2020-scaling-quantum-computer-roadmap, Dec 2020. Accessed: 4-18-2022.
- [19] Isaac L. Chuang and M. A. Nielsen. Prescription for experimental determination of the dynamics of a quantum black box. Journal of Modern Optics, 44(11-12):2455–2467, Nov 1997.
- [20] Dripto M. Debroy and Kenneth R. Brown. Extended flag gadgets for low-overhead circuit verification. Physical Review A, 102(5), nov 2020.
- [21] Rui Chao and Ben W. Reichardt. Quantum error correction with only two extra qubits. Phys. Rev. Lett., 121:050502, Aug. 2018.
- [22] Huiyang Zhou and Gregory T. Byrd. Quantum circuits for dynamic runtime assertions in quantum computation. IEEE Computer Architecture Letters, 18(2):111–114, jul 2019.
- [23] Michael A Nielsen and Isaac L Chuang. Quantum Computation and Quantum Information. Cambridge University Press, 2011.
- [24] E. C. G. Sudarshan, P. M. Mathews, and Jayaseetha Rau. Stochastic dynamics of quantum-mechanical systems. Phys. Rev., 121:920–924, Feb 1961.
- [25] Man-Duen Choi. Completely positive linear maps on complex matrices. Linear Algebra and its Applications, 10(3):285–290, 1975.
- [26] K. Kraus, A. Böhm, J.D. Dollard, and W.H. Wootters. States, Effects, and Operations: Fundamental Notions of Quantum Theory. Lecture Notes in Physics. Springer Berlin Heidelberg, 1983.
- [27] Simon Milz, M. S. Kim, Felix A. Pollock, and Kavan Modi. Completely positive divisibility does not mean Markovianity. Phys. Rev. Lett., 123:040401, July 2019.
- [28] Tirthak Patel, Abhay Potharaju, Baolin Li, Rohan Basu Roy, and Devesh Tiwari. Experimental evaluation of nisq quantum computers: Error measurement, characterization, and implications. In SC20: International Conference for High Performance Computing, Networking, Storage and Analysis, pages 1–15, 2020.
- [29] Shuaining Zhang, Yao Lu, Kuan Zhang, Wentao Chen, Ying Li, Jing-Ning Zhang, and Kihwan Kim. Error-mitigated quantum gates exceeding physical fidelities in a trapped-ion system. Nature Communications, 11(1):587, Jan 2020.
- [30] Zhenyu Cai and Simon C. Benjamin. Constructing smaller Pauli twirling sets for arbitrary error channels. Scientific Reports, 9(1):11281, Aug 2019.
- [31] Charles H. Bennett, David P. DiVincenzo, John A. Smolin, and William K. Wootters. Mixed-state entanglement and quantum error correction. Phys. Rev. A, 54:3824–3851, Nov 1996.
- [32] Charles H. Bennett, Gilles Brassard, Sandu Popescu, Benjamin Schumacher, John A. Smolin, and William K. Wootters. Purification of noisy entanglement and faithful teleportation via noisy channels. Phys. Rev. Lett., 76:722–725, Jan 1996.
- [33] Peter W. Shor. Scheme for reducing decoherence in quantum computer memory. Phys. Rev. A, 52:R2493–R2496, Oct 1995.
- [34] Ketan N. Patel, Igor L. Markov, and John P. Hayes. Optimal synthesis of linear reversible circuits. Quantum Info. Comput., 8(3):282–294, Mar 2008.
- [35] Thomas J. Maldonado, Johannes Flick, Stefan Krastanov, and Alexey Galda. Error rate reduction of single-qubit gates via noise-aware decomposition into native gates. Scientific Reports, 12(1):6379, Apr 2022.
- [36] Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A quantum approximate optimization algorithm. arXiv preprint arXiv:1411.4028, 2014.
- [37] Sergey Bravyi, Dan Browne, Padraic Calpin, Earl Campbell, David Gosset, and Mark Howard. Simulation of quantum circuits by low-rank stabilizer decompositions. Quantum, 3:181, September 2019.
- [38] Yifeng Xiong, Daryus Chandra, Soon Xin Ng, and Lajos Hanzo. Circuit symmetry verification mitigates quantum-domain impairments. arXiv preprint arXiv:2112.13904, 2021.
- [39] Kaveh Khodjasteh and Daniel A. Lidar. Performance of deterministic dynamical decoupling schemes: Concatenated and periodic pulse sequences. Physical Review A, 75(6), Jun 2007.
The submitted manuscript has been created by UChicago Argonne, LLC, Operator of Argonne National Laboratory (“Argonne”). Argonne, a U.S. Department of Energy Office of Science laboratory, is operated under Contract No. DE-AC02-06CH11357. The U.S. Government retains for itself, and others acting on its behalf, a paid-up nonexclusive, irrevocable worldwide license in said article to reproduce, prepare derivative works, distribute copies to the public, and perform publicly and display publicly, by or on behalf of the Government. 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-public-access-plan.