# Quantum Teleportation Error Suppression Algorithm Based on Convolutional Neural Networks and Quantum Topological Semion Codes

Authors: Qian Cao; Hao-Wen Wang; Ying-Jie Qu; Yun-Jia Xue; Shu-Mei Wang
Journal: Quantum Engineering
 (2022)

---

## Abstract

Quantum error correction (QEC) is a key technique for building scalable quantum computers that can be used to mitigate the effects of errors on physical quantum bits. Since quantum states are more or less affected by noise, errors are inevitable. Traditional QEC codes face huge challenges. Therefore, designing an error suppression algorithm based on neural networks (NN) and quantum topological error correction (QTEC) codes is particularly important for quantum teleportation. In this paper, QTEC codes: semion codes—a greater than 2 dimensional (2D) error correction code based on the double semion model—are used to suppress errors during quantum teleportation, using a NN to build a decoder based on semion codes and to simulate the quantum information error suppression process and the suppression effect. The proposed convolutional neural network (CNN) decoder is suitable for small distance topological semion codes. The aim is to optimize the NN for better decoder performance while deriving the relationship between decoder performance and slope and pseudothreshold during training and calculate the thresholds for different noise areas when the code distances are the same,Pthreshold=0.082 for Area<0.007dB and Pthreshold=0.096 for Area<0.01dB. This paper demonstrates the ability of CNNs to suppress errors in quantum transmission information and the great potential of NNs in the field of quantum computing.


---

## Body

## 1. Introduction

Quantum information theory is an emerging interdisciplinary subject that combines the principles of quantum mechanics, classical communication technology, and classical information theory. Quantum communication [1, 2] is a communication technology [3, 4] that transmits and processes secret information through a quantum channel. It has provable security in principle and is an essential supplement to the traditional cryptographic security system [5, 6]. In addition to quantum communication, quantum computers are another essential application in information. Quantum computers cannot directly measure quantum states and the noncopy ability of quantum states, which determines that error correction methods in classical computers cannot be now transplanted to quantum computers. The study of quantum error-correcting (QEC) code technology [7] makes quantum logic gate circuits have a higher threshold for fault-tolerant calculations, which also has important guiding significance for the research in the field of quantum computers. QEC code technology [8, 9] is an essential means of antinoise in quantum information processing [10, 11], and it has important guiding significance for the research of quantum communication, quantum computer, quantum storage, and other fields. Extending topological codes [12–14] in modern error correction code theory in quantum information has become a hot research issue in the area of QEC codes.Machine learning is a programming method that learns patterns from data through statistical analysis and makes corresponding predictions [15, 16]. In traditional computing, an algorithm executes specific program instructions to give the correct output value for the input data. Through the machine learning algorithm, the rules or patterns are learned, the model is trained, and the optimal algorithm is finally obtained. Training is mainly divided into two types, one is supervised learning, which requires a data set with input and the corresponding output. The machine learning algorithm will learn from the input and output information during training and try to make predictions based on the analysis of the actual situation and data, such as classification and regression problems [17]. The other is unsupervised learning, which has the same input data set as supervised learning, but the difference is that there is no corresponding actual situation information. Looking at machine learning algorithms from a mathematical perspective, the core of any machine learning algorithm is to estimate a function or function parameters that can solve a problem given a task.Quantum information in a quantum system is highly fragile. In a noisy network, an information processing system may change. Using a larger-dimensional Hilbert space to prevent noise from a QEC is a robust approach [18–20]. The logical encoding of the error code can have a better error correction effect. A topological code is equivalent to a quantum memory with topological protection and can be given additional computing power in some cases. One of the remarkable characteristics of topological codes is that their generators are located in the physical qubits of the quantum system, which means that each generator only involves neighboring qubits. This locality has been proved to be very useful for performing quantum error correction tasks with auxiliary qubits, and it is an advantage for nonlocal standard codes. Therefore, based on previous research results, to suppress the errors of logical qubits, we study quantum topological error correction (QTEC) code. Topological properties are robust to noise and errors and are widely used in the ordered phase studies to protect super qubits in conductive circuits.The rest of this article is organized as follows. Section2 is the background of this paper on semion codes. Section 3 is a quantum information error suppression algorithm based on quantum topological semion codes and CNNs. Section 4 is an experimental simulation of the CNN decoder training process, performance analysis, and quantum information error suppression capabilities. Section 5 is the conclusion.


## 2. Background

