Quantum error correction hardware decoder and chip

By designing a quantum error correction hardware decoder and using a neural network processing unit and an error merging search unit, the problems of long decoding delay and poor scalability in the existing technology are solved, and efficient quantum error correction decoding and flexible hardware architecture are achieved.

WO2024221872A1PCT designated stage expired Publication Date: 2024-10-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/132891
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-27
Filing Date
2023-11-21
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

The quantum error correction decoding scheme based on neural network models in the existing technology has not yet achieved effective hardware implementation, resulting in long decoding delays and difficulty in expansion.

Method used

A quantum error correction hardware decoder is designed, which includes an instruction memory, a control unit, a neural network processing unit and an error merging search unit. By pre-storing computer instructions and parameters of the neural network model, quantum error correction decoding based on the neural network model is realized. Hardware implementation of the algorithm, reducing decoding latency and improving scalability.

Benefits of technology

It achieves efficient quantum error correction decoding, reduces decoding delay, adapts to different error correction scenarios through flexible hardware architecture, and improves decoding performance and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023132891_31102024_PF_FP_ABST
    Figure CN2023132891_31102024_PF_FP_ABST
Patent Text Reader

Abstract

A quantum error correction hardware decoder and a chip, relating to the technical fields of artificial intelligence and quanta. The quantum error correction hardware decoder comprises: an instruction memory, used to store a computer instruction; a control unit, used to read the computer instruction from the instruction memory and control at least one neural network processing unit according to the computer instruction; the at least one neural network processing unit, used to, in response to the control of the control unit, decode error symptom information of a quantum circuit on the basis of a neural network model, and obtain an output result of the neural network model, the error symptom information referring to an error symptom measured upon an error occurring in the quantum circuit; and an error merge searching unit, used to determine error information according to the output result, the error information being used for indicating a qubit in which the error has occurred in the quantum circuit and a corresponding error type. The programmable hardware architecture provided in the present application is beneficial for sufficiently reducing a decoding delay and improves scalability and flexibility while ensuring decoding performance.
Need to check novelty before this filing date? Find Prior Art

Description

Quantum error correction hardware decoder and chip

[0001] This application claims priority to the Chinese patent application filed on April 27, 2023, with application number 202310479401.9 and invention name “Quantum Error Correction Hardware Decoder and Chip”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the fields of artificial intelligence and quantum technology, and in particular to a quantum error correction hardware decoder and chip. Background Art

[0003] All operations in real quantum computing, including quantum gates and quantum measurements, are noisy. This means that even the circuits used for quantum error correction themselves contain noise. Fault-tolerant quantum error correction involves cleverly designing error-correcting circuits to perform error correction using noisy circuits. This approach can still correct errors and prevent them from propagating over time.

[0004] Fault-tolerant quantum error correction involves performing symptom measurements on a quantum circuit to obtain corresponding error symptom information. This information is then decoded to determine the qubits in the quantum circuit experiencing errors and the corresponding error types. Related technologies offer a method for decoding error symptom information based on a neural network model. This information is fed into a neural network model, which then decodes it to produce an output. This output can then be used to further determine the qubits in the quantum circuit experiencing errors and the corresponding error types.

[0005] At present, the hardware implementation of the decoding scheme based on the neural network model still needs further research.

[0006] Summary of the Invention

[0007] The present invention provides a quantum error correction hardware decoder and chip. The technical solution is as follows:

[0008] According to one aspect of an embodiment of the present application, a quantum error correction hardware decoder is provided, wherein the quantum error correction hardware decoder includes: an instruction memory, a control unit, at least one neural network processing unit, and an error merging and searching unit;

[0009] The instruction memory is used to store computer instructions;

[0010] The control unit is configured to read the computer instructions from the instruction memory and control the at least one neural network processing unit according to the computer instructions;

[0011] The at least one neural network processing unit is configured to decode error symptom information of the quantum circuit based on a neural network model in response to control by the control unit and obtain an output result of the neural network model, wherein the error symptom information refers to an error symptom obtained by performing an error measurement on the quantum circuit;

[0012] The error merging and searching unit is used to determine error information according to the output result, where the error information is used to indicate the quantum bit in which an error occurs in the quantum circuit and the corresponding error type.

[0013] According to one aspect of an embodiment of the present application, a chip is provided, wherein the chip is deployed with the above-mentioned quantum error correction hardware decoder.

[0014] The technical solutions provided by the embodiments of the present application include at least the following beneficial effects:

[0015] A hardware implementation architecture for a quantum error correction decoding algorithm based on a neural network is provided. The hardware architecture is a programmable architecture, and the computer instructions for implementing the decoding algorithm can be pre-stored in an instruction memory. During the real-time decoding process, the control unit reads the above-mentioned computer instructions and controls the neural network processing unit according to the computer instructions to decode the error symptom information of the quantum circuit based on the neural network model, and finally obtains error information. The above-mentioned hardware decoding architecture can efficiently run the quantum error correction decoding algorithm based on the neural network model, thereby fully reducing the decoding delay while ensuring the decoding performance. Moreover, in the above-mentioned hardware decoding architecture, the number of neural network processing units and the number of computing units contained in the neural network processing unit can be designed and expanded according to actual needs. Therefore, the hardware decoding architecture provided in this application has good scalability and flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] FIG1 is a schematic diagram of a rotating surface code according to an embodiment of the present application;

[0017] FIG2 is a schematic diagram of an application scenario of a solution provided by an embodiment of the present application;

[0018] FIG3 is a schematic diagram of the error correction decoding process involved in the application scenario of the solution shown in FIG2 ;

[0019] FIG4 is a schematic diagram of a quantum error correction hardware decoder architecture provided by one embodiment of the present application;

[0020] FIG5 is a schematic diagram of a quantum error correction hardware decoder provided by one embodiment of the present application;

[0021] FIG6 is a schematic diagram of a prefetch mechanism in an addition tree provided by one embodiment of the present application;

[0022] FIG7 is a schematic diagram of a multi-core architecture provided by an embodiment of the present application;

[0023] FIG8 is a schematic diagram illustrating resource consumption of a programmable decoder and a specific network architecture according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0025] Before introducing the embodiments of the present application, some terms involved in the present application are first explained.

[0026] 1. Quantum Computation (QC): A method that uses the superposition and entanglement properties of quantum states to quickly complete specific computing tasks.

[0027] 2. Quantum Error Correction (QEC): A method of encoding a quantum state by mapping it into a subspace in the Hilbert space of a multi-body quantum system. Quantum noise will migrate the encoded quantum state to other subspaces. By continuously observing the space where the quantum state is located (symptom extraction), we can evaluate and correct the quantum noise without interfering with the encoded quantum state, thereby protecting the encoded quantum state from interference from quantum noise. Specifically, a [[n,k,d]] quantum error correction code represents encoding k logical quantum bits in n physical quantum bits, which is used to correct any An error can occur in any single qubit.

[0028] 3. Data quantum state: The quantum state of the data quantum bit used to store quantum information during quantum computing.

[0029] 4. Stabilizer generator: Also known as a parity check operator. The occurrence of quantum noise (error) will change the eigenvalues ​​of certain stabilizer generators, allowing us to perform quantum error correction based on this information.

[0030] 5. Stabilizer group: A stabilizer group is a group generated by stabilizer generators. For example, an Abelian group generated by stabilizer generators is called a stabilizer generator group. If there are k stabilizer generators, then the stabilizer group includes 2 k elements, this is an abelian group.

[0031] 6. Error syndrome: When there are no errors, the eigenvalues ​​of the stable generators are 0. However, when quantum noise occurs, the eigenvalues ​​of some stable generators (parity operators) of the error-correcting code that are anti-commutative to the error become 1. The bit string consisting of these 0 and 1 syndrome bits is called an error syndrome.

[0032] 7. Syndrome measurement: A measurement required to collect error symptoms. To avoid destroying the information on the data qubit, the symptom measurement is performed on the auxiliary qubit.

[0033] 8. Number of symptom measurement rounds: Measurements themselves contain noise. To ensure fault tolerance, we need to repeat multiple rounds of measurement and use all collected error symptoms for decoding. The number of symptom measurement rounds can be represented by T.

[0034] 9. Topological quantum error-correcting codes: A special class of quantum error-correcting codes. The qubits of this type of error-correcting code are distributed on a lattice array with dimensions greater than 2. The lattice forms a discrete structure on a high-dimensional manifold. In this case, the stable subgenerators of the error-correcting code are defined on a finite number of geometrically proximal qubits, making them geometrically localized and physically easy to measure. The qubits acting on the logical operators of this type of error-correcting code form a topologically nontrivial geometric object on the manifold of the lattice array.

