Quantum error correction method and device, electronic equipment and storage medium

By collecting contextual data from quantum systems and combining it with knowledge graphs and reinforcement learning algorithms to generate target policies, the adaptation problem of existing quantum error correction technologies in complex environments has been solved, achieving efficient error correction operations and resource optimization.

CN122065997APending Publication Date: 2026-05-19CHINA MOBILE INTERNET CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE INTERNET CO LTD
Filing Date
2025-12-19
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing quantum error correction technologies are difficult to dynamically adapt to the complex and ever-changing states and environmental conditions of quantum systems. They lack effective integration and fine-grained control of multi-source knowledge, resulting in limited error correction efficiency, excessive resource consumption, and difficulties in cross-platform adaptation.

Method used

Contextual data of quantum systems is collected, and contextual feature vectors are generated through feature extraction and fusion. Target policies are generated by combining association rules of the knowledge graph with reinforcement learning algorithms, and the parameters of the knowledge graph and reinforcement learning model are updated based on the execution results, forming a closed-loop optimization mechanism.

Benefits of technology

It improves the adaptability to dynamic noise and state changes in quantum systems, reduces repeated trial and error and resource waste, balances error correction efficiency and hardware consumption, and provides reliable support for the stable operation of quantum computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122065997A_ABST
    Figure CN122065997A_ABST
Patent Text Reader

Abstract

The invention discloses a quantum error correction method and device, electronic equipment and a storage medium, and relates to the technical field of quantum computing, and the method comprises the steps: collecting context data of a quantum system, and executing feature extraction and fusion, so as to obtain a context feature vector; and based on the association rule of the knowledge graph and the context feature vector, generating a target strategy through a reinforcement learning algorithm. Wherein the knowledge graph is a graph structure constructed according to multi-source data, and the multi-source data comprises at least two types of data. And executing a quantum error correction operation according to the target strategy, and updating model parameters of the knowledge graph and the reinforcement learning algorithm based on an execution result of the quantum error correction operation. By applying the technical scheme of the invention, the noise change of the quantum system can be dynamically adapted to improve the error correction success rate, multi-source knowledge is efficiently utilized to reduce trial and error resource waste, the error correction efficiency and hardware consumption are balanced, the system is updated and optimized in a closed loop, and support is provided for stable operation of quantum calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of quantum computing technology, and in particular to a quantum error correction method and apparatus, electronic device and storage medium. Background Technology

[0002] Quantum error correction technology is a core supporting technology in the fields of quantum computing and quantum communication. The core goal of quantum error correction technology is to solve the problem of quantum state decoherence and errors caused by environmental interference, hardware defects and other factors during the storage, transmission and operation of qubits, so as to ensure the reliability of quantum information processing.

[0003] In related technologies, the core implementation of quantum error correction technology is to map a single logical qubit onto multiple physical qubits through redundant coding, and then combine this with real-time error correction algorithms to detect and repair quantum state errors. For example, redundant coding includes Shor codes, Steane codes, and surface codes, among which surface codes encode information using a two-dimensional lattice structure and indirectly measure errors through auxiliary bits to avoid destroying the quantum superposition state; real-time error correction algorithms mainly include iterative error correction and adaptive error correction, which achieve error correction through continuous monitoring and feedback of the quantum state.

[0004] However, the aforementioned quantum error correction technologies are difficult to dynamically adapt to the complex and ever-changing states and environmental conditions of quantum systems. They lack the ability to effectively integrate and finely control multi-source knowledge. For example, they are not adaptable enough to sudden noise, have low efficiency in utilizing historical error correction records and theoretical knowledge, and do not fully consider the impact of the quantum system's operating state and environmental parameters. This results in limited error correction efficiency, excessive resource consumption, and difficulty in cross-platform adaptation, and cannot meet the error correction needs of the scaling up of quantum computing hardware and the increasing complexity of noise environments. Summary of the Invention

[0005] In view of this, this application provides a quantum error correction method, apparatus, electronic device, and storage medium to solve the problems of limited error correction efficiency, excessive resource consumption, and difficulty in cross-platform adaptation during quantum error correction.

[0006] In a first aspect, this application provides a quantum error correction method, including: Acquire context data from quantum systems; Feature extraction and fusion are performed on the context data to obtain a context feature vector; Based on the association rules of the knowledge graph and the context feature vector, a target policy is generated through a reinforcement learning algorithm; the knowledge graph is a graph structure constructed from multi-source data, which includes at least two types of data. Perform quantum error correction operations according to the target strategy; The model parameters of the knowledge graph and the reinforcement learning algorithm are updated based on the execution result of the quantum error correction operation.

[0007] In the above method, by collecting contextual data of the quantum system and performing feature extraction and fusion, the operating state and environmental parameters of the quantum system can be comprehensively captured, providing an accurate scene-aware foundation for subsequent policy generation and avoiding the problem of policy mismatch with the actual scene due to a single information dimension. Combining the association rules of the knowledge graph and the context feature vector, the target policy is generated through reinforcement learning algorithm. The knowledge graph integrates the association logic of multi-source data, which can reduce repeated trial and error and reduce resource consumption, while reinforcement learning can dynamically adjust the policy based on real-time context features, effectively improving the adaptability to dynamic noise and state changes of the quantum system. The execution result of the error correction operation updates the parameters of the knowledge graph and the reinforcement learning model, forming a closed-loop optimization mechanism, enabling the system to continuously iterate the policy with the long-term changes of the quantum environment, gradually improving the error correction success rate, while balancing hardware resource consumption and error correction efficiency, providing reliable support for the stable operation of the quantum system.