Topological quantum computing uses arbitrary ones of strange quasiparticles to store and manipulate information [21, 22]. In basic physics [23], anyons that cover the statistical information of bosons and fermions seem to be a way of performing quantum computing too much. Complex methods play a critical role in QEC and should not be underestimated. The lattice has the characteristics of a nontrivial topological structure. When the system is on the lattice, it will show the degeneracy of the ground state [24]. Quantum topological error correction applies the topological properties of quantum states to protect the safety of quantum states in quantum teleportation. The realization of topological quantum adds activity and tension to quantum computing.Code space can be identified using Hamiltonian ground space popularity [25]. The Hamiltonian [26] is the Hermitian function H, which is entirely solvable in a specific subspace. The topological characteristics of a quantum system are a unique resource that is robust to external interference, which is better than the standard QEC code. The development of topological characteristics provides us with new ideas for research in the quantum field. QTEC codes [27] are more robust error correction codes than ordinary QEC codes. Error correction can be achieved by measuring the topological charge of lattice position each time.A semion code is a QEC code with double-semion characteristics. Small plaquette represents stabilizer operators. Edges represent qubits and vertices. Qubits have a deep connection with the edges of the lattice. We can regularly detect errors in them by measuring vertices and small block operators. Semion code are constructed by topological order based on double Semion model [28]. Semion is defined in the hexagonal lattice R. As shown in Figure 1(a), vertex operator Aa is appended to the three edges of a a<R, which is similar to that in the Kitaev toric code. Vertex operator is the same, and vertex operator Aa satisfies(1)Aa=σizσjzσkz.Figure 1
We deploy the semion code on the three-dimensional lattice. (a) Circled in green is the vertex operator of the semion code, denotedAa. It contains three quantum bits. Circled in yellow is the path, denoted b, where the Pauli-X operators are applied. The support of Sb+, Connb is indicated with continuous lines. (b) Circled in blue is the plaquette operator of the semion code, denoted Bb. It contains 12 quantum bits. Note that only part of the lattice is drawn here and does not mean that the six lattices have boundary constraints.
(a)(b)PauliZ operation of each edge of vertex a corresponds to the three quantum bits in the diagram, label them as i,j,k. As shown in Figure 1(b), plaquette operator Bb is a Hermitian operator applying Pauli X operation to the edge of the hexagon, and there is(2)Bb=∑i∈∂bσix∑j∈obi1/21−σjz,where ∂b is the representation of hexagon sides, and the aggregate of b in all plaquette operators is ob. The eigenvalues of vertex operator Aa and plaquette operator Bb are both +1. The properties of vertex operators and plaquette operators provide help for the following calculations. All normal values on Aa are all +1, and when σZ appears, the measured value of Aa will become −1, in the same way, when we measure the two adjacent Bb. The value of this place changed from +1 to −1, indicating that σX error occurred on Bb.


## 3. Arithmetic

### 3.1. Study the Quantum State

The preparation of an arbitrary quantum primitive state is the very first step to be implemented in all algorithms, and for the study of logical quantum bit error suppression algorithms, the study in [29] is drawn upon to address the preparation of the quantum state. Assume that the quantum register has M orthogonal quantum basis vectors, denoted by m quantum bits as m=log2M. The amplitude of each basis vector is expressed as the square root of the probability of measuring the value obtained from the above equation, and the sum of the measurement probabilities of the individual basis vectors is 1, denoted as ∑i=02m−1pi=1, where pi is the probability. However, the measurement probe of each basis vector is random, and it is desired to prepare the basis state G0 with as few elementary quantum gate operations as possible, using a dichotomy that divides the basis vector into two parts, so 0,M/2−1 and M/2,M−1. Then, continue to use dichotomy to divide the above two-part basis vectors into two parts, respectively, and the probability of the four-part basis vectors is as follows:(3)p00=∑i=02m−2−1pi=cos2θ1cos2θ2,p01=∑i=2m−22m−1−1pi=cos2θ1sin2θ2,p10=∑i=2m−12m−1+2m−2−1pi=sin2θ1cos2θ3,p11=∑i=2m−1+2m−22m−1pi=sin2θ1sin2θ3,where operation can be expressed using a quantum gate, the Ryθ gate, which has the matrix form(4)Ryθ=cosθ−sinθsinθcosθ,and any quantum state is(5)G0=∑i=02m−1pii.


### 3.2. Exploring Quantum Teleportation

Quantum teleportation [30, 31] is a technique that uses scattered quantum entanglement and the conversion of some physical information to transmit a quantum state to a position at any distance [32]. As we all know, the working principle of quantum teleportation is that both the sender and the receiver hold a qubit in the EPR pair, and the sender needs to send a qubit to the receiver, but the sender does not know the state of the qubit, and the laws of mechanics make it impossible for the sender to copy with only one qubit. Assuming that the quantum state that the sender needs to transmit is G0〉=α0〉+β1, where α and β are unknown amplitudes, and then, the input in Figure 2 is G0β00 can be expressed as follows:(6)G0β00=12α000+11+β100+11.Figure 2
Quantum teleportation circuit diagram. WhereM1 is measurement1, M2 is measurement2.After the qubit is transformed by theCNOT=0〉0⊗I+1〈1⊗X gate in Figure 2,(7)G1=12α000+11+β110+01.After the sender Hadamard gates a qubit, after the transformation of the integer, we can get(8)G2=1200α0+β1+01α1+β0+10α0−β1,+11α1−β0.Therefore, the sender only needs to tell the receiver of its measurement results, and then, the receiver can obtain qubits through some unitary transformations. The measurement results and actions to be performed by the receiver are shown in Table1. To sum up, it can be concluded that if the receiver wants to get the most primitive G0 qubit, it needs to perform the ZM1XM2 operation.Table 1
Quantum teleportation sender and receiver operations.
SenderReceiverAction to take00G0No01G0X10G0Z11G0X and ZSource: assuming that the qubit obtained by the sender is 01, then the receiver needs to perform theX gate operation to obtain G0.


### 3.3. Select Semion Code

