Error detection method and device

By dividing the stableon generator into X-type and Z-type in the quantum circuit, and using four auxiliary particles to achieve error detection, the problem that error detection process itself may cause errors in quantum computing is solved, reducing the overhead of auxiliary particles and improving the performance of quantum error correction code.

CN115733605BActive Publication Date: 2025-06-06HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111016798.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-31
Publication Date
2025-06-06
Estimated Expiration
2041-08-31

AI Technical Summary

Technical Problem

In quantum computing, the error detection process itself may cause errors, resulting in excessive overhead of auxiliary particles, affecting the performance of quantum error correction codes and the application of large-scale quantum computing.

Method used

By dividing the stableon generator into X-type and Z-type in a quantum circuit, and using four auxiliary particles (including two for detecting X-operators and Z-operators, and two for detecting errors introduced by quantum gates), the overhead of auxiliary particles is reduced.

Benefits of technology

It realizes that while ensuring fault tolerance of error detection, it reduces the overhead of auxiliary particles and reduces the propagation of errors on the encoding block, and is suitable for general quantum stable subcodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115733605B_ABST
    Figure CN115733605B_ABST
Patent Text Reader

Abstract

The present application provides an error detection method and device, which belongs to the field of quantum computing technology. The present application divides the stabilizer generators into two types—X type and Z type—in the quantum circuit measuring the stabilizer generators to detect errors respectively, and adds flag particles to detect the X errors and Z errors introduced by the quantum gates in the quantum circuit, and only uses four auxiliary particles to realize the error detection function and fault tolerance function, thereby greatly reducing the overhead of the auxiliary particles. In addition, since the stabilizer generators are divided into two types and measured separately, and the quantum gates corresponding to the two types of operators act on different auxiliary bits, the propagation of errors on the coding block is reduced. In addition, the method is applied to general quantum stabilizer codes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of quantum computing technology, and in particular to an error detection method and device. Background Art

[0002] The coding block obtained based on the quantum error correction code may be interfered by noise during the channel transmission process, resulting in errors in the coding block. To this end, the errors in the coding block can be corrected by adopting error detection and error recovery technology. In addition, since the error detection process also involves complex quantum calculations, the hardware that performs quantum calculations may not be perfect, causing errors in the error detection process itself. To this end, auxiliary particles can be added to the quantum circuit, and the coding block can be detected by the quantum circuit containing the auxiliary particles. Among them, a part of the auxiliary particles is used to detect errors introduced by the noisy channel in the coding block, thereby achieving error detection performance. Another part of the auxiliary particles is used to detect errors generated by the error detection process, thereby achieving fault tolerance performance.

[0003] In order to ensure the fault tolerance of quantum computing during error detection, many current solutions have adopted the method of increasing the overhead of auxiliary particles. However, the large overhead of auxiliary particles not only affects the performance of quantum error correction codes, but also affects the application of large-scale quantum computing in actual situations. In view of this, how to reduce the overhead of auxiliary particles while ensuring the fault tolerance of the error detection process has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiment of the present application provides an error detection method and device, which can reduce the overhead of auxiliary particles while ensuring the fault tolerance of the error detection process. The technical solution is as follows.

[0005] In a first aspect, an error detection method is provided, the method comprising:

[0006] Obtaining a coding block, wherein a generator of a stable subcode of the coding block can be split into an X operator and a Z operator;

[0007] Detecting the encoding block through a quantum circuit to obtain a first detection result, the quantum circuit comprising a first auxiliary particle, a second auxiliary particle and a quantum gate set, the first auxiliary particle being used to detect the X operator, the second auxiliary particle being used to detect the Z operator, the quantum gate set comprising a first quantum gate and a second quantum gate, the first quantum gate being used to establish a quantum entanglement relationship between the X operator and the first auxiliary particle, and the second quantum gate being used to establish a quantum entanglement relationship between the Z operator and the second auxiliary particle;

[0008] Using a verification block to detect the quantum circuit to obtain a second detection result, the verification block includes a first flag particle and a second flag particle, the first flag particle is used to detect whether the quantum gate set introduces a bit flip error for the coding block, and the second flag particle is used to detect whether the quantum gate set introduces a phase flip error for the coding block;

[0009] Whether an error occurs in the coding block and the type of the error are determined according to the first detection result and the second detection result.

[0010] The method provided above, by dividing the stabilizer generators into two types - X type and Z type in the quantum circuit measuring the stabilizer generators to detect errors respectively, and adding flag particles to detect X errors and Z errors introduced by quantum gates in the quantum circuit, only four auxiliary particles are used to realize the error detection function and fault tolerance function, thus greatly reducing the overhead of the auxiliary particles. Among them, the four auxiliary particles refer to the first auxiliary particle, the second auxiliary particle, the first flag particle and the second flag particle. In addition, since the stabilizer generators are divided into two types and measured separately, and the quantum gates corresponding to the two types of operators act on different auxiliary bits, the propagation of errors on the coding block is reduced. In addition, the scope of application of this method is not limited to CSS codes, but can be applied to general quantum stabilizer codes, and has a wider range of applications.

[0011] Optionally, the detecting the coding block by using the quantum circuit to obtain a first detection result includes:

[0012] Establishing a quantum entanglement relationship between the X operator and the first auxiliary particle through the first quantum gate, and establishing a quantum entanglement relationship between the Z operator and the second auxiliary particle through the second quantum gate;

[0013] The first auxiliary particle having a quantum entanglement relationship with the X operator and the second auxiliary particle having a quantum entanglement relationship with the Z operator are measured by the quantum circuit to obtain the first detection result.

[0014] Optionally, the using a verification block to detect the quantum circuit to obtain a second detection result includes:

[0015] Establishing a quantum entanglement relationship between the first flag particle and the first auxiliary particle having a quantum entanglement relationship with the X operator through a third quantum gate, and establishing a quantum entanglement relationship between the second flag particle and the second auxiliary particle having a quantum entanglement relationship with the Z operator through a fourth quantum gate;

[0016] The first flag particle having a quantum entanglement relationship with the first auxiliary particle is measured through the quantum circuit, and the second flag particle having a quantum entanglement relationship with the second auxiliary particle is measured to obtain the second detection result.

[0017] Optionally, the first detection result includes a measurement result of the first auxiliary particle and the second auxiliary particle as a whole, the second detection result includes a measurement result of the first flag particle and a measurement result of the second flag particle, and determining whether an error occurs in the coding block and the type of the error according to the first detection result and the second detection result includes:

[0018] If the measurement results of the first auxiliary particle and the second auxiliary particle as a whole are different from the initial quantum states of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, it is determined that an error occurs in the coding block, and the type of error includes an error introduced by a noise channel.

[0019] Optionally, the first detection result includes a measurement result of the first auxiliary particle and the second auxiliary particle as a whole, the second detection result includes a measurement result of the first flag particle and a measurement result of the second flag particle, and determining whether an error occurs in the coding block and the type of the error according to the first detection result and the second detection result includes:

[0020] If the measurement results of the first auxiliary particle and the second auxiliary particle as a whole are different from the initial quantum states of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is different from the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, it is determined that an error occurs in the coding block, and the type of error includes a bit flip error introduced by the quantum gate set.

[0021] Optionally, the first detection result includes a measurement result of the first auxiliary particle and the second auxiliary particle as a whole, the second detection result includes a measurement result of the first flag particle and a measurement result of the second flag particle, and determining whether an error occurs in the coding block and the type of the error according to the first detection result and the second detection result includes:

[0022] If the measurement results of the first auxiliary particle and the second auxiliary particle as a whole are different from the initial quantum states of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is different from the initial quantum state of the second flag particle, it is determined that an error occurs in the coding block, and the type of error includes a phase flip error introduced by the quantum gate set.

[0023] Optionally, the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is different from the initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole, including:

[0024] The initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole is a Bell state |β 00 >, the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is the Bell state |β 10 > or,

[0025] The initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole is a Bell state |β 10 >, the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is the Bell state |β 00 >.

[0026] Optionally, the measurement result of the first flag particle is different from the initial quantum state of the first flag particle, including:

[0027] The initial quantum state of the first flag particle is |0>, and the measurement result of the first flag particle is |1>; or,

[0028] The initial quantum state of the first flag particle is |1>, and the measurement result of the first flag particle is |0>.

[0029] Optionally, the measurement result of the second flag particle is different from the initial quantum state of the second flag particle, including:

[0030] The initial quantum state of the second flag particle is |+>, and the measurement result of the second flag particle is |->; or,

[0031] The initial quantum state of the second flag particle is |->, and the measurement result of the first flag particle is |+>.

[0032] Optionally, the first quantum gate and the second quantum gate are both quantum controlled non-CNOT gates.

[0033] In a second aspect, an error detection device is provided, which has the function of implementing the first aspect or any optional method of the first aspect. The error detection device includes at least one functional unit, and the at least one functional unit is used to implement the method provided by the first aspect or any optional method of the first aspect. In some embodiments, the functional unit in the error detection device is implemented by software, and the functional unit in the error detection device is a program module. In other embodiments, the functional unit in the error detection device is implemented by hardware or firmware. The specific details of the error detection device provided in the second aspect can be found in the first aspect or any optional method of the first aspect, which will not be repeated here.

[0034] In a third aspect, a computer device is provided, the computer device comprising a processor and a memory, wherein the memory stores computer instructions, and the processor executes the computer instructions to implement the method of the first aspect and possible implementations thereof. In some embodiments, the computer device further comprises a network interface for sending the constructed event sequence via a network. In some embodiments, the computer device further comprises a screen for displaying the constructed event sequence.

[0035] In a fourth aspect, a (non-transient) computer-readable storage medium is provided. The (non-transient) computer-readable storage medium stores at least one instruction, and when the instruction is executed on a computer, the computer executes the method provided in the first aspect or any optional manner of the first aspect. The types of the storage medium include, but are not limited to, volatile memory, such as random access memory, non-volatile memory, such as flash memory, hard disk drive (HDD), solid state drive (SSD).

[0036] In a fifth aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and executed by a computer, the computer executes the method provided by the first aspect or any optional manner of the first aspect.

[0037] In a sixth aspect, a chip is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method in the above-mentioned first aspect and any possible implementation of the first aspect.