[0008] In this embodiment of the application, the acquisition of context data of the quantum system includes: acquiring state data, environmental parameters, and historical error correction record data of the quantum system; wherein, the state data of the quantum system is acquired through a quantum sensor, the environmental parameters are acquired through an environmental sensor, and the historical error correction record data is stored in time sequence.

[0009] In this embodiment, the context data includes the state data, environmental parameters, and historical error correction record data of the quantum system. The feature extraction and fusion of the context data includes: processing the environmental parameters based on a spatial feature extraction algorithm to extract spatial features; processing the historical error correction record data based on a temporal modeling algorithm to extract temporal features; allocating weights to the spatial features, temporal features, and state data according to the state data using a gating mechanism; and fusing the spatial features, temporal features, and state data according to the weights to obtain the context feature vector.

[0010] In this embodiment of the application, before generating the target policy through the reinforcement learning algorithm, the method further includes: performing classification processing on the multi-source data to obtain structured data and unstructured data; determining the association rules between entities based on the structured data and the unstructured data to obtain the knowledge graph; and storing the knowledge graph through a graph database.

[0011] In this embodiment of the application, the method further includes: in response to detecting a new noise pattern or a novel quantum error correction code in the quantum system, calculating a target similarity through a graph neural network; the target similarity is the similarity of the new noise pattern or novel quantum error correction code to entities in the knowledge graph; if the target similarity is less than a preset threshold, then activating an incremental learning module to expand the nodes and associated edges of the knowledge graph.

[0012] In this embodiment of the application, the entity includes qubits, quantum error correction codes, noise types, and quantum system parameters; the association rules include the adaptation relationship between quantum error correction codes and noise types, the vulnerability association of the quantum system to different noises, and the correspondence between the code distance of quantum error correction codes and resource consumption.

[0013] In this embodiment of the application, the step of generating a target policy through a reinforcement learning algorithm includes: constructing the state space of the reinforcement learning algorithm based on the context feature vector and the knowledge graph; constructing the action space of the reinforcement learning algorithm based on the state space, according to quantum error correction codes, code distance adjustment, and measurement frequency optimization; fusing error correction performance and resource consumption to obtain a reward function; and training the reinforcement learning algorithm under the constraints of the association rules based on the state space, the action space, and the reward function to generate the target policy.

[0014] In this embodiment of the application, the reward function balances the error correction success rate, the number of physical qubits consumed, and the error correction operation delay by preset weights; the resource consumption includes the amount of hardware resources used and the number of operations; and the error correction performance includes the error rate after error correction and the fidelity of logical qubits.

[0015] In this embodiment of the application, the step of performing quantum error correction according to the target strategy includes: generating a corresponding quantum circuit structure according to the target strategy; performing a stabilizer measurement operation based on the quantum circuit structure to obtain the original measurement signal of the quantum state error; locating the target position and target type of the quantum state error based on the original measurement signal and the decoding rules of the quantum circuit structure; generating an error correction operation based on the target position and the target type; and performing a repair process based on the error correction operation to complete the quantum error correction operation.

[0016] In this embodiment of the application, updating the knowledge graph includes: feeding back the execution result of the quantum error correction operation to the knowledge graph; and updating the quantitative indicators of the relationships between entities in the knowledge graph based on the execution result.

[0017] Secondly, this application also provides a quantum error correction device, comprising: The acquisition module is configured to acquire context data of the quantum system; The processing module is configured to perform feature extraction and fusion on the context data to obtain a context feature vector; and to generate a target policy based on the association rules of the knowledge graph and the context feature vector through a reinforcement learning algorithm; wherein the knowledge graph is a graph structure constructed based on multi-source data, and the multi-source data includes at least two types of data; The error correction module is configured to perform quantum error correction operations according to the target strategy; The optimization module is configured to update the model parameters of the knowledge graph and the reinforcement learning algorithm based on the execution result of the quantum error correction operation.

[0018] Thirdly, this application provides an electronic device, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect embodiment.

[0019] Fourthly, this application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in the first aspect embodiment.

[0020] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect of the embodiments described above.

[0021] As can be seen from the above technical solutions, the quantum error correction method, apparatus, electronic device, and storage medium provided in this application relate to the field of quantum computing technology. The method collects context data of a quantum system and performs feature extraction and fusion to obtain a context feature vector. Then, based on the association rules of a knowledge graph and the context feature vector, a target policy is generated through a reinforcement learning algorithm. The knowledge graph is a graph structure constructed from multi-source data, which includes at least two types of data. Quantum error correction operations are performed according to the target policy, and the model parameters of the knowledge graph and the reinforcement learning algorithm are updated based on the execution results of the quantum error correction operations. By applying the technical solutions of this application, the noise changes of the quantum system can be dynamically adapted to improve the error correction success rate, multi-source knowledge can be efficiently utilized to reduce trial-and-error resource waste, error correction efficiency and hardware consumption can be balanced, and the closed-loop update and optimization system provides support for the stable operation of quantum computing.