Hamiltonian is the sum of local exchange terms, and both are projectors [33]. Hamiltonian defined by vertex operator and plaquette operator:(9)H=−ΣaAa+ΣbBb′,Bb′=Σj∈∂bσixΣj∈∂b−1nj−1−nj−Σa∈bβa,where Bb′ is not the same as Bb in our previous (2). And n±=1/21±Zi is the project or on the state 0〉n+ or 1〉n− [14] of qubit i. βa is a phase operator, which can be obtained by the twelve sides of the plaquette Bb′, and the form of βa depends on the specific position of the plaquette. Bb′ meets the following conditions:(10)B′b2=1,B′b†=Bb,Bb′,Bb′=0,Aa,Bb=0,for ∀a,b∈R all hold.Therefore, this is the desired property required for a stabilizer form of QTEC to satisfy the entire Hilbert space. It can also be said that a qubit onBb has an error, and we can correct the error according to the commutation property of Bb to ensure the correctness of the qubit.All vertex operators with eigenvalues+1 and all plaquette operators with eigenvalues −1 constitute the code space of a system. When an error occurs, the symbol of the stabilizer will flip. These flipped positions can be regarded as a vertex excitation, similar to the Kitaev toric code. The recovery process uses string operators to form a small loop, which is a way to eliminate incentives. The string that generates lattice excitation is a string of Z operators, which we denote as SZ, and the string that generates vertex excitation is a string of X operators. SZ can be exchanged with any stabilizer, except for the grid at the end of the string. A character string on the path b as shown in Figure 1(a) is denoted as Sb+:(11)Sb+=Σj∈∂bσixΣj∈∂bFbi⟶i⟶i⟶.The value of some phasesFb is ±1 or ±i, and the operator Sb+ only works on Connb, as shown in Figure 1, Fii⟶=Fii⟶⊕i⟶, and any i whose qubits in Connb are zero. Fore-chiral chord is S+, and negative-chiral chord is S−. S−=S+SZ. S+, S− generate semions at endpoints. If chirality is the same, it is reversed exchange, and if chirality is different, it is exchanged.The Hamiltonian is used as the coding space, and stable codes are vertex and plaquette operators. Semion code is similar to Kitaev toric code. The logical operator consists ofSL+ and SV+, LV is any homogeneous nontrivial path in the horizontal(vertical) direction, and the other pair logical operator is SL− and SV−. Embedding the semion code in Kitaev toric code results in two quantum memories with logical qubits, the embedded torus 16 lattices of the code, and two logical qubits of the code require two pairs of logical operators, which are defined as Xi and Xj:(12)Xi=SL−,Zi=SZV,Xj=SV+,Zj=SZL.The set of these operators satisfies the inverse relationship. The hexagonal lattice makes the distance of theX operator twice that of the Z operator, which can better avoid errors. The semion code has a topological protection effect on quantum information and will not affect the global error due to local errors. It can correct the quantum information [34] during the invisible transmission process. For the wrong qubit, after the syndrome is successfully corrected, the measurement result of the eigenvalue will be restored to the +1 eigenvalue, and the quantum information will be restored. The stabilizer must be measured regularly, and the stabilizer must be combined with the string operator to eliminate excitation and ensure the security of quantum information.


### 3.4. Coded Logic Quantum State

Suppose that the quantum information transmitted by quantum teleportation isG0, G0 in teleportation is regarded as a physical quantum state. According to the relevant knowledge of quantum error correction codes, physical quantum states can be encoded as logical quantum states, and each logical qubit is described by a set of connected physical qubits that meet the requirements of any nonzero coupling in the target, what may happen when a physical quantum state G0 interacts with the environment: no error (represented by I), bit reversal error (represented by X), bit phase reversal error(represented by Z), bit phase reversal error, and bit phase reversal error (represented by Y), and the most preferred choice is depolarization noise, which assigns only X, Y, Z errors with equal probability p/3 on the data qubits with probability p an error occurs in a given qubit.The general error of a qubit can be expressed as a linear combination of these error operators. Assuming that the stateG0 of k logical qubits is saved in a quantum computer, the first step is to introduce redundancy and encode the state in a larger space of r physical qubits. For this reason, it is necessary to introduce r−k physical qubits and prepare these newly introduced physical qubits in the 0 state, and this extended system is R, that is, introduce them into the logical space of semion codes, and then perform a coding operation Ccode:(13)Ccode|G00=GE,GE is the coding state of the original state G0 in the Hilbert space of r qubits.


### 3.5. Detect and Correct Errors

For the noise model composed of the Pauli operator, it is very important to determine the influence of the Pauli operator on the path of the semion code. We take Pauli-X operator as an example. Suppose that the Pauli-X on a path b acting on the code is(14)Xb=∏k∈bXk=Sb+∑i⟶Fbi⟶∗i⟶i⟶.Use diagonal partFi⟶ to express Pauli-Z as follows:(15)∑i⟶Fbi⟶∗i⟶i⟶=∑P∈ConnbcZPZP,where ZP=∏i∈PZi is expressed as the qubit set P of the Pauli-Z operator acting on Connb by(16)cZP=12nTrZP∑i⟶Fbi⟶∗i⟶i⟶,which can get cZP [35]. For logical quantum state GE, suppose G is represented as a logical subspace, g is represented as an eigenvalue, and the eigenvalue is divided into +1 and −1, +1 represents a vertex operator, and −1 represents a plaquette operator, when Xb acts on the logical quantum state GE:(17)XbGE=Sb+ΣP∈ConnbcZPZPGE,where Sb+ flips the vertices at the b endpoint, and ZP flips the plaquette at the P endpoint. Satisfy ZP,Bbsb=0 for each plaquette involved, where sb is the syndrome of plaquette b: sb∈±1. So the influence of Pauli-X operator on the path b of the semion code is(18)GE′=NSb+ΣP∈OcZPZPGE,where N is the normalization factor, and O=P∈Connb.For error recovery operations, we assume that the recovery operation isZH, ZHGE〉=GE can be made, and ZHZP can form a trivial cycle of the Pauli-Z operator, so ZH can be used to correct the error and restore the quantum state to the GE.Before designing the CNN decoder, we must map the quantum topological semion code into the toric code. Figure3 shows the semion code map converted to an embedded toric code suitable for CNN, as shown in the figure, with 16 slabs, 32 vertices, and 48 physical quantum bits, the vertices, and plaquettes being labelled right-to-left and top-to-bottom as 8×8 images, corresponding to the matrix form in Table 2. Numbers represent vertex operators, plaquette operators are represented by letters, and 0 does not represent any number or letter. It has no meaning, just for space validity. The mapping method can refer to the way in Refs. [35]. This article directly gives the result after the mapping and does not go into the process.Figure 3
A semion code embedded in a torus. There are 16 patches, 32 vertices, 48 physical quantum bits, and code distance is 4.Table 2
Convert semion codes to toric codes in square form.
12345678567812340B150B160B130B14B110B120B90B10023241718192021220B80B50B60B7169101112131415B40B10B20B3012345678