[0038] In a seventh aspect, a computer device cluster is provided, the computer device cluster comprising at least one computer device. Different units of the computer device in the second aspect are distributed and run on different computer devices in the computer device cluster. Optionally, the computer device cluster is a cloud computing system (including multiple cloud computer devices, such as servers). Alternatively, the computer device cluster is an edge computing system (including multiple edge computer devices, such as servers, desktop computers); alternatively, the computer device cluster is a terminal device cluster (including multiple terminals, such as laptops, personal desktop computers, etc.). BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the meaning of symbols in a quantum circuit diagram provided in an embodiment of the present application;

[0040] Figure 2 It is a schematic diagram of a propagation mode of an X error, a Y error and a Z error through a quantum CNOT gate provided in an embodiment of the present application;

[0041] Figure 3 is a schematic diagram of a measurement circuit provided in an embodiment of the present application;

[0042] Figure 4 is a schematic diagram of a measurement circuit in the related art;

[0043] Figure 5 is a schematic diagram of a measurement circuit in the related art;

[0044] Figure 6 It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0045] Figure 7 is a flow chart of an error detection method provided by an embodiment of the present application;

[0046] Figure 8 It is a schematic diagram of a measurement circuit of any generator in a general stable subcode provided in an embodiment of the present application;

[0047] Fig. 9 It is a schematic diagram of a measurement circuit of all generators in a general stable subcode provided in an embodiment of the present application;

[0048] Fig.10 It is a stable subgenerator M=X provided in the embodiment of the present application. A Z B Schematic diagram of the measurement circuit;

[0049] Fig.11 is a schematic diagram of a measurement circuit for achieving fault tolerance provided by an embodiment of the present application;

[0050] Fig.12 It is a schematic diagram of an error detection circuit of a general stable subcode provided in an embodiment of the present application;

[0051] Fig.13 It is a stable subgenerator M provided in the embodiment of the present application. 1 =Schematic diagram of the measurement circuit of XZZXI;

[0052] Fig.14 is a structural schematic diagram of an error detection device provided in an embodiment of the present application;

[0053] Fig.15 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0055] The following is an explanation of some terminology concepts involved in the embodiments of the present application.

[0056] (1) Pauli operator, X operator, Y operator and Z operator

[0057] The expression of the unit operator I is The expression of the X operator is The expression of the Y operator is The expression of the Z operator is I operator, X operator, Y operator and Z operator are collectively referred to as Pauli operator. The functions of Pauli operator are as follows.

[0058] The X operator is used to convert the state of a qubit from |0> to |1>, or to convert the state of a qubit from |1> to |0>. That is, X|0>=|1>, X|1>=|0>. The operation implemented by the X operator is also called bit flipping.

[0059] The Z operator is used to convert the state of a qubit from |+> to |->, or to convert the state of a qubit from |-> to |+>. That is, Z|+>=|->, Z|->=|+>. The operation implemented by the Z operator is also called phase flipping.

[0060] The Y operator is used to rotate the quantum bit 180° around the Y axis. That is, Y = iXZ, i is the phase factor, which can be ignored in the measurement.

[0061] (2) Bell state

[0062] Bell state is used to describe the entangled state of two quantum bit (Qubit) systems. There are four types of Bell state, which are denoted as |β 00 >、|β 10 >、|β 01 > and |β 11 >. Among them,

[0063] (3) Stabilizers and Stabilizer Codes

[0064] The Pauli group is the set of Pauli operators. Suppose S is a commutative group of an n-qubit Pauli group, the elements in S commutate with each other, and the common eigenvalue space of all elements in S with eigenvalue +1 is H S , then when , for any M(M∈S) there exists H S The corresponding quantum code is a stable subcode, and the subgroup S is called the stabilizer of the stable subcode.

[0065] (4) Generators

[0066] Generators are used to represent subgroups S. If there are r generators g 1 ,g 2 ,…,g r , then the subgroup S can be expressed as

[0067] (5) Quantum companion formula