[0022] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0024] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A schematic flowchart of a quantum error correction method provided in an embodiment of this application is shown; Figure 2 An architecture diagram of quantum error correction provided in an embodiment of this application is shown; Figure 3 This paper shows a schematic diagram of the structure of a quantum error correction device provided in an embodiment of this application; Figure 4 A schematic block diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0026] The embodiments of this application will now be described in more detail with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0027] This disclosure is not exhaustive, but merely illustrative of some embodiments, and is not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment can be arbitrarily interchanged. Furthermore, the optional implementation methods in a particular embodiment can be arbitrarily combined; moreover, the embodiments can be arbitrarily combined, for example, some or all steps of different embodiments can be arbitrarily combined, and a particular embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.

[0028] In each of the disclosed embodiments, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of the embodiments are consistent and can be referenced by each other. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. In this disclosure, unless otherwise stated, elements expressed in the singular form, such as "a," "an," "the," "the," "the," "the," "the," "the," "this," etc., can mean "one and only one," or "one or more," "at least one," etc. For example, when using articles such as "a," "an," "the," etc. in translation, the noun following the article can be understood as either a singular or a plural expression. In some embodiments, the terms “in response to…”, “in response to determining…”, “in the case of…”, “when…”, “if…”, “if…”, etc., can be used interchangeably. In some embodiments, the terms “greater than,” “greater than or equal to,” “not less than,” “more than,” “more than or equal to,” “not less than,” “higher than,” “higher than or equal to,” “not lower than,” and “above” can be used interchangeably, as can the terms “less than,” “less than or equal to,” “not greater than,” “less than,” “less than or equal to,” “not more than,” “lower than,” “lower than or equal to,” “not higher than,” and “below”. The prefixes such as "first" and "second" in the embodiments of this disclosure are only for distinguishing different descriptive objects and do not constitute restrictions on the position, order, priority, number or content of the descriptive objects. For the description of the descriptive objects, please refer to the description in the claims or the context of the embodiments. The use of prefixes should not constitute unnecessary restrictions.

[0029] In the embodiments disclosed herein, "multiple" refers to two or more. In the embodiments disclosed herein, terms such as “import”, “input”, and “read in” can be used interchangeably.

[0030] In some embodiments, devices, etc., can be interpreted as physical or virtual, and their names are not limited to the names recorded in the embodiments. Terms such as “device”, “equipment”, “circuit”, “network element”, “node”, “function”, “unit”, “section”, “system”, “network”, “chip”, “chip system”, “entity”, and “subject” can be used interchangeably.

[0031] In some embodiments, the terms "terminal", "terminal device", "user equipment (UE)", "user terminal", "mobile station (MS)", "mobile terminal (MT)", "subscriber station", "mobile unit", "subscriber unit", "wireless unit", "remote unit", "mobile device", "wireless device", "wireless communication device", "remote device", "mobile subscriber station", "access terminal", "mobile terminal", "wireless terminal", "remote terminal", "handset", "useragent", "mobile client", and "client" can be used interchangeably.

[0032] The following is an explanation of the technical terms used in this application.

[0033] Quantum bit (Qubit), knowledge graph (KG), reinforcement learning (RL), surface code (SC), decoherence time (DT), redundancy encoding (RE), context awareness (CA), graph neural network (GNN), and dynamic code distance adjustment (DCDA).

[0034] Quantum error correction technology maps logical qubits to multiple physical qubits through redundant encoding and combines real-time error correction algorithms (such as iterative and adaptive error correction) to detect and repair errors in quantum states. For example, surface codes use a two-dimensional lattice structure to encode information and indirectly measure errors through auxiliary qubits, thus avoiding disruption of the quantum superposition state.

[0035] However, the aforementioned quantum error correction technologies still have significant limitations. Encoding redundancy leads to enormous resource consumption; for example, a single logical bit requires hundreds or even thousands of physical bits, far exceeding current hardware capabilities. The extremely short decoherence time of a quantum bit (approximately 150 nanoseconds) necessitates that error correction operations be completed within a very short time, imposing stringent requirements on algorithm efficiency and hardware stability. Furthermore, the error correction process relies on high-precision quantum gate operations and measurements, while the aforementioned quantum error correction technologies are limited by the manipulation errors of physical bits (e.g., the survival time of superconducting quantum bits is only 90 microseconds) and the compatibility differences between different hardware platforms (superconducting, ion traps, etc.), further limiting the application of quantum error correction technologies.

[0036] For example, the aforementioned quantum error correction technologies suffer from insufficient dynamic noise adaptability, inefficient use of global knowledge, and lack of contextual information. For instance, when the error correction code undergoes a sudden change in noise mode (such as switching from low-frequency noise to burst noise), it cannot adjust the strategy in time, leading to error correction failure. Error correction decisions rely on single measurement data and do not integrate historical error correction records (such as the performance of error correction codes under different noise levels) and theoretical knowledge (such as error correction code thresholds and quantum system topology), resulting in repeated trial and error and wasted resources. Furthermore, the impact of the quantum system's operating state (such as qubit coherence time and gate operation fidelity) and environmental parameters (such as temperature and magnetic field strength) on the error correction strategy is not considered, making it difficult to achieve fine-grained control.