## 3.1. Study the Quantum State

The preparation of an arbitrary quantum primitive state is the very first step to be implemented in all algorithms, and for the study of logical quantum bit error suppression algorithms, the study in [29] is drawn upon to address the preparation of the quantum state. Assume that the quantum register has M orthogonal quantum basis vectors, denoted by m quantum bits as m=log2M. The amplitude of each basis vector is expressed as the square root of the probability of measuring the value obtained from the above equation, and the sum of the measurement probabilities of the individual basis vectors is 1, denoted as ∑i=02m−1pi=1, where pi is the probability. However, the measurement probe of each basis vector is random, and it is desired to prepare the basis state G0 with as few elementary quantum gate operations as possible, using a dichotomy that divides the basis vector into two parts, so 0,M/2−1 and M/2,M−1. Then, continue to use dichotomy to divide the above two-part basis vectors into two parts, respectively, and the probability of the four-part basis vectors is as follows:(3)p00=∑i=02m−2−1pi=cos2θ1cos2θ2,p01=∑i=2m−22m−1−1pi=cos2θ1sin2θ2,p10=∑i=2m−12m−1+2m−2−1pi=sin2θ1cos2θ3,p11=∑i=2m−1+2m−22m−1pi=sin2θ1sin2θ3,where operation can be expressed using a quantum gate, the Ryθ gate, which has the matrix form(4)Ryθ=cosθ−sinθsinθcosθ,and any quantum state is(5)G0=∑i=02m−1pii.


## 3.2. Exploring Quantum Teleportation

Quantum teleportation [30, 31] is a technique that uses scattered quantum entanglement and the conversion of some physical information to transmit a quantum state to a position at any distance [32]. As we all know, the working principle of quantum teleportation is that both the sender and the receiver hold a qubit in the EPR pair, and the sender needs to send a qubit to the receiver, but the sender does not know the state of the qubit, and the laws of mechanics make it impossible for the sender to copy with only one qubit. Assuming that the quantum state that the sender needs to transmit is G0〉=α0〉+β1, where α and β are unknown amplitudes, and then, the input in Figure 2 is G0β00 can be expressed as follows:(6)G0β00=12α000+11+β100+11.Figure 2
Quantum teleportation circuit diagram. WhereM1 is measurement1, M2 is measurement2.After the qubit is transformed by theCNOT=0〉0⊗I+1〈1⊗X gate in Figure 2,(7)G1=12α000+11+β110+01.After the sender Hadamard gates a qubit, after the transformation of the integer, we can get(8)G2=1200α0+β1+01α1+β0+10α0−β1,+11α1−β0.Therefore, the sender only needs to tell the receiver of its measurement results, and then, the receiver can obtain qubits through some unitary transformations. The measurement results and actions to be performed by the receiver are shown in Table1. To sum up, it can be concluded that if the receiver wants to get the most primitive G0 qubit, it needs to perform the ZM1XM2 operation.Table 1
Quantum teleportation sender and receiver operations.
SenderReceiverAction to take00G0No01G0X10G0Z11G0X and ZSource: assuming that the qubit obtained by the sender is 01, then the receiver needs to perform theX gate operation to obtain G0.


## 3.3. Select Semion Code

Hamiltonian is the sum of local exchange terms, and both are projectors [33]. Hamiltonian defined by vertex operator and plaquette operator:(9)H=−ΣaAa+ΣbBb′,Bb′=Σj∈∂bσixΣj∈∂b−1nj−1−nj−Σa∈bβa,where Bb′ is not the same as Bb in our previous (2). And n±=1/21±Zi is the project or on the state 0〉n+ or 1〉n− [14] of qubit i. βa is a phase operator, which can be obtained by the twelve sides of the plaquette Bb′, and the form of βa depends on the specific position of the plaquette. Bb′ meets the following conditions:(10)B′b2=1,B′b†=Bb,Bb′,Bb′=0,Aa,Bb=0,for ∀a,b∈R all hold.Therefore, this is the desired property required for a stabilizer form of QTEC to satisfy the entire Hilbert space. It can also be said that a qubit onBb has an error, and we can correct the error according to the commutation property of Bb to ensure the correctness of the qubit.All vertex operators with eigenvalues+1 and all plaquette operators with eigenvalues −1 constitute the code space of a system. When an error occurs, the symbol of the stabilizer will flip. These flipped positions can be regarded as a vertex excitation, similar to the Kitaev toric code. The recovery process uses string operators to form a small loop, which is a way to eliminate incentives. The string that generates lattice excitation is a string of Z operators, which we denote as SZ, and the string that generates vertex excitation is a string of X operators. SZ can be exchanged with any stabilizer, except for the grid at the end of the string. A character string on the path b as shown in Figure 1(a) is denoted as Sb+:(11)Sb+=Σj∈∂bσixΣj∈∂bFbi⟶i⟶i⟶.The value of some phasesFb is ±1 or ±i, and the operator Sb+ only works on Connb, as shown in Figure 1, Fii⟶=Fii⟶⊕i⟶, and any i whose qubits in Connb are zero. Fore-chiral chord is S+, and negative-chiral chord is S−. S−=S+SZ. S+, S− generate semions at endpoints. If chirality is the same, it is reversed exchange, and if chirality is different, it is exchanged.The Hamiltonian is used as the coding space, and stable codes are vertex and plaquette operators. Semion code is similar to Kitaev toric code. The logical operator consists ofSL+ and SV+, LV is any homogeneous nontrivial path in the horizontal(vertical) direction, and the other pair logical operator is SL− and SV−. Embedding the semion code in Kitaev toric code results in two quantum memories with logical qubits, the embedded torus 16 lattices of the code, and two logical qubits of the code require two pairs of logical operators, which are defined as Xi and Xj:(12)Xi=SL−,Zi=SZV,Xj=SV+,Zj=SZL.The set of these operators satisfies the inverse relationship. The hexagonal lattice makes the distance of theX operator twice that of the Z operator, which can better avoid errors. The semion code has a topological protection effect on quantum information and will not affect the global error due to local errors. It can correct the quantum information [34] during the invisible transmission process. For the wrong qubit, after the syndrome is successfully corrected, the measurement result of the eigenvalue will be restored to the +1 eigenvalue, and the quantum information will be restored. The stabilizer must be measured regularly, and the stabilizer must be combined with the string operator to eliminate excitation and ensure the security of quantum information.