[0068] The quantum syndrome is an r-bit binary number string (s 1 ,s 2 ,…,s r The basic principle of error recovery through quantum syndrome is to use quantum syndrome to determine the error E and then use the inverse operator E of the error -1 , that is, itself E -1 =E, acting on the coding block , get E -1 (E|φ>) = |φ>, thus completing error recovery. More specifically, since any error E in the coded block is represented by an operator in the Pauli group, the error E and the stable subgenerator g i To trade or to oppose trade, when trading, it is Eg i =g i E, then s i = 0, when the opposition is easy, that is, Eg i =-g i E, then s i =1. If If no error occurs, That is, at least one quantum syndrome s after the generator measurement i =1, indicating an error. Then search for the quantum syndrome in the quantum syndrome table (s 1 ,s 2 ,…,s r ) corresponding to the error. Therefore, as long as the number string is measured, the error operator E can be determined, and the inverse operation E -1 Error correction can be achieved.

[0069] (6) Auxiliary particles

[0070] The quantum bits of the non-coding block are collectively referred to as auxiliary particles. In this paper, the auxiliary particles in the auxiliary block (such as |β 00 >) and the flag particles in the verification block are collectively referred to as auxiliary particles.

[0071] (7) Auxiliary block

[0072] Auxiliary block refers to a collection of auxiliary particles, which are used to assist the stable sub-generator to extract quantum syndromes, thereby realizing the error detection function.

[0073] (8) Verification Block

[0074] The verification block refers to a set consisting entirely of auxiliary particles, which is used to verify whether the auxiliary particles in the auxiliary block are prepared correctly or whether the quantum gates in the quantum circuit are faulty, thereby achieving fault tolerance.

[0075] (9) Flag particles

[0076] Flag particles are auxiliary particles used to check whether a quantum gate (such as a CNOT gate) introduces errors.

[0077] (10) flag particle |0>

[0078] The flag particle |0> refers to a flag particle initialized to the |0> state.

[0079] (11) Flag particle |+>

[0080] The flag particle |+> refers to a flag particle initialized to the |+> state.

[0081] (12) Controlled-not gate (CNOT gate)

[0082] The CNOT gate is a quantum gate that operates on two quantum bits. The CNOT gate includes a control bit and a controlled bit. When two quantum bits are input into the CNOT gate, when the quantum bit at the control bit is in the |0> state, no operation is performed on the quantum bit at the controlled bit, that is, the controlled bit remains unchanged; when the quantum bit at the control bit is in the |1> state, an X operation is performed on the quantum bit at the controlled bit, that is, the controlled bit is flipped. The CNOT gate is usually used to establish a quantum entanglement relationship between two quantum bits.

[0083] (13) [[n,k,d]] code

[0084] The [[n,k,d]] code represents the use of n physical quantum bits to encode k bits of quantum information. The minimum Hamming distance between codewords in the resulting coding space is d, which can correct A quantum error of one bit.

[0085] (14) CSS code

[0086] CSS code is a special quantum stable subcode. CSS code was proposed by Calderbank, Shor and Steane.

[0087] (15) Quantum Circuits

[0088] A quantum circuit is a quantum circuit, which refers to the circuit used to operate quantum bits.

[0089] (16) Measurement results are trivial and measurement results are non-trivial.

[0090] Trivial means that the quantum state after measurement is the same as the initial quantum state. Non-trivial means that the quantum state after measurement is different from the initial quantum state.

[0091] The meanings of the symbols in the quantum circuit diagram in the embodiments of this application can be found in the attached Figure 1 content.

[0092] In the embodiment of the present application, the measurement results of the first auxiliary particle and the second auxiliary particle as a whole are different from the initial quantum states of the first auxiliary particle and the second auxiliary particle as a whole, including the following two situations:

[0093] Case 1: The initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole is the Bell state |β 00 >, the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is not the Bell state |β 00 >, for example |β 10 >、|β 01 > or |β 11 >.

[0094] Case 2: The initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole is the Bell state |β 10 >, the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is not the Bell state |β 10 >, for example |β 00 >、|β 01 > or |β 11 >.

[0095] In the embodiment of the present application, the measurement result of the first flag particle is different from the initial quantum state of the first flag particle, including the following two situations:

[0096] Case 1: The initial quantum state of the first flag particle is |0>, and the measurement result of the first flag particle is |1>.

[0097] Case 2: The initial quantum state of the first flag particle is |1>, and the measurement result of the first flag particle is |0>.

[0098] In the embodiment of the present application, the measurement result of the second flag particle is different from the initial quantum state of the second flag particle, including the following two situations:

[0099] Case 1: The initial quantum state of the second flag particle is |+>, and the measurement result of the second flag particle is |->.

[0100] Case 2: The initial quantum state of the second flag particle is |->, and the measurement result of the first flag particle is |+>.

[0101] In the following embodiments, only the initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole is taken as the Bell state |β 00 >, the initial quantum state of the first flag particle is |0>, and the initial quantum state of the second flag particle is |+> as an example for explanation.

[0102] Since quantum network coding will be interfered by noise during channel transmission, it is necessary for quantum error correction codes to correctly correct the errors introduced by coding in the noisy channel. However, this process is based on the fact that error detection and error recovery operations can be performed completely correctly without other errors. In fact, error detection and error recovery operations are also complex quantum calculations. Since quantum computing involves hardware imperfections, errors may also be introduced in the error detection process. In order to detect errors introduced by the noisy channel and errors introduced by the hardware itself during the error detection process, auxiliary particles need to be added. The auxiliary particles are divided into two parts. One part of the auxiliary particles is used to obtain the quantum syndrome about the coding block to achieve error detection performance. The other part of the auxiliary particles is used to detect errors introduced by the error detection operation itself to achieve fault tolerance performance.

[0103] The error detection of quantum error correction code is to detect the type of error and the location of the error in the coding block. In quantum error correction code, all errors can be discretized into a linear combination of I error (no error), X error (bit flip error), Z error (phase flip error) and Y error (bit flip error and phase flip error). The propagation mode of X error, Y error and Z error through quantum CNOT gate is shown in the attached figure. Figure 2 When one of the three types of errors, X error, Y error and Z error, occurs on a qubit on the coding block, during error detection, the coding block can be first measured by the stable subgenerator, and the error can be copied to the auxiliary block through the quantum CNOT gate. Then, the quantum syndrome corresponding to the error is obtained by measuring the auxiliary block, and error recovery is performed based on the quantum syndrome.

[0104] Quantum fault-tolerant detection is to make the error in the coding block caused by any imperfect single element in the error detection process tolerable, that is, the error in the error detection process itself can be corrected by the error correction code. For example, the imperfect quantum CNOT gate, denoted as ε, can be rewritten as Where U is a perfect quantum CNOT gate, so the imperfect CNOT gate is equivalent to following this perfect quantum gate with The error operation is usually understood as a tensor product, that is, (Where U 1 and U 2 Acting on the control bit and controlled bit of the CNOT gate respectively).

[0105] Early symptom measurements based on a single auxiliary qubit may produce uncorrectable multi-qubit errors due to the interaction of an auxiliary bit with multiple quantum information bits in the encoding block, and cannot guarantee the fault tolerance of the measurement circuit. For example, please refer to the attached Figure 3 , attached Figure 3 (a) is the measurement circuit of the quantum stabilizer generator XZZXI of the quantum stabilizer code [[5,1,3]]. Figure 3 (b) is attached Figure 3 The equivalent circuits of quantum gates a and d in (a), where H is a Hadamard gate. The imperfection of quantum operation elements may result in the inability to achieve fault tolerance. For example, if the attached Figure 3 Introduction of medium quantum CNOT gate b Error, that is, when Z error is introduced into the controlled bit, Z error will propagate to the coding block through the subsequent quantum gates c and d along the same auxiliary particle, causing the error of the coding block to be Z 3 X 4(The third qubit of the coding block has a Z error, and the fourth qubit has an X error). This is an error on two qubits, but the error correction capability of the stable subcode [[5,1,3]] can only correct errors on one qubit.

[0106] In order to ensure the fault tolerance of quantum logic operations during error detection, many solutions to this problem adopt the method of increasing the overhead of auxiliary particles. However, the large overhead of auxiliary particles not only affects the performance of error correction codes, but also affects the application of large-scale quantum computing in actual situations. This requires a low-overhead fault-tolerant detection method so that even if some errors occur during the error detection process, the correct quantum information can still be restored.

[0107] In some studies, attempts have been made to use the Steane-type fault-tolerant detection method to achieve quantum fault-tolerant detection. Specifically, in response to the fault-tolerant problem of quantum CSS codes, Steane et al. proposed a quantum adjoint measurement method based on coding blocks, namely the Steane-type fault-tolerant method. The basic idea of ​​the Steane-type fault-tolerant method is to use two auxiliary blocks to detect and correct X errors and Z errors respectively. The simplified model of the symptom measurement circuit of this method is shown in the attached figure. Figure 4 shown.

[0108] Attached Figure 4 Each slash in indicates that the line it is in is a combination of n (n is the number of particles in the encoding block) lines, and the corresponding quantum gates are operated bit by bit, and the corresponding measurement operations are also measured bit by bit. Figure 4 (a) in the figure represents the measurement circuit of the X-type generator (composed of the X operator and the I operator). The verification block uses a quantum |+> state to detect the auxiliary block. Once the auxiliary block is verified to be prepared correctly, the X-basis measurement can be continued to obtain the quantum companion of the X-type stabilizer. Otherwise, the auxiliary block must be re-prepared. Figure 4 (b) shows the measurement circuit of the Z-type generator (composed of the Z operator and the I operator). The |0> state in the verification block is used to detect the auxiliary block. The Z error in .

[0109] The Steane-type fault-tolerant detection method has the following two disadvantages.

[0110] ① Auxiliary particles have high overhead

[0111] When the verification auxiliary block is prepared correctly, the number of particles in the auxiliary block in the measurement circuit of the X (or Z) type stabilizer generator is the same as the number of particles in the encoding block, and the auxiliary particle cost is 2 (n + 1). When the verification auxiliary block preparation fails, the failed auxiliary block is discarded and the auxiliary block is re-prepared until the auxiliary block is prepared correctly. At this time, the auxiliary particle cost will be greater than 2 (n + 1).

[0112] ②The preparation of the auxiliary block is complex

[0113] The auxiliary block needs to be encoded into the same type of quantum state as the encoded block. Since a relatively large number of auxiliary particles are used and a series of quantum operations are required for encoding, additional auxiliary particles are also needed as verification blocks to check the correctness of the preparation of the auxiliary block.

[0114] In some other studies, attempts have been made to use the "cat state" fault-tolerant method to achieve quantum fault-tolerant detection. The "cat state" fault-tolerant method was proposed by Peter W. Shor. Its main idea is to prepare the auxiliary block into a "cat state" and adopt the way that each quantum state in the auxiliary block interacts only with a single quantum state in the encoded block to solve the problem of error cross-propagation. The detailed steps are as follows: First, prepare the auxiliary block into a "cat state" where ω (ω < n) represents the weight of the generator; secondly, verify the "cat state"; there are two verification methods. One verification method is to strictly verify the "cat state". The verification block requires ω - 1 auxiliary particles to verify whether any two adjacent qubits are the same. If they are the same, the measurement results are all +1, indicating that the "cat state" is successfully prepared; if the measurement result of a certain verification qubit is -1, the two measured qubits are different, that is, the "cat state" preparation fails and is discarded and re-prepared. The other verification method is to non-strictly verify the "cat state", and only use one auxiliary qubit to verify the first qubit and the last qubit in the "cat state". If the "cat state" is correctly prepared, the measurement result is +1, otherwise it is -1. Finally, measure the generator of the stabilizer.

[0115] However, the "cat state" fault-tolerant method also has some disadvantages. Specifically, this method uses ω auxiliary particles for the auxiliary block, and there are two methods to verify whether the auxiliary block is correctly prepared. One is strict verification, which requires the verification block to use ω - 1 auxiliary particles, and the other is non-strict verification, which requires 1 auxiliary particle. Therefore, in the circuit for measuring a generator of the stabilizer, the auxiliary particle overhead is 2ω - 1 or ω + 1. When there are r generators in the stabilizer, the total auxiliary particle overhead is r(2ω - 1) or r(ω + 1). The auxiliary block used in this method is easier to prepare than the auxiliary block used in the Steane-type fault-tolerant detection method, but the auxiliary particle overhead is higher.

[0116] In some other studies, attempts have been made to use the "flag" type of fault-tolerant method to achieve quantum fault-tolerant detection. Specifically, Chaorui et al. first proposed the "flag" type of fault-tolerant method for the CSS code in quantum error correction codes in 2018. This method introduces an auxiliary particle named "flag" into the measurement circuit of the stabilizer generator, as shown in the appendix Figure 5As shown, in the error detection process of the quantum error correction code, the "flag" particle is used to detect whether there is an imperfect quantum CNOT gate in the measurement circuit of the stable sub-generator to introduce a Z error, and propagate the Z error to the coding block. Therefore, the "flag" type fault-tolerant method achieves the purpose of fault-tolerant measurement using only two auxiliary particles.

[0117] Attached Figure 5 The fault-tolerant measurement circuit of the generator XZZXI of the quantum stable subcode [[5,1,3]] is shown. The function of the flag particle is to detect whether one of the two quantum CNOT gates, quantum CNOT gate b and quantum CNOT gate c, introduces a Z error in the controlled bit. If the quantum CNOT gate b or quantum CNOT gate c introduces a Z error in the controlled bit, the measurement result of the flag particle |+> after the Z error and after passing through the X basis is |->; otherwise, the measurement result of the flag particle is still |+>.

[0118] The "flag" type fault tolerance method has the following two disadvantages.

[0119] ① The quantum CNOT gates corresponding to all operators in a generator of the stabilizer act on the same auxiliary particle in sequence. Compared with the error detection circuits of the Steane type and "cat state" fault-tolerant methods, the error detection circuit of this method has increased the time depth.

[0120] ② Only one "flag" particle is used to detect the Z error introduced by the CNOT gate corresponding to the Z-type operator in the generator. Therefore, only the Z error introduced by some quantum CNOT gates can be detected, but the Z error and X error cannot be detected at the same time.

[0121] Analysis of the above three solutions, namely the Steane-type fault-tolerant method, the "cat-state" fault-tolerant method and the "flag"-type fault-tolerant method, shows that all three solutions have some problems that need to be solved.

[0122] Since both the Steane-type fault-tolerant method and the "cat-state" fault-tolerant method use lateral fault-tolerant technology, although this technology can prevent the cross-propagation of errors in the measurement circuit of the stabilizer generator, this technology requires the auxiliary block to be prepared into a complex specific quantum state, and it is very dependent on the correctness of the auxiliary block preparation. This is because errors in the preparation process will cause errors in the measurement of the stabilizer generator, and the errors can be propagated to the encoding block through subsequent error correction operations. Therefore, additional auxiliary particles are required as verification blocks to verify whether the auxiliary blocks are prepared correctly, and errors may also be introduced during the verification process. In addition, after measuring the auxiliary block to obtain the corresponding quantum syndrome, all the auxiliary particles collapse to the determined |0> state and |1> state, destroying the original specific quantum state prepared by the auxiliary block, and it is difficult to be re-prepared to the specific quantum state, so the auxiliary block needs to be re-prepared for the measurement of another generator of the stabilizer.

[0123] In the "flag" type fault tolerance method proposed by Chao et al., only one auxiliary particle is used in the auxiliary block as the controlled bit of all CNOT gates, which not only causes error propagation but also converts the X error and Z error introduced by the CNOT gate into each other. In order to detect whether the CNOT gate is perfect, a "flag" particle is added to detect the perfection of the CNOT gate in the measurement circuit of the generator, but only one of the X error or Z error can be verified. Therefore, the "flag" type fault tolerance method of Chao et al. is only applicable to the more special CSS code or some special stable subcodes in the stable subcode.

[0124] In view of the many problems listed above, the present application embodiment proposes a fault-tolerant detection method for reducing the auxiliary particle overhead based on the technology of using classification measurement and adding "flag" particles for general stable subcodes. In some embodiments, first, in the measurement circuit of the stable subgenerator, each generator of the stable subgenerator is divided into two types-X-type generator (containing only X operators) and Z-type generator (containing only Z operators) to detect errors respectively. At the same time, "flag" particles are added as an important tool for detecting bit flip errors (X errors) and phase flip errors (Z errors) introduced by quantum CNOT gate failures in the measurement circuit. Then, the error type and range of the quantum CNOT gate are determined using the measurement results of the auxiliary block and the "flag" particle. Finally, the specific location where the error occurs is further determined according to the quantum syndrome. In the method of this embodiment, only four auxiliary particles are used to realize the error detection function and the fault tolerance function, which greatly reduces the overhead of the auxiliary particles. Since the generators are divided into two types for separate measurement, and the CNOT gates corresponding to these two types of operators act on different auxiliary bits, the propagation of errors on the coding block is reduced. In addition, the method provided in this embodiment is applicable to general quantum stable subcodes.

[0125] In view of the shortcomings of the Steane-type fault-tolerant method and the "cat-state" fault-tolerant method, which have large auxiliary particle overhead and complex auxiliary block preparation, the fault-tolerant detection method provided in this embodiment has an auxiliary particle overhead of only 4, which is relatively small and does not require a complex preparation process. In addition, the auxiliary particles can be reset and reused in the measurement circuit of each generator, thereby solving the shortcomings of large auxiliary particle overhead and complex auxiliary block preparation.

[0126] The "flag" type fault tolerance method of Chao et al. is only applicable to the case of a relatively special CSS code in a stable subcode. The fault tolerance detection method provided in this embodiment can be applied to a general stable subcode and can realize the function of detecting X errors and Z errors at the same time, so the scope of use is not limited to special CSS codes.

[0127] The following is an example of an application scenario of the embodiment of the present application.

[0128] Attached Figure 6 Schematic diagram of an application scenario provided by an embodiment of the present application. Figure 6 The illustrated scene includes a computer device 11 and a computer device 12 .

[0129] The computer device 11 plays the role of a sender and is responsible for encoding the service data to generate an encoding block, and then sending the encoding block to the computer device 12 through the network.

[0130] The computer device 12 plays the role of the receiver. The computer device 12 is responsible for error detection, error recovery and decoding of the coded blocks. Figure 6 As shown, when the computer device 12 performs error detection, it is necessary to add auxiliary particles to measure the coding block and copy out the error information without destroying the coding block. Considering that errors may also be introduced by the quantum CNOT gate during the error detection process, it is also necessary to add auxiliary particles to detect the errors of the quantum CNOT gate, and correct the errors introduced by the quantum CNOT gate through the error recovery process to achieve the fault tolerance function of the quantum error correction code.

[0131] The computer device 11 and the computer device 12 are connected via a network. The computer device 11 and the computer device 12 include but are not limited to personal computers, mobile phones, servers, notebook computers, IP phones, cameras, tablet computers, wearable devices, etc.

[0132] The following is an example of the method flow of the embodiment of the present application.

[0133] Attached Figure 7 It is a flowchart of an error detection method provided in an embodiment of the present application.

[0134] Attached Figure 7The application scenario based on the method shown is optionally as described in the above-mentioned appendix. Figure 6 For example, in combination with the Figure 6 Come and see, Figure 7 The computer device in the method shown is attached Figure 6 The computer device 12 in the Figure 7 The method shown is applied to the process of error detection and error recovery of computer device 12. Figure 7 The method shown includes the following steps S201 to S204.

[0135] This embodiment relates to the detection results obtained by measuring the auxiliary block and the detection results obtained by measuring the verification block. In order to distinguish different detection results, the detection result obtained by measuring the auxiliary block is described as "first detection result", and the detection result obtained by measuring the verification block is described as "second detection result". The first detection result can optionally be the auxiliary block|β 00 >the quantum state after measurement, the second detection result can optionally be the quantum state of flag particle |0>after measurement and the quantum state of flag particle |+>after measurement.

[0136] Step S201: A computer device obtains a coding block, and a stable sub-generator corresponding to the coding block includes an X operator and a Z operator.

[0137] Optionally, the coding block is specifically a codeword of a stable subcode after being interfered by channel noise. A stable subcode is a codeword that carries information after being encoded according to a coding rule.

[0138] For example, the minimum stable subcode is [[5,1,3]]. Another example is the general stable subcode, such as [[8,3,3]], [[10,4,3]], [[11,5,3]], etc.

[0139] Step S202: The computer device detects the coding block through the quantum circuit to obtain a first detection result.

[0140] Quantum circuits are also called measurement circuits. Quantum circuits are used for error detection. Quantum circuits include auxiliary blocks and quantum gate sets.

[0141] The auxiliary block includes two or more auxiliary particles. In order to distinguish different auxiliary particles in the auxiliary block, the following description uses "first auxiliary particle" and "second auxiliary particle" to distinguish and describe different auxiliary particles. In some embodiments, the auxiliary block includes a first auxiliary particle and a second auxiliary particle.

[0142] The first auxiliary particle and the second auxiliary particle are in one of the four Bell states as a whole. Optionally, the initial quantum state of the first auxiliary particle and the second auxiliary particle is Bell state |β 00>. Alternatively, the initial quantum states of the first auxiliary particle and the second auxiliary particle are Bell states |β 10 >. Here, |> is the Dirac symbol used to represent the state of a quantum bit.

[0143] The first auxiliary particle and the second auxiliary particle are used to detect different types of stable sub-generators, thereby realizing the classification measurement of stable sub-generators. Specifically, the stable sub-generator of the coding block is split into X operator and Z operator. The first auxiliary particle is used to detect the X operator in the stable sub-generator. The second auxiliary particle is used to detect the Z operator in the stable sub-generator.

[0144] The quantum gate set includes multiple quantum gates, and different quantum gates can optionally act on different operators of the stabilizer generator and different auxiliary particles in the auxiliary block. In order to distinguish different quantum gates, the following description of multiple different quantum gates is distinguished by "first quantum gate" and "second quantum gate".

[0145] The quantum gate set includes a first quantum gate and a second quantum gate. Optionally, the first quantum gate and the second quantum gate are both quantum CNOT gates.

[0146] The first quantum gate acts on the X operator and the first auxiliary particle of the stable sub-generator. The first quantum gate is used to operate the X operator and the first auxiliary particle of the stable sub-generator, so that the X operator and the first auxiliary particle establish a quantum entanglement relationship. The controlled bit of the first quantum gate is on the X operator, and the control bit of the first quantum gate is on the first auxiliary particle.

[0147] The second quantum gate acts on the Z operator and the second auxiliary particle of the stabilizer generator. The second quantum gate is used to operate the Z operator and the second auxiliary particle so that the Z operator and the second auxiliary particle establish a quantum entanglement relationship. The controlled bit of the second quantum gate is on the second auxiliary particle, and the control bit of the second quantum gate is on the Z operator.

[0148] Step S203: The computer device uses the verification block to detect the set of quantum gates in the quantum circuit to obtain a second detection result.

[0149] The verification block includes two or more flag particles. In order to distinguish different flag particles, the following description will be distinguished by "first flag particle" and "second flag particle".

[0150] The initial quantum states of the first flag particle and the second flag particle are different. For example, the initial quantum state of the first flag particle is |0>, and the initial quantum state of the second flag particle is |+>. For another example, the initial quantum state of the first flag particle is |1>, and the initial quantum state of the second flag particle is |->. For another example, the initial quantum state of the first flag particle is |0>, and the initial quantum state of the second flag particle is |->.

[0151] The first flag particle is used to detect whether the quantum gate set introduces X errors into the quantum error correction code. The second flag particle is used to detect whether the quantum gate set introduces Z errors into the quantum error correction code.

[0152] The first flag particle and the second flag particle act on different auxiliary particles through different quantum gates. Taking the quantum gate corresponding to the first flag particle as the third quantum gate and the quantum gate corresponding to the second flag particle as the fourth quantum gate as an example, the first flag particle and the first auxiliary particle are operated through the third quantum gate, and the second flag particle and the second auxiliary particle are operated through the fourth quantum gate; the first flag particle after the operation and the second flag particle after the operation are measured; according to the measurement results of the first flag particle and the measurement results of the second flag particle, the error of the quantum gate set is determined.

[0153] The third quantum gate acts on the first flag particle and the first auxiliary particle. The third quantum gate is used to operate the first flag particle and the first auxiliary particle, so that the first flag particle and the first auxiliary particle generate a quantum entanglement relationship. The controlled bit of the third quantum gate is on the first flag particle, and the control bit of the third quantum gate is on the first auxiliary particle.

[0154] The fourth quantum gate acts on the second flag particle and the second auxiliary particle. The second quantum gate is used to operate the second flag particle and the second auxiliary particle, so that the second flag particle and the second auxiliary particle generate a quantum entanglement relationship. The controlled bit of the fourth quantum gate is on the second auxiliary particle, and the control bit of the fourth quantum gate is on the second flag particle.

[0155] Optionally, the third quantum gate and the fourth quantum gate are both quantum CNOT gates.

[0156] Step S204: The computer device determines whether an error occurs in the quantum error correction code and the type of the error according to the first detection result and the second detection result.

[0157] The types of errors include but are not limited to errors introduced by a noise channel, X errors introduced by a quantum gate set, X errors introduced by a quantum gate set, and Y errors introduced by a quantum gate set. Optionally, the computer device further determines the location where the error occurs, that is, which quantum gate in the quantum gate set introduces the error, based on the first detection result and the second detection result.

[0158] In a possible implementation, the content of the following Table 1 is queried according to the first detection result and the second detection result to determine whether an error occurs and the type of the error.

[0159] The method provided in this embodiment divides the stable sub-generators into two types, X type and Z type, in the quantum circuit for measuring the stable sub-generators to detect errors respectively, and adds flag particles to detect X errors and Z errors introduced by quantum gates in the quantum circuit, and only uses four auxiliary particles to realize the error detection function and the fault tolerance function, thereby greatly reducing the overhead of the auxiliary particles. The four auxiliary particles refer to the first auxiliary particle, the second auxiliary particle, the first flag particle, and the second flag particle.

[0160] In addition, since the stabilizer generators are divided into two types and measured separately, and the quantum gates corresponding to the two types of operators act on different auxiliary bits, the propagation of errors on the coding block is reduced. In addition, the application scope of this method is not limited to CSS codes, but can be applied to general quantum stabilizer codes, and has a wider range of applications.

[0161] In some embodiments, whether only errors introduced by the noisy channel exist in the coded block is determined by comparing whether the initial quantum state of the auxiliary block is the same as the quantum state of the auxiliary block after measurement.

[0162] Specifically, in the process of executing step S202, a quantum entanglement relationship is established between the X operator and the first auxiliary particle through the first quantum gate, and a quantum entanglement relationship is established between the Z operator and the second auxiliary particle through the second quantum gate; the first auxiliary particle having a quantum entanglement relationship with the X operator and the second auxiliary particle having a quantum entanglement relationship with the Z operator are measured through a quantum circuit to obtain a first detection result; if the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is different from the initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, it is determined that an error occurs in the coding block, and the type of the error includes an error introduced by a noise channel. If the measurement results of the first auxiliary particle and the second auxiliary particle as a whole are the same as the initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, it is determined that there is no error in the coding block.

[0163] For example, the initial quantum states of the two auxiliary particles in the auxiliary block are Bell states |β 00 >, the initial quantum state of the first flag particle is |0>, and the initial quantum state of the second flag particle is |+>, when the coding block passes through the quantum circuit, the auxiliary block after being acted on by the generator is measured using the Bell basis, the first flag particle after being acted on by the first auxiliary particle is measured using the Z basis, and the second flag particle after being acted on by the second auxiliary particle is measured using the X basis. If the measurement results of the first auxiliary particle and the second auxiliary particle are Bell states |β 10 >, and the measurement result of the first flag particle is |0>, and the measurement result of the second flag particle is |+>, it is determined that an error introduced by the noise channel has occurred in the coding block. If the measurement results of the first auxiliary particle and the second auxiliary particle are still Bell states |β 00 >, and the measurement result of the first flag particle is |0>, and the measurement result of the second flag particle is |+>, it is determined that the coding block has no errors introduced by the noise channel. For another example, the initial quantum states of the two auxiliary particles in the auxiliary block are Bell states |β 10 >, the initial quantum state of the first flag particle is |0>, and the initial quantum state of the second flag particle is |+>, if the measurement results of the first auxiliary particle and the second auxiliary particle are Bell states |β 10 >, the measurement result of the first flag particle is |0>, and the measurement result of the second flag particle is |+>, which determines that the coding block has no errors introduced by the noise channel.

[0164] In some embodiments, whether only the quantum gate in the quantum circuit introduces an error (X error or Z error) is determined by comparing whether the initial quantum state of the flag particle is the same as the quantum state of the flag particle after measurement.

[0165] For the process of detecting quantum gate X errors in quantum circuits, after the coding block is input into the quantum circuit and the first flag particle and the first auxiliary particle establish a quantum entanglement relationship, the first flag particle is measured; if the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is different from the initial quantum state of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is different from the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, it is determined that an error occurs in the coding block, and the type of the error includes a bit flip error (X error) introduced by the quantum gate set.

[0166] For example, the initial quantum states of the two auxiliary particles in the auxiliary block are Bell states |β 00 >, the initial quantum state of the first flag particle is |0>, and the initial quantum state of the second flag particle is |+>, if the measurement results of the first auxiliary particle and the second auxiliary particle are Bell states |β 01 >, the measurement result of the first flag particle is |1>, and the measurement result of the second flag particle is |+>, which determines that X errors occur in the quantum gate set.

[0167] For the process of detecting quantum gate Z errors in quantum circuits, after inputting the coding block into the quantum circuit and establishing a quantum entanglement relationship between the second flag particle and the second auxiliary particle, the second flag particle is measured; if the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is different from the initial quantum state of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is different from the initial quantum state of the second flag particle, it is determined that an error occurs in the coding block, and the type of error includes a phase reversal error (Z error) introduced by the quantum gate set. Optionally, the first flag particle is measured using the Z basis, and the second flag particle is measured using the X basis.

[0168] For example, the initial quantum states of the two auxiliary particles in the auxiliary block are Bell states |β 00 >, the initial quantum state of the first flag particle is |0>, and the initial quantum state of the second flag particle is |+>, if the initial quantum states of the two auxiliary particles in the auxiliary block are Bell states |β 01>, the initial quantum state of the first flag particle is |0>, and the measurement result of the second flag particle is |->, which determines that Z errors occur in the quantum gate set.

[0169] In some embodiments, the measurement results of the auxiliary block and the measurement results of the verification block are used to determine whether a Y error occurs.

[0170] That is, based on the measurement results of the first auxiliary particle and the second auxiliary particle, the measurement results of the first flag particle and the measurement results of the second flag particle, the bit and phase flip errors (Y errors) occurring in the quantum gate set are detected.

[0171] For example, when the initial quantum states of the first auxiliary particle and the second auxiliary particle are Bell states |β 00 >, if the measurement results of the first auxiliary particle and the second auxiliary particle are Bell states |β 11 >, and the measurement result of the first flag particle is different from the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, it is determined that the first quantum gate has a Y error. If the measurement results of the first auxiliary particle and the second auxiliary particle are Bell states |β 11 >, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is different from the initial quantum state of the second flag particle, it is determined that the second quantum gate has a Y error.

[0172] The following are some specific examples Figure 7 An illustration of a quantum circuit in the method shown.

[0173] The following measurement circuit is for the attached Figure 7 The flag_1 particle described below is an example of a quantum circuit in the method shown. Figure 7 The flag_2 particle described below is an example of the first flag particle in the method shown. Figure 7 The second flag particle in the method shown is illustrated in the following example. 00 > is attached Figure 7 An example of the first auxiliary particle and the second auxiliary particle in the method shown, the auxiliary block | β 00 The first particle in > is an illustration of the first auxiliary particle, the auxiliary block |β 00 The second particle in the figure is an example of the second auxiliary particle. The quantum CNOT gate introduced below is an example of the auxiliary particle. Figure 7 An illustration of a quantum gate in the method shown.

[0174] For a general stable subcode [[n,k,d]], the stable subcode has a total of r generators, which are M 1 ,M 2 ,…,M r , where r = nk. Figure 8 is any generator M in a general stable subcode i The measurement circuit of Figure 8 Each slash in indicates that the circuit it is on is a combination of multiple circuits, and the corresponding quantum CNOT gates are operated bit by bit. Figure 8 middle Indicates that when c i-1 = 1, execute X operation, when c i-1 = 0, due to X 0 =I is the unit operator, that is, no operation is performed. Indicates that when d i-1 = 1, execute Z operation, when d i-1 = 0, due to Z 0 =I is the unit operator, that is, no operation is performed.

[0175] In order to make auxiliary particles reusable, after the encoding block is replaced by the previous generator M i-1 After the measurement of the auxiliary block |β 00 >will collapse to in There are four Bell states The auxiliary particle Perform a reset operation Right now, Similarly, flag_1 particle and flag_2 particle also perform reset operations respectively. and Make|c i-1 > and Reset to |0>|+> respectively, that is Among them, a i-1 ,b i-1 ,c i-1 ,d i-1 ∈{0,1}. All generators M of the stabilizer 1 ,M 2 ,…,M r The measurement circuit is as follows Fig. 9 shown.

[0176] By attaching Fig. 9 The measurement circuit shown performs r rounds of detection on the coding block, and the specific detection process is as follows.

[0177] First round of testing: using generator M 1When measuring the coded block, first, the auxiliary block is prepared as |β 00 >, flag_1 particles are prepared as |0>, flag_2 particles are prepared as |+>, auxiliary blocks |β 00 >The particles undergo reset operation Z 0 =I,X 0 =I (i.e., no reset operation is performed), and similarly, flag_1 particles and flag_2 particles do not perform any operation. Then, after the addition Figure 8 Following the circuit shown, the auxiliary block collapses to Similarly, the flag_1 particle is recorded as |c after Z-basis measurement 1 >(c 1 =0,1); after the X-basis measurement, the flag_2 particle is recorded as When 1 =0 o'clock When 1 =1 hour Finally, record the detection results. The results of the auxiliary block are The measurement result of flag_1 particle is |c 1 >; Flag_2 particle measurement results are

[0178] Second round of testing: using generator M 2 When measuring the coding block, first, initialize the auxiliary particles for the first round of detection. At this time, the auxiliary block is Execute on the first particle Execute on the second particle Right now Therefore, the auxiliary block is initialized to |β 00 >. Similarly, flag_1 particle|c 1 >, after After the operation Also initialized to the |0> state; flag_2 particle go through After the operation is also initialized to the |+> state. Then, using the generator M 2 Measure the coding block. Finally, record the detection results. The results of the auxiliary block are The measurement result of flag_1 particle is |c 2 >; Flag_2 particle measurement results are

[0179] Similarly, the third round of detection, the fourth round of detection to the (r-1)th round of detection are performed.

[0180] The rth round of detection: At this time, after the r-1th round of detection, the auxiliary block and the flag particle are |c r-1 > and As with the second round of detection, the auxiliary particles are initialized first. Then generate the element M r Finally, the test results are recorded. The results of the auxiliary block are The measurement result of flag_1 particle is |c r >; Flag_2 particle measurement results are

[0181] In the quantum companion extraction circuit, the auxiliary particles can be reused, that is, only the quantum state needs to be initialized. Therefore, when counting the consumption of additional quantum bits, it is only necessary to look at the number of auxiliary particles that consume the most in the circuit.

[0182] The following example 1 introduces how to Figure 8 or attached Fig. 9 The measurement circuit shown achieves both error detection and error tolerance performance.

[0183] Example 1

[0184] Error detection performance

[0185] When the sender transforms the encoded quantum state |φ> into E|φ> after the channel noise E, the receiver starts to prepare the auxiliary block |β 00 >, and use all generators of the stable sub-element for error detection, record Where A, B, and C represent the set of qubits acted upon by the X, Z, and I operators in one of the generators M of the stabilizer, respectively. Let M = X A Z B The measurement circuit of generator M is shown in the attached figure. Fig.10 As shown, in particular, if there is no Y operator in the generator, then Otherwise the qubit acted on by the Y operator is A∩B.

[0186] The changes in the quantum states after the auxiliary block and the coding block are entangled are as follows (1) to (5).

[0187] (1) The initial state after adding the auxiliary block is as follows.

[0188]

[0189] (2) Generator M = X A Z B The quantum CNOT gate corresponding to the operator X acts on the quantum state of the set A.

[0190]

[0191] (3) Using X = HZH, where H is the Hadamard gate, the Z operator is transformed into the operator X, |β 00 >The second qubit first passes through the Hadamard gate.

[0192]

[0193] (4) Generator M = X A Z B The quantum CNOT gate corresponding to the operator Z acts on the quantum state of set B.

[0194]

[0195] (5) Finally, |β 00 >The second qubit passes through the H gate again.

[0196]

[0197] When the generator M of the stabilizer commutes with the error operator E, ME = EM.

[0198]

[0199] When the generator M of the stabilizer is anti-commutative with the error operator E, ME = -EM.

[0200]

[0201] Therefore, this circuit diagram can be used as the circuit of the measurement coding block of the stabilizer generator. After measuring all the generators of the stabilizer, the quantum syndrome is obtained according to all the measurement results, so the circuit can achieve error detection performance. It is worth noting that if the i-th generator g is used i After measuring the coded block E|φ>, use the Bell state to measure the auxiliary block. If the result is |β 00 >, that is, a i b i =00, the corresponding element in the quantum syndrome is recorded as 0; if the measurement result is |β 10 >, that is, a i b i =10, then the corresponding element in the quantum syndrome is recorded as 1.

[0202] Fault Tolerance

[0203] In order to detect whether there is a quantum CNOT gate introducing error in the measurement circuit of the above-mentioned stable sub-generator, this embodiment introduces two flag particles |0> and |+>, which are respectively connected to the auxiliary block |β 00 >The first and second particles establish an entangled relationship, such as Fig.11 The auxiliary block is used to detect whether there is an error in the coding block, and the two added "flag" particles can be used as verification blocks. The difference from the Steane-type fault-tolerant method and the "cat state" fault-tolerant method is that the verification block here does not verify whether the auxiliary block is prepared correctly, but verifies whether the quantum CNOT gate introduces errors.

[0204] As attached Fig.11 As shown in (a) of , if an X error occurs, the result of the Z-basis measurement of flag_1 particle is |1>, otherwise the result of the Z-basis measurement of flag_1 particle is |0>. Fig.11 As shown in (b), if a Z error occurs, the result of the flag_2 particle measured through the X basis is |->, otherwise the result of the flag_2 particle measured through the X basis is |+>.

[0205] In order to achieve the error detection and fault tolerance performance of the general stable subcode, the fault tolerance measurement circuit of each generator is as shown in the attached Fig.12 As shown in FIG. 1 , the CNOT gates acting on the particles in the coding block set A, if the control bit of one of the CNOT gates introduces an X (or Y) error, the error will be transmitted along the auxiliary block |β 00 >, and propagates to the coded block after being acted upon by the subsequent CNOT gates, causing multiple particles in the coded block to have X errors. Similarly, if the controlled bit of one of the CNOT gates acting on the particles in the coded block set B introduces Z (or Y) errors, multiple particles in the coded block will have Z errors.

[0206] In order to further determine whether a Y error has occurred, the measurement results of the auxiliary block are also required. The following Table 1 shows the relationship between the measurement results and the errors introduced by the CNOT gate. According to the measurement results in Table 1, it can be determined whether there is an error in the coding block, whether the quantum CNOT gate introduces an error, and the type of error introduced.

[0207] Table 1

[0208]

[0209]

[0210] From Table 1 above, when the coding block is not affected by the noise channel and there is no CNOT gate to introduce errors, the measurement results of all generators are trivial, as shown in the second column of Table 1. At this time, since the measurement results of the auxiliary blocks are all |β 00 >, so the quantum syndrome is s = (0,0,…,0); when the coding block is affected by the noise channel, there are some generators whose measurement results are shown in the third column of Table 1, and the remaining generators whose measurement results are shown in the second column of Table 1, and the quantum syndrome is When the measurement result of a “flag” particle is non-trivial, it indicates that an error is introduced by a CNOT gate and the error is propagated to the coding block.

[0211] By using the "flag" particle, the type of error (X, Y or Z) and the range of the error (CNOT gate corresponding to set A or set B) introduced by the CNOT gate can be determined. In order to lock the location of the error introduced by the CNOT gate, it is necessary to measure the stable sub-generator of the coding block after the error is introduced. According to the measurement results, the quantum syndrome is obtained. If the quantum syndromes of errors introduced by different CNOT gates are distinguishable, error recovery can be performed.

[0212] At least the following four technical effects can be achieved through the above Example 1.

[0213] First, error detection performance is achieved.

[0214] Specifically, using the auxiliary block |β 00 >As an auxiliary particle for detecting errors in the coding block, the auxiliary particle obtains the quantum syndrome of the coding block after Bell basis measurement.

[0215] Second, fault tolerance is achieved.

[0216] The “flag” particle is used as a verification block to verify whether the quantum CNOT gate introduces errors.

[0217] Third, the auxiliary particles are inexpensive and simple to prepare.

[0218] The fault-tolerant detection method in Example 1 only uses 4 auxiliary particles, and the auxiliary particles are simple to prepare and can be reused after being reset. However, the Steane-type fault-tolerant method and the "cat-state" fault-tolerant method require at least 2(n+1) and r(ω+1) respectively, and the auxiliary blocks are complicated to prepare.

[0219] Fourth, it can be applied to general stable subcodes.

[0220] The fault-tolerant detection method in Example 1 can be applied to general stable subcodes, and is not limited to the special stable subcode, CSS code.

[0221] The following example 2 describes how to perform error detection and error recovery when the stable subcode in example 1 is the minimum stable subcode [[5,1,3]].

[0222] Example 2

[0223] The minimum general stable subcode [[5,1,3]] has four generators M 1 =XZZXI,M 2 =IXZZX,M 3=XIXZZ,M 4 =ZXIXZ, where M 1 The measurement circuit diagram is as follows Fig.13 shown.

[0224] The steps of completing error detection and error recovery in Example 2 include the following steps S401 and S402.

[0225] S401, Use Fig.13 Measurement Generator M 1 =XZZXI, the following processing logic is adopted.

[0226] If the measurement result of the auxiliary particle is the 4th or 6th column of Table 1, it means that quantum CNOT gate a or quantum CNOT gate b introduces one of the errors XI, XX, XY, XZ, YI, YX, YY, YZ (Note: the first operator represents the error introduced by the control bit of quantum CNOT gate a or b, and the second one represents the error introduced by the controlled bit), where the X or Y error introduced by the control bit is propagated to the coding block, causing the error of the coding block to be I, X 4 ,X 1 X 4 ,Y 1 X 4 ,Z 1 X 4 ,Y 4 ,Z 4 An error in 4 ,X 1 X 4 ,Y 1 X 4 ,Z 1 X 4 ,Y 4 ,Z 4 The subscript in the equation indicates which particle has the type of error, for example, Z 1 X 4 It means that the first particle has a Z error and the fourth particle has an X error.

[0227] To recover these errors, use all generators M 1 ,M 2 ,M 3 ,M 4 The quantum syndromes obtained by measuring the coding block are shown in Table 2 and Table 3. Error recovery is performed according to different quantum syndromes. According to the quantum syndromes in the last column of Table 2 and Table 3, the error position and type in the coding block can be determined (the results in the second column). For example, if the quantum syndrome obtained is (1100), it can be determined that the error in the coding block is E=Z 1 X 4, that is, the first qubit has Z error, and the fourth qubit has X error. Using the inverse operator E -1 , that is, itself E -1 =Z 1 X 4 , acting on the encoding block , get E -1 (E|φ)=Z 1 X 4 (Z 1 X 4 |φ)=|φ>This is because X 2 =Z 2 =I. This completes the error recovery. (Note: the inverse operator of the error operator in all coded blocks is itself.) It is worth noting that, using M again 1 When measuring the coding block, the imperfect quantum gate a and quantum gate b should be replaced.

[0228] Table 2

[0229] Quantum gate a introduces errors Encoding block error Quantum companion XI or YI <![CDATA[X 4 ]]> (0110) XX or YX <![CDATA[X 1 X 4 ]]> (0111) XY or YY <![CDATA[Y 1 X 4 ]]> (1101) XZ or YZ <![CDATA[Z 1 X 4 ]]> (1100)

[0230] Table 3

[0231] Quantum gate b introduces errors Encoding block error Quantum companion XI or YI I (0000) XX or YX <![CDATA[X 4 ]]> (0110) XY or YY <![CDATA[Y 4 ]]> (1111) XZ or YZ <![CDATA[Z 4 ]]> (1001)

[0232] If the measurement result of the auxiliary particle is the 5th or 7th column of Table 1, it means that the quantum CNOT gate c or quantum CNOT gate d introduces one of the errors IZ, XZ, YZ, ZZ, IY, XY, YY, ZY (Note: the first operator represents the error introduced by the control bit of the quantum CNOT gate c or d, and the second one represents the error introduced by the controlled bit), where the Z or Y error introduced by the controlled bit is propagated to the coding block, resulting in I, Z in the coding block. 3 ,X 2 Z 3 ,Y 2 Z 3 ,Z 2 Z 3 ,X 3 ,Y 3 To recover from these errors, all generators M are used. 1 ,M 2 ,M 3 ,M 4 The quantum syndromes obtained by measuring the coding block are shown in Tables 4 and 5, and the errors are further recovered through the quantum syndromes.

[0233] Table 4

[0234] Quantum gate c introduces errors Encoding block error Quantum companion IZ or IY <![CDATA[Z 3 ]]> (0010) XZ or XY <![CDATA[X 2 WITH 3 ]]> (1010) YZ or YY <![CDATA[Y 2 WITH 3 ]]> (1111) ZZ or ZY <![CDATA[Z 2 WITH 3 ]]> (0111)

[0235] Table 5

[0236] Quantum gate d introduces errors Encoding block error Quantum companion IZ or IY I (0000) XZ or XY <![CDATA[X 3 ]]> (1100) YZ or YY <![CDATA[Y 3 ]]> (1110) ZZ or ZY <![CDATA[Z 3 ]]> (0010)

[0237] If the measurement result of the auxiliary particle is the second or third column of Table 1, then there is no quantum gate to introduce errors, and the remaining three generators M are measured. 2 ,M 3 ,M 4 , when all generator measurements are completed, if the measurement results are as shown in the second or third column of Table 1, the quantum syndrome is obtained according to the measurement results of the auxiliary block, and the error of the coded block passing through the noisy channel can be determined by looking up the quantum syndrome corresponding to Table 6, Table 7 and Table 8. At this time, the error correction capability of the general stable subcode [[5,1,3]] is used, so the corrected error weight is ≤1.

[0238] Table 6

[0239]

[0240] Table 7

[0241]

[0242] Table 8

[0243] The location where the Y error occurs Quantum syndrome <![CDATA[Y 1 ]]> (1011) <![CDATA[Y 2 ]]> (1101) <![CDATA[Y 3 ]]> (1110) <![CDATA[Y 4 ]]> (1111) <![CDATA[Y 5 ]]> (0111)

[0244] It should be noted that the stable subcode [[5,1,3]] itself determines the relationship between the error position and type and the syndrome as shown in Table 6, Table 7 and Table 8. 1 M 1 =M 1 X 1 , X 1 M 2 =M 2 X 1 , X 1 M 3 =M 3 X 1 , X 1 M 4 =-M 4 X 1 , so the error X 1 The corresponding quantum syndrome is s=(s 1 ,s 2 ,s 3 ,s 4 )=(0001).

[0245] S402, continue measuring M 2 ,M 3 ,M 4 , when the measurement results are shown in Table 1, and the above measurement M 1The same is true for the case of and recovers errors introduced by the channel or errors introduced by imperfections of the CNOT gate.

[0246] The above process of Example 2 is summarized as follows: First, the auxiliary block and flag particle are used to measure the generation element M 1 Measure the coding block. If the flag particle measurement result is trivial, continue to generate the element M 2 If the flag particle measurement result is still ordinary, continue to measure the next generator until the last generator M r After the measurement is completed, the quantum syndrome obtained in this process is used to determine whether the noise channel introduces errors and the location and type of errors. Once the measurement result of a generator in the above measurement process shows that the flag particle measurement result is non-trivial, the measurement of the remaining generators is stopped, the possibly imperfect CNOT gate is replaced, and the flag particle is removed, and only the auxiliary block |β is used. 00 > for all generators M 1 ,M 2 ,…,M r The coding block is measured and the quantum syndrome is obtained to determine the error position of the CNOT gate and the type of error introduced.

[0247] At least the following three technical effects can be achieved through the above Example 2.

[0248] First, reduce the overhead of auxiliary particles.

[0249] When the Steane type fault tolerance method is used to detect the minimum stable subcode [[5,1,3]], the auxiliary block requires 10 auxiliary particles, and there is also the overhead of the auxiliary block particles. Therefore, the auxiliary particle overhead is at least 10. When the "cat state" fault tolerance method is used to detect the minimum stable subcode [[5,1,3]], a total of 20 or 28 auxiliary particles are required. However, the method of this embodiment only uses 4 auxiliary particles to achieve fault tolerance.

[0250] Second, reduce the error propagation path.

[0251] The "flag" type fault tolerance method of Chao et al. is shown in the attached Figure 5 As shown, the controlled positions of all CNOT gates are the same auxiliary particle, and in this embodiment, the CNOT gates corresponding to the X-type operator and the Z-type operator act on |β 00 >on two auxiliary particles, thus reducing the error propagation path.

[0252] Third, reduce the time depth.

[0253] Since the X-type operator and the Z-type operator act on two auxiliary particles respectively, they can be measured simultaneously, thus reducing the time depth. 1 = Measurement of XZZXI is as shown in the attached Figure 5 As shown, the time depth of the line is 8; and using the method of this embodiment, as shown in the attached Fig.13 As shown, the time depth is 6.

[0254] Summarizing the solutions of the above embodiments, it can be seen that in the fault-tolerant detection method provided in the embodiments of the present application, the stable sub-generators are classified and measured, and the flag particles |0> and |+> are used to simultaneously detect X errors and Z errors.

[0255] The implementation method of classification measurement of stable sub-generators is, for example, to use |β 00 >As auxiliary particles, when measuring stable sub-generators, the generators are divided into X-type and Z-type and act on different auxiliary particles for measurement.

[0256] The implementation method of using flag particles |0> and |+> to simultaneously detect X errors and Z errors is, for example, to use two "flag" particles - |0> and |+> to simultaneously detect the two errors X and Z introduced by the quantum CNOT gate.

[0257] By stabilizing the sub-generator classification measurement, the three effects of reducing the overhead of auxiliary particles, reducing the error propagation path and reducing the time depth can be achieved.

[0258] By using flag particles |0> and |+> to detect X errors and Z errors simultaneously, the scheme can be applied to general stable subcodes.

[0259] The following is an illustration of a general stable subcode applicable to the embodiments of the present application.

[0260] For example, the embodiments of the present application can be applied to general stable subcodes [[8,3,3]], [[10,4,3]], and [[11,5,3]]. The generators of the stable subcode [[8,3,3]] are shown in Table 9, the generators of the stable subcode [[10,4,3]] are shown in Table 10, and the generators of the stable subcode [[11,5,3]] are shown in Table 11.

[0261] Table 9

[0262] <![CDATA[M 1 ]]> XXXXXXXX <![CDATA[M 2 ]]> ZZZZZZZZ <![CDATA[M 3 ]]> IIZYXZYX <![CDATA[M 4 ]]> IZXIXYZY <![CDATA[M 5 ]]> IXIZZXYY

[0263] Table 10

[0264] <![CDATA[M 1 ]]> XXXXXXXXXX <![CDATA[M 2 ]]> ZZZZZZZZZZ <![CDATA[M 3 ]]> XZZXIZYYZI <![CDATA[M 4 ]]> IXZZXIZYYZ <![CDATA[M 5 ]]> XIXZZZIZYY <![CDATA[M 6 ]]> ZXIXZYZIZY

[0265] Table 11

[0266]

[0267]

[0268] Attached Fig.14 is a schematic diagram of the structure of an error detection device provided in an embodiment of the present application, Fig.14 The error detection device 700 shown is used to implement the methods provided by the above-mentioned various method embodiments.

[0269] Optionally, in combination with Figure 6 From the application scenario shown in the Fig.14 The error detection device 700 shown is provided in the attached Figure 6 The computer device 12 in.

[0270] Optionally, in combination with Figure 7 From the application scenario shown in the Fig.14 The error detection device 700 shown is provided in the attached Figure 7 The computer device in the embodiment of the present invention. The error detection device 700 includes an acquisition unit 701, a detection unit 702, a verification unit 703 and a determination unit 704. The acquisition unit 701 is used to support the error detection device 700 to perform S201. The detection unit 702 is used to support the error detection device 700 to perform S202. The verification unit 703 is used to support the error detection device 700 to perform S203, and the determination unit 704 is used to support the error detection device 700 to perform S204.

[0271] Attached Fig.14 The device embodiments described are merely illustrative. For example, the division of the above units is only a logical functional division. There may be other division methods in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0272] Each unit in the error detection device 700 is implemented in whole or in part by software, hardware, firmware or any combination thereof.