[0035] 10. Surface Codes: Surface codes are a class of topological quantum error-correcting codes defined on a two-dimensional manifold. Their stable sub-generators are typically supported by four qubits (with two qubits at the boundary), and their logical operators are nontrivial chains spanning the array in a strip. The specific two-dimensional structure of a surface code (7×7, consisting of 49 data qubits and 48 auxiliary qubits, for a total of 97 physical qubits, capable of correcting errors occurring between any two qubits) is shown in Figure 1. The black circles 11 represent the data qubits used for quantum computation, and the crosses 12 represent the auxiliary qubits. The auxiliary qubits are initially prepared in the |0> or |+> state. The shaded and white filled squares represent two different types of stable sub-generators, used to detect Z errors and X errors, respectively.

[0036] 11. Surface code scale L: One-quarter of the surface code array circumference. The surface code array in Figure 1 has L = 7, including 49 data qubits and 48 auxiliary qubits, for a total of 97 physical qubits.

[0037] 12. X and Z errors: These are randomly generated Pauli X and Pauli Z evolution errors in the quantum state of a physical qubit. According to quantum error correction theory, if an error-correcting code can correct X and Z errors, it can also correct any error occurring in a single qubit.

[0038] 13. Fault-tolerant Quantum Error Correction (FTQEC): All operations in real quantum computing, including quantum gates and quantum measurements, are noisy. This means that even the circuits used for quantum error correction themselves contain noise. Fault-tolerant quantum error correction involves cleverly designing error-correcting circuits and then using them to correct errors while preventing them from propagating over time.

[0039] 14. Fault-Tolerant Quantum Computation (FTQC): In quantum computing, any physical operation is noisy, including the quantum error correction circuits themselves and qubit measurements. Assuming that classical operations (such as command input and error-correcting code decoding) are noise-free, fault-tolerant quantum computing relies on a rationally designed quantum error correction scheme and specific quantum gate operations on the encoded logical quantum states to ensure that errors can be effectively controlled and corrected during quantum computations using noisy qubits.

[0040] 15. Physical qubit: A qubit implemented using real physical devices.

[0041] 16. Logical qubit: A mathematical degree of freedom in a Hilbert subspace defined by an error-correcting code. Its quantum state is typically described as a multi-body entangled state, typically a two-dimensional subspace of the Hilbert space of multiple physical qubits. Fault-tolerant quantum computing requires running on logical qubits protected by error-correcting codes.

[0042] 17. Quantum gate / circuit: A quantum gate / circuit that acts on a physical quantum bit.

[0043] 18. Threshold Theorem: For quantum computing schemes that meet the requirements of fault-tolerant quantum computing, when the error rate of all operations is below a certain threshold, the accuracy of the computation can be brought arbitrarily close to 1 by using better error-correcting codes, more qubits, and more quantum operations. At the same time, the additional resource overhead is negligible compared to the exponential speedup of quantum computing.

[0044] 19. Neural Network: An artificial neural network is an adaptive, nonlinear dynamic system composed of a large number of interconnected, simple basic elements—neurons. While the structure and function of each neuron are relatively simple, the system behavior generated by a large number of neurons is extremely complex and can, in principle, express arbitrary functions.

[0045] 20. Convolutional Neural Network (CNN): A convolutional neural network is a deep feedforward neural network that uses convolutional computations. The convolutional layer is the core building block of a convolutional neural network. It convolves a discrete two-dimensional or three-dimensional filter (also called a convolution kernel, a two-dimensional or three-dimensional matrix, respectively) with a two-dimensional or three-dimensional data matrix.

[0046] 21. Field Programmable Gate Array (FPGA): A further development of programmable devices such as PAL (Programmable Array Logic) and GAL (Generic Array Logic). FPGAs, a semi-custom circuit within the field of application-specific integrated circuits (ASICs), address the shortcomings of custom circuits while also overcoming the limited number of gates in existing programmable devices.

[0047] 22. Application-Specific Integrated Circuit: An integrated circuit designed and manufactured to meet specific user requirements and the needs of a specific electronic system. Using CPLDs (Complex Programmable Logic Devices) and FPGAs for ASIC design is one of the most popular approaches. They both share the characteristics of field programmability and support boundary scan technology, but each has its own unique characteristics in terms of integration, speed, and programming methods.

[0048] 23. Single Flux Quantum (SFQ) Circuit: Also known as Rapid Single Flux Quantum (RSFQ) circuit, this circuit consists of a Josephson junction (JJ). The presence or absence of a magnetic flux quantum represents "1" and "0." An "X" represents a Josephson junction in the circuit. The SFQ circuit consists of two superconducting layers, with a very thin insulating layer in between. It can be used for digital logic calculations.

[0049] 24. Neural Network Model Quantization: Quantization compresses the original network by reducing the number of bits required to represent each weight. Neural network models generally take up a large amount of storage space. If a neural network algorithm is to be implemented on a hardware chip, this will occupy a large amount of valuable on-chip storage space, on-chip registers and routing, and seriously affect the calculation speed. Because these parameters are floating-point types, ordinary compression algorithms cannot effectively handle this situation. If other simple numerical types (for example, fixed-point operations) can be used for calculations within the model without affecting the accuracy of the model, the consumed hardware computing resources (including hardware computing units and storage units) will be greatly reduced. For the algorithm computing chips of real-time feedback systems, the quantization algorithm will increase the amount of calculation per unit time and reduce the delay of the decoding algorithm.

[0050] 25. Multiply Accumulate (MAC): A special operation in digital signal processors and some microprocessors. The hardware circuit unit that implements this operation is called a "multiplier accumulator" or "multiplication accumulator." This operation adds the product of the multiplication to the value in the accumulator and stores the result in the accumulator.

[0051] 26. Low-Voltage Differential Signaling (LVDS): An electrical standard for low-voltage differential signaling, a method for serial data transmission using differential signaling. Physical implementation typically uses twisted-pair cables, enabling high-speed transmission at relatively low voltages. LVDS is only a physical layer specification and does not address protocol layer communication methods, resulting in very low latency.

[0052] 27. Given any Pauli operator P and an error-correcting code (In this application, the rotation surface code is taken as an example, and any topological error correction code can be defined in a similar way) The generator of the stable subgroup Then the Pauli operator P acting on the physical quantum bit supporting the error correction code can be decomposed into: P = L(P)T(S(P))

[0053] Where S(P) is The generators in the equation S(P) that are anti-commutative with P (also called the symptoms of the Pauli operator P) can be viewed as a bit array consisting of 0s and 1s. T(S(P)) is a Pauli operator generated by mapping these generators. It should be noted that in quantum mechanics, if operators F and G satisfy FG = GF, they are said to commute; if they satisfy FG = -GF, they are said to anti-commutative. The relationship between T(S(P)) and S(P) is one-to-one, and is called the simple representation of P. For rotation surface codes, a simple representation can be defined geometrically as the shortest Pauli operator connecting the symptoms to the boundary that does not commute with P. An X-type Pauli operator is the shortest Pauli operator connecting a symptom point a to the boundary that does not commute with P. A Z-type Pauli operator is the shortest Pauli operator connecting a symptom point b to the boundary that does not commute with P. General topological error-correcting codes can have similar simple representation mappings.

[0054] L(P) is a specific operator in the class of error-correcting codes to which P belongs (once selected, it is fixed). If we consider another Pauli operator P′, we have a similar decomposition: P′=L(P′)T(S(P′))

[0055] If S(P ′ )=S(P), and L(P′) and L(P) belong to the same logical class, then P′ and P only differ by an element of a stable subgroup, that is, they are equivalent in the sense of error correction. Then for any Pauli operator P, we can define: P c =L c (P)T(S(P))

[0056] Among them, L c (P) is a fixed representative element of the logical class to which L(P) belongs, then P c is called the canonical representation of P, L c (P)T(S(P)) is called the canonical decomposition of P. We convert all Pauli operators into their equivalent canonical representations. This significantly limits the unnecessary diversity of Pauli operators. This significantly reduces the difficulty of model training, especially when Pauli operators are used as model outputs, thereby improving the convergence speed of the training process.

[0057] The technical solution of this application relates to the fields of quantum technology and artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0058] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0059] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning through demonstration.

[0060] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0061] The solution provided in the embodiments of this application relates to the application of artificial intelligence machine learning technology in the field of quantum technology, and specifically to the application of machine learning technology in the decoding algorithm of quantum error correction code, which is specifically illustrated by the following embodiments.

[0062] Because qubits are highly susceptible to noise, performing quantum computing directly on physical qubits is unrealistic with current technology. The development of quantum error-correcting codes and fault-tolerant quantum computing technologies, in principle, makes it possible to perform arbitrary-precision quantum computing on noisy qubits. Generally speaking, measuring the stable subgenerators of a quantum error-correcting code (also known as performing a parity check on a qubit) requires the use of long-distance quantum gates and the preparation of complex quantum auxiliary states using additional qubits to achieve fault-tolerant error correction. Due to current experimental limitations, researchers are currently unable to achieve high-precision long-distance quantum gates or prepare complex quantum auxiliary states. However, the use of surface codes for fault-tolerant quantum error correction and fault-tolerant quantum computing does not require the use of long-distance quantum gates or the preparation of complex quantum auxiliary states, making it highly feasible to achieve a universal, fault-tolerant quantum computer using current technology.