## 3.4. Coded Logic Quantum State

Suppose that the quantum information transmitted by quantum teleportation isG0, G0 in teleportation is regarded as a physical quantum state. According to the relevant knowledge of quantum error correction codes, physical quantum states can be encoded as logical quantum states, and each logical qubit is described by a set of connected physical qubits that meet the requirements of any nonzero coupling in the target, what may happen when a physical quantum state G0 interacts with the environment: no error (represented by I), bit reversal error (represented by X), bit phase reversal error(represented by Z), bit phase reversal error, and bit phase reversal error (represented by Y), and the most preferred choice is depolarization noise, which assigns only X, Y, Z errors with equal probability p/3 on the data qubits with probability p an error occurs in a given qubit.The general error of a qubit can be expressed as a linear combination of these error operators. Assuming that the stateG0 of k logical qubits is saved in a quantum computer, the first step is to introduce redundancy and encode the state in a larger space of r physical qubits. For this reason, it is necessary to introduce r−k physical qubits and prepare these newly introduced physical qubits in the 0 state, and this extended system is R, that is, introduce them into the logical space of semion codes, and then perform a coding operation Ccode:(13)Ccode|G00=GE,GE is the coding state of the original state G0 in the Hilbert space of r qubits.


## 3.5. Detect and Correct Errors

For the noise model composed of the Pauli operator, it is very important to determine the influence of the Pauli operator on the path of the semion code. We take Pauli-X operator as an example. Suppose that the Pauli-X on a path b acting on the code is(14)Xb=∏k∈bXk=Sb+∑i⟶Fbi⟶∗i⟶i⟶.Use diagonal partFi⟶ to express Pauli-Z as follows:(15)∑i⟶Fbi⟶∗i⟶i⟶=∑P∈ConnbcZPZP,where ZP=∏i∈PZi is expressed as the qubit set P of the Pauli-Z operator acting on Connb by(16)cZP=12nTrZP∑i⟶Fbi⟶∗i⟶i⟶,which can get cZP [35]. For logical quantum state GE, suppose G is represented as a logical subspace, g is represented as an eigenvalue, and the eigenvalue is divided into +1 and −1, +1 represents a vertex operator, and −1 represents a plaquette operator, when Xb acts on the logical quantum state GE:(17)XbGE=Sb+ΣP∈ConnbcZPZPGE,where Sb+ flips the vertices at the b endpoint, and ZP flips the plaquette at the P endpoint. Satisfy ZP,Bbsb=0 for each plaquette involved, where sb is the syndrome of plaquette b: sb∈±1. So the influence of Pauli-X operator on the path b of the semion code is(18)GE′=NSb+ΣP∈OcZPZPGE,where N is the normalization factor, and O=P∈Connb.For error recovery operations, we assume that the recovery operation isZH, ZHGE〉=GE can be made, and ZHZP can form a trivial cycle of the Pauli-Z operator, so ZH can be used to correct the error and restore the quantum state to the GE.Before designing the CNN decoder, we must map the quantum topological semion code into the toric code. Figure3 shows the semion code map converted to an embedded toric code suitable for CNN, as shown in the figure, with 16 slabs, 32 vertices, and 48 physical quantum bits, the vertices, and plaquettes being labelled right-to-left and top-to-bottom as 8×8 images, corresponding to the matrix form in Table 2. Numbers represent vertex operators, plaquette operators are represented by letters, and 0 does not represent any number or letter. It has no meaning, just for space validity. The mapping method can refer to the way in Refs. [35]. This article directly gives the result after the mapping and does not go into the process.Figure 3
A semion code embedded in a torus. There are 16 patches, 32 vertices, 48 physical quantum bits, and code distance is 4.Table 2
Convert semion codes to toric codes in square form.
12345678567812340B150B160B130B14B110B120B90B10023241718192021220B80B50B60B7169101112131415B40B10B20B3012345678


## 4. Decoder

### 4.1. Build a Network Model