[0273] Attached Fig.14The device embodiments described are merely illustrative. For example, the division of the above units is only a logical functional division. There may be other division methods in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0274] Each unit in the error detection device 700 is implemented in whole or in part by software, hardware, firmware or any combination thereof.

[0275] In the case of software implementation, for example, the detection unit 702, the verification unit 703 and the determination unit 704 are provided by the attached Fig.15 At least one processor 801 in the processor 801 reads the program code stored in the memory 802 and generates a software function unit to implement it.

[0276] In the case of hardware implementation, for example, Fig.14 The above-mentioned units are implemented by different hardware in the error detection device, for example, the detection unit 702 is implemented by the attached Fig.15 The verification unit 703 is implemented by a part of the processing resources of at least one processor 801 (for example, one core or two cores in a multi-core processor), and the verification unit 703 is implemented by the attached Fig.15 The acquisition unit 701 is composed of the remaining processing resources of at least one processor 801 (such as other cores in a multi-core processor), or a programmable device such as a field-programmable gate array (FPGA) or a coprocessor. Fig.15 The network interface 803 is implemented in.

[0277] In the case of implementing by combining software and hardware, for example, the detection unit 702 is implemented by a hardware programmable device, and the verification unit 703 is a software functional unit generated by the CPU after reading the program code stored in the memory.