[0063] As an error-correcting code, when an error occurs, we can obtain the error syndrome by performing a parity check. Based on these syndromes, we then need to use a specific decoding algorithm for the error-correcting code to determine the location and type of error (whether it is an X error, a Z error, or both, i.e., a Y error). For surface codes, errors and error syndromes have specific spatial locations: when an error causes a syndrome, the eigenvalue of the auxiliary qubit at the corresponding location is 1 (which can be thought of as a point particle appearing at that location); when there is no error, the eigenvalue of the auxiliary qubit at the corresponding location is 0. Decoding can then be reduced to the following problem: given a spatial array of numbers (2D or 3D, with values ​​of 0 or 1), based on a specific error model—the probability distribution of errors occurring on the qubits—we can infer which qubits are most likely to experience errors and the specific error type, and then perform error correction based on this inference.

[0064] As mentioned above, by decoding the error symptom information using the decoding algorithm of the error correction code, the corresponding error information, such as the location and type of the error, can be obtained. This application mainly focuses on the hardware implementation architecture of the quantum error correction decoding algorithm based on the neural network, and proposes a neural network quantum error correction hardware decoder based on a programmable architecture. The quantum error correction hardware decoder referred to in this application refers to the hardware architecture implemented by deploying the decoding algorithm related to quantum error correction on the corresponding hardware resources, and can be applied in real-time quantum error correction scenarios.

[0065] The performance of a quantum error correction hardware decoder can be measured by the following performance indicators: decoding performance, decoding latency, scalability and flexibility.

[0066] Decoding performance (accuracy): After decoding and error correction based on a specific noise model, it is measured by the error rate occurring on the logical qubits. For the same physical qubit error rate, the lower the logical error rate, the better the decoding performance. For a hardware decoder, the upper limit of its decoding performance is determined by the decoding algorithm used. During hardware implementation, specific hardware resources may impose certain limitations on algorithm implementation (such as neural network quantization), resulting in a certain loss of accuracy.

[0067] Decoding delay: The lifetime of a superconducting qubit is approximately 150 microseconds under optimal processing conditions. During the decoding process, the system is idle, and errors accumulate over time. Theoretically, the entire error correction process must take less than 1 / 1000-1 / 100 of the superconducting qubit lifetime. In other words, the entire error correction delay needs to be less than 1.5 microseconds. Otherwise, the error rate may exceed the error correction capability of the surface code. Targeted optimization of the hardware decoder is crucial to achieving this delay target.

[0068] Scalability: We hope that the resource consumption of the hardware decoder increases moderately with the increase of the surface code scale L, otherwise it may be impossible to implement a decoder with a larger L. This means that the decoding algorithm used must have lower algorithmic complexity and that hardware architecture optimizations are needed to further reduce resource consumption.

[0069] Flexibility: In real-world scenarios, hardware decoders must adapt to a variety of environmental configurations, including varying noise levels, surface code distances, and error correction code types. Therefore, we desire flexible decoder configurations and the ability to frequently reconfigure and experiment to find the optimal design for different scenarios. This requirement becomes particularly critical when implementing hardware decoders using ASICs, as the redesign and deployment of ASICs is lengthy and expensive, making them impractical in both engineering and application scenarios.

[0070] Please refer to Figure 2, which shows a schematic diagram of an application scenario of a solution provided by an embodiment of the present application. As shown in Figure 2, the application scenario can be a superconducting quantum computing platform, which includes: quantum circuit 21, dilution refrigerator 22, control device 23 and computer 24.

[0071] The quantum circuit 21 is a circuit that acts on a physical quantum bit. The quantum circuit 21 can be implemented as a quantum chip, such as a superconducting quantum chip at near absolute zero. The dilution refrigerator 22 is used to provide an absolute zero environment for the superconducting quantum chip.

[0072] Control device 23 controls quantum circuit 21, and computer 24 controls control device 23. For example, a pre-written quantum program is compiled into instructions by software in computer 24 and sent to control device 23 (e.g., an electronic / microwave control system). Control device 23 converts these instructions into electronic / microwave control signals and inputs them into dilution refrigerator 22, controlling the superconducting qubits at 10 mK. The reading process is the reverse.

[0073] The present application provides an optimized quantum algorithm suitable for real-time error correction of superconducting quantum bits. As shown in Figure 3, the real-time quantum fault-tolerant error correction algorithm needs to be combined with the control device 23 (such as integrating the decoding algorithm into the electronic / microwave control system). After the master control system 23a (such as the central board FPGA) of the control device 23 reads the error symptom information from the quantum circuit 21, the master control system 23a sends an error correction instruction to the error correction module 23b of the control device 23, and the error correction instruction includes the error symptom information of the above-mentioned quantum circuit 21. The error correction module 23b can be an FPGA chip or an ASIC chip. The error correction module 23b runs a quantum error correction decoding algorithm based on a neural network, decodes the error symptom information, and converts the decoded error information into an error correction control signal in real time and sends it to the quantum circuit 21 for error correction.

[0074] Please refer to FIG4 , which shows a schematic diagram of a quantum error correction hardware decoder architecture provided by one embodiment of the present application.

[0075] In some embodiments, error symptoms are measured on quantum circuits using quantum error correction codes to obtain corresponding error symptom information. This error symptom information is a data array consisting of the eigenvalues ​​of the quantum error correction code's stabilizer generators. Optionally, the error symptom information is a two-dimensional or three-dimensional data array consisting of 0s and 1s. For example, when there are no errors, the eigenvalue of the stabilizer generator is 0; when an error occurs, the eigenvalue of the stabilizer generator is 1. For example, in the case of a surface code, errors and error symptoms have specific spatial locations: when an error causes a symptom, the eigenvalue of the auxiliary qubit at the corresponding location is 1 (which can be viewed as the appearance of a point particle at that location); when there is no error, the eigenvalue of the auxiliary qubit at the corresponding location is 0. Therefore, for surface codes, if errors in the error correction process itself are not considered (that is, if the measurement process is perfect, it is called a perfect symptom), the error symptom information can be considered a two-dimensional data array consisting of 0s and 1s. Optionally, if multiple rounds of symptom measurements are performed on the quantum circuit, each round of symptom measurement can obtain error symptom information in the form of a two-dimensional data array, and multiple rounds of symptom measurement can obtain error symptom information in the form of a three-dimensional data array.

[0076] In some embodiments, for a surface code of scale L, T (where T is greater than L) rounds of measurements are required to ensure tolerance to measurement errors. Each round of measurement produces a single-bit result for each auxiliary qubit. The results of these multiple rounds are combined into a three-dimensional data array consisting of 0s and 1s, which serves as the error symptom information for the quantum circuit.

[0077] Optionally, the quantum error correction hardware decoder obtains error symptom information about the quantum circuit through the master control system. For example, the master control system instructs the quantum error correction hardware decoder to initiate quantum error correction via an error correction instruction. Exemplarily, the error correction instruction includes the error symptom information about the quantum circuit, or the quantum error correction hardware decoder reads the error symptom information from the master control system in response to the received error correction instruction. In other words, the error symptom information about the quantum circuit is fed to the quantum error correction hardware decoder, which decodes the error symptom information to ultimately obtain error information about the quantum circuit. This error information indicates the quantum bit in the quantum circuit that has experienced an error and the corresponding error type. Error types include at least one of the following: X error and Z error.

[0078] In some embodiments, error information of different error types is obtained by decoding error symptom information using different quantum error correction decoders. For example, two quantum error correction hardware decoders are designed, denoted as a first quantum error correction hardware decoder and a second quantum error correction hardware decoder. The first quantum error correction hardware decoder (i.e., the X error decoder in FIG4 ) is used to decode and obtain X-type error information, which is used to indicate the quantum bits in the quantum circuit that have experienced X errors. The second quantum error correction hardware decoder (i.e., the Z error decoder in FIG4 ) is used to decode and obtain Z-type error information, which is used to indicate the quantum bits in the quantum circuit that have experienced Z errors.

[0079] In one possible implementation, the error symptom information is decomposed into two parts: type X error symptom information and type Z error symptom information. The two parts are input into a first quantum error correction hardware decoder and a second quantum error correction hardware decoder, respectively. The first quantum error correction hardware decoder decodes the type X error symptom information to obtain type X error information, and the second quantum error correction hardware decoder decodes the type Z error symptom information to obtain type Z error information. This helps reduce the computational complexity of the decoder.

[0080] In another possible implementation, both the first and second quantum error correction hardware decoders receive error symptom information as input. Instead of distinguishing between type X and type Z error symptoms, all syndrome bits are used simultaneously to decode both X and Z errors. Because X and Z errors are correlated, this combined consideration of all syndrome bits allows for more accurate determination of the locations of X and Z errors.