Neurons [36] are elements that accept input data and perform operations, and the highest abstraction of NNs can be thought of as black-box functions:(19)FNN=x,w,where w parameter here needs to be adjusted several times. Choose the loss function L and do the operation to minimize F, the input and output relationships of the dataset are as follows:(20)D=xi,yi.Therefore, it is necessary to use gradient descent to train the network, and the gradient descent algorithm will calculate local minima or regions with small gradients, which has a huge advantage. A common classification problem is to use cross-entropy. For datasetD=xi,yi, where yi∈0,1, and the output yi′ of the NN tries to approach Probyi=1, and the cross-entropy loss function is(21)−Σiyilogyi′+1−yilog1−yi′,where the dataset D=xi,yi is calculated by the probability distribution. Different basic neurons will be combined into different architectures. The current well-known structures are CNNs [37], recurrent NNs, fully CNNs, etc. All architectures are composed of layers, which are combinations of neurons.An alternative to traditional decoders is used to identify errors, they exhibit constant execution time and physical error rate, and their execution time scales linearly with the number of qubits. And it has been proven that NNs provide better decoding performance than many classical decoding algorithms [38, 39]. To build a NN decoder, one can simply train a CNN with input-output pairs, namely syndrome and logic correction, but it does not achieve good enough performance in practice. Therefore, special attention needs to be paid to the design of CNNs. The CNN in this paper allows the construction of very deep networks. Since CNN can naturally take into account the spatial structure of the code, it has scalability and significant performance advantages. For semion codes, the CNN can be the largest to achieve it to the limit. Since the vertices and squares of semion codes have a robust correlation, for a variety of noises, the CNN can take the correlation into account and obtain better results.The CNN decoder in this paper consists of three different parts, namely the input layer, the hidden layer, and the output layer, where the hidden layer is the convolutional layer, as shown in Figure4(a), and we start with the syndrome slice, arbitrarily choose the depth of the syndrome volume, and then input the syndrome into the CNN in Figure 4(b), and these layers are composed of neurons or nodes with trainable parameters, and each node is fully connected to all nodes in adjacent layers. All hidden layers have the same number of nodes. The cost function uses categorical cross-entropy, and the optimizer uses the gradient-based optimization algorithm Adam [40]. NNs have been widely used for image recognition, although the information of each position in the lattice is binary, and it is still necessary to treat this as an image, and false syndrome patterns can be seen as CNNs can identify an image. Compared to other NNs, CNNs are more suitable for semion codes because the structure of the lattice stabilizer of semion codes can lead to complex correlations between externally generated X and Z errors.Figure 4
Convolutional neural network decoding graph. (a) Syndrome value. (b) Convolutional neural network diagram. The syndrome is input to the input layer, and the corresponding value is output through the convolution layer.


### 4.2. Training Model

The data to be used as a training dataset should be collected first, and we may all think that all possible error syndromes have an impact on the performance of the decoder but as the code distance increases, all error syndromes slowly become infeasible, because the space of all potential errors increases exponentially with increasing code distance and therefore needs to contain as few and diverse error syndromes as possible that will provide the greatest generalization ability.During sampling, multiple error correction cycles are run to store each decoder’s corresponding input and output. At first, smaller and shorter code distances [41] are selected, and when the performance is stable enough, we expand the code distance and gradually train the stability of the decoder. Due to the diverse nature of semion codes, different datasets may generate the same error syndrome, so it is necessary to track the frequency of occurrence of each set of errors that provide the same error syndrome. One set of errors is more likely to occur when the physical error rate is small, and another set of errors is more likely to occur when the physical error rate is large. When training a NN decoder [42], regardless of the physical error rate being tested for a given error syndrome, only one of these error sets will be selected. To get better decoding performance, it is necessary to create multiple datasets, obtain different datasets for different physical error rates, and train different NNs. By sampling, training, and testing performance at the same physical error rate, the decoder has the most relevant information to perform the decoding task.Create an error probability distribution for each logic state based on the observed error syndrome. Train a NN to map all stored inputs to corresponding outputs. When the NN can correctly predict a higher value, the training ends, and a relatively stable decoder performance is obtained. The decoder’s corrections do not need to exactly match the errors that occur, just correct the observed error syndromes, and predict whether the corrections proposed by the decoder will result in logical errors. In addition, the decoder is designed in the simplest way to conform to semion codes, ensuring fast and convenient data acquisition. The decoder is tested against an error model, the depolarization noise model [43], which assigns only X, Y, Z errors with equal probability p/3 on the data qubits. There are no insertion errors on the auxiliary quantum bits, and perfect measurements are used. Therefore, only a single error correction cycle is required to find all errors.The physical error rate corresponding to the logical quantum bit exceeding the physical quantum a bit is referred to as the pseudothreshold, which is defined asPpseudo, can be expressed as follows:(22)Plogical=PpseudoPphysicalPpseudos⋅1−c⋅Ppseudo,where s and c denote the fitting parameters for the pseudothreshold, respectively. Pphysical denotes the physical error rate, and Plogical indicates the logical error rate. This formula is adapted from the study of [44]. The slope of the decoder is also an important parameter, which is defined as Pslope. Figure 5 shows a correlation plot between Pslope and Ppseudo and code distance during training, from which it can be seen that the Pslope increases from 2 to about 4.5 as the Ppseudo increases from 0 to 0.12 and increases as the code distance increases from 7 to 9 and then to 11. It can therefore be concluded that both the slope and the pseudothreshold increase when increasing to a sufficiently large code distance, but due to the exponential relationship, the slope usually dominates the decoding performance at lower physical error rates. Regarding the CNN framework simulated in this paper, thanks to the provider of the open-source code [44].Figure 5
Correlation between slopePslope and pseudothreshold Ppseudo for the three code distances. Each point represents a different neural network configuration, and the dashed line indicates the slope and pseudothreshold Ppseudo of the neural network decoder.


### 4.3. Analysis of Performance