[0037] To address the aforementioned problems, this application provides a quantum error correction method, such as... Figure 1 As shown, in some embodiments, the method includes steps S101-S105.

[0038] S101, Acquire context data of the quantum system.

[0039] Real-time data acquisition of quantum systems is performed to extract corresponding contextual data, such as the state data of the quantum system, environmental parameters (environmental noise), and historical error correction records.

[0040] S102. Perform feature extraction and fusion on the context data to obtain the context feature vector.

[0041] Feature extraction and fusion are performed on the collected context data to obtain the corresponding context feature vector.

[0042] In one implementation, feature extraction is performed on the context data, resulting in noise features and system features. For example, noise features include noise intensity, temporal correlation, and spatial distribution; system features include quantum bit connectivity and current encoding type.

[0043] In one implementation, when fusing features extracted from the preceding and following data, a Convolutional Neural Network (CNN) or a Long Short-Term Memory Network (LSTM) is used to process the time-series data in order to extract contextual feature vectors.

[0044] S103. Based on the association rules and context feature vectors of knowledge graphs, the target policy is generated through reinforcement learning algorithm.

[0045] After obtaining the context feature vector, an optimal error correction strategy is generated using a reinforcement learning algorithm based on the association rules of the knowledge graph and the context feature vector, serving as the target strategy. The knowledge graph is a graph structure constructed from multi-source data, which includes at least two types of data, specifically error correction-related data.

[0046] S104. Perform quantum error correction operations according to the target strategy.

[0047] After generating the target strategy, quantum error correction is performed through the target strategy to complete the detection and repair of quantum state errors.

[0048] S105. Update the model parameters of the knowledge graph and reinforcement learning algorithm based on the execution results of quantum error correction operations.

[0049] After performing quantum error correction, the execution of the quantum error correction operation is monitored, and the model parameters of the knowledge graph and reinforcement learning algorithm are updated based on the execution results of the quantum error correction operation, thus forming a closed-loop optimization mechanism for quantum error correction.

[0050] In this embodiment, three types of contextual data are first collected in real time: the state of the quantum system, environmental parameters, and historical error correction records. Then, CNN or LSTM is used to extract and fuse the data to generate contextual feature vectors. Subsequently, the association rules of the knowledge graph constructed from multi-source data are combined to generate a target error correction strategy adapted to the current scenario through reinforcement learning algorithms. Finally, the error correction operation is performed, and the operation results are used to update the parameters of the knowledge graph and the reinforcement learning model in reverse, forming a dynamic and adaptive error correction closed loop.

[0051] In this way, the contextual information of the quantum system can be accurately perceived, improving the problem of missing context; by integrating multi-source knowledge through knowledge graphs and dynamically adjusting strategies through reinforcement learning, the adaptability to noise mutations can be improved, reducing repeated trial and error and resource waste; the closed-loop update mechanism can also continuously optimize system performance, balancing hardware resource consumption while ensuring the success rate of error correction, and providing reliable support for the stable operation of quantum computing.

[0052] For step S101, in some embodiments, when collecting the context data of the quantum system, the state data, environmental parameters, and historical error correction record data of the quantum system are collected. Specifically, the quantum system state data is collected using a quantum sensor, the environmental parameters are collected using an environmental sensor, and the historical error correction record data is stored in a time-series format.

[0053] For example, the state data of a quantum system includes the fidelity of qubits and the gate operation error rate obtained through quantum state tomography; environmental parameters include parameters such as temperature, magnetic field strength, and electromagnetic interference monitored by sensors; and historical error correction record data includes the noise type, error correction code selection, and error correction result for each error correction.

[0054] For step S102, in some embodiments, the extracted features include noise features and system features. For example, noise features can be noise intensity, temporal correlation, and spatial distribution; system features can be quantum bit connectivity and current encoding type.

[0055] In some embodiments, when performing feature extraction and fusion on context data, environmental parameters are processed based on a spatial feature extraction algorithm to extract spatial features; historical error correction record data is processed based on a temporal modeling algorithm to extract temporal features. Then, based on the state data, weights are assigned to spatial features, temporal features, and state data through a gating mechanism, and the spatial features, temporal features, and state data are fused according to their weights to obtain a context feature vector.

[0056] For example, feature fusion is performed using the following formula:

[0057] The weights α, β, and γ are dynamically adjusted through a gating mechanism, and the input is the temporal features output by the LSTM.

[0058] Noise types are classified using the following formula:

[0059] Among them, W c Let f be the noise classification weight matrix. fused b is a multimodal fusion feature vector. c It provides a noise classification bias term; it outputs the probability distribution of noise categories, supporting 6 types including burst noise and low-frequency noise.

[0060] For the state data of the quantum system, the density matrix ρ is obtained through quantum state tomography, and the fidelity F = Tr(ρρideal) is calculated. Environmental parameters such as temperature T and magnetic field strength B are normalized and then input into a CNN to extract spatial features. The temporal modeling algorithm uses a bidirectional LSTM to process historical error correction records {(noise type t, error correction code t, success rate t)} and outputs the hidden state ht.