[0081] In other embodiments, error information for different error types is obtained by decoding the error symptom information using the same quantum error correction decoder. For example, only one quantum error correction hardware decoder is designed, and the error symptom information is input into the quantum error correction hardware decoder, which then decodes the error symptom information to obtain error information. This error information includes the qubit in the quantum circuit that experienced the error and the corresponding error type. In other words, a single quantum error correction hardware decoder simultaneously determines both X and Z errors.

[0082] The quantum error correction hardware decoder decodes error symptom information based on a neural network model. A neural network model refers to an AI model built on a neural network. The quantum error correction hardware decoder requires the storage of a network parameter file, which contains the neural network model's parameters, such as its weights and biases. The neural network model's calculations require a large number of parameters, which are pre-trained in the software and loaded into the network parameter file before error correction begins. These neural network model parameters are grouped and loaded into the computational unit, requiring the decoder to be able to rapidly switch between parameter groups during real-time decoding.

[0083] Therefore, the present application tends to select on-chip storage to store the network parameter file to avoid large off-chip storage read delays. The entire network parameter file is divided into two parts according to different data structures, one part for storing weight parameters (also called weight matrix), and the other part for storing bias parameters (also called bias vector). These parameters are originally floating-point numbers, but this will result in complex multiplication operations and consume a large amount of storage space. In order to improve storage and computing efficiency, the present application quantizes these parameters into 8-bit signed fixed-point numbers and implements them on FPGA. By selecting non-saturated quantization to simplify the implementation of the arithmetic unit and data file, only negligible precision loss is caused. Of course, the parameters in the form of floating-point numbers can also be quantized into signed fixed-point numbers of other digits, which can be considered in combination with the computing power, precision requirements and algorithm complexity of the decoder. The embodiments of the present application are not limited to this.

[0084] The main hardware unit responsible for neural network operations in the quantum error correction hardware decoder is the neural network processing unit (or neural network processing engine (NPE)). The number of neural network processing units can be one or more. Each neural network processing unit can include multiple arithmetic units (AUs). In some embodiments, the neural network model can be constructed based on 3D CNN and FCN (Fully Connected Neural Network). In the neural network processing unit, most arithmetic units perform similar vector inner product operations, which can be expressed as the following formula.

[0085] Among them, y n+1 It represents the output data of the nth layer of the neural network model and is also the input data of the n+1th layer, where n is a positive integer. is the weight coefficient corresponding to the computation node in the jth row and the ith column in the nth layer, is the i-th element of the input data vector in the n-th layer, Represents the calculation result of weighted summation of the input data vectors in the nth layer based on the weight coefficient corresponding to the calculation node in the jth row of the coefficient matrix of the nth layer, is the bias coefficient of the jth row in the nth layer, A represents the nonlinear function, Represents the output data of the jth row in the nth layer. Since the bias vectors are only used once in each iteration, they can also be stored in a series of simple registers. The multiplication and addition operations in the neural network processing unit occupy most of the computing resources in the entire decoder.

[0086] The quantum error correction hardware decoder also includes an error merging and searching unit, which is used to determine the error information based on the output of the neural network model. Taking the decoding of the X and Z errors separately as an example, the first quantum error correction hardware decoder and the second quantum error correction hardware decoder will each generate an error of length The decoding result of the bit is the possible error combination, L is the surface code size. This decoding result will be used as an address to search the lookup table. Correspondingly, the lookup table also contains entries, each of size L 2 , which corresponds to the number of data qubits. Therefore, the memory consumption of the lookup table is When performing a lookup, the lookup table content corresponding to each non-zero position in the decoded result is retrieved and XORed, and the final result is the position of the erroneous data qubit. Therefore, the number and size of the lookup table entries can be easily calculated. For a surface code of scale L, the lookup table consumes L 4 -L 2 bits of memory. This storage requirement is relatively small, and a LUT (Look Up Table) can be used to easily achieve a predictable surface code scale. Finally, this error information is transmitted to the control unit to generate error correction control signals for the data qubits.

[0087] Please refer to Figure 5, which shows a schematic diagram of a quantum error correction hardware decoder provided by one embodiment of the present application. The quantum error correction hardware decoder includes: an instruction memory 51, a control unit 52, at least one neural network processing unit 54, and an error merging and searching unit 53.

[0088] The instruction memory is used to store computer instructions.

[0089] The control unit 52 is configured to read computer instructions from the instruction memory 51 and control at least one neural network processing unit 54 according to the computer instructions. In response to the control of the control unit 52, the at least one neural network processing unit 54 is configured to decode error symptom information of the quantum circuit based on the neural network model and obtain an output result of the neural network model. The error symptom information refers to error symptoms obtained by performing error measurements on the quantum circuit.

[0090] The error merging and searching unit 53 is used to determine error information according to the output result, where the error information is used to indicate the quantum bit in which an error occurs in the quantum circuit and the corresponding error type.

[0091] The control unit 52 is mainly responsible for the instruction scheduling of the operation in the entire decoding process. Before the real-time error correction decoding begins, a series of assembly codes (or computer instructions) describing the decoding algorithm can be generated by the compiler and loaded into the instruction memory 51. The above-mentioned assembly code is used to implement the processing flow of the entire decoding algorithm, so as to realize the control of at least one neural network processing unit 54 based on the neural network model, decode the error symptom information of the quantum circuit, and obtain the output result of the neural network model. After the real-time error correction decoding begins, the control unit 52 reads the computer instructions from the instruction memory 51, and decodes and executes them. In this way, the quantum error correction hardware decoder provided in the embodiment of the present application is programmable, and the corresponding code can be flexibly written according to the decoding algorithm, which helps to improve the universality of the quantum error correction hardware decoder for different error correction algorithms.

[0092] Optionally, the control unit 52 receives error correction instructions from the master control system and obtains error symptom information about the quantum circuit from the error correction instructions. The control unit 52 transmits the error symptom information about the quantum circuit to the neural network model, allowing the neural network model to decode the error symptom information. In other words, the error symptom information about the quantum circuit serves as input data for the neural network model. For the specific form of the error symptom information about the quantum circuit, please refer to the above embodiments and will not be elaborated on here.

[0093] For example, the number of network layers of the neural network model and the role of each network layer are determined according to the quantum error correction algorithm actually used. For example, the neural network model is designed based on networks such as 3D CNN, FCN, and recurrent neural network (RNN). The neural network model is used to decode the error type that occurs based on error feature information. This application does not limit the model structure of the neural network model.

[0094] In some embodiments, the decoding process of the neural network model is divided into n sub-processes that are executed sequentially. Different sub-processes reuse the neural network processing unit 54, where n is an integer greater than 1. Optionally, the sub-processes included in the decoding process are obtained by dividing the decoding process. For example, the decoding process can be divided into n sub-processes based on the different functions of each stage in the decoding process. For each of the n sub-processes, the sub-process begins by obtaining input data, processes the input data during the sub-process, and outputs the output data after the sub-process ends.

[0095] The decoding process of a neural network model refers to the process of decoding the error symptoms of a quantum circuit based on the neural network model to obtain the output of the neural network model. The decoding process can be understood as a classification process, that is, encoding the error symptoms to obtain feature information, and then decoding the error symptoms based on the feature information to obtain the decoding result.

[0096] Optionally, the output result of the neural network model includes multiple decoding results. Exemplarily, the type of decoding result includes at least one of the following: the error symptom information includes a probability distribution of a certain error type, a representative element related to a certain error type, and a regular symptom related to a certain type; wherein the regular symptom refers to the regular decomposition result of the error symptom information. For example, the multiple decoding results include the probability distribution of the error symptom information belonging to each error type. For another example, the multiple decoding results include: representative elements related to each error type and regular symptoms related to each error type.

[0097] It should be noted that the output results of the neural network model are related to the training data selected during the training of the neural network. For example, if the neural network model is trained using sample error symptom information and the probability distribution of error types, the output results of the trained neural network model after processing the error symptom information will include the probability distribution of error types. For another example, if the neural network model is trained using sample error symptom information and representative elements related to error types, the output results of the trained neural network model after processing the error symptom information will include the probability distribution of error types. This application does not limit the form of the output results of the neural network model.

[0098] Optionally, according to the structure of the neural network model, the decoding process of the neural network model is divided to obtain n sub-processes that are executed in sequence. Among them, the i+1th sub-process is executed after the i-th sub-process, that is, after the i-th sub-process is completed, the i+1th sub-process is started, and i is a positive integer less than or equal to n. Exemplarily, the neural network model has a 4-layer structure, including a first convolutional layer, a second convolutional layer, a third convolutional layer and a fully connected layer connected in series. The input data of the first convolutional layer includes the error symptom information of the quantum circuit. The error symptom information of the sub-circuit is convolved by the first convolutional layer to obtain the output data of the first convolutional layer, and the output data of the first convolutional layer is used as the input data of the second convolutional layer. The second convolutional layer performs a convolution operation on its own input data to obtain the output data of the second convolutional layer, and the output data of the second convolutional layer is used as the input data of the third convolutional layer. The third convolutional layer performs a convolution operation on its own input data to obtain the output data of the third convolutional layer, and the output data of the third convolutional layer is used as the input data of the fully connected layer. The fully connected layer performs a vector inner product operation on its input data to obtain the output of the neural network model. Based on the structure of the above neural network model, the decoding process of the neural network model can be divided into four sub-processes executed in sequence. The first sub-process refers to the operation process of the first convolutional layer, the second sub-process refers to the operation process of the second convolutional layer, the third sub-process refers to the operation process of the third convolutional layer, and the fourth sub-process refers to the operation process of the fully connected layer.