[0278] The following is an example of the basic hardware structure of a computer device.

[0279] Attached Fig.15 is a schematic diagram of a computer device provided in an embodiment of the present application, Fig.15 The computer device 800 shown is used to implement the methods provided by the above-mentioned various method embodiments.

[0280] The computer device 800 includes at least one processor 801 , a memory 802 , and at least one network interface 803 .

[0281] The processor 801 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 801 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0282] The memory 802 is, for example, a read-only memory (ROM) or other static storage device that can store static information and instructions, a random access memory (RAM) or other dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. Optionally, the memory 802 exists independently and is connected to the processor 801 through the internal connection 804. Alternatively, the memory 802 and the processor 801 are optionally integrated together.

[0283] The network interface 803 uses any transceiver-like device for communicating with other devices or communication networks. The network interface 803 includes, for example, at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof.

[0284] In some embodiments, the processor 801 includes one or more CPUs, such as Fig.15 CPU0 and CPU1 are shown in the figure.

[0285] In some embodiments, the computer device 800 optionally includes multiple processors, such as the attached Fig.15 801 and processor 805 are shown in FIG. Each of these processors is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). The processor here optionally refers to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0286] In some embodiments, the computer device 800 further includes an internal connection 804. The processor 801, the memory 802, and the at least one network interface 803 are connected via the internal connection 804. The internal connection 804 includes a path to transmit information between the above components. Optionally, the internal connection 804 is a single board or a bus. Optionally, the internal connection 804 is divided into an address bus, a data bus, a control bus, etc.