[0061] The weights are calculated using the gating unit, as shown below:

[0062] Where Wg is the gate weight matrix, The feature concatenation operation is performed, and the fused feature vector is input into the decision engine.

[0063] In one implementation, the LSTM hidden layer dimension d h =128, CNN convolution kernel size k=3, noise classification category number K=6.

[0064] In some embodiments, a knowledge graph is also constructed before generating the target policy.

[0065] In some embodiments, knowledge graph construction involves classifying multi-source data to obtain structured and unstructured data. Then, association rules between entities are determined based on the structured and unstructured data to obtain the knowledge graph. Finally, the knowledge graph is stored in a graph database.

[0066] That is, integrating structured knowledge (such as error correction code parameters and noise models) and unstructured data (such as experimental reports and papers) in the field of quantum error correction.

[0067] For example, entities in the knowledge graph are defined, including qubits, error-correcting codes (such as surface codes and Steane codes), noise types (such as bit flips and phase flips), and quantum system parameters (such as coherence time and gate error rate). Relationships between entities are defined, such as error-correcting codes, noise types and error-correction efficiency, quantum systems, noise types and vulnerabilities, error-correcting codes, code distances, and resource consumption. The structured data obtained through classification includes quantum chip monitoring data and error-correcting code performance databases; unstructured data includes external literature and experimental reports. A graph database (such as Neo4j) is used to store the knowledge graph, supporting complex queries and reasoning.

[0068] For the construction and management of knowledge graphs, in some embodiments, in response to the detection of new noise patterns or novel quantum error-correcting codes in a quantum system, a target similarity is calculated using a graph neural network; if the target similarity is less than a preset threshold, an incremental learning module is activated to expand the nodes and associated edges of the knowledge graph. Here, the target similarity is the similarity between the new noise pattern or novel quantum error-correcting code and entities in the knowledge graph.

[0069] In one implementation, the similarity is calculated using a cosine similarity formula, which is determined based on the entity embedding vector and the weight matrix obtained from training the graph neural network.

[0070] For example, entity alignment of a knowledge graph can be performed using the following formula:

[0071] Among them, v ei W is the entity embedding vector. e The trainable weight matrix is ​​generated by combining a graph neural network (GNN) with a knowledge graph topology.

[0072] Reasoning about relationships can be done using the following formula:

[0073] Where σ is the Sigmoid function, W r It provides a relation classification weight matrix and supports dynamic updates of the association rules between error correction codes and noise types.

[0074] The knowledge graph is initialized with entity embeddings, taking structured data (error-correcting code parameters, noise models) and unstructured text (papers, experimental logs) as input. The TransE model is used to map entities to a low-dimensional vector space, minimizing the loss function as follows:

[0075] In the formula, L is the loss function value, vh is the embedding vector of the head entity in the knowledge graph, vr is the embedding vector of the relation in the knowledge graph, and vt is the embedding vector of the tail entity in the knowledge graph.

[0076] Then, dynamic alignment is performed, and new noise patterns (such as burst noise) are monitored in real time. The weights of entity association edges are updated through a graph attention network (GAT). If an unaligned entity (such as a new type of error correction code) is detected, an incremental learning module is activated to expand the graph nodes.

[0077] In one embodiment, the path reasoning of the knowledge graph is based on a greedy strategy to traverse the knowledge graph and generate a set of candidate error-correcting codes: C = {surface codes}, Steane codes, topological codes}. The optimal path is output: the path from the noise type to the surface code with a code distance ≥ 7, where the error correction efficiency of the noise type is > 0.95.

[0078] In one implementation, the knowledge embedding dimension d=256, the relation classification threshold θ=0.8, and the number of graph attention heads H=4.

[0079] Therefore, in some embodiments, the entities of the knowledge graph include qubits, quantum error-correcting codes, noise types, and quantum system parameters; the association rules include the adaptation relationship between quantum error-correcting codes and noise types, the vulnerability association of quantum systems to different noises, and the correspondence between the code distance of quantum error-correcting codes and resource consumption.

[0080] For step S103, in some embodiments, when generating the target policy using a reinforcement learning algorithm, the state space of the reinforcement learning algorithm is constructed based on the context feature vector and the knowledge graph. Then, based on the state space, the action space of the reinforcement learning algorithm is constructed according to quantum error correction codes, code distance adjustment, and measurement frequency optimization, and the reward function is obtained by integrating error correction performance and resource consumption. Finally, the reinforcement learning algorithm is trained under the constraints of association rules based on the state space, action space, and reward function to generate the target policy.

[0081] For example, the framework of a reinforcement learning algorithm includes a state space containing contextual feature vectors and relevant entities in the knowledge graph (such as the current error correction code and noise type); and an action space including error correction code selection (such as surface codes and Steane codes), code distance adjustment, and measurement frequency optimization. The reward function integrates metrics such as error correction success rate, resource consumption (such as the number of physical qubits and the number of measurements), and error correction latency. Training is performed using a Deep Q-Network (DQN) or Proximal Policy Optimization (PPO) algorithm, combined with constraints from the knowledge graph (such as error correction code thresholds and system resource limitations).