[0099] The parameters of the neural network model used in different sub-processes may be different. Optionally, at the beginning of a sub-process, the neural network processing unit 54 obtains the parameters of the neural network model required for use in the sub-process. In order to increase the speed of obtaining the parameters of the neural network model required for use in the sub-process, the parameters of the neural network model are illustratively stored in blocks in advance. For any parameter block, the parameters of the neural network model included in the parameter block are used in a sub-process. The parameter block can be understood as parameters with continuous storage addresses or a certain regularity, and these parameters need to be used in the same sub-process. In one example, at the beginning of a sub-process, or at the stage when it is about to begin, the quantum error correction hardware decoder can obtain all the parameters required for the sub-process by reading the parameters in the parameter block. For the specific steps of parameter reading, please refer to the embodiment below.

[0100] Through the above division, different sub-processes can reuse the neural network processing unit 54. For example, the neural network processing unit 54 starts to execute from the first sub-process, and after the first sub-process is completed, the neural network processing unit 54 starts to execute the second sub-process, and so on, until the nth sub-process is completed, the output result of the neural network model can be obtained. By dividing the decoding process of the neural network model into multiple sub-processes executed in sequence, different sub-processes reuse the neural network processing unit, so that there is no need to allocate exclusive operation units to different network layers, which helps to improve the utilization rate of each operation unit in the decoder and reduce the complexity and cost of the decoder hardware design.

[0101] In some embodiments, each sub-process includes a first stage, a second stage, and a third stage. The first stage is used to perform a multiplication-addition operation on the input data of the sub-process to obtain at least one first calculation result. The second stage is used to perform an addition operation on the at least one first calculation result to obtain at least one second calculation result. The third stage is used to obtain output data of the sub-process based on the at least one second calculation result. The input data of the first sub-process among the n sub-processes includes error symptom information of the quantum circuit, and the output data of the last sub-process among the n sub-processes (i.e., the nth sub-process) includes the output result of the neural network model.

[0102] From the above introduction to the main operation process of the neural network model, it can be seen that the neural network model mainly involves multiplication and addition operations. Therefore, we divide each sub-process into three stages. The first stage can also be called the multiplication and addition stage, which is used to perform multiplication and addition operations on the input data of the sub-process to obtain at least one first calculation result. For example, in the first stage, the main multiplication operation is performed to calculate Some addition operations can also be performed to add the above-mentioned multiplication results. The second stage, also known as the addition stage, is used to perform addition operations on at least one first calculation result obtained in the first stage to obtain at least one second calculation result. The third stage is responsible for some final finishing operations and processing, and obtains the output data of this sub-process based on the at least one second calculation result obtained in the second stage. By analyzing the common characteristics of each sub-process and dividing each sub-process into the above three stages, the entire decoding algorithm process is made clearer and easier to implement in hardware deployment.

[0103] For any of the three stages included in the sub-process that are executed sequentially, the same type of operations are required in the same stage, the types of computing units used are similar, and data transmission is stored between adjacent stages in terms of timing. By dividing the sub-process into multiple stages, it is convenient to design the layout of each computing unit required for each stage in the neural network processing unit and to design the wiring between the computing units. Based on this, it is helpful to improve the regularity of the computing units in the neural network processing unit, help to expand the performance of the neural network processing unit in the future to support larger surface code scales, and help to improve the adaptability of the quantum error correction hardware decoder to different error correction situations.

[0104] In some embodiments, when each sub-process is divided into the above-mentioned three stages, the neural network processing unit 54 includes: a first sub-unit 54a, a second sub-unit 54b, and a third sub-unit 54c. The first sub-unit 54a includes at least one operation unit for performing the first stage. For example, the first sub-unit 54a includes one or more multiplication operation units. Optionally, the first sub-unit 54a also includes one or more addition operation units. The second sub-unit 54b includes at least one operation unit for performing the second stage. For example, the second sub-unit 54b includes one or more addition operation units. The third sub-unit 54c includes at least one operation unit for performing the third stage. For example, the third sub-unit 54c includes an adder. Optionally, the third sub-unit 54c also includes a register, and the register and the adder are used to cooperate and coordinate to complete the accumulation operation.

[0105] It should be noted that the type of the operation unit included in the sub-unit is related to the operation that needs to be completed in the execution stage of the sub-unit, and is not limited here.

[0106] In the embodiment of the present application, there is no specific limitation on the number of multiplication units and addition units included in the first subunit 54a, and this can be designed based on actual needs. For example, when the first subunit 54a includes 4 multiplication units, it supports the parallel calculation of 4 groups of multiplication operations. When the first subunit 54a includes 8 multiplication units, it supports the parallel calculation of 8 groups of multiplication operations. The more multiplication units included in the first subunit 54a, the more parallel multiplication operations it supports, and the structure of the first subunit 54a is correspondingly more complex. In addition, the addition units included in the first subunit 54a can be in a tree structure, adding the product results obtained by the above-mentioned multiplication units. In actual applications, the appropriate number of multiplication units and addition units can be selected based on a comprehensive consideration of multiple factors such as the complexity of the entire decoding algorithm, decoding latency, and hardware complexity.

[0107] Because the operations required in each stage are not exactly the same and there is a temporal relationship between the stages, using the stage as the smallest unit and assigning corresponding operation units to each stage can not only ensure the normal decoding process, but also help avoid redundant operation units and reduce the hardware overhead of the quantum error correction hardware decoder.

[0108] In some embodiments, the first subunit 54a further includes a data operation unit and a weight operation unit. The data operation unit is configured to read input data used in the first stage from a first register, and the weight operation unit is configured to read weight parameters of the neural network model used in the first stage from a second register. These input data and weight parameters are sent to corresponding multiplication units for operation.

[0109] Optionally, the process of the data operation unit reading the input data used in the first stage from the first register and the process of the weight operation unit reading the weight parameters of the neural network model used in the first stage from the second register can be executed in parallel.

[0110] For example, the control unit 52 sends a first computer instruction to the data operation unit and a second computer instruction to the weight operation unit in the same clock cycle, so that the data operation unit reads the input data used in the first stage from the first register according to the first computer instruction, and the weight operation unit reads the weight data used in the first stage from the second register according to the second computer instruction. This arrangement helps to shorten the time difference between the weight data and the input data reaching the multiplication unit in the first subunit, thereby shortening the time consumption of the first stage.

[0111] Of course, the control unit 52 may also send the first computer instruction and the second computer instruction in different clock cycles in the same clock cycle, which is not limited in this application.

[0112] Optionally, there is a line connection between the data operation unit and the operation unit included in the first subunit 54a, and the data operation unit transmits the input data to the operation unit through the line; there is a line connection between the weight operation unit and the operation unit included in the first subunit 54a, and the weight operation unit transmits the weight data to the operation unit through the line.

[0113] Considering that the neural network model usually processes multi-dimensional input data in vector or matrix form, and different elements in the vector or matrix (understood as a numerical value in the input data) correspond to different weight data, there is a routing connection between the data operation unit and at least one operation unit included in the first sub-unit 54a, and the data operation unit transmits the above elements to the corresponding operation unit through the routing connection.

[0114] Through the above-mentioned data operation unit and weight operation unit, it can be ensured that the input data and weight parameters are correctly given to the corresponding multiplication operation unit for processing.

[0115] As shown in Figure 5, the quantum error correction hardware decoder also includes a first register and a second register. The first register is used to store the input data used in the decoding process of the neural network model and the output data generated by the decoding process of the neural network model. The second register is used to store the weight parameters and bias parameters of the neural network model.

[0116] Optionally, error symptom information is stored in the first register. Exemplarily, the first register obtains the error symptom information from the error correction instruction and stores the error symptom information. In each sub-process of the decoding process, the neural network processing unit can read the data and parameters required for the sub-process from the above two registers, and after executing the sub-process, store the output data obtained by the sub-process in the first register for subsequent use. By setting the above two registers, the data and parameters used in the decoding process are stored separately, which can ensure the efficiency of data and parameter reading and writing.