The primary function of the NN decoder is to obtain the output of the correction data through the training of the NN and to generate the basic correction of the error by measuring the given syndrome. Specifically, the decoder process can be regarded as a classification problem of a NN, and we use cross-entropy for the classification problem. A CNN decoder takes as input the error syndrome and produces that the corresponding thresholds are obtained based on the relationship between thePphysical, Plogical, and the code spacing. The threshold value is defined as the Pphysical at the intersection of the different code pitch curves. By displaying different code distances d, different thresholds can be obtained. For code distance d, Plogical has the following formula: as output the error probability of the logical state of the logical qubit. Based on this error correction scheme, the NN does not need to predict the correction of all data qubits but only needs to predict the state of the logical qubits, which will make prediction easier. This is because there are four types of logic errors: no error, the output result is I; X logic error, Y logic error, and Z logic error. It is worth noting that a very high level of granularity is required to correctly predict each physical error, which is unnecessary for semion codes.(23)Plogical=p−Pthreshold×d1/v0,where Pthreshold is the threshold of decoders, and Plogical is the logical error rate, and v0 is the scaling exponent corresponding to the universality class of the three-dimensional random-plaquette gauge model. When using the same dataset size, there is a constant execution time and physical error rate Pphysical for a given code spacing, and the sum of samples from multiple datasets with different Pphysical increases linearly relative to the code spacing. Training improves decoding performance because the samples are more correlated. Figure 6 plots the relationship between Plogical, Pphysical, noise area Area, and d, as shown in the Figure 6(a), when the code distance d=7,9,11, the Pphysical of the intersection is 0.082 for the noise area Area<0.007dB, which is the threshold Pthreshold=0.082. Figure 6(b) shows that when the code distance d=7,9,11, the Pphysical of the intersection is 0.096 for the noise area Area<0.01dB, which is the threshold Pthreshold=0.096. For different noise area, we have different thresholds. Compared with other decoders [45–47], the CNN decoder is easier to train, can decode higher code distances, and achieves better decoding performance.Figure 6
(a) Function correspondence of physical error ratePphysical, logical error rate Plogical, noise area Area<0.007dB, and code distance d=7,9,11. Threshold Pthreshold=0.082. (b) Function correspondence of physical error rate Pphysical, logical error rate Plogical, noise area Area<0.01dB, and code distance d=7,9,11. Threshold Pthreshold=0.096. The abscissa represents the Pphysical, the ordinate represents the Plogical, and different code distances are marked with different colours. Values can be better judged.
(a)(b)Through our experiments for the semion code decoder, we can see that we can successfully suppress information errors during the transmission of states by quantum invisibility through quantum topological semion codes, which not only solves the problem if possible errors in quantum information but also verify the contribution of NNs to quantum computing, the great potential of NNs.


## 4.1. Build a Network Model

Neurons [36] are elements that accept input data and perform operations, and the highest abstraction of NNs can be thought of as black-box functions:(19)FNN=x,w,where w parameter here needs to be adjusted several times. Choose the loss function L and do the operation to minimize F, the input and output relationships of the dataset are as follows:(20)D=xi,yi.Therefore, it is necessary to use gradient descent to train the network, and the gradient descent algorithm will calculate local minima or regions with small gradients, which has a huge advantage. A common classification problem is to use cross-entropy. For datasetD=xi,yi, where yi∈0,1, and the output yi′ of the NN tries to approach Probyi=1, and the cross-entropy loss function is(21)−Σiyilogyi′+1−yilog1−yi′,where the dataset D=xi,yi is calculated by the probability distribution. Different basic neurons will be combined into different architectures. The current well-known structures are CNNs [37], recurrent NNs, fully CNNs, etc. All architectures are composed of layers, which are combinations of neurons.An alternative to traditional decoders is used to identify errors, they exhibit constant execution time and physical error rate, and their execution time scales linearly with the number of qubits. And it has been proven that NNs provide better decoding performance than many classical decoding algorithms [38, 39]. To build a NN decoder, one can simply train a CNN with input-output pairs, namely syndrome and logic correction, but it does not achieve good enough performance in practice. Therefore, special attention needs to be paid to the design of CNNs. The CNN in this paper allows the construction of very deep networks. Since CNN can naturally take into account the spatial structure of the code, it has scalability and significant performance advantages. For semion codes, the CNN can be the largest to achieve it to the limit. Since the vertices and squares of semion codes have a robust correlation, for a variety of noises, the CNN can take the correlation into account and obtain better results.The CNN decoder in this paper consists of three different parts, namely the input layer, the hidden layer, and the output layer, where the hidden layer is the convolutional layer, as shown in Figure4(a), and we start with the syndrome slice, arbitrarily choose the depth of the syndrome volume, and then input the syndrome into the CNN in Figure 4(b), and these layers are composed of neurons or nodes with trainable parameters, and each node is fully connected to all nodes in adjacent layers. All hidden layers have the same number of nodes. The cost function uses categorical cross-entropy, and the optimizer uses the gradient-based optimization algorithm Adam [40]. NNs have been widely used for image recognition, although the information of each position in the lattice is binary, and it is still necessary to treat this as an image, and false syndrome patterns can be seen as CNNs can identify an image. Compared to other NNs, CNNs are more suitable for semion codes because the structure of the lattice stabilizer of semion codes can lead to complex correlations between externally generated X and Z errors.Figure 4
Convolutional neural network decoding graph. (a) Syndrome value. (b) Convolutional neural network diagram. The syndrome is input to the input layer, and the corresponding value is output through the convolution layer.


## 4.2. Training Model