[0287] In some embodiments, the computer device 800 further includes an input-output interface 806. The input-output interface 806 is connected to the internal connection 804.

[0288] Optionally, the processor 801 implements the method in the above embodiment by reading the program code 810 stored in the memory 802, or the processor 801 implements the method in the above embodiment by the program code stored internally. In the case where the processor 801 implements the method in the above embodiment by reading the program code 810 stored in the memory 802, the memory 802 stores the program code for implementing the method provided in the embodiment of the present application.

[0289] For more details on how the processor 801 implements the above functions, please refer to the descriptions in the previous method embodiments, which will not be repeated here.

[0290] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0291] A refers to B, which means that A is the same as B or A is a simple variant of B.

[0292] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe the specific order of the objects, and cannot be understood as indicating or implying relative importance. For example, the first auxiliary particle and the second auxiliary particle are used to distinguish different auxiliary particles, rather than to describe the specific order of the auxiliary particles, and cannot be understood as the first auxiliary particle being more important than the second auxiliary particle.

[0293] In the embodiments of the present application, unless otherwise specified, "at least one" means one or more, and "a plurality" means two or more. For example, a plurality of quantum gates means two or more quantum gates.

[0294] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in accordance with the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.

[0295] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An error detection method, It is characterized in that The method comprises: Obtaining a coding block, wherein a generator of a stable subcode corresponding to the coding block can be split into an X operator and a Z operator; Detecting the encoding block through a quantum circuit to obtain a first detection result, the quantum circuit comprising a first auxiliary particle, a second auxiliary particle and a quantum gate set, the first auxiliary particle being used to detect the X operator, the second auxiliary particle being used to detect the Z operator, the quantum gate set comprising a first quantum gate and a second quantum gate, the first quantum gate being used to establish a quantum entanglement relationship between the X operator and the first auxiliary particle, and the second quantum gate being used to establish a quantum entanglement relationship between the Z operator and the second auxiliary particle; Using a verification block to detect the quantum circuit to obtain a second detection result, the verification block includes a first flag particle and a second flag particle, the first flag particle is used to detect whether the quantum gate set introduces a bit flip error for the coding block, and the second flag particle is used to detect whether the quantum gate set introduces a phase flip error for the coding block; Whether an error occurs in the coding block and the type of the error are determined according to the first detection result and the second detection result.