[0082] The rule engine for knowledge reasoning generates candidate strategies based on association rules in the knowledge graph (such as "when the noise type is burst noise, the surface code with a code distance of 7 is preferred"). The path query uses graph traversal algorithms (such as breadth-first search) to find the optimal error-correcting code and noise matching path.

[0083] In some embodiments, the Deep Q Network (DQN) updates:

[0084] Here, state s includes noise type and qubit fidelity, and action α is either code distance adjustment (±1) or error correction code switching. The knowledge constraint strategy is as follows:

[0085] In the formula, M KG(a) is the feasibility mask for action a in the knowledge graph (e.g., the code distance must satisfy d≥2t+1, where t is the number of bits that can be corrected).

[0086] In some embodiments, the reward function balances the error correction success rate, the number of physical qubits consumed, and the error correction operation latency by pre-setting weights; resource consumption includes hardware resource usage and the number of operations; and error correction performance includes the error rate after error correction and the fidelity of logical qubits.

[0087] For example, the state space is constructed using three dimensions: noise intensity ∈ [0,1], qubit fidelity ∈ [0.85,0.99], and the average historical error correction success rate. The reward function is as follows: r=w1 Error correction success rate - w2 Physical bits w3 Delay; Where r is the reward value, and the weights w1=0.6, w2=0.3, w3=0.1, supporting multi-objective optimization.

[0088] In some embodiments, actions are sampled based on the PPO algorithm, and invalid actions (such as code distance exceeding hardware limits) are pruned using knowledge graph rules.

[0089] In one implementation, the learning rate η = 0.001, the discount factor γ = 0.95, and the experience replay buffer size N = 10. 4 .

[0090] For step S104, in some embodiments, when performing quantum error correction according to the target strategy, a corresponding quantum circuit structure is generated according to the target strategy, and a stabilizer measurement operation is performed based on the quantum circuit structure to obtain the original measurement signal of the quantum state error. Then, based on the original measurement signal and the decoding rules of the quantum circuit structure, the target location and target type of the quantum state error are located. An error correction operation is generated based on the target location and target type, and then a repair process is performed based on the error correction operation to complete the quantum error correction operation.

[0091] For example, quantum error correction operations include error correction code generation and deployment. In the encoding phase, a corresponding quantum circuit structure (such as a two-dimensional array of surface codes) is generated based on the error correction code type and parameters selected by the decision engine. In the measurement and decoding phase, a stabilizer measurement is performed, and errors (target position and target type) are located by a classical decoder and error correction operations are generated, such as minimum weight perfect matching (MWPM).

[0092] In some embodiments, the stabilization sub-measurement and decoding algorithm includes stability factor generation and minimum weight perfect matching, with the surface code lateral measurement as follows:

[0093] In the formula, N(i) represents the neighboring nodes of qubit i. The minimum weight perfect matching is as follows:

[0094] In the formula, the weights It is calculated jointly from the measurement results and the error probability in the knowledge graph.

[0095] For example, based on the code distance d output by the decision engine, a d×d surface code lattice is generated, and a stabilizer measurement S is performed. i Construct a disjoint-set data structure, merge conflicting edges from measurement results, and generate an error chain set ε. Utilize historical error correction records from the knowledge graph to adjust the MWPM weights. .

[0096] In one implementation, the surface code distance d∈{5,7,11}, and the MWPM time threshold t max =1ms.

[0097] For step S105, in some embodiments, when updating the knowledge graph, the execution result of the quantum error correction operation is fed back to the knowledge graph, and then the quantitative index of the relationship between entities in the knowledge graph is updated based on the execution result.

[0098] For example, after performing quantum error correction, the fidelity and error rate of the corrected logical qubits are calculated and compared with the expected performance. Information such as the error correction result (success or failure) and resource consumption is fed back to the knowledge graph to update the relationships between entities (e.g., "surface code - burst noise - error correction efficiency"). Then, the experience replay mechanism of reinforcement learning is used to update the policy network parameters, thereby improving the accuracy of future decisions.

[0099] Based on the above embodiments, the quantum error correction method provided in this application includes a knowledge graph construction and management mechanism that integrates structured knowledge (such as error correction code parameters and noise models) and unstructured data (such as experimental reports and papers) in the field of quantum error correction; a context-aware mechanism that monitors the state of the quantum system and environmental noise in real time and extracts key features (such as noise type, intensity, and qubit fidelity); a dynamic decision engine mechanism that generates the optimal error correction strategy, i.e., the target strategy, based on the knowledge graph and context information through reinforcement learning and knowledge reasoning; and an error correction execution and feedback mechanism that executes error correction operations and collects results to update the knowledge graph and reinforcement learning model.

[0100] For example, such as Figure 2As shown, the input layer transmits data to the context awareness module through environmental sensors (collecting temperature and electromagnetic noise) and quantum sensors (collecting qubit fidelity). After quantum state deterioration prediction and noise model analysis by the core processor, feature information is output. Then, the policy generator, combined with the rule reasoning engine and reinforcement learning agent, completes multi-objective optimization. The generated policy drives the output layer's quantum gate instruction generation, error correction execution unit, fidelity measurement (including success indicators and anomaly detection), routine diagnosis, and homology mechanism to complete the error correction operation. At the same time, the knowledge graph construction and management module processes unstructured data (papers or experimental reports) and structured data (error correction parameters) and stores them in the Neo4j database to provide historical policy query support for the policy generator, realizing intelligent decision-making and continuous optimization of the error correction system.

