# Convolutional-Neural-Network-Based Hexagonal Quantum Error Correction Decoder
## 1 Introduction  
Like classical computers, qubits are an important part of quantum computers [1; 2; 3]. The difference between qubits and classical bits is that they have quantum mechanical properties, such as entanglement and superposition, which enable quantum computers to solve complex problems that cannot be solved by classical computers. Refs. [4; 5; 6]. However, quantum states are very fragile and susceptible to external environmental noise, leading to inevitable interactions between qubits and their environment, which can cause a decoherence and errors in qubits [7; 8; 9]. The development of efficient quantum error-correcting codes is the key to overcoming this problem and is an important guarantee for quantum information transmission. Quantum error correction operates similarly to classical bit error correction and centers on the use of redundant qubits to encode the information of one qubit into multiple entangled qubits [10; 11]. These entangled qubits are called logic qubits and have superior properties compared to single qubits. The principle of quantum error-correcting codes is to reduce the effect [12] of noise on qubits by encoding physical qubits into logical qubits. Various quantum error-correcting codes have been proposed and studied, of which surface codes are the main area of research today. Surface codes are a family of quantum error-correcting codes that utilize neighborhood interactions between planarly arranged physical qubits for error correction purposes [13; 14; 15]. However, on the dense lattice of a surface code, each qubit is connected to four other qubits, potentially causing multiple frequency collisions between them. To solve this problem, researchers have proposed a new error-correcting code, the heavy hexagonal code [16]. This code is based on a combination of degree-two and degree-three vertices connecting the vertices of physical qubits. Thus, it can be viewed as a fusion ofsurface codes and Bacon-Shor codes [17]. One of the main advantages of this approach is that it reduces the number of different frequencies required for the implementation, while minimizing qubit crosstalk by introducing auxiliary qubits or flagged qubits in the syndromic measurement. This coding structure fits well with the hexagonal structure of a quantum computer. Another major research focus in quantum error correction is how to achieve a fast and stable decoding of error-correcting codes, and the threshold is a key metric for evaluating decoder performance. The heavy hexagonal code [18] utilizes tight interactions between physical qubits to achieve error correction, but it poses considerable challenges for decoding. Currently, the research schemes for decoding heavy hexagonal codes mainly use the minimum-weight perfect-matching algorithm (MWPM) [19], which has an X error threshold of about 0.45%. In addition to this, the perfect-matching decoder and the maximum likelihood decoder have been used to reduce the logic error rate, respectively, in Ref. [20]. In this paper, we propose to decode heavy hexagonal codes using a machine-learning-based CNN architecture and also consider the application of machine learning in decoding topological quantum error-correcting codes [21,22]. Under a depolarizing noise model, we attempt to reach the error correction threshold for heavy hexagonal coding. Our numerical results show that the decoding threshold can be reached around 0.57% under the CNN architecture. As the decoding distance increases, more complex neural network models are required. Based on this, we optimized the CNN architecture to further investigate the decoding performance of heavy hexagonal coding. The decoding threshold of the optimized heavy hexagonal coding is about 0.65%, which is close to the threshold of 0.67% for standard surface coding. Compared to the MWPM decoding algorithm, our decoding method improves the decoding threshold by about 25%. The main points of this paper's work are as follows.