[0117] Furthermore, the first subunit 54a is scalable. For example, the number of multiplication units and addition units within the first subunit 54a can be increased as needed to support larger surface code sizes. Alternatively, the number of first subunits 54a can be increased as needed, such as by providing multiple first subunits 54a. These multiple first subunits 54a can perform the operations required for the first stage in parallel, and the results of these multiple first subunits 54a can be ultimately integrated to obtain the at least one first calculation result. Furthermore, in the first stage, the selection of which first subunit(s) 54a to perform the operation, as well as which multiplication units and addition units to perform the operation, can be predetermined by computer instructions stored in the instruction memory 51. The control unit 52 can then control the corresponding first subunits 54a and operation units to perform the corresponding operations according to the computer instructions.

[0118] In the embodiment of the present application, there is no specific limitation on the number of addition units included in the second subunit 54b, which can be designed in combination with actual needs. In addition, the addition units included in the second subunit 54b can be in a tree structure to add the at least one first calculation result mentioned above. The number of addition units included in the first subunit 54a and the second subunit 54b can be determined according to the number of multiplication units included in the first subunit 54a. For example, when the number of multiplication units included in the first subunit 54a is C, the required addition tree depth is log2C, and the number of addition units included in the first subunit 54a and the second subunit 54b can be determined based on the addition tree depth of log2C. For example, when the number of multiplication operation units is 4, the depth of the addition tree is 2, including 2+1=3 addition operation units in total; when the number of multiplication operation units is 8, the depth of the addition tree is 3, including 4+2+1=7 addition operation units in total; when the number of multiplication operation units is 16, the depth of the addition tree is 4, including 8+4+2+1=15 addition operation units in total, and so on.

[0119] In some embodiments, the second subunit 54b also includes at least one multiplexer (such as the module shown in the ladder in Figure 5), which is used to pre-fetch the calculation results of different depths in the operation unit tree (such as the addition tree) corresponding to the second stage. The operation unit tree includes multiple operation units, and the multiple operation units have a hierarchical structure in the operation unit tree. For the first level other than the bottom level in the operation unit tree, the input data of the operation unit in the first level comes from the operation unit in the second level. For example, the input data of the operation unit in the first level is the operation result of at least one operation unit in the second level, and the second level refers to the level result adjacent to the first level in the operation unit tree and lower than the first level. For example, the operation unit tree includes 4 levels, and the level order from high to low is: level 1, level 2, level 3 and level 4; if the first level is level 2, the second level is level 1.

[0120] Considering that not all multiplication units are necessarily required at all times in the first stage, this prefetch mechanism allows for flexible configuration of the number of multiplication operations. For example, as shown in FIG6 , assume there are eight multiplication units, represented by the circles numbered 1 to 8 in FIG6 . The two operation results obtained by the multiplication units numbered 1 and 2 are added together by an addition unit A1 to obtain a sum. The two operation results obtained by the multiplication units numbered 3 and 4 are added together by an addition unit A2 to obtain a sum. The two operation results obtained by the multiplication units numbered 5 and 6 are added together by an addition unit A3 to obtain a sum. The two operation results obtained by the multiplication units numbered 7 and 8 are added together by an addition unit A4 to obtain a sum. Furthermore, the sum of the results obtained by addition units A1 and A2 is added together by an addition unit B1 to obtain a sum. The summation results obtained by addition unit A3 and addition unit A4 are added together by one addition unit B2 to obtain a summation result. The summation results obtained by addition unit B1 and addition unit B2 are added together by one addition unit C1 to obtain a summation result. The above-mentioned addition units A1 to A4, B1 to B2, and C1 together constitute an addition tree. Assume that in some cases, only one addition unit is needed to add two values, for example, only addition unit A1 is needed to add the two operation results obtained by multiplication units numbered 1 and 2. Or, in some cases, only three addition units are needed to add four values, for example, only addition units A1, A2, and B1 are needed to add the four operation results obtained by multiplication units numbered 1 to 4. Therefore, a multiplexer may be provided to pre-fetch calculation results at different depths in the addition tree, which helps to improve the adaptability of the second subunit 54b to different computing scenarios, enhance flexibility and reduce latency.

[0121] Furthermore, the second subunit 54b is also scalable. For example, the number of addition units in the second subunit 54b can be increased as needed to support larger surface code sizes. Alternatively, the number of second subunits 54b can be increased as needed, such as by providing multiple second subunits 54b. These multiple second subunits 54b can perform the operations required for the second stage in parallel, and ultimately integrate the operation results of these multiple second subunits 54b to obtain the at least one second calculation result. Furthermore, in the second stage, the selection of which second subunit(s) 54b to perform the operation, as well as which addition units to perform the operation, can be predetermined by computer instructions stored in the instruction memory 51. The control unit 52 can then control the corresponding second subunits 54b and operation units to perform the corresponding operations according to the computer instructions.

[0122] In the embodiment of the present application, there is no limitation on the specific type and number of the operation units included in the third subunit 54c, which can be designed accordingly according to the operations to be completed in the third stage. For example, when the third stage needs to complete the addition operation of the second calculation result and the bias coefficient, the third subunit 54c needs to have an addition operation unit. For example, when the third stage needs to complete the calculation of some nonlinear functions, the third subunit 54c needs to have a multiplication operation unit and an addition operation unit. It should be understood that the various operation units included in the third subunit 54c are not necessarily all used every time the third stage is executed. For example, for different network layers in the neural network model, the operation operations involved in the third stage may be different. The control unit 52 controls the corresponding operation units in the third subunit 54c to perform the corresponding operations according to the computer instructions read from the instruction memory 51. Some unnecessary operation units can be skipped by bypassing.

[0123] In some embodiments, as shown in FIG5 , the control unit 52 includes an instruction decoder, a scheduler, and a manager. The instruction decoder is used to decode the read computer instructions to obtain first-category instructions and second-category instructions, provide the first-category instructions to the scheduler, and provide the second-category instructions to the manager. The scheduler is used to control at least one neural network processing unit according to the first-category instructions. The at least one neural network unit is also used to perform arithmetic operations in response to the control of the scheduler; the manager is used to control the various registers included in the quantum error correction hardware decoder in response to the second-category instructions. The various registers included in the quantum error correction hardware decoder are used to perform read and write operations in response to the control of the manager.

[0124] The instructions taken out from the instruction memory 51 are decoded in the control unit 52 and then distributed to the scheduler or manager according to the instruction type. The instruction decoding mentioned here is similar to the instruction decoding in classical computers (that is, the value decoding stage in classical computers), that is, the opcode, address, operand and other data contained in the instruction are taken out separately for subsequent processing. Some basic network information (such as the number of parameters of the neural network model, the address where the parameters are stored, and the address where the results are stored) is also pre-stored in the on-chip memory of the decoder and accessed by the control unit 52 during operation.

[0125] The scheduler receives instructions for computational execution (i.e., the first type of instructions described above) and uses a finite state machine (FSM) to determine the specific operations to be performed in the neural network processing unit 54. The manager is responsible for scheduling communications between registers at each stage of the neural network processing unit 54 and the input / output data collector.

[0126] Managing different instructions through a scheduler or manager helps to enable the neural network processing unit 54 to perform computing operations and read and write operations in parallel, thereby improving the efficiency of quantum error correction.

[0127] Compared with classical processors, error decoding is a static process, and the number of execution cycles of the entire neural network processing unit 54 and the computational division of each network layer can be predetermined. Therefore, we can choose the Very Long Instruction Word (VLIW) method to reduce the instruction execution delay. The control instructions of our programmable decoder can be divided into two groups: computation class instructions and memory transfer class instructions, namely the first class instructions and the second class instructions mentioned above. These two groups of instructions are used for the command scheduler and manager respectively. Therefore, the design of the control instructions basically represents a method for operating a configurable FSM in the control unit. The reason for scheduling instructions based on different groups is that we can overlap the delay of reading the memory with the time spent on execution of the neural network processing unit 54, thereby reducing the overall delay.

[0128] In addition, considering that the matrix-vector calculations in a single network layer may be too large to be completed in a single sub-process, the input data of the larger network layer will be divided into multiple blocks and calculated in the scheduling order according to the instructions. To this end, an accumulator can be implemented in the third stage to complete the accumulation of the execution results of different blocks. According to the instructions, the network layer calculations that do not need to be divided into blocks can also bypass this accumulator. Accordingly, sometimes multiple smaller network layers can also be processed in parallel in a neural network processing unit 54, and the prefetch mechanism of the second stage introduced above can help achieve this parallelism.

[0129] The embodiment of the present application provides a hardware implementation architecture of a quantum error correction decoding algorithm based on a neural network. The hardware architecture is a programmable architecture. The computer instructions for implementing the decoding algorithm can be pre-stored in an instruction memory. During the real-time decoding process, the control unit reads the above-mentioned computer instructions and controls the neural network processing unit according to the computer instructions to decode the error symptom information of the quantum circuit based on the neural network model, and finally obtains error information. The above-mentioned hardware decoding architecture can efficiently run the quantum error correction decoding algorithm based on the neural network model, thereby fully reducing the decoding delay while ensuring the decoding performance. Moreover, in the above-mentioned hardware decoding architecture, the number of neural network processing units and the number of computing units contained in the neural network processing unit can be designed and expanded according to actual needs. Therefore, the hardware decoding architecture provided by the present application has good scalability and flexibility.