[0101] Based on the above-mentioned quantum error correction method, this application also provides a quantum error correction device, such as... Figure 3 As shown, the quantum error correction device 300 includes a data acquisition module 301, a processing module 302, an error correction module 303, and an optimization module 304, wherein: Acquisition module 301 is configured to acquire context data of the quantum system; Processing module 302 is configured to perform feature extraction and fusion on the context data to obtain a context feature vector; and generate a target policy based on the association rules of the knowledge graph and the context feature vector through a reinforcement learning algorithm; the knowledge graph is a graph structure constructed based on multi-source data, and the multi-source data includes at least two types of data; Error correction module 303 is configured to perform quantum error correction operation according to the target strategy; The optimization module 304 is configured to update the model parameters of the knowledge graph and the reinforcement learning algorithm based on the execution result of the quantum error correction operation.

[0102] In some embodiments, the acquisition module 301 performs the acquisition of context data of the quantum system, and is configured to acquire the state data, environmental parameters and historical error correction record data of the quantum system; wherein, the state data of the quantum system is acquired through a quantum sensor, the environmental parameters are acquired through an environmental sensor, and the historical error correction record data is stored in time sequence.

[0103] In some embodiments, the processing module 302 is configured to process the environmental parameters based on a spatial feature extraction algorithm to extract spatial features; process the historical error correction record data based on a temporal modeling algorithm to extract temporal features; allocate weights for the spatial features, the temporal features, and the state data through a gating mechanism according to the state data; and fuse the spatial features, the temporal features, and the state data according to the weights to obtain the context feature vector.

[0104] In some embodiments, the processing module 302 is further configured to perform classification processing on the multi-source data to obtain structured data and unstructured data; determine association rules between entities based on the structured data and the unstructured data to obtain the knowledge graph; and store the knowledge graph through a graph database.

[0105] In some embodiments, the processing module 302 is further configured to, in response to detecting a new noise pattern or a novel quantum error correction code in the quantum system, calculate a target similarity using a graph neural network; the target similarity is the similarity of the new noise pattern or novel quantum error correction code to entities in the knowledge graph; if the target similarity is less than a preset threshold, an incremental learning module is activated to expand the nodes and associated edges of the knowledge graph.

[0106] In some embodiments, the processing module 302 is configured to construct the state space of the reinforcement learning algorithm based on the context feature vector and the knowledge graph; construct the action space of the reinforcement learning algorithm based on the state space according to quantum error correction code, code distance adjustment and measurement frequency optimization; fuse error correction performance and resource consumption to obtain a reward function; and train the reinforcement learning algorithm under the constraints of the association rule according to the state space, the action space and the reward function to generate a target policy.

[0107] In some embodiments, the error correction module 303 is configured to generate a corresponding quantum circuit structure according to the target strategy; perform a stabilizer measurement operation based on the quantum circuit structure to obtain the original measurement signal of the quantum state error; locate the target position and target type of the quantum state error based on the original measurement signal and the decoding rules of the quantum circuit structure; generate an error correction operation based on the target position and the target type; and perform a repair process based on the error correction operation to complete the quantum error correction operation.

[0108] In some embodiments, the optimization module 304 is configured to feed back the execution result of the quantum error correction operation to the knowledge graph; and update the quantitative indicators of the relationships between entities in the knowledge graph based on the execution result.

[0109] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of the embodiments of this disclosure, and the principle is the same. Therefore, the embodiments of this disclosure are not limited thereto.

[0110] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0111] Figure 4A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0112] like Figure 4 As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 402 or a computer program loaded from storage unit 408 into RAM (Random Access Memory) 403. The RAM 403 may also store various programs and data required for the operation of the electronic device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An I / O (Input / Output) interface 405 is also connected to the bus 404.

[0113] Multiple components in electronic device 400 are connected to I / O interface 405, including: input unit 406, such as keyboard, mouse, etc.; output unit 407, such as various types of displays, speakers, etc.; storage unit 408, such as disk, optical disk, etc.; and communication unit 409, such as network card, modem, wireless transceiver, etc. Communication unit 409 allows electronic device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0114] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as quantum error correction methods. For example, in some embodiments, the quantum error correction method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, computing unit 401 may be configured to perform the aforementioned quantum error correction method by any other suitable means (e.g., by means of firmware).

[0115] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0116] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0117] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0118] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0119] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.