2. The method according to claim 1, It is characterized in that The detecting the coding block by the quantum circuit to obtain a first detection result includes: Establishing a quantum entanglement relationship between the X operator and the first auxiliary particle through the first quantum gate, and establishing a quantum entanglement relationship between the Z operator and the second auxiliary particle through the second quantum gate; The first auxiliary particle having a quantum entanglement relationship with the X operator and the second auxiliary particle having a quantum entanglement relationship with the Z operator are measured by the quantum circuit to obtain the first detection result.

3. The method according to claim 1 or 2, It is characterized in that The using the verification block to detect the quantum circuit to obtain a second detection result includes: Establishing a quantum entanglement relationship between the first flag particle and the first auxiliary particle having a quantum entanglement relationship with the X operator through a third quantum gate, and establishing a quantum entanglement relationship between the second flag particle and the second auxiliary particle having a quantum entanglement relationship with the Z operator through a fourth quantum gate; The first flag particle having a quantum entanglement relationship with the first auxiliary particle and the second flag particle having a quantum entanglement relationship with the second auxiliary particle are measured through the quantum circuit to obtain the second detection result.

4. The method according to claim 1 or 2, It is characterized in that The first detection result includes a measurement result of the first auxiliary particle and the second auxiliary particle as a whole, the second detection result includes a measurement result of the first flag particle and a measurement result of the second flag particle, and determining whether an error occurs in the coding block and the type of the error according to the first detection result and the second detection result includes: If the measurement results of the first auxiliary particle and the second auxiliary particle as a whole are different from the initial quantum states of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, it is determined that an error occurs in the coding block, and the type of error includes an error introduced by a noise channel.