[0130] In addition, by dividing the decoding process of the neural network model into multiple sub-processes executed in sequence, different sub-processes reuse the neural network processing unit, which improves the resource utilization of the decoder, thereby reducing resource consumption when expanding to large-scale error correction decoding, and at the same time meeting the flexibility requirements when facing different experimental environments.

[0131] In the above embodiment, the decoding process of the neural network model is divided into multiple sub-processes that are executed in sequence, and different sub-processes can reuse the operation units in the neural network processing unit 54.

[0132] In some embodiments, the neural network model is a multi-task classification neural network model, which is obtained by integrating multiple classification neural networks, and any one of the multiple classification neural networks is used to determine the decoding result corresponding to the error symptom information. Exemplarily, the multiple classification neural networks can share some network parameters.

[0133] Optionally, based on functional division, the neural network model includes a feature encoder and an error decoder, with the working processes of the feature encoder and the error decoder belonging to different sub-processes. The feature encoder is used to extract features from the error symptom information and generate feature information of the error symptom information. The feature information is used to characterize the distribution characteristics of the feature space of the error symptom information. The error decoder is used to decode the feature information and obtain the decoding result of the error symptom information.

[0134] Exemplarily, the working process of the feature encoder is divided into at least one sub-process, and the working process of the error decoder can be divided into at least one sub-process.

[0135] Exemplarily, the error decoder of the neural network model includes multiple type decoders, and a type decoder among the multiple type decoders is used to determine whether a certain error type (such as a certain type of error symptom of type X, or a certain type of error symptom of type Z) occurs based on feature information. The feature encoder and any type decoder are combined to form a complete classification neural network. That is, in this embodiment, multiple classification neural networks share the network parameters of the feature encoder, which helps to reduce the parameter scale of the neural network model and helps to reduce the amount of computation in the process of determining the error type and the quantum bit in which the error occurs.

[0136] Exemplarily, the feature encoder is also referred to as the frontend, or feature extraction network. For example, the feature encoder may include multiple cascaded feature extraction subnetworks and a feature fusion subnetwork. The feature extraction subnetwork extracts local feature information using a divide-and-conquer approach, while the feature fusion subnetwork aggregates and compresses all local feature information to ultimately obtain feature information.

[0137] For example, the feature sub-network is built based on 3D CNN; the feature fusion sub-network is built based on a fully connected network. For example, the feature fusion sub-network includes one or two fully connected layers. For the feature information of the error symptom information, the feature information must at least provide the type decoder with Calculation of the Pauli operator distribution, where L represents the scale of the surface code.

[0138] Optionally, in the process of generating feature information, the error symptom information can be subjected to block feature extraction. That is, when the feature extraction subnetwork is used to extract feature information, the error symptom information is blocked and divided into multiple small blocks, and feature extraction is performed on each small block separately. That is, block feature extraction refers to the process of blocking the input data to obtain at least two blocks, and then using at least two feature extraction units to perform parallel feature extraction processing on the at least two blocks. Among them, there is a one-to-one correspondence between at least two blocks and at least two feature extraction units, each feature extraction unit is used to perform feature extraction on one block, and the number of blocks and feature extraction units is the same. In addition, the above-mentioned at least two blocks are parallel when performing feature extraction, that is, they are performed at the same time, which helps to reduce the time required for feature extraction. If at least two blocks perform feature extraction in parallel, different processors are required to control the two blocks respectively. Feature processing unit refers to the structure in the neural network model used by different processors to control. For the specific process of multiple processors working in parallel, please refer to the embodiment below.

[0139] Exemplarily, the type decoder is also referred to as a backend or a feature decoding network. For example, the type decoder includes an FFN layer, and the type decoder is used to generate a decoding result corresponding to the error symptom information.

[0140] After obtaining the decoding results generated by multiple types of decoders respectively, the error information is calculated based on these decoding results (that is, the output results of the neural network model).

[0141] In some embodiments, the training process of the neural network model includes at least the following steps:

[0142] 1. Obtain sample error symptom information and sample error result information corresponding to the sample error symptom information sample.

[0143] Optionally, the sample error symptom information is randomly generated symptom information (which can be either X or Z symptoms alone, or both), and the sample error result information corresponding to the sample error symptom information is the error result corresponding to the symptom information, obtained after one-hot encoding. Note that the same symptom information can correspond to different error results. Maintaining diversity in the output results helps the model ultimately learn the output probability distribution based on specific symptom information during training.

[0144] 2. Obtain predicted decoding results determined by multiple error decoders based on the sample error symptom information through the neural network model to be trained.

[0145] 3. Determine the loss function values ​​corresponding to the plurality of feature decoding networks based on the predicted decoding results determined by the plurality of error decoders and the sample error result information. Optionally, the loss function values ​​may be calculated based on cross entropy.

[0146] 4. Determine the total loss function value based on the loss function values ​​corresponding to multiple error decoders.

[0147] 5. Adjust the parameters of the neural network model to be trained based on the total loss function value to obtain a trained neural network model. Optionally, the parameters of the trained neural network model are stored in the quantum error correction hardware decoder. In some embodiments, the training process of the neural network model to be trained is completed by other computer equipment.

[0148] In some embodiments, we can also allocate and use the computing units in the neural network processing unit 54 in the following manner. The neural network processing unit includes a plurality of computing units, which are allocated to perform calculations of different network layers in the neural network model, and the number of computing units allocated to each network layer in the neural network model is determined based on the total number of computing units included in the neural network processing unit and the number of operations contained in each network layer. Under this allocation method, different network layers are assigned their own computing units, and adjacent network layers are connected by hard wiring, that is, the inputs and outputs of each adjacent network layer are directly connected with specific data transmission lines. This is also a good solution for scenarios where the surface code scale is small (such as L=5 or 7) and the network architecture of the neural network model is fixed. We call the above scenario a "specific network architecture."

[0149] For the “specific network architecture”, this application proposes a resource allocation model to optimize decoding performance. Assume that the total number of computing units included in the neural network processing unit is C, and the number of network layers included in the neural network model is N. l , the jth layer of the neural network model has M j Multiplication operations. Define the number of computing units allocated to the jth layer of the neural network model as C j , we simplify this problem to j Perform constrained optimization of the partitions, described by the following equations:

[0150] in,

[0151] Here α j is the number of independent computational parts in layer j, which is determined based on the structure of the neural network model, such as α j The value of can be 1 or greater than 1. The above problem can be solved by Lagrange multipliers to obtain some real-valued solutions C j , and rounded to an integer while satisfying the equation constraints. This simple heuristic method has been shown to be effective and shows excellent performance in our experiments.

[0152] In some embodiments, the quantum error correction hardware decoder can adopt a single-core architecture or a multi-core architecture. The single-core architecture and multi-core architecture here refer to the number of processors (or processing cores) included.

[0153] In the case of a single-core architecture, the quantum error correction hardware decoder includes a single processing core, which completes the entire decoding algorithm. When the surface code scale L is small, the single-core architecture can withstand the computational complexity; however, when the surface code scale L is large, the single-core architecture will have limitations. Therefore, this application proposes a multi-core architecture solution.

[0154] In some embodiments, the quantum error correction hardware decoder includes multiple processing cores, each of which is responsible for processing a portion of the neural network model's operations. Two processing cores with data dependencies are connected via one or more data lines. In the embodiments of the present application, the number of processing cores included in the quantum error correction hardware decoder in a multi-core architecture is not limited. The design can be based on the size of the surface code scale L or the computational complexity to complete the entire decoding algorithm while fully utilizing the computing power of each processing core.

[0155] In the case of a multi-core architecture, any two processing cores that do not have a data dependency relationship can be parallelized, which can maximize the computing power of each processing core and shorten the decoding time. In addition, any two processing cores that have a data dependency relationship can execute sequentially. For example, Figure 7 shows a schematic diagram of a multi-core architecture. Processors 1 to p may not have a connection relationship with each other, and the p processors can execute in parallel, such as using a divide-and-conquer strategy to process different blocks of error symptom information in parallel. The calculation results obtained by processors 1 to p are sent to processor p+1, and processor p+1 performs further calculations on the calculation results provided by processors 1 to p. The calculation results of processor p+1 are then input to processors p+2 to N. Processors p+2 to N may not have a data dependency relationship with each other, and the multiple processors can execute in parallel. Finally, the output results of the entire neural network model can be collected by a certain processor, and the error information can be determined based on the output results.

[0156] Here, multiple processing cores form a tree-like structure, with each processing core responsible for a portion of the computation within a 3D CNN or fully connected network. In the striding 3D CNN employed here, the inputs to the different processing cores are largely independent, requiring little complex communication between them beyond input-output data transfer. The same is true for the fully connected network used for classification. Therefore, while each processing core is fully utilized, this architecture scales parallel computation by adding more cores to maintain a certain decoding latency.