[0120] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0121] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0122] As can be seen from the above technical solutions, the quantum error correction method, device, electronic device, and storage medium provided in this application construct a knowledge graph based on multi-source data (including error correction code performance, noise model, and system topology) in the field of quantum error correction, supporting dynamic entity alignment and relation reasoning; through quantum system state monitoring and environmental parameter acquisition, noise features, system features, and historical error correction features are extracted in real time; under the constraints of the knowledge graph, the optimal error correction strategy (such as code distance adjustment and error correction code switching) is explored through reinforcement learning; according to the real-time noise type and quantum system state, the error correction code distance is adaptively adjusted or the error correction code type (such as surface code) is switched; the error correction result is fed back to the knowledge graph to dynamically update the association rules between entities (such as the efficiency relationship between error correction code and noise type). By applying the technical solutions of this application, the noise changes of the quantum system can be dynamically adapted to improve the error correction success rate, multi-source knowledge can be efficiently utilized to reduce trial and error resource waste, error correction efficiency and hardware consumption can be balanced, and the closed-loop update and optimization system can provide support for the stable operation of quantum computing.

[0123] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0124] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A quantum error correction method, characterized in that, include: Acquire context data from quantum systems; Feature extraction and fusion are performed on the context data to obtain a context feature vector; Based on the association rules of the knowledge graph and the context feature vector, a target policy is generated through a reinforcement learning algorithm; The knowledge graph is a graph structure constructed based on multi-source data, which includes at least two types of data. Perform quantum error correction operations according to the target strategy; The model parameters of the knowledge graph and the reinforcement learning algorithm are updated based on the execution result of the quantum error correction operation.

2. The method according to claim 1, characterized in that, The context data of the acquired quantum system includes: Collect the state data, environmental parameters, and historical error correction records of the quantum system; The quantum system state data is collected through a quantum sensor, the environmental parameters are collected through an environmental sensor, and the historical error correction record data is stored in a time sequence.

3. The method according to claim 1 or 2, characterized in that, The context data includes the state data, environmental parameters, and historical error correction records of the quantum system; the feature extraction and fusion of the context data includes: The environmental parameters are processed based on a spatial feature extraction algorithm to extract spatial features; The historical error correction record data is processed based on a time-series modeling algorithm to extract time-series features; Based on the state data, weights are assigned to the spatial features, the temporal features, and the state data through a gating mechanism. The spatial features, temporal features, and state data are fused according to the weights to obtain the context feature vector.

4. The method according to claim 1, characterized in that, Before generating the target policy through the reinforcement learning algorithm, the method further includes: The multi-source data is classified to obtain structured data and unstructured data. The association rules between entities are determined based on the structured data and the unstructured data to obtain the knowledge graph; The knowledge graph is stored in a graph database.

5. The method according to claim 4, characterized in that, Also includes: In response to the detection of new noise patterns or novel quantum error correction codes in the quantum system, target similarity is calculated using a graph neural network. The target similarity is the similarity between the new noise pattern or the novel quantum error-correcting code and entities in the knowledge graph; If the target similarity is less than a preset threshold, the incremental learning module is activated to expand the nodes and associated edges of the knowledge graph.

6. The method according to claim 4, characterized in that, The entities include qubits, quantum error correction codes, noise types, and quantum system parameters; the association rules include the adaptation relationship between the quantum error correction codes and the noise types, the vulnerability association of the quantum system to different noises, and the correspondence between the code distance of the quantum error correction codes and resource consumption.

7. The method according to claim 1, characterized in that, The target strategy generated through reinforcement learning algorithms includes: The state space of the reinforcement learning algorithm is constructed based on the context feature vector and the knowledge graph. Based on the state space, the action space of the reinforcement learning algorithm is constructed according to the quantum error correction code, code distance adjustment, and measurement frequency optimization. By combining error correction performance and resource consumption, a reward function is obtained. The reinforcement learning algorithm is trained under the constraints of the association rules, based on the state space, the action space, and the reward function, to generate the target policy.

8. The method according to claim 7, characterized in that, The reward function balances the error correction success rate, the number of physical qubits consumed, and the error correction operation delay through preset weights; the resource consumption includes the amount of hardware resources used and the number of operations; and the error correction performance includes the error rate after error correction and the fidelity of logical qubits.

9. The method according to claim 1, characterized in that, The step of performing quantum error correction operation according to the target strategy includes: Generate the corresponding quantum circuit structure according to the target strategy; Based on the quantum circuit structure, a stabilizer measurement operation is performed to obtain the original measurement signal of the quantum state error; Based on the original measurement signal and the decoding rules of the quantum circuit structure, the target location and target type of the quantum state error are located; An error correction operation is generated based on the target location and the target type; Based on the error correction operation, a repair process is performed to complete the quantum error correction operation.

10. The method according to claim 1, characterized in that, Updating the knowledge graph includes: The execution result of the quantum error correction operation is fed back to the knowledge graph; The quantitative indicators of the relationships between entities in the knowledge graph are updated based on the execution results.

11. A quantum error correction device, characterized in that, include: The acquisition module is configured to acquire context data of the quantum system; The processing module is configured to perform feature extraction and fusion on the context data to obtain a context feature vector; and to generate a target policy based on the association rules of the knowledge graph and the context feature vector through a reinforcement learning algorithm. The knowledge graph is a graph structure constructed based on multi-source data, which includes at least two types of data. The error correction module is configured to perform quantum error correction operations according to the target strategy; The optimization module is configured to update the model parameters of the knowledge graph and the reinforcement learning algorithm based on the execution result of the quantum error correction operation.

12. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.

13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-10.

14. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-10.