Single-Step Parity Check Gate Set For Quantum Erro
Single-Step Parity Check Gate Set For Quantum Erro
1088/2058-9565/ad473c
PAPER
1. Introduction
Being able to scale quantum computers is a necessary condition for useful quantum algorithms [1].
Algorithms with proven speed up, such as Shor’s factorization algorithm [2], quantum simulation [3] or the
quantum algorithm for solving linear systems of equations [4] only become useful when implemented on
thousands of near-perfect qubits. As it is unlikely that physical error rates will be vanishingly small in the
near term, the addition of quantum error correction (QEC) and fault-tolerance is required. For practical
QEC, the critical metric is the fault-tolerance threshold. This is the physical error rate below which QEC
becomes effective and corrects more errors than it introduces (figure 1). Therefore the threshold value,
determined by the QEC scheme’s structure and subsequent fault-tolerant circuit and hardware
implementations [5], is the highest acceptable physical error per gate for each qubit.
The surface code, a well-performing and experimentally feasible code [6–9], exhibits a high threshold,
dependent on the assumed noise model. A noise model incorporates assumptions about error channels like
qubit loss and leakage, affecting the fault-tolerance threshold. Making assumptions about how error
syndromes are measured in the system, commonly referred to as code capacity noise model,
phenomenological noise model, and circuit-based noise model [10], can lead to significantly different
fault-tolerant threshold values. For the surface code, which involves extracting syndromes based on the
parity of four-body operators, different noise models consider different methods for measuring the parity of
these operators.
Figure 1. Hierarchy for scalability: The threshold is a fundamental component in practical quantum error correction (QEC),
serving as a critical benchmark to gauge QEC scheme efficacy in rectifying quantum system errors. Attaining a sufficiently high
threshold is essential for feasible QEC implementation; without it, practicality is compromised or rendered impossible. Crossing
the threshold marks the point at which QEC becomes effective, enabling Fault Tolerant Quantum Computation (FTQC). The
FTQC implementation is vital for realizing accurate and reliable quantum applications. Thus, a high threshold ensures not only
QEC feasibility but also unlocks the potential for FTQC.
The code capacity and phenomenological noise models rely on natural four-body measurements, while
the circuit-based model constructs four-body parity check measurements using one-body Pauli
measurements and standard quantum gates. This approach yields the lowest code threshold due to physical
error accumulation on standard quantum gates throughout the circuit. The circuit-based noise model is the
most experimentally precise analysis of the surface code, as most experimental qubit systems lack direct
access to four-body measurements.
In this study, rather than enhancing thresholds with current sources specifically designed for universal
computation, we redesign the universal gates to be inherently suited for QEC implementation. Focusing on
gates fundamental to QEC, as opposed to universal computation, enhances the threshold and simplifies
experimental scalability challenges. This modification is deemed necessary as any large-scale quantum
computer inherently functions as a QEC machine.
For error-correcting quantum computing, occasional use of traditionally universal gates suffices as
primitives. However, QEC necessitates defining a new gate set, achieved by modifying the existing universal
gate set. Then the challenge lies in how an experimental system can validate implementability of the new gate
set in the lab, ensuring its effective use to raise the QEC threshold.
In this work, we present a rigorous formalism for constructing and verifying a native gate set, which we
denote as the single-step parity check (SSPC) gate set, designed specifically for QEC circuits. We apply this
technique to the two-body parity check circuits necessary for implementing the Honeycomb code [11]. We
present the SSPC gates in the context of nuclear spin qubits in silicon [12], since they offer a native, direct
two-body measurements via a bound electron spin [13]. However, this formalism applies more broadly and
could be used for hardware systems that can naturally implement high dimensional parity check gate
primitives.
The organization of this paper is as follows: section 2.1 briefly reviews the concept of multi-qubit
measurements and introduce notations that are used for the later part of the paper. In section 2.2, the
Honeycomb code is explained. In section 3 the drawback of the circuit-based noise model is shown
numerically by analyzing the experimental data [13]. In section 4, we introduce the SSPC gate set and in
section 4.1, we theoretically compare two-body parity check circuits constructed both using the universal
gate set and the SSPC gate set in the presence of noise. In section 4.2, we provide an example system of silicon
spin qubits to implement the SSPC gate set. In section 5, we summarise the paper.
2. Preliminaries
2
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure 2. XX and XXXX parity check measurements using Mpp1 . (a) a two-body parity check circuit. The circuit outputs the parity
information of the two qubits in the X basis by sequentially applying CNOT gates between the ancilla and q1 and q2, followed by
measuring the ancilla -Mpp1 -. (b) a four-body parity check circuit. The circuit outputs the parity information of the four qubits in
the X basis by sequentially applying CNOT gates between the ancilla and four qubits, followed by measuring the ancilla -Mpp1 -.
Product and Mpp1 refers to measuring in one Pauli basis, for example measuring in the Z basis. This can be
generalized beyond a single qubit and becomes particularly useful in QEC. The idea of parity checks in QEC
is to have just parity information of multiple data qubits over one (ancilla) qubit without revealing any other
information. In other words, we are constructing Mppi , i = 2, 3, 4, . . . from Mpp1 . To construct Mppi from
Mpp1 for a valid quantum observable U, we apply the controlled-U gates between the ancilla qubit and the
data qubits sequentially. For example, for a parity check measurement in the X basis, the controlled-U gates
are simply CNOT gates.
While any unitary can be used for the parity check, we provide an example using well-known parity
check measurements in QEC. For instance, with an XX parity check measurement (XX = X ⊗ X), we use two
CNOT gates; for an XXXX parity check measurement (XXXX = X ⊗ X ⊗ X ⊗ X), we use four CNOT gates.
To measure the system over one (ancilla) qubit, we use Mpp1 4 . Let us look at figure 2(a) closer to understand
what a parity check does to a state.
In figure 2(a), we started with an initial state of the ancilla qubit which is |0i. The initial combined state
of the system is |0i ⊗ |ψin i in which |ψin i is a general state over |q1 i and |q2 i. Then, applying the Hadamard
gate transforms the initial combined state of the system, |0i ⊗ |ψin i, as follows:
Hadamard 1
|0i|ψin i −−−−−→ √ (|0i + |1i) |ψin i. (1)
2
After the Hadamard gate, once we apply the CNOT gates sequentially, we have the transformation of (1)
to (2):
1 CNOT’s 1
√ (|0i + |1i) |ψin i −−−−→ √ (|0i|ψin i + |1iXX|ψin i) . (2)
2 2
We apply the last Hadamard gate and have the transformation of (2) as follows:
1 Hadamard 1 1
√ (|0i|ψin i + |1iXX|ψin i) −−−−−→ |0i (|ψin i + XX|ψin i) + |1i (|ψin i − XX|ψin i) . (3)
2 2 2
The final step of the circuit is to measure the ancilla qubit. After this step, if:
|ψin i + XX|ψin i ∼
ancilla = |0i ⇒ = |ψout i
2 (4)
|ψin i − XX|ψin i ∼
ancilla = |1i ⇒ = |ψout i
2
where ∼= means up to a renormalization factor. The symmetries of |ψout i are
If:
( )
|ψin i + XX|ψin i
measured|0i ⇒ XX|ψout i = XX
2
XX|ψin i + |ψin i (5)
=
2
= |ψout i
4 Any valid quantum observable can be used for the parity check, determined by the operator on the target side of the controlled gate.
3
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
If:
( )
|ψin i − XX|ψin i
measured|1i ⇒ XX|ψout i = XX
2
XX|ψin i − |ψin i
=
( 2 ) . (6)
|ψin i − XX|ψin i
=−
2
= −|ψout i
Hence, dependent on the measurement result, we have projected our state into eigenstates of the XX operator
with eigenvalues +1 or −1, with the ancilla measurement result dictating which eigenstate we have projected
into. If the input was already in an eigenstate with eigenvalues +1 or −1, we will simply obtain a
measurement result on the ancilla that indicates the parity of the input state, without changing the state
itself. We therefore have the parity information of the multi qubit system by using CNOT gates and a
one-body measurement, (CNOT’s + Mpp1 ).
Multi-body measurements are used in different aspects of quantum information/computation. In QEC,
stabilizer measurements are the important examples of multi-body measurements, that occur over the
operators that define the stabilizers of the QEC code. However, for example, instead of making direct XX
parity check measurement, called Mpp2 , we perform this measurement by using CNOT’s + Mpp1 and single
qubit rotations. Here Mpp2 refers to the fact that the operator we are measuring, XX, is a Pauli operator with
weight two. In semiconductor spin qubits, single-triplet readout is also a multi-body measurement over 2
qubits. However, we are not using it to measure the parity of a multi-qubit Pauli operator, so we do not
classify it as Mpp2 .
Measuring a qubit is, in fact, a one-body parity measurement, allowing the unique definition of states.
However, when measuring multiple qubits, our goal is to constrain the global space into subspaces where the
symmetry of the measured operator is enforced. Consider the example in figure 2(a), where the input state is
chosen as:
where α,β,γ and δ are arbitrary complex amplitudes that define a unique state in this four dimensional
Hilbert space. If we restrict the space by enforcing a symmetry, i.e. by running the circuits in figure 2(a),
prior to measurement of the ancilla, the state of the three qubits before measurement, |ψbm i, bm is:
( ) ( )
1 1
|ψbm i = |0i (I + XX) |ψin i + |1i (I − XX) |ψin i . (8)
2 2
Here |0i and |1i are the states of the ancilla qubit. We know that by measuring the ancilla state will project
the state into an eigenstate of XX. If we assume that we measure the ancilla in |0i and project our state into
the +1 eigenstate of XX, we can write our output state |ψout i as
1 1
|ψout i = (α|00i + β|01i + γ|10i + δ|11i) + (α|11i + β|10i + γ|01i + δ|00i) . (9)
2 2
By grouping them
( ) ( )
|00i + |11i |01i + |10i
|ψout i = (α + δ) + (β + γ) (10)
2 2
(α + δ) (|00i + |11i)
√ = α ′ and √ ˆ
= |0i
2 2
. (11)
(β + γ) (|01i + |10i)
√ = β ′ and √ ˆ
= |1i
2 2
As a result, we have:
ˆ + β ′ |1i
|ψout i = α ′ |0i ˆ (12)
which is effectively a new qubit. Hence, by enforcing a symmetry on our original two-qubit system, we have
ˆ |1i},
reduced it to an effective one qubit system, where our new basis states, {|0i, ˆ are both +1 eigenstates of
4
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
XX. Making multi-body parity measurements enforces the symmetry of the system and reduces the number
of degrees of freedom. A two-body parity measurement over a two qubit system reduces the result into
effective one-qubit. This can be generalised to an N qubit system: for every symmetry we enforce, by
performing a measurement of an arbitrary operator, we reduce the effective number of qubits in the system
by one [5, 14].
with probability, p. This error map allows us to differentiate between two types of errors: quantum errors and
classical errors. The first set of brackets represents the quantum errors and it allows us to have one Pauli error
on one of the data qubits. The second set of brackets represents the classical error and it allows us to have one
classical bit flip error which is the bit flip error on the classical measurement result on the ancilla qubit. With
this map, the threshold of the Honeycomb code was found to be approximately 2%. This threshold is
commensurate with the phenomenological threshold for the surface code, but unlike the surface code, some
hardware systems may have the possibility of realising Mpp2 operations, while it is unlikely that a natural
Mpp4 measurement will be found in any current hardware systems.
Figure 3. Honeycomb code. (a) general structure of the Honeycomb code. Black dots represents physical qubits. Multiplying blue
and red edges yields the green face (6 body Y stabilizer). Multiplying blue and green edges yields the red face (6 body X stabilizer).
Multiplying red and green edges yields the blue face (6 body Z stabilizer). (b) Measurements for the Honeycomb Code.
Honeycomb code requires two body parity check: XX, YY and ZZ (c) Equivalent circuits for XX, YY, and ZZ parity measurement
using the traditional method: 1- and 2-qubit gates, plus Mpp1 .
5 This code was originally introduced by Kitaev in 2006 [17], but its use as a QEC code was demonstrated in [15].
5
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
This means that if we can have a natural two-body measurement that satisfies the error model of Gidney
and Fowler, we will have a three times higher threshold for the Honeycomb code while maintaining a 2D
nearest-neighbour hardware architecture. Furthermore, the latest study by Gidney [20], shows that if the
surface code is run by using natural two-body measurements, the threshold of the surface code will be
similarly increased.
The next question is: how can we asses whether a physical system allows a natural implementation of
natural Mpp2 operations? For this purpose, we outline a workflow to map an experimental process matrix to
a QEC-specific error model for checking if a real system’s error behavior matches the assumptions of a
threshold analysis. We develop and validate a native gate set tailored for QEC, focusing on higher
dimensional unitaries required for syndrome extraction circuits, termed the SSPC gate set. Applying this
technique to two-qubit parity check circuits for the Honeycomb code implementation, we illustrate the SSPC
gates in the context of spin qubit systems [12, 13].
3. Analyzing the XX parity check circuit from experimental data in the context of QEC
Assessments of hardware systems have primarily focused on single- and two-qubit gate fidelities, assuming
fidelity reflects operational perfection. However, fidelity is a numerical representation lacking information
on error type, and it does not correspond to gate error rates. In QEC, we analyze errors using stochastic Pauli
channels, focusing on error types and values for 1- and 2-qubit gates instead of relying on gate fidelities.
Furthermore, relying solely on the error values for these gates is insufficient to determine the total circuit
error rate and, consequently, the overall circuit perfection rate due to error propagation in the circuit.
Here we numerically demonstrate (to the best of our knowledge, for the first time) the loss in the circuit
by calculating the perfection rate at each step when utilizing one-body measurement (Mpp1 ) with 1- and
2-qubit gates, based on experimental data. The detailed explanation of the perfection rate calculation A.1,
including a comprehensive tutorial A.4, is available in the appendices. Our algorithm A.3 allows
experimentalists to directly map the gates used in their systems to thresholds derived for a broad-class of
QEC codes.
In this section, we use data from [13] to show how the output perfection rate decreases for XX parity
check circuit which is the smallest parity check measurement that we can use to implement a topological
error correcting code. This study showcases the universal quantum logic operations performed on a silicon
nanoelectronic device utilizing a pair of ion-implanted 31 P donor nuclei. This device, consisting of two
phosphorus nuclei and one electron spin system, is henceforth referred to as the ‘2P1e’ device. Researchers
precisely characterized the quantum operations by using gate set tomography (GST) [21, 22]. They achieved
one-qubit gates with average gate fidelities up to 99.95(2)%, two-qubit gates with an average gate fidelity of
99.37(11)% and two-qubit preparation/measurement fidelities of 98.95(4)%. These results indicate that
nuclear spins in silicon are close to the performance required by fault-tolerant quantum processors. Figure 4
shows the decrease of perfection rate for the XX parity check measurement which is constructed by the
circuit based model. Another important point is the identity gates. When we apply a single qubit gate on a
multi-qubit circuit, the qubits which have no applied gate should stay stable and this is represented by
identity gates. Identity gates are also as important as other single-qubit gates since they contribute to the
errors. As each step progresses in figure 4, errors accumulate. Initially, the system is in state ρi . Then, a
Hadamard gate is applied to the first qubit and an identity is applied to the other two, resulting in state ρ2
from ρi . The final density matrix for ρ2 is calculated, in terms it of having experienced certain errors in a
QEC block, resulting in a perfection rate of 0.96.
The next step, ρ3 , includes errors from not only CNOT and identity operations, but also from ρ2 . When
the process continues, the final perfection rate is found to be 0.82. The perfection rate between the
application of the first operation—in this case, the Hadamard gate on the ancilla qubit and the identities on
the |q1 i and |q2 i—and the measurement operation decreased by 14%, from 0.96 to 0.82. This striking
observation highlights how, even in a state-of-the-art experiment with average gate fidelities above 99%,
constructing a two-body parity check circuit out of universal logic gates results in a drastic reduction of the
perfection rate at the end of circuit.
With the goal of optimizing the perfection rate for an Mpp2 operation, we thus aim to design full unitaries
directly, instead of composing them from 1- and 2-qubit gates. We construct these new unitaries by
modifying the universal gate set. These unitaries are fundamental to QEC rather than universal computation.
By using these gates, we can increase the threshold and decrease the experimental challenge to the scalibility.
We call these gates as single step-parity check gate set. These gates are actually multi-body parity
measurement gates. This is described in section 4.
6
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure 4. Analysis of the XX parity check circuit in terms of QEC. The circuit depth is 6 (6 steps to calculate in the widget).
Commencing with ρi , each step the value of having no error in the channel (PI ) decrease since the errors accumulate to the next
step of the circuit.
Figure 5. Single-step parity check gate for XX. (a) Mpp2 with current resources. The gates inside the dashed rectangle represent the
1- and 2-qubit operations normally used to build the XX Mpp(2) . (b) A natural Mpp(2) . The noise model incorporates Pauli errors
from the set defined in equation (13). (c) Natural Mpp(2) as a widget: new unitary U XX and 1-qubit measurement operator.
Figure 6. Single-step parity check gate for ZZ. (a) Mpp2 with current resources. The gates inside the dashed rectangle represent the
2-qubit operations normally used to build the ZZ Mpp(2) . (b) A natural Mpp(2) . The noise model incorporates Pauli errors from
the set defined in equation (13). The error model for both XX and ZZ parity checks is the same. (c) Natural Mpp(2) as a widget:
new unitary UZZ and 1-qubit measurement operator.
Single-step parity check (SSPC) gates are a version of pulse optimization where we optimize for the full
unitary needed for QEC. In this case, we reduce the number of steps and instead of having six different steps,
we have single step for the same circuit. From figures 5(a) and 6(a), the unitaries are found to be
equations (14) and (15) and they belong to the Clifford group. Apart from the new unitary, we have a new
device which can be called a natural Mpp2 . It is a widget that includes one of those new unitaries, and a
measurement operator. It receives 3 qubits as input, using one of them as an ancilla, and returns the parity
information by measuring the ancilla qubit. In the next section, we compare the SSPC gate and the
decomposed parity check circuit theoretically in the presence of noise.
1 0 0 1 1 0 0 −1
0 1 1 0 0 1 −1 0
0 1 1 0 0 −1 1 0
1
1 0 0 1 −1 0 0 1
UXX = (14)
2 1 0 0 −1 1 0 0 1
0 1 −1 0 0 1 1 0
0 −1 1 0 0 1 1 0
−1 0 0 1 1 0 0 1
7
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0
UZZ =
0
. (15)
0 0 0 1 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 1
Figure 7. The circuits are modeled using a standard Pauli-based noise model, where errors are randomly chosen from possible
combinations of Pauli operators for all gates, representing phase flip errors applied with probability p. In this case, the probability
of having, for example, Pauli Z errors includes combinations such as Z ⊗ I ⊗ I,I ⊗ Z ⊗ I, and I ⊗ I ⊗ Z with an error rate of p,
Z ⊗ Z ⊗ I, I ⊗ Z ⊗ Z, and Z ⊗ I ⊗ Z with an error rate of p2 , and finally Z ⊗ Z ⊗ Z with an error rate of p3 for HII. (a) A
traditional, decomposed, XX parity check circuit. This circuit comprises four building blocks: HII, CNOTI, CNOT02 , and again
HII, constructed from H, I, and CNOT gates. (b) Defines a direct XX parity check gate with the XX-SSPC gate. We create each of
building block with ≈ 99% fidelity.
4.1. Comparison of decomposed XX parity check circuit and XX-SSPC circuit in the presence of noise
In this section, we will show how the perfection rate differs in the presence of noise between decomposed
parity check circuit and SSPC circuit. For this purpose, we take the circuits defined in figure 7. In figure 7(a),
the circuit has four building blocks constructed from Hadamard, Identity, and CNOT gates: HII = H ⊗ I ⊗ I,
CNOTI = CNOT ⊗ I, CNOT 02 (CNOT gate between the ancilla and the second data qubit), and
HII = H ⊗ I ⊗ I. In figure 7(b) the circuit contains only one building block, the UXX gate. Each noisy
operator can be modeled by perfect operator plus some errors to be mapped in the circuit. We simulated
process matrices such that each gate is modeled by a noisy channel with a 0.00 375 phase flip error rate. Then
we calculate the average gate fidelity from these noisy channels and we find that each building block in the
circuit will have ≈ 99% fidelity. Note that if we change the error type, the amount of error required to
maintain the same fidelity will also change. The reason for selecting this error type is because phase flip
errors are the predominant sources of error for most solid-state hardware systems, especially in
semiconductor spin qubits such as the one described in [13]. Overall, we have on one side four building
block with 99% fidelity, and on the other we have one building block with 99% fidelity. We apply our
workflow A.1 to find the perfection rate of each circuit defined in figure 7.
As it is seen from the result, since the traditional, decomposed, parity check circuit requires four steps
(four building blocks), the errors in each step accumulate. However, with a SSPC gate, there is no more than
one building block so there is no place for errors to accumulate. For this reason, the perfection rate remains
high. As a further illustration, in figure 8 we show a simulation where each single qubit gate (Hadamard and
Identity gates) has 99.43% fidelity, and the CNOT gate experiences the single qubit errors as a tensor product
of the amount (I ⊗ X,I ⊗ Y . . .). We chose this fidelity value because it is the surface code fault-tolerance
threshold [6]. To achieve this fidelity, we used an error rate of p = 0.0085 for the phase flip error in each
single-qubit gate. As depicted in figure 8, the resulting perfection rate at the circuit’s end is 0.887. This
perfection rate is obtained by utilizing gates with the specified fault tolerance error value.
8
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure 8. This example demonstrates increasing the error threshold by reducing circuit gates. Unlike the example in figure 7
example, here we create two circuits with different error rates to achieve approximately the same perfection rate. (a) A traditional
XX parity check circuit with Hadamard and identity gates as single-qubit gates, and CNOT gates as two-qubit gates. The circuit is
modeled using a standard Pauli based noise model where errors are randomly chosen over X, Y and Z for single qubit gates
(including idling gates, initialisation and measurement) and over the 15 possible combination of two-qubit Pauli operators for all
two qubit gates, applied with a probability. Each single-qubit gate is created with p = 0.0085 (corresponding to 99.43% fidelity).
Errors calculated in stochastic Pauli channels yield a total perfection rate of PI = 0.887 at the circuit’s end. (b) Using a direct XX
parity check gate with an XX-SSPC gate, we can tolerate a much larger phase-flip error rate per qubit, p = 0.0239 to achieve a
similar perfection rate as in (a). Hence, the noise model takes Pauli errors from the set defined in equation (13).
To attain an equivalent perfection rate for the XX-SSPC gate, comparable to the decomposed parity
check circuit, we can increase the error rate to p = 0.0239 for the phase flip error per qubit. Implementing an
XX gate with this error rate yields a perfection rate PI = 0.886, as illustrated in figure 8(b). As a result once
the parity check circuit is created with SSPC gate at higher error rates than the 1- and 2-qubit gates, the same
perfection rate can be maintained. This simple example shows how SSPC gates can drastically boost the error
threshold value for QEC.
where ⃗S = [Sˆx , Sˆy , Sˆz ] are the electron spin operators with eigenvectors {| ↑i, | ↓i}, ⃗Ii = [Iˆx , Iˆy , Iˆz ] are the
nuclear spin operators for nucleus i ∈ 1, 2 with eigenvectors {| ⇑i i, | ⇓i i}, A1 and A2 are the electron-nuclear
hyperfine interactions, γ e is the electron gyromagnetic ratio, γ n is the nuclear gyromagnetic ratio, and B0 is a
static magnetic field oriented along the ẑ-axis. This Hamiltonian is commonly found in well-studied spin
qubit systems such as the nitrogen-vacancy (NV) center in diamond [23], spins in quantum dots [24] and
donors in silicon [12]. A Hamiltonian with this structure can be viewed as implementing the smallest
possible parity check circuit for the Honeycomb Code, as shown in figure 9.
We take the specific example of a recent experiment where two 31 P nuclear spins were hyperfine-coupled
to a common electron (2P1e) and entangled using a geometric CZ gate obtained through a rotation of the
electron conditional on the state of the nuclei [13]. The gate fidelities extracted from GST were used in the
preceding section to illustrate how gate errors build through a circuit. The numerical parameters of the
Hamiltonian are γe = −27.97 GHz/T, γn = 17.23 MHz/T, B0 = 1.33 T, A1 = 95 MHz and A2 = 9 MHz. The
9
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure 9. (a) The left side of the image is an artist’s representation of the 2P1e device [13], while the right side corresponds to the
smallest honeycomb code cell. The two black dots in the honeycomb code represent the two phosphorus nuclear spins that are
physical qubits in the 2P1e device, shown in pink. The ancilla qubit is an electron spin (blue ‘cloud’) hyperfine-coupled to both
nuclei. With the 2P1e system, we are able to demonstrate the smallest parity check circuit, which is the smallest component of the
Honeycomb code cell. (b) NMR and ESR transitions in the eight-dimensional Hilbert space of the two-phosphorus system when
loaded with an electron. The pink and light blue lines represent the NMR frequencies, while the remaining lines represent the ESR
frequencies. Adapted from [13], with permission from Springer Nature.
large separation of energies in the system, whereby the electron Zeeman energy splitting γe B0 ≈ 37.2 GHz is
orders of magnitude larger than both the nuclear Zeeman energies γn B0 ≈ 22.8 MHz and the hyperfine
interactions, ensures that the eigenstates of the Hamiltonian are almost exactly the tensor products
{| ↑i, | ↓i} ⊗ {| ⇑1 i, | ⇓1 i} ⊗ {| ⇑2 i, | ⇓2 i}, as shown in figure 9(b).
To implement the ZZ-SSPC gate we add the control Hamiltonian:
( )
Hrf (t) = −γe B⃗1⃗S cos (ωt) − γn B⃗1 I⃗1 + I⃗2 cos (ωt) (17)
where B1 is an the oscillating magnetic field strength oriented along ŷ. A ZZ-SSPC gate is obtained trivially
by applying a bichromatic pulse of B1 at the frequencies ω⇑⇓ and ω⇓⇑ corresponding to the resonance
frequencies of the electron spin when the nuclei are in the odd-parity states | ⇑⇓i, | ⇓⇑i. This is depicted with
the yellow and green lines in figure 9(b). Calibrating the amplitude and duration of the pulse such that the
electron undergoes an exact π-rotation implements the CNOT gates depicted in figure 6(c)(a). The two
frequencies can be applied simultaneously because they both act on the same physical object (the electron).
The SSPC gate is then followed by electron readout [25].
The XX-SSPC gate, shown in figure 5(c)(a), involves operations on both the electron and the nuclei,
which require different time scales due to the vastly different gyromagnetic ratios. It is no longer immediately
obvious that the whole operation can be executed in a single step. In order to verify whether an XX-SSPC
gate exists, we adopt a widespread quantum control optimization algorithm known as gradient ascent pulse
engineering (GRAPE) [26], which can be found within QuTip [27]. One of the reasons we chose to use
GRAPE is because it enables us to account for real-life experimental limitations such as the maximum and
minimum control amplitudes. Another reason is that the GRAPE algorithm was originally designed for
NMR pulses [26, 28] and finds practical application in many experimental studies [29]. Notably, the results
of the first experiment in QEC in 1998 [30] were greatly improved through the utilization of the GRAPE
algorithm in 2011 [31]. The GRAPE algorithm in QuTip, is wrapped by the L-BFGS-B [32] optimization
algorithm which takes into account second order derivatives and chooses the step size which is the change of
position in the control landscape by itself. This helps the algorithm to use a smaller number of iterations. We
utilized this algorithm in two distinct ways, namely modulated GRAPE and non-modulated GRAPE. The
non-modulated GRAPE does not use the modulated control Hamiltonian, but it does use a control
Hamiltonian with proper frequencies for both the electron and nucleus and control fields applied in two
different directions (x and y). The modulated GRAPE, however, allows us to use a modulated control
Hamiltonian, and we refer to this version of the algorithm as modulated GRAPE.
10
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure 10. The first 100 ns of the optimised control pulses for the XX gate. The control amplitude represents the B1 magnetic field
applied to the spins.
For the modulated GRAPE method, we took into account the cos(ωt) term and we modulated the
control Hamiltonian with cos(ωt) for each time slot with a proper angular frequency. As a first step, we set
the maximum control amplitude (the B1 magnetic field in our case) in the range of millitesla and we ran the
algorithm for 1, 10, 100, 1000 µs evolution time for the XX gate. The number of time slots is one of the most
important parameters of the algorithm. We need to provide a fine enough resolution to observe the
oscillation of the pulse. Since we are in the laboratory frame, the time interval is determined by the highest
frequency in the system, which in this case is the electron Larmor frequency. In a 1.33 T magnetic field, the
electron precesses at 27.97 GHz, corresponding to a period of 35 ps. When the number of sampling per
oscillation is taken into account, for each evolution time, the minimum time resolution is maintained at 10
picoseconds by allocating the appropriate number of time slots. To execute the algorithm with such a small
time resolution, we utilized a high-performance computing cluster. As a result, we could have perfect gate
fidelity for an evolution time of order 10 µs.
We then attempted to find a shorter gate evolution time, by increasing the control amplitude (still within
experimentally feasible values). We set the evolution time to 4 µs for the XX gate. We set upper and lower
bounds to 40 mT for the control field and we used 400 000 time slots which correspond to every 10 ps for a
pulse. We run the algorithm for every frequency in the system and the algorithm was able to find XX parity
check gates with a single pulse with an accuracy of 0.99996 The first 100 ns of the control amplitudes are
shown in figure 10.
To verify that the pulse found by GRAPE was physically meaningful, we then calculated its fast Fourier
transform (FFT), shown in figure 10. Since the XX gate is an entangling gate formed through a combination
of operations on both nuclei and electrons, we expect the spectrum of the pulse to consists of control signals
at the natural resonance frequencies of the electron (ESR) and the nuclei (NMR). Indeed, the FFT in
figure 11 reveals all the expected frequencies: electron spin resonance (orange marker in figure 11,
corresponding to the orange line in figure 9(b), and nuclear magnetic resonances (blue for nucleus 1, pink
for nucleus 2). Interestingly, GRAPE also uses a stimulus at frequency A1 + A2 + γn B0 which does not
correspond to any natural resonance of the system (purple marker in figure 11)
We then tried to find a pulse for even shorter evolution times. The shortest evolution time that we could
find a pulse for is 2 µs with a 0.98 fidelity with a modulated control Hamiltonian in the x direction. Note
that, when we decreased the total evolution time from 4 µs to 2 µs, we also decreased the time resolution
from 400 000 points to 200 000 points so that the time resolution stayed the same. Overall, GRAPE was
consistently able to find one single pulse that can implement the gate without decomposing it into one- and
two-qubit gates, and which does not require exceedingly long gate times while taking into account the
experimental limitations on the maximum control amplitude.
To understand whether there are any advantages or disadvantages in terms of experimental feasibility of
using the XX gate over the decomposed parity check circuit, we took a further step and attempted to
6 This is the theoretical fidelity and this demonstrates the feasibility of implementing this gate under the given conditions.
11
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure 11. Fourier Transform of the GRAPE Pulse that implements the XX-SSPC gate. The peaks in the spectrum correspond to
the natural resonance frequencies of the electron and the nuclei. The colors of the stars represent the transitions, which are drawn
with the same color as in figure 9.
Figure 12. (a) Clock dynamics of the simplified Ising drift Hamiltonian in the laboratory frame. Every term in the time evolution
operator of the drift Hamiltonian can be associated with a gate with a specific ‘clock’. The colors of the clocks differentiate the
times for completion of each gates. Gate1 is a single qubit gate on the electron, with clock speed is γe B0 . Gate2 and Gate3 are the
single qubit gates on the nuclei, with clock speed γn B0 . The hyperfine interactions in the drift Hamiltonian, A1 and A2 , are used to
generate the entangling operations Gate4 (between electron and nucleus (1) and Gate5 (between electron and nucleus (2). (b)
Circuit diagram of the gates depicted in panel (a). Note that these are just the gate arising from the drift Hamiltonian.
implement the decomposed parity check circuit, as defined in figure 5(a), by individually implementing each
one- and two-qubit gate using GRAPE. Surprisingly, while we were able to implement the Hadamard gates
within a proper gate evolution time of 0.5 µs, the implementation of CNOT gates with high fidelity required
a much longer time, around 100 µs. As a result, the total timing for the decomposed parity check circuit fell
in the ∼ 100 microsecond range. This analysis shows that the system under study—two nuclear spins
hyperfine-coupled to an electron—is naturally suited to implement a SSPC gate, thanks to the fact that each
qubit has a separate resonance frequency, and that the ancilla (the electron) has resonances that each
constitute a natural rotation conditional on the state of the two nuclei.
In the next part of this work, we analytically study a modified drift Hamiltonian to gain an
understanding of the appropriate timescale for the SSPC gate and the decomposed parity check circuit. In
pursuit of this goal, we performed a thorough investigation of the clock dynamics associated with the drift
Hamiltonian in the laboratory frame (figure 12). To afford an analytical solution, we approximate the drift
Hamiltonian as an Ising type modification to equation (16). While the result of GRAPE explicitly examines
12
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
the active pulsing required to realize the unitary for the SSPC gate without loss of generality, here we
analytically examine the passive drift Hamiltonian for the Ising Hamiltonian in equation (18) (figure 12(a)).
Each of the exponential terms in equation (19), which are the free evolution times of the drift Hamiltonian,
will generate a gate and every gate will have its own clock (figure 12(a)). These clocks correspond to the time
taken for the desired gates. Gate1 , Gate2 , Gate3 , Gate4 and Gate5 are the natural gates which can be obtained
from the evolution of the drift Hamiltonian (figure 12(b)). However, if we want to create specific gates, such
as a CZ gate between an electron and the first nucleus using the hyperfine interaction denoted as A1 , in other
words, if we want Gate4 to function as a CZ gate, then we need to have the control Hamiltonian and pulse the
system. In this part of the study, our focus is on understanding the approximate timescale for the SSPC gate
and the decomposed parity check circuit that were derived by using GRAPE. When considering the control
Hamiltonian, the time required for the SSPC gate and the decomposed parity check circuit will change.
However, the relative timescales between the SSPC gate and the decomposed parity check circuit will be
comparable for analytical analysis and the numerical analysis. Since we are not using the control
Hamiltonian, we do not refer to the gates as CZ gate or ZZ gate. Instead, we refer to them as CZ-like gate and
ZZ-like gate. If we want to implement a decomposed ZZ parity check circuit as shown in figure 6(a), we need
to implement CZ-like dynamics, since the ZZ parity check circuit can be implemented either by using the CZ
gate with Hadamard gates or directly with two CNOT gates. However, if we want to implement an entangling
gate between the electron and the first nucleus, we need to use the hyperfine coupling A1 . But, the hyperfine
coupling A2 is also present and always on. Therefore, we need to find a time that allows us to perform an
entangling gate (Gate4 ) between the electron and the first nucleus and the identity (Gate5 ) between the
electron and the second nucleus, so that the second hyperfine interaction does not disturb the system. To
find such a time, we need to consider the clock dynamics of the drift Hamiltonian. The first entangling gate
will be between the electron and the first nucleus. A π rotation around the Bloch sphere will be a CZ rotation
since eiπ = −1. The time for Gate4 to function as a CZ-like gate will be π/95MHz ≈ 33.06ns. For Gate5 to be
the identity operation, it should induce a 2π rotation, which takes 2π/9MHz ≈ 698.13ns. However, there
will be some error associated with timing, denoted as t error , as achieving the exact duration is not always
possible. To find the appropriate time for both gates, we need to solve:
2
((a × tGate4 ) − (b × tGate5 )) <= terror
2
, a > 0, b > 0,
(20)
where a is an odd integer and b is an integer
Here, the timing error, t error is chosen as 0.01, and consequently, probability of experiencing a Pauli error is
2
equal to the terror is 0.0001. In this situation, the evolution of Gate4 should at least make a = 6981 π rotations
while the evolution of Gate5 should at least make b = 331 2π rotations so that we can have a perfect CZ-like
gate. The total time for a perfect CZ-like gate between the electron and the first nuclei is
33.1 ∗ 6981 = 231.07 µs
Now, if we want to make a perfect CZ-like gate between the electron and the second nucleus, one π
rotation for Gate5 to function as a CZ-like is equal to π/9 MHz ≈ 349.06ns and the time for one 2π rotation
for Gate4 to function as identity is equal to ≈ 66.13 ns. If we solve:
2
((a × tGate5 ) − (b × tGate4 )) <= terror
2
, a > 0, b > 0,
(21)
where a is an odd integer and b is an integer
the fastest possible time will occur when we take a single π rotation time for Gate5 as 349.06 ns and single 2π
rotation time for Gate4 as 66.13 ns. In this case, a = 887 is the number of π rotations for the evolution of
Gate5 . Correspondingly, the total time for a clear CZ-like gate for the electron and the second nucleus is
equal to 349.06 × 887 = 309.06 µs. As a result, if we want to implement the circuit which is defined in
figure 6(a), the simplified Hamiltonian can naturally achieve that in a range of hundreds µs. In the second
part of this analytical calculation, we will analyze the drift Hamiltonian for the ZZ-like gate. For
13
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
implementing such a gate, both the Gate4 and the Gate5 should function as CZ gates so they should make a π
rotation. For Gate4 to function as CZ-like, the time for one single π rotation is π/95 MHz = 33.06ns and for
Gate5 , the time for one single π rotation is π/9 MHz = 349.06 ns. To see if our drift Hamiltonian can have a
suitable time for such a gate, we need to solve equation (22).
2
((a × tGate4 ) − (b × tGate5 )) <= terror
2
, a > 0, b > 0,
(22)
where both a and b are an odd integer.
This yields a = 1805 and b = 171 and total time for the desired unitary of ≈ 60 µs. As a result, implementing
two separated CZ-like dynamics requires ≈ 540.13 µs in total whereas implementing a ZZ-like dynamics
requires ≈ 60 µs which is 9 times faster than implementing a traditional parity check circuit. This
explanation clarifies why the GRAPE algorithm discovered the SSPC gate approximately 10 times faster than
the decomposed parity check circuit. This is because the SSPC gate does not suffer from imbalanced
hyperfine interaction, whereas the isolated entangling gate does. The codes concerning this section,
encompassing both the XX gate and the decomposed parity check gate, can be found in [33–35].
5. Conclusions
In this theory work, we developed a workflow which calculates the perfection rate of the whole parity check
with given experimental data. We numerically showed how errors are accumulating and causing a decrease of
the perfection rate of the parity check circuit with current sources (with single and two qubit gate and Mpp1 )
from the experimental GST matrices. Our findings indicate that relying solely on the fidelity of 1- and
2-qubit gate operations is inadequate in assessing the effectiveness of constructing the fundamental elements
of QEC, specifically the parity check circuits. Then, we introduced new SSPC unitaries which allow us to
make parity check measurements in one step. We modified the universal gate set such that the new unitaries
are the most natural gate set for QEC. We compared the traditional parity check gate (1- and 2-qubits gates)
and the SSPC gate for an XX parity check scenario in the presence of noise.
We provided an experimentally realizable example based on spin qubits in silicon, and used the GRAPE
algorithm to find a single pulse capable of implementing the SSPC gate within experimental limitations.
Furthermore, we implemented the decomposed parity check circuit using GRAPE. We found that the SSPC
gate is naturally suited for this system, and outperforms a decomposed gate.
Many have asked what the ‘killer-app’ is for a large-scale, error-corrected quantum computer, this is
error-correction. The vast majority of the computation occurring in a large-scale machine is dedicated to
correcting its own errors. As such, fundamental gate sets used at the physical level should be targeted at this
application. We have introduced a complete workflow that allows experimentalists to characterise more
complex gate sets and connect outputs of characterisation experiments to commonly used models used in
QEC analysis. This allows quantum hardware engineers to potentially redesign and test fundamental gate
libraries, increase performance, and accelerate the realisation of fault-tolerant, error-corrected quantum
computers
The data that support the findings of this study are openly available at the following URL/DOI: https://
zenodo.org/doi/10.5281/zenodo.10795552.
Acknowledgment
The work was funded by the Australian Research Council (CE170100012). G Ü acknowledges support from
the Sydney Quantum Academy. This research was undertaken with the assistance of resources and services
from the National Computational Infrastructure (NCI), which is supported by the Australian Government.
SJD was supported with funding from the Defense Advanced Research Projects Agency [under the Quantum
Benchmarking (QB) Program Under Award Nos. HR00112230007 and HR001121S0026 contracts]. The
views, opinions and/or findings expressed are those of the authors and should not be interpreted as
representing the official views or policies of the Department of Defense or the U.S. Government. We thank S
Asaad, M Ma˛dzik and R Savytskyy for sharing GST experimental results and useful discussions. We thank B
C Sanders for discussions on quantum control and optimal pulse methods, and A Pitchford for support on
the GRAPE algorithm.
14
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
The current standard method for constructing multi-body measurements involves applying controlled-gates,
like the CNOT (CX) gate for X parity measurement, between data qubits and ancilla qubits, followed by a
one-body measurement on the ancilla qubit. The ancilla is crucial in this process, as without it, the
measurement result will not provide us with the parity information. While this works in theory, it is
expensive in the lab since each layer of gates added results in a decrease in the total perfection of the quantum
circuit. Moreover, we may be able to do better as natural two qubits measurements are possible in some
systems. Here, we provide details on how to derive the total perfection rate of the circuit using stochastic
Pauli channels. This calculation assumes that we apply each of the operators just before making the
measurement and model every imperfect gate as perfect gates plus some error.
A.1. Preliminaries
(i) Superoperators represent a linear map between initial and final density matrices of the system. They are
the mathematical representations which bring one density matrix to another. The unitary evolution of
a density matrix is defined by equation (A.1) where U is the unitary matrix and its dimension is
2n × 2n , n is the number of qubits, ρi is the initial state of the system and ρf is the final state of the
system after this unitary is applied.
Dimensions of the Superoperators are equal to 22n × 22n where n is the number of qubits and |·ii
represents vectorization.
(ii) Equation (A.1) is the special case where we have applied the unitary U in the absence of environmental
noise. However, in the presence of imperfect gates or environmental noise, equation (A.1) will not be
enough to represent the imperfections. In this case, we will need a more general mapping to represent
our system. Kraus operators are the most general representation of our system in the presence of noise
and they represent both the systematic gate errors and the errors induced by environmental
decoherence [14]. Then, the density matrix can be written as
∑
N
ρf = E (ρi ) = Ak ρi A†k , (A.3)
k =1
with
∑
N
A†k Ak = 1, (A.4)
k=1
where N ⩽ 22n and {Ak } are the set of Kraus operators which replace the unitary in equation (A.1). The
Kraus operators, {Ak }, are not necessarily unitary operators, hermitian operators or invertible. If
N = 1, this means that we have the ideal case and this brings us back to the equation (A.1) where Ak is
U. Equation (A.4) is called the completeness condition if the map is trace-positive, TP. Note that since
the quantum channels considered here map the system to itself, we only consider Kraus operators to be
square matrices.
(iii) χ—Process matrix
When we write Kraus operators in the Pauli basis, in other words, Ak is extended in terms of Pauli
∑ d2
operators, then we will have Ak = j =1 ajk Pj where Pj ∈ P⊗n and P = {I, X, Y, Z}. If we write that in
equation (A.3), then we will have:
2
∑
d
ρf = E (ρi ) = χjk Pj ρi Pk (A.5)
j =1
15
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
∑
where χjk = i aij a∗ik . The χ matrix is a complex-valued matrix with dimension 22n × 22n and is a
complete map of ρf . The χ matrix is also the output of process tomography [21].
(iv) The Pauli transfer matrix (PTM), which is shown as R in literature [21, 36–38], is another useful
representation of a quantum channel and an outcome of GST [21, 22]. It is defined by the vectorization
of a quantum channel in the Pauli basis and it can be written as:
1 { ( )}
(Rε )ij = Tr Pi E Pj . (A.6)
d
Here, Pj ’s represents ordering in the strings of Pauli operators, i.e {I, X, Y, Z}. The PTM, R, is the special
case of Superoperators where the vectorization is made in the Pauli basis. One notable advantage of
using the PTM, R, is its exclusive utilization of real elements. Furthermore, R facilitates the
straightforward determination of whether a quantum operation is trace-preserving or unital. It is also
noteworthy that for any Clifford operation, each row and column of R with unit magnitude contains a
single non-zero element. The PTM makes it easy to evaluate the result of multiple gates acting in
succession. The process matrix does not have this property. This is why the output matrices of GST are
PTM [22].
(v) The Density matrix in the context of QEC:
We shall commence the construction of the density matrix for a single qubit. For the density matrix of
multi-qubit systems, we refer the reader to the appendices A.5 and A.6). In this case, the dimensions of
Kraus operators will be 2 × 2. Once we found the Kraus operators, they can be written in terms of Pauli
matrices as in equation (A.7), since every complex 2 × 2 matrix can be written by Pauli Matrices7 .
Ak = C0 I + C1 X + C2 Y + C3 Z. (A.7)
If the Kraus operators are in equation (A.3) are decomposed as in equation (A.7), then we have:
∑∑
ρf = aρi b† (A.8)
a∈M b∈M
Here ρ represents a qubit, while X and Y represent the physical error on the qubits in the code block.
An ancilla block, represented by the density matrix ρE0 is coupled to the system and the QEC unitary
which is called UQEC is run:
( )
UQEC ρf ⊗ ρE0 U†QEC = pi ρ ⊗ |EihE| + px XρX ⊗ |Ex ihEx |
(A.10)
+ pxy XρY ⊗ |Ex ihEy |
Here, |Ei, |Ex i and |Ey i represent the three orthogonal syndrome states of the ancilla qubit and they are
used the detect errors on the qubits. Now, when the ancilla qubit is measured, the system will be
collapsed to one of the two states in equation (A.11)
The off-diagonal term, in this case the pxy XρY term in the error model, is never observed. After the
measurement of the ancilla, we have two possible states which are shown in equation (A.12)
where pi + px = 1. The off-diagonal term is eliminated because we are about to make a measurement in
the E, Ex basis and the measurement result will collapse one of the diagonal terms. Although it was
7 Also every 2n × 2n matrix can be written as a linear combination of the tensor products of n Pauli matrices. The total number of
independent tensor products of Pauli matrices is 22n .
16
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
written in [14], it is once more worth noting that not only the off-diagonal term is eliminated but the
final density matrix is collapsed to clean codeword states with bit-flip errors. Here, we do not use the
twirling method which is a way to convert the off-diagonal terms of the matrix into the diagonal terms
[39, 40]. In quantum computation, there are some protocols that use twirling, such as purification
protocols [41–43]. However, when we write errors in terms of stochastic Pauli channels, we let unitaries
evolve until the measurement is done. This is why, when we calculate the effective errors in the context
of QEC, we only care about diagonal elements and we ignore off-diagonal elements. Hence, we are
finding the diagonal elements of the χ matrix and we are writing the Kraus operators in terms of these
diagonal elements of the χ matrix. It is true that we are loosing the information by ignoring the
off-diagonal terms. In equation (A.8), once cancelling the off-diagonal elements, we have,
where pi = (|C0 |)2 , px = (|C1 |)2 , py = (|C2 |)2 , pz = (|C3 |)2 . This formula represents effective errors in
the context of QEC for 1 qubit. As an illustration, in the case of implementing the identity gate, the
coefficient pi serves as an indicator of the gate’s efficacy. A value of pi = 1 signifies the perfect
implementation of the identity gate. The equation (A.13), can be written for any state and in QEC, the
errors in the quantum channel are analyzed after the application of the desired unitary. Because of that,
to utilize the equation (A.13) in a more general way, the ρi is replaced with ρg where ρg = Uρi U† and
the U is the desired unitary that we want to implement. Then, the equation (A.13), becomes
equation (A.14):
In equation (A.14), the pi represents the probability of having no error. We define it as the perfection
rate. If pi = 1, we are in the ideal case with no error and we turn back to equation (A.1). For all the
other values of pi , we use the Kraus decomposition. The coefficients px , py and pz are, now, the
probability of having X errors, the probability of having Y errors and the probability of having Z errors,
respectively. We start with the experimental data, in our case the experimental data is the PTM matrix,
and we end up with equation (A.14). This result is the important conclusion of the section. If we want
to determine error rates subsequent to the implementation of a unitary operation within the
framework of QEC, every operation performed in the laboratory will be denoted as equation (A.14).
This equation represents a whole process and the coefficient pi in the equation represents the perfection
of the operation that cannot be written simply as the fidelity. For example, if we have 99% fidelity for a
specific operation, this does not mean that the coefficient pi = 0.99. To find the coefficient pi , we need
to do the whole workflow: we first take the experimental process matrices of the system and find the
Kraus operators. Subsequently, we then write the Kraus operators in terms of stochastic Pauli channels
and determine the value of coefficient pi , which is the perfection rate and it is not equal to fidelity. It is
less than the fidelity. Neither the fidelity means the perfection rate, nor the infidelity means the error
rate. To finding the error rate, we need information beyond the fidelity [44] A.4. We give a complete
tutorial below A.4 regarding this process. If we take figure A1 as an example and calculate the
probability of experiencing certain errors when gates are applied to qubits, the equation which
represents the perfection of the operator will be equation (A.15). The detailed derivation of
equation (A.15) is shown in appendix A.2.
The value PI is the perfection rate for the whole circuit and it represents the final succession rate after
all of the accumulated errors in the widget. The important point is, that PI is not just the multiplication
of perfection rates pi . The cancellation terms also contribute to PI since X ⊗ X = I, Y ⊗ Y = I and
Z ⊗ Z = I. We will call PI as the perfection rate of the widget.
17
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure A1. A one qubit circuit example which will be used to calculate effective errors in the context of QEC. At the beginning, the
circuit will have ρi . After applying a U 1 gate,the density matrix will become ρ2 . The final density matrix will be ρ3 , which can be
written as ρf, after applying U3 .
ρ2 = pi1 IU1 ρi U†1 I + px1 XU1 ρi U†1 X + py1 YU1 ρi U†1 Y + pz1 ZU1 ρi U†1 Z (A.16)
where pi1 is the perfection rate of U 1 gate. px1 , py1 , and pz1 respectively represent the probabilities of having
X, Y, and Z errors in the channel after applying the unitary U 1 . The system now in ρ2 . Then we apply U 2
gates and the system becomes ρ3 .
ρ3 = pi2 IU2 ρ2 U†2 I + px2 XU2 ρ2 U†2 X + py2 YU2 ρ2 U†2 Y + pz2 ZU2 ρ2 U†2 Z (A.17)
where pi2 is the perfection of U 2 gate which. px2 ,py2 and pz2 respectively represent the probabilities of having
X, Y, and Z errors in the channel after applying the unitary U 2 . If we put equation (A.16) in equation (A.17),
then we will have:
Now, the coefficients are inside the dashed lines gives us to total perfection of the circuit after applying
operations. As a result we get equation (A.19):
where PI is the perfection rate of the widget after applying all the unitaries in the quantum circuit. For the
accumulated errors, for instance the accumulated x errors, we will have the equation (A.20):
If we had only one step, we would have ρ2 exclusively. In that case, PI would be equal to pi1 , and the X error
would be represented by px = px1 . However, as the circuit depth increases, the occurrences of X, Y, and Z
errors also increase, leading to a decrease in the fidelity PI . In equation (A.19), it is important to note that
PI < pi1 since errors accumulate within the circuit. Below, we will explain our algorithms for finding the
perfection rate:
18
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
The initial stage of the algorithm involves specifying the type of the matrices. In case of GST, the suitable
format is the PTM (A.6) and from the GST experiment, π/2 and CNOT gate matrices are constructed and
analysed. The important thing here is to correctly classify the matrix type. This can be achieved through the
use of libraries such as Qiskit [45] and Qutip [46]. If we do not explicitly specify the matrix type in our code
and attempt to analyze the matrix, for example, to check its physicality (that is CPTP: completely positive
and trace preserving) using some libraries, directly from the array, we will receive a False output because we
did not specify the matrix type. In addition, if we misidentify the matrix type, for example, when the matrix
type is a PTM but we mistakenly identify it as a χ matrix in our code, even though the χ matrix is CPTP, we
may receive incorrect results when checking the physicality of the matrix due to the incorrect matrix type
specification.
In the first phase of the algorithm, we first check if the matrix is completely positive (CP). If it is not a CP
matrix, this means that the experimental method used gives a different result than the PTM. In this case, it is
recommended to check the output of the experimental method used in the lab, as it may yield different types
of output, such as χ matrix. After specifying the type of the matrix correctly, the second step in Phase 1 is to
find the Kraus operators. Then we check if we can find the Kraus operators correctly by using the
completeness condition equation (A.4) and see if this gives us the identity matrix. If the completeness
condition gives us the identity matrix, then we satisfy the trace-preserving condition for the quantum
channel. After finding the Kraus operators, the second step is to calculate errors in the context of QEC.
For finding errors, we write each Kraus operator in terms of Pauli matrices as shown in Phase 2 and then
the density matrix was written in terms of effective errors in the context of QEC as in equation (A.40).
In the third phase of the algorithm, since we have 3 qubits (2 data qubits and 1 ancilla qubit), all triplet
combinations of Pauli matrices should be considered as possible error probabilities and we take into account
all the diagonal terms. In this case, we have 64 different coefficients for the density matrix. The perfection
value is calculated in equation (A.41) in terms of accumulating errors. Here, each density matrix includes the
previous density matrix which has 64 coefficients. Since we have 6 steps in the XX parity check circuit, then
at 6th step, we will have 646 coefficients and from those 646 , once we extracted the coefficient for the
dominated term, equation (A.41) was found. Last phase of the algorithm shows how to calculate the
perfection rate for XX parity check circuit.The complete code for replicating the results presented in figure 4,
as well as the software for analyzing errors within the context of QEC, can be found in [35, 47].
19
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
20
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure A2. One qubit circuit example √ which will be used to calculate effective errors in the context of QEC. At the beginning, the
circuit will
√ have the ρ i , after applying X gate, the density matrix will become ρ2 and the final density matrix will be ρ3 after
applying Y.
A.4. Tutorial
Here, we will demonstrate the complete process for a single qubit. We take the circuit in figure A2 as an
example:
We take the √data from [48]. The average fidelity of the single qubit operation is 98.4%. The experimental
GST matrix for X gate is (A.21).
1 0 0 0
√ 8.86 × 10−4 0.9864 0.01961 0.04048
XGST−exp =
0.01433
. (A.21)
0.01039 0.01856 −0.957
−0.02782 −0.03123 0.9487 0.008478
√
The ideal GST matrix for X gate is (A.22).
1 0 0 0
√ 0 1 0 0
XGST−ideal =
0
. (A.22)
0 0 −1
0 0 1 0
√
Now the complete GST matrix for X gate will be (A.23)
√ √ √
XGST = XGST−ideal† × XGST−exp (A.23)
1 0 0 0
√ 8.86 × 10−4 0.9864 0.01961 0.04048
XGST = −0.02782 −0.03123
. (A.24)
0.9487 0.008478
−0.01433 −0.01039 −0.01856 0.9569
√the matrix type in equation (A.24) as PTM [21, 36, 45] and then, we find the Kraus
We then specify
Operators for X gate:
( )
−0.9828 − i1.522 × 10−17 0.01241 − i0.01432
Ak1 = (A.25)
−0.01333 + i5.944 × 10−5 −0.9898 + i0.02618
( )
0.07268 + i2.130 × 10−16 0.09659 − i0.06736
Ak2 = (A.26)
0.1050 − i0.1321 −0.07130 + i0.004211
( )
9.315 × 10−3 + i4.151 × 10−16 −2.728 × 10−3 + i1.084 × 10−2
Ak3 = (A.27)
−5.364 × 10−3 − i1.597 × 10−3 −9.358 × 10−3 + i3.656 × 10−4
( )
1.140 × 10−3 + i1.923 × 10−12 −4.041 × 10−4 − i1.773 × 10−3
Ak4 = . (A.28)
−3.195 × 10−6 + i1.833 × 10−3 −1.112 × 10−3 − i2.334 × 10−5
To verify whether we have identified the correct Kraus operators, we need to apply equation (A.4). After
applying equation (A.4), if we obtain the identity matrix, it indicates that the Kraus operators we have
21
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
determined are correct. The subsequent step involves expanding each Kraus operator in terms of Pauli
matrices. Therefore, we will have the following expressions:
√
To obtain the total final density matrix for the X gate, we apply equation (A.8). We square the absolute
value of each coefficient and then sum the coefficients based on their respective groups. As a result, we obtain
equation (A.33).
ρ2 = ρ√X = (0.9730) I+
(0.02019) Xρi X+
. (A.33)
(0.001325) Yρi Y+
(0.005458) Zρi Z
As seen from equation (A.33), the value of pi is 0.973, which is not equal
√ to the average fidelity of the 1Q gate
operation, which is 98.4%. Next, we perform the same process for the Y gate:
1 0 0 0
√ −0.00995 0.03178 0.03606 0.9617
YGST−exp =
−0.001533 0.04237
. (A.34)
0.9806 −0.01486
−0.00903 −0.9692 0.008547 0.01403
√
The ideal GST matrix for Y gate is (A.35).
1 0 0 0
√ 0 0 0 1
YGST−ideal =
0 0
. (A.35)
1 0
0 −1 0 0
√
The final density matrix for Y gate is found as equation (A.36).
ρ3 = ρ√Y = (0.9779) I+
(0.006719) Xρ2 X
. (A.36)
(0.01241) Yρ2 Y+
(0.002998) Zρ2 Z
22
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure A3. The figure shows how accumulated errors decrease the perfection
√ rate of the circuit which is PI . Density matrix in
terms of having
√ certain errors in QEC is calculated. After applying X gate, the value of perfection was found as 0.973. After
applying Y, the perfection value decreased 0.951.
As it seen from equation (A.36), ρ3 has ρ2 . To calculate final coefficients of ρ3 , we put the equation (A.33) in
equation (A.36) as it shown in (A1). Then we calculate the PI coefficient by the equation (A.19).
PI = (0.9779) × (0.973) +
(0.006719) × (0.02019) +
(A.37)
(0.01241) × (0.001325) +
(0.002998) × (0.005458)
PI = 0.9517. (A.38)
† †
ρf = pii I ⊗ IUρi U† (I ⊗ I) + pxx X ⊗ XUρi U† (X ⊗ X) +
† †
pyy Y ⊗ YUρi U† (Y ⊗ Y) + pzz Z ⊗ ZUρi U† (Z ⊗ Z) +
† †
pix I ⊗ XUρi U† (I ⊗ X) + piy I ⊗ YUρi U† (I ⊗ Y) +
† †
piz Z ⊗ ZUρi U† (I ⊗ Z) + pxi X ⊗ IUρi U† (X ⊗ I) +
† †
(A.39)
pxy X ⊗ YUρi U† (X ⊗ Y) + pxz X ⊗ ZUρi U† (X ⊗ Z) +
† †
pyi Y ⊗ IUρi U† (Y ⊗ I) + pyx Y ⊗ XUρi U† (Y ⊗ X) +
† †
pyz Y ⊗ ZUρi U† (Y ⊗ Z) + pzi Z ⊗ IUρi U† (Z ⊗ I) +
† †
pzx Z ⊗ XUρi U† (Z ⊗ X) + pzy Z ⊗ YUρi U† (Z ⊗ Y)
23
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
24
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
Figure A6. Analysis of XX parity check in terms of QEC. The circuit has 6 steps. We first start with ρi . Each step that we apply the
gates, the value of having no error in the channel which is PI decrease since the errors accumulate to the next step of the circuit.
PI = p5iii p4iii p3iii p2iii p1iii + p5iix p4iix p3iix p2iix piix +
p5iiy p4iiy p3iiy p2iiy piiy + p5iiz p4iiz p3iiz p2iiz piiz +
p5ixi p4ixi p3ixi p2ixi pixi + p5ixx p4ixx p3ixx p2ixx pixx +
p5ixy p4ixy p3ixy p2ixy pixy + p5ixz p4ixz p3ixz p2ixz pixz +
p5iyi p4iyi p3iyi p2iyi piyi + p5iyx p4iyx p2iyx p2iyx piyx +
p5iyy p4iyy p3iyy p2iyy piyy + p5iyz p4iyz p2iyz p2iyz piyz +
p5iyz p4iyz p3iyz p2iyz piyz + p5izi p4izi p3izi p2izi pizi +
p5izx p4izx p3izx p2izx pizx + p5izy p4izy p3izy p2izy pizy +
p5izy p4izy p3izy p2izy pizy + p5izz p4izz p3izz p2izz pizz +
p5xii p4xii p3xii p2xii pxii + p5xix p4xix p3xix p2xix pxix +
p5xiy p4xiy p3xiy p2xiy pxiy + p5xiz p4xiz p3xiz p2xiz pxiz +
p5xxi p4xxi p3xxi p2xxi pxxi + p5xxx p4xxx p3xxx p2xxx pxxx +
p5xxy p4xxy p3xxy p2xxy pxxy + p5xxz p4xxz p3xxz p2xxz pxxz +
p5xxz p4xxz p3xxz p2xxz pxxz + p5xyi p4xyi p3xyi p2xyi pxyi +
p5xyx p4xyx p3xyx p2xyx pxyx + p5xzi p4xzi p3xzi p2xzi pxzi +
p5xzx p4xzx p3xzx p2xzx pxzx + p5xzy p4xzy p3xzy p2xzy pxzy +
(A.41)
p5xzz p4xzz p3xzz p2xzz pxzz + p5yii p4yii p3yii p2yii pyii +
p5yix p4yix p3yix p2yix pyix + p5yiy p4yiy p3yiy p2yiy pyiy +
p5yiz p4yiz p3yiz p2yiz pyiz + p5yxi p4yxi p3yxi p2yxi pyxi +
p5yxx p4yxx p3yxx p2yxx pyxx + p5yxy p4yxy p3yxy p2yxy pyxy +
p5yxz p4yxz p3yxz p2yxz pyxz + p5yyi p4yyi p3yyi p2yyi pyyi +
p5yyx p4yyx p3yyx p2yyx pyyx + p5yyy p4yyy p3yyy p2yyy pyyy +
p5yyz p4yyz p3yyz p2yyz pyyz + p5yzi p4yzi p3yzi p2yzi pyzi +
p5yzx p4yzx p3yzx p2yzx pyzx + p5yzz p4yzz p3yzz p2yzz pyzz +
p5zii p4zii p3zii p2zii pzii + p5zix p4zix p3zix p2zix pzix +
p5ziy p4ziy p3ziy p2ziy pziy + p5ziz p4ziz p3ziz p2ziz pziz +
p5zxi p4zxi p3zxi p2zxi pzxi + p5zxx p4zxx p3zxx p2zxx pzxx +
p5zxy p4zxy p3zxy p2zxy pzxy + p5zxz p4zxz p3zxz p2zxz pzxz +
p5zyi p4zyi p3zyi p2zyi pzyi + p5zyx p4zyx p3zyx p2zyx pzyx +
p5zyy p4zyy p3zyy p2zyy pzyy + p5zyz p4zyz p3zyz p2zyz pzyz +
p5zzi p4zzi p3zzi p2zzi pzzi + p5zzx p4zzx p3zzx p2zzx pzzx +
p5zzy p4zzy p3zzy p2zzy pzzy + p5zzz p4zzz p3zzz p2zzz pzzz +
25
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
ORCID iDs
References
[1] Van Meter R and Devitt S J 2016 The path to scalable distributed quantum computing Computer 49 31–42
[2] Shor P W 1997 Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer SIAM J.
Comput. 26 1484–509
[3] Lanyon B P et al 2010 Towards quantum chemistry on a quantum computer Nat. Chem. 2 106–11
[4] Harrow A W, Hassidim A and Lloyd S 2009 Quantum algorithm for linear systems of equations Phys. Rev. Lett. 103 150502
[5] Gottesman D 2009 An introduction to quantum error correction and fault-tolerant quantum computation (arXiv:0904.2557)
[6] Fowler A G, Mariantoni M, Martinis J M and Cleland A N 2012 Surface codes: towards practical large-scale quantum computation
Phys. Rev. A 86 032324
[7] Bravyi S B and Kitaev A Y 1998 Quantum codes on a lattice with boundary (arXiv:quant-ph/9811052)
[8] Dennis E, Kitaev A, Landahl A and Preskill J 2002 Topological quantum memory J. Math. Phys. 43 4452–505
[9] Erhard A et al 2021 Entangling logical qubits with lattice surgery Nature 589 220–4
[10] Stephens A M 2014 Fault-tolerant thresholds for quantum error correction with the surface code Phys. Rev. A 89 022321
[11] Gidney C, Newman M, Fowler A and Broughton M 2021 A fault-tolerant honeycomb memory Quantum 5 605
[12] Morello A, Pla J, Bertet P and Jamieson D 2020 Donor spins in silicon for quantum technologies Adv. Quantum Technol. 3 2000005
[13] Madzik M T et al 2022 Precision tomography of a three-qubit donor quantum processor in silicon Nature 601 348–53
[14] Devitt S J, Munro W J and Nemoto K 2013 Quantum error correction for beginners Rep. Prog. Phys. 76 076001
[15] Hastings M B and Haah J 2021 Dynamically generated logical qubits Quantum 5 564
[16] Bombin H 2010 Topological subsystem codes Phys. Rev. A 81 032301
[17] Kitaev A 2006 Anyons in an exactly solved model and beyond Ann. Phys., NY 321 2–111
[18] Wang D S, Fowler A G and Hollenberg L C L 2011 Surface code quantum computing with error rates over 1% Phys. Rev. A
83 020302(R)
[19] Bombin H 2010 Topological order with a twist: ising anyons from an Abelian model Phys. Rev. Lett. 105 030403
[20] Gidney C 2022 A pair measurement surface code on pentagons (arXiv:2206.12780)
[21] Greenbaum D 2015 Introduction to quantum gate set tomography (arXiv:1509.02921)
[22] Nielsen E, Gamble J K, Rudinger K, Scholten T, Young K and Blume-Kohout R 2021 Gate set tomography Quantum 5 557
[23] Waldherr G et al 2014 Quantum error correction in a solid-state hybrid spin register Nature 506 204–7
[24] Hensen B et al 2020 A silicon quantum-dot-coupled nuclear spin qubit Nat. Nanotechnol. 15 13–17
[25] Morello A et al 2010 Single-shot readout of an electron spin in silicon Nature 467 687–91
[26] Khaneja N, Reiss T, Kehlet C, Schulte-Herbrüggen T and Glaser S J 2005 Optimal control of coupled spin dynamics: design of
NMR pulse sequences by gradient ascent algorithms J. Magn. Reson. 172 296–305
[27] Li B, Ahmed S, Saraogi S, Lambert N, Nori F, Pitchford A and Shammah N 2022 Pulse-level noisy quantum circuits with QuTiP
Quantum 6 630
[28] Ryan C A, Negrevergne C, Laforest M, Knill E and Laflamme R 2008 Liquid-state nuclear magnetic resonance as a testbed for
developing quantum control methods Phys. Rev. A 78 012328
[29] Koch C P et al 2022 Quantum optimal control in quantum technologies. Strategic report on current status, visions and goals for
research in Europe EPJ Quantum Technol. 9 19
[30] Cory D G, Price M D, Maas W, Knill E, Laflamme R, Zurek W H, Havel T F and Somaroo S S 1998 Experimental quantum error
correction Phys. Rev. Lett. 81 2152–5
[31] Zhang J, Gangloff D, Moussa O and Laflamme R 2011 Experimental quantum error correction with high fidelity Phys. Rev. A
84 034303
[32] Byrd R H, Lu P, Nocedal J and Zhu C 1995 A limited memory algorithm for bound constrained optimization SIAM J. Sci. Comput.
16 1190–208
[33] Üstün G, Morello A, Devitt S, Pitchford A 2023 Implementing-XX-single-step-parity-check-gate-on-silicon-spin-system (Version
1.0.0.) (available at: https://github.com/apassenger/Implementing-XX-Single-Step-Parity-Check-Gate-on-Silicon-Spin-System)
[34] Üstün G, Morello A, Devitt S, Pitchford A 2023 CNOT gate implementation on silicon spin system using GRAPE algorithm
(Version 1.0.0.) (available at: https://github.com/apassenger/CNOT_gate_implementation_with_Grape)
[35] Üstün G, Morello A and Devitt S 2024 Single-Step-Parity-Check-Gate-Set (Version 1.0.0) Computer software (https://doi.org/
10.5281/zenodo.1234)
[36] Wood C J, Biamonte J D and Cory D G 2011 Tensor networks and graphical calculus for open quantum systems (arXiv:1111.6950)
[37] Chow J M et al 2012 Universal quantum gate set approaching fault-tolerant thresholds with superconducting qubits Phys. Rev. Lett.
109 060501
[38] Korotkov A N 2013 Error matrices in quantum process tomography (arXiv:1309.6405 [quant-ph])
[39] Cai Z and Benjamin S C 2019 Constructing smaller pauli twirling sets for arbitrary error channels Sci. Rep. 9 11281
[40] Magesan E 2008 Gaining information about a quantum channel via twirling (available at: http://hdl.handle.net/10012/3828)
[41] Anwar M S, Xiao L, Short A J, Jones J A, Blazina D, Duckett S B and Carteret H A 2005 Practical implementations of twirl
operations Phys. Rev. A 71 032327
[42] Hou S-Y, Sheng Y-B, Feng G-R and Long L 2014 Experimental optimal single qubit purification in an NMR quantum information
processor Sci. Rep. 4 6857
[43] Behera B K, Seth S, Das A and Panigrahi P K 2019 Demonstration of entanglement purification and swapping protocol to design
quantum repeater in IBM quantum computer Quantum Inf. Process. 18 108
[44] Sanders Y R, Wallman J J and Sanders B C 2015 Bounding quantum gate error rate based on reported average fidelity New J. Phys.
18 012002
[45] Qiskit contributors 2023 Qiskit: an open-source framework for quantum computing Zenodo (available at: https://doi.org/10.5281/
zenodo.2573505)
26
Quantum Sci. Technol. 9 (2024) 035037 G Üstün et al
[46] Johansson J R, Nation P D and Nori F 2012 QuTiP: an open-source Python framework for the dynamics of open quantum systems
Comput. Phys. Commun. 183 1760–72
[47] Üstün G, Morello A and Devitt S 2023 Error analysis in the context of quantum error correction (Version 1.0.0) (available at:
https://github.com/apassenger/Error-Analysis-in-QEC)
[48] Savytskyy R, Botzem T, Fuentes I F, Joecker B, Hudson F E, Itoh K M, Jakob A M, Johnson B C, Jamieson D N, Dzurak A S and
Morello A 2022 An electrically-driven single-atom ‘flip-flop’ qubit (arXiv:2202.04438)
27