5. The method according to claim 1 or 2, It is characterized in that The first detection result includes a measurement result of the first auxiliary particle and the second auxiliary particle as a whole, the second detection result includes a measurement result of the first flag particle and a measurement result of the second flag particle, and determining whether an error occurs in the coding block and the type of the error according to the first detection result and the second detection result includes: If the measurement results of the first auxiliary particle and the second auxiliary particle as a whole are different from the initial quantum states of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is different from the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, it is determined that an error occurs in the coding block, and the type of error includes a bit flip error introduced by the quantum gate set.

6. The method according to claim 1 or 2, It is characterized in that The first detection result includes a measurement result of the first auxiliary particle and the second auxiliary particle as a whole, the second detection result includes a measurement result of the first flag particle and a measurement result of the second flag particle, and determining whether an error occurs in the coding block and the type of the error according to the first detection result and the second detection result includes: If the measurement results of the first auxiliary particle and the second auxiliary particle as a whole are different from the initial quantum states of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is different from the initial quantum state of the second flag particle, it is determined that an error occurs in the coding block, and the type of error includes a phase flip error introduced by the quantum gate set.

7. The method according to claim 4, It is characterized in that The measurement result of the first auxiliary particle and the second auxiliary particle as a whole is different from the initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole, including: The initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole is a Bell state |β 00 >, the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is the Bell state |β 10 > or, The initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole is a Bell state |β 10 >, the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is the Bell state |β 00 >.

8. The method according to claim 5, It is characterized in that The measurement result of the first flag particle is different from the initial quantum state of the first flag particle, including: The initial quantum state of the first flag particle is |0>, and the measurement result of the first flag particle is |1>; or, The initial quantum state of the first flag particle is |1>, and the measurement result of the first flag particle is |0>.

9. The method according to claim 6, It is characterized in that The measurement result of the second flag particle is different from the initial quantum state of the second flag particle, including: The initial quantum state of the second flag particle is |+>, and the measurement result of the second flag particle is |->; or, The initial quantum state of the second flag particle is |->, and the measurement result of the first flag particle is |+>.

10. The method according to claim 1 or 2, It is characterized in that The first quantum gate and the second quantum gate are both quantum controlled non-CNOT gates.

11. An error detection device, It is characterized in that The device comprises: An acquisition unit, used for acquiring a coding block, wherein a generator of a stable subcode corresponding to the coding block can be split into an X operator and a Z operator; a detection unit, configured to detect the coding block through a quantum circuit to obtain a first detection result, wherein the quantum circuit includes a first auxiliary particle, a second auxiliary particle, and a quantum gate set, wherein the first auxiliary particle is used to detect the X operator, and the second auxiliary particle is used to detect the Z operator, and the quantum gate set includes a first quantum gate and a second quantum gate, wherein the first quantum gate is used to establish a quantum entanglement relationship between the X operator and the first auxiliary particle, and the second quantum gate is used to establish a quantum entanglement relationship between the Z operator and the second auxiliary particle; A verification unit, configured to detect the quantum circuit using a verification block to obtain a second detection result, wherein the verification block includes a first flag particle and a second flag particle, wherein the first flag particle is used to detect whether the quantum gate set introduces a bit flip error into the coding block, and the second flag particle is used to detect whether the quantum gate set introduces a phase flip error into the coding block; A determination unit is used to determine whether an error occurs in the coding block and the type of the error according to the first detection result and the second detection result.

12. The device according to claim 11, It is characterized in that The detection unit is configured to establish a quantum entanglement relationship between the X operator and the first auxiliary particle through the first quantum gate, and to establish a quantum entanglement relationship between the Z operator and the second auxiliary particle through the second quantum gate; and to measure the first auxiliary particle having a quantum entanglement relationship with the X operator and the second auxiliary particle having a quantum entanglement relationship with the Z operator through the quantum circuit to obtain the first detection result.

13. The device according to claim 11 or 12, It is characterized in that The verification unit is used to establish a quantum entanglement relationship between the first flag particle and the first auxiliary particle having a quantum entanglement relationship with the X operator through a third quantum gate, and to establish a quantum entanglement relationship between the second flag particle and the second auxiliary particle having a quantum entanglement relationship with the Z operator through a fourth quantum gate; and to measure the first flag particle having a quantum entanglement relationship with the first auxiliary particle and the second flag particle having a quantum entanglement relationship with the second auxiliary particle through the quantum circuit to obtain the second detection result.

14. The device according to claim 11 or 12, It is characterized in that The first detection result includes a measurement result of the first auxiliary particle and the second auxiliary particle as a whole, the second detection result includes a measurement result of the first flag particle and a measurement result of the second flag particle, and the determination unit is used to determine that an error has occurred in the coding block if the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is different from the initial quantum state of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, and the type of error includes an error introduced by a noise channel.

15. The device according to claim 11 or 12, It is characterized in that The first detection result includes a measurement result of the first auxiliary particle and the second auxiliary particle as a whole, the second detection result includes a measurement result of the first flag particle and a measurement result of the second flag particle, and the determination unit is used to determine that an error has occurred in the coding block if the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is different from the initial quantum state of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is different from the initial quantum state of the first flag particle, and the measurement result of the second flag particle is the same as the initial quantum state of the second flag particle, and the type of error includes a bit flip error introduced by the quantum gate set.

16. The device according to claim 11 or 12, It is characterized in that The first detection result includes the measurement result of the first auxiliary particle and the second auxiliary particle as a whole, the second detection result includes the measurement result of the first flag particle and the measurement result of the second flag particle, and the determination unit is used to determine that an error has occurred in the coding block if the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is different from the initial quantum state of the first auxiliary particle and the second auxiliary particle, and the measurement result of the first flag particle is the same as the initial quantum state of the first flag particle, and the measurement result of the second flag particle is different from the initial quantum state of the second flag particle, and the type of error includes a phase flip error introduced by the quantum gate set.

17. The device according to claim 14, It is characterized in that The measurement result of the first auxiliary particle and the second auxiliary particle as a whole is different from the initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole, including: The initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole is a Bell state |β 00 >, the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is the Bell state |β 10 > or, The initial quantum state of the first auxiliary particle and the second auxiliary particle as a whole is a Bell state |β 10 >, the measurement result of the first auxiliary particle and the second auxiliary particle as a whole is the Bell state |β 00 >.

18. The device according to claim 15, It is characterized in that The measurement result of the first flag particle is different from the initial quantum state of the first flag particle, including: The initial quantum state of the first flag particle is |0>, and the measurement result of the first flag particle is |1>; or, The initial quantum state of the first flag particle is |1>, and the measurement result of the first flag particle is |0>.

19. The device according to claim 16, It is characterized in that The measurement result of the second flag particle is different from the initial quantum state of the second flag particle, including: The initial quantum state of the second flag particle is |+>, and the measurement result of the second flag particle is |->; or, The initial quantum state of the second flag particle is |->, and the measurement result of the first flag particle is |+>.

20. The device according to claim 11 or 12, It is characterized in that The first quantum gate and the second quantum gate are both quantum controlled non-CNOT gates.

21. A computer device, It is characterized in that The computer device comprises a processor and a memory, wherein: The memory stores computer instructions; The processor executes the computer instructions to implement the method according to any one of claims 1 to 10.

22. A computer-readable storage medium, It is characterized in that The storage medium stores at least one instruction, and when the instruction is executed on a computer, the computer executes the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Graph state-based link chain structure quantum stabilizer subcode construction method

    CN106100642A

  • Quantum code symptom extraction line design method based on equivalent unidirectional CNOT gate

    CN111030706A