[0157] In this multi-core architecture, we only need to complete input and output data transmission between each network layer. This data exists in the form of vectors. The data volume of these vectors is not large, so we are more concerned with the latency of a single data transmission rather than the bandwidth. In this architecture, we use a method based on the LVDS standard to build data transmission between different processing cores. First, we do not add complex serial-to-parallel conversion protocols at the input and output ends. High-speed communication interfaces generally transmit serial data. Therefore, the output end needs to convert the logical parallel data into serial data for transmission, and the input end needs to convert the received serial data into parallel data. This requires the use of some common serial-to-parallel conversion protocols in the industry, such as the common SerDes IP. However, these protocols are relatively complex to operate and have high latency overhead, making them unsuitable for our scenario. For the real-time error correction decoding scenario involved in this application, the alignment between the data lines is pre-trained by using training codes. At the same time, the data rate is maintained at a moderate level, such as 1G-1.5G, to avoid excessive data rates that make synchronization difficult. On this basis, the number of channels between each data path group is increased. The data path here is the communication interface mentioned above. See Figure 7 for the black arrows between the processors. The number of channels refers to the number of parallel data lines in a data path. Our approach uses multiple data lines and transmits multiple sets of serial data in parallel over them. By controlling the data rate, the data on each data line does not need to go through the complex communication protocol described above. Instead, the data lines are pre-trained with training codes before actual communication to ensure data alignment. This approach avoids the latency overhead of the communication protocol while ensuring overall bandwidth by using multiple lines in parallel.

[0158] Practical measurements have shown that our data transmission method can achieve extremely low transmission latency, making multi-core architectures scalable. When the surface code size L increases further, resulting in a larger amount of data to be transmitted between cores, we can infer that the Hamming weights of these vectors will be relatively low, leveraging the sparse nature of the symptom bits. In this case, compression can be used to reduce the amount of data between transmissions, further reducing latency. This involves first statistically analyzing the Hamming weights in the data and, when the Hamming weight is below a certain threshold, sending the data to the compression module. The compression module can include various data compression methods. For example, dynamic zero compression divides the data into k blocks and uses a k-bit flag to indicate whether the corresponding block is all zeros. If it is all zero, the corresponding bit is set to 1, and if it is non-zero, it is set to 0. The data for that block is then added to the compressed result, where k is an integer greater than 1. Different compression methods have different effects on different types of transmitted data. Therefore, at the end of the compression module, the compression ratios of different compression methods are compared, and the one with the best compression ratio is selected for final data communication.

[0159] Below, the experimental data related to the technical solution of this application are introduced and explained.

[0160] We first implemented the L=5 and L=7 decoders on an FPGA platform using the specific network architecture described above and tested their latency results. The configuration of the neural network model used and the latency results are shown in Table 1 below:

[0161] Table 1 Delay results of different decoder configurations

[0162] Where L represents the surface code scale, T represents the number of symptom measurement rounds, and N represents the number of parameters of the neural network model.

[0163] It can be seen that the delay results of the three implemented decoders are all less than the expected delay value (1.5us), meeting the real-time error correction requirements of recent superconducting quantum computers. Among them, the L=7 decoder is also the largest and lowest-latency real-time decoder known to be implemented in hardware.

[0164] We also implemented the programmable decoder introduced in the above embodiment on the same hardware platform. Figure 8 shows a schematic diagram of the resource consumption of the programmable decoder and the specific network architecture. The three figures in the upper part show the comprehensive situation of FPGA, and the table in the lower part shows the consumption of various resources. It can be seen that on the two main types of hardware resources DSP (Digital Signal Processor) and ALM (Adaptive Logic Module), the programmable micro-architecture in the embodiment of the present application reduces resource consumption by 2.4 times and 3.0 times compared with the specific network architecture. At the same time, unlike the specific network architecture that requires hardware implementation for each different neural network configuration, the programmable decoder can run various network configurations on the same hardware implementation, realizing the flexibility requirement, making it the best choice for large-scale neural network decoders.

[0165] An exemplary embodiment of the present application further provides a chip, which is equipped with the quantum error correction hardware decoder provided in the above embodiment. Optionally, the chip is an FPGA chip or an ASIC chip.

[0166] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application do not limit this.

Claims

1. A quantum error correction hardware decoder, the quantum error correction hardware decoder comprising: an instruction memory, a control unit, at least one neural network processing unit, and an error merging and finding unit; The instruction memory is used to store computer instructions; The control unit is used to read the computer instructions from the instruction memory and control the at least one neural network processing unit according to the computer instructions; The at least one neural network processing unit is used to decode error symptom information of the quantum circuit based on the neural network model in response to the control of the control unit and obtain an output result of the neural network model, wherein the error symptom information refers to an error symptom obtained by performing an error measurement on the quantum circuit; The error merging and searching unit is used to determine error information according to the output result, and the error information is used to indicate the quantum bit where an error occurs in the quantum circuit and the corresponding error type.

2. The quantum error correction hardware decoder according to claim 1, wherein: The decoding process of the neural network model is divided into n sub-processes that are executed in sequence, and different sub-processes reuse the neural network processing unit, where n is an integer greater than 1.

3. The quantum error correction hardware decoder according to claim 2, wherein: Each sub-process includes the first, second and third stages; The first stage is used to perform multiplication and addition operations on the input data of the sub-process to obtain at least one first calculation result; The second stage is used to perform an addition operation on the at least one first calculation result to obtain at least one second calculation result; The third stage is used to obtain output data of the sub-process according to the at least one second calculation result.

4. The quantum error correction hardware decoder according to claim 3, wherein: The neural network processing unit includes: a first subunit, a second subunit and a third subunit; The first subunit includes at least one computing unit for executing the first stage; The second subunit includes at least one computing unit for executing the second stage; The third subunit includes at least one computing unit for executing the third stage.

5. The quantum error correction hardware decoder according to claim 4, wherein: The first subunit also includes: a data operation unit and a weight operation unit, the data operation unit is used to read the input data used in the first stage from the first register, and the weight operation unit is used to read the weight parameters of the neural network model used in the first stage from the second register.

6. The quantum error correction hardware decoder according to claim 4 or 5, wherein: The second subunit also includes at least one multiplexer, and the multiplexer is used to pre-fetch calculation results of different depths in the operation unit tree corresponding to the second stage.

7. The quantum error correction hardware decoder according to any one of claims 2 to 6, wherein: The input data of the first sub-process among the n sub-processes includes the error symptom information, and the output data of the last sub-process among the n sub-processes includes the output result.

8. The quantum error correction hardware decoder according to any one of claims 1 to 7, wherein: The control unit includes an instruction decoder, a scheduler and a manager; The instruction decoder is used to decode the read computer instruction to obtain a first type of instruction and a second type of instruction, provide the first type of instruction to the scheduler, and provide the second type of instruction to the manager; The scheduler is used to control the at least one neural network processing unit according to the first type of instructions; The at least one neural network unit is further configured to perform a computing operation in response to control of the scheduler; The manager is used to control each register included in the quantum error correction hardware decoder according to the second type of instructions; The various registers included in the quantum error correction hardware decoder are used to perform read and write operations in response to the control of the manager.

9. The quantum error correction hardware decoder according to any one of claims 1 to 8, wherein: The quantum error correction hardware decoder also includes a first register and a second register; The first register is used to store input data used in the decoding process of the neural network model, and is used to store output data generated by the decoding process of the neural network model; The second register is used to store weight parameters and bias parameters of the neural network model.

10. The quantum error correction hardware decoder according to any one of claims 1 to 9, wherein: The neural network processing unit includes multiple computing units, which are allocated to perform calculations of different network layers in the neural network model, and the number of computing units allocated to each network layer in the neural network model is determined based on the total number of computing units included in the neural network processing unit and the number of computing units contained in each network layer.

11. The quantum error correction hardware decoder according to any one of claims 1 to 10, wherein: The quantum error correction hardware decoder includes multiple processing cores, each processing core is responsible for processing a part of the operation of the neural network model, and two processing cores with data dependency are connected via one or more data lines.

12. A chip, wherein the quantum error correction hardware decoder according to any one of claims 1 to 11 is deployed on the chip.

13. The chip according to claim 12, wherein the chip is a field programmable gate array (FPGA) chip or an application specific integrated circuit (ASIC) chip.

Citation Information

Patent Citations

  • Quantum error correction decoding method and device based on neural network, and chip

    CN111510157A

  • Fault-tolerant error correction decoding method and device of quantum circuit, and chip

    CN111510158A

  • Fault-tolerant calculation method, device, equipment and chip of quantum Krifd circuit

    CN112632881A

  • Quantum error correction decoding system and method, fault-tolerant quantum error correction system and chip

    CN112988451A

  • Apparatus and method for probabilistic error correction of a quantum computing system

    US20200310908A1