The data to be used as a training dataset should be collected first, and we may all think that all possible error syndromes have an impact on the performance of the decoder but as the code distance increases, all error syndromes slowly become infeasible, because the space of all potential errors increases exponentially with increasing code distance and therefore needs to contain as few and diverse error syndromes as possible that will provide the greatest generalization ability.During sampling, multiple error correction cycles are run to store each decoder’s corresponding input and output. At first, smaller and shorter code distances [41] are selected, and when the performance is stable enough, we expand the code distance and gradually train the stability of the decoder. Due to the diverse nature of semion codes, different datasets may generate the same error syndrome, so it is necessary to track the frequency of occurrence of each set of errors that provide the same error syndrome. One set of errors is more likely to occur when the physical error rate is small, and another set of errors is more likely to occur when the physical error rate is large. When training a NN decoder [42], regardless of the physical error rate being tested for a given error syndrome, only one of these error sets will be selected. To get better decoding performance, it is necessary to create multiple datasets, obtain different datasets for different physical error rates, and train different NNs. By sampling, training, and testing performance at the same physical error rate, the decoder has the most relevant information to perform the decoding task.Create an error probability distribution for each logic state based on the observed error syndrome. Train a NN to map all stored inputs to corresponding outputs. When the NN can correctly predict a higher value, the training ends, and a relatively stable decoder performance is obtained. The decoder’s corrections do not need to exactly match the errors that occur, just correct the observed error syndromes, and predict whether the corrections proposed by the decoder will result in logical errors. In addition, the decoder is designed in the simplest way to conform to semion codes, ensuring fast and convenient data acquisition. The decoder is tested against an error model, the depolarization noise model [43], which assigns only X, Y, Z errors with equal probability p/3 on the data qubits. There are no insertion errors on the auxiliary quantum bits, and perfect measurements are used. Therefore, only a single error correction cycle is required to find all errors.The physical error rate corresponding to the logical quantum bit exceeding the physical quantum a bit is referred to as the pseudothreshold, which is defined asPpseudo, can be expressed as follows:(22)Plogical=PpseudoPphysicalPpseudos⋅1−c⋅Ppseudo,where s and c denote the fitting parameters for the pseudothreshold, respectively. Pphysical denotes the physical error rate, and Plogical indicates the logical error rate. This formula is adapted from the study of [44]. The slope of the decoder is also an important parameter, which is defined as Pslope. Figure 5 shows a correlation plot between Pslope and Ppseudo and code distance during training, from which it can be seen that the Pslope increases from 2 to about 4.5 as the Ppseudo increases from 0 to 0.12 and increases as the code distance increases from 7 to 9 and then to 11. It can therefore be concluded that both the slope and the pseudothreshold increase when increasing to a sufficiently large code distance, but due to the exponential relationship, the slope usually dominates the decoding performance at lower physical error rates. Regarding the CNN framework simulated in this paper, thanks to the provider of the open-source code [44].Figure 5
Correlation between slopePslope and pseudothreshold Ppseudo for the three code distances. Each point represents a different neural network configuration, and the dashed line indicates the slope and pseudothreshold Ppseudo of the neural network decoder.


## 4.3. Analysis of Performance

The primary function of the NN decoder is to obtain the output of the correction data through the training of the NN and to generate the basic correction of the error by measuring the given syndrome. Specifically, the decoder process can be regarded as a classification problem of a NN, and we use cross-entropy for the classification problem. A CNN decoder takes as input the error syndrome and produces that the corresponding thresholds are obtained based on the relationship between thePphysical, Plogical, and the code spacing. The threshold value is defined as the Pphysical at the intersection of the different code pitch curves. By displaying different code distances d, different thresholds can be obtained. For code distance d, Plogical has the following formula: as output the error probability of the logical state of the logical qubit. Based on this error correction scheme, the NN does not need to predict the correction of all data qubits but only needs to predict the state of the logical qubits, which will make prediction easier. This is because there are four types of logic errors: no error, the output result is I; X logic error, Y logic error, and Z logic error. It is worth noting that a very high level of granularity is required to correctly predict each physical error, which is unnecessary for semion codes.(23)Plogical=p−Pthreshold×d1/v0,where Pthreshold is the threshold of decoders, and Plogical is the logical error rate, and v0 is the scaling exponent corresponding to the universality class of the three-dimensional random-plaquette gauge model. When using the same dataset size, there is a constant execution time and physical error rate Pphysical for a given code spacing, and the sum of samples from multiple datasets with different Pphysical increases linearly relative to the code spacing. Training improves decoding performance because the samples are more correlated. Figure 6 plots the relationship between Plogical, Pphysical, noise area Area, and d, as shown in the Figure 6(a), when the code distance d=7,9,11, the Pphysical of the intersection is 0.082 for the noise area Area<0.007dB, which is the threshold Pthreshold=0.082. Figure 6(b) shows that when the code distance d=7,9,11, the Pphysical of the intersection is 0.096 for the noise area Area<0.01dB, which is the threshold Pthreshold=0.096. For different noise area, we have different thresholds. Compared with other decoders [45–47], the CNN decoder is easier to train, can decode higher code distances, and achieves better decoding performance.Figure 6
(a) Function correspondence of physical error ratePphysical, logical error rate Plogical, noise area Area<0.007dB, and code distance d=7,9,11. Threshold Pthreshold=0.082. (b) Function correspondence of physical error rate Pphysical, logical error rate Plogical, noise area Area<0.01dB, and code distance d=7,9,11. Threshold Pthreshold=0.096. The abscissa represents the Pphysical, the ordinate represents the Plogical, and different code distances are marked with different colours. Values can be better judged.
(a)(b)Through our experiments for the semion code decoder, we can see that we can successfully suppress information errors during the transmission of states by quantum invisibility through quantum topological semion codes, which not only solves the problem if possible errors in quantum information but also verify the contribution of NNs to quantum computing, the great potential of NNs.


## 5. Conclusions

This paper protects quantum information during quantum teleportation based on quantum topological semion codes, suppresses errors in quantum information due to the influence of noise during transmission, ensures the safety of quantum information, uses NNs to simulate the error suppression process, and evaluates the performance of the NN decoder. Error correction using quantum topology semion codes is a new error correction method. Through regular measurements and checks, it is ensured that interference from local errors does not destroy the global degrees of freedom. Error-correcting codes protect the security and correctness of quantum information. Semion codes are more novel and flexible than ordinary QEC codes. Embedding the hexagonal lattice into the surface code by mathematical thinking will make experimental simulations easier to implement, and the resulting input into a NN algorithm and numerical results will be obtained. We demonstrate the possibility of QTEC codes for the protection of quantum information in invisible transmission states, and the possibility of NN implementations of QTEC codes, and discover the great potential of NNs.



---

*Source: 6245336-2022-11-24.xml*