A quantum error correction processing method, device, storage medium and electronic device
By determining the parameter types and calculation range of quantum error correction codes, and generating and storing a variety of quantum error correction codes, the problem of difficulty in querying suitable error correction codes in the prior art is solved, and high-accurate quantum error correction processing is achieved.
Patent Information
- Application Number
- CN202411193882.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-28
AI Technical Summary
The prior art is difficult to accurately query suitable quantum error correction codes for quantum error correction processing, and cannot fully meet actual business needs.
By receiving a quantum error correction code generation request, the parameter types required to generate quantum error correction codes are determined, the computing range is determined based on the computing power resource information of the quantum computing device, a variety of quantum error correction codes are generated, and a database of quantum error correction codes is used. Store and query appropriate error correction codes in it to perform quantum error correction processing.
It improves the accuracy of quantum error correction, and can accurately query appropriate quantum error correction codes to meet business needs.
Smart Images

Figure CN118709802B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum information technology, and in particular to a quantum error correction processing method, device, storage medium and electronic device. Background Art
[0002] As a new form of computing, quantum computing has great application potential in encryption, search, machine learning and other fields. To realize quantum computing, it is necessary to overcome the noise in the quantum system and realize the fault-tolerant quantum computing architecture through quantum error correction technology.
[0003] Among them, quantum error correction can encode a certain number of noisy physical bits into a smaller number of logical bits, and judge and correct the noise through a given quantum error correction code, so that the noise of the logical bits is lower than the noise of the physical bits, thereby realizing quantum error correction processing of the physical bits.
[0004] However, there are currently many ways to encode physical bits. In the actual process of quantum error correction, it is difficult to find a suitable quantum error correction code to correct the physical bits to be processed, which cannot fully meet actual business needs.
[0005] Therefore, how to accurately query and identify appropriate quantum error correction codes for data quantum error correction is an urgent problem to be solved. Summary of the invention
[0006] This specification provides a quantum error correction processing method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.
[0007] This manual adopts the following technical solutions:
[0008] This specification provides a quantum error correction processing method, including:
[0009] Receiving a request for generating a quantum error correction code, and determining, according to the request, types of parameters required to generate the quantum error correction code, wherein the parameters include basic parameters and matching parameters;
[0010] Determining, based on computing power resource information of the quantum computing device, a computing range of the computing device for at least part of the basic parameters;
[0011] Based on the calculation range, determining several value strategies for each basic parameter, for each value strategy, generating at least one quantum error correction code according to the values of different types of basic parameters under the value strategy, and using the values as the basic parameters corresponding to the at least one quantum error correction code;
[0012] For each quantum error correction code, the quantum error correction code is parsed to obtain a matching parameter corresponding to the quantum error correction code;
[0013] According to the basic parameters and matching parameters corresponding to each quantum error correction code, each quantum error correction code is stored in a quantum error correction code database;
[0014] When an error correction instruction is received, the data to be processed and the error correction parameters corresponding to the data to be processed are obtained according to the error correction instruction, and a quantum error correction code matching the error correction parameters is queried in the quantum error correction code database to perform quantum error correction processing on the data to be processed.
[0015] Optionally, for each quantum error correction code, the basic parameters corresponding to the quantum error correction code include: the number of stabilizers corresponding to the quantum error correction code, and the number of physical bits that can be processed by the quantum error correction code;
[0016] The matching parameters corresponding to the quantum error correction code include: the number of logical bits of the logical bits obtained after the quantum error correction code encodes the physical bits, the distance corresponding to the quantum error correction code, and the weight corresponding to the quantum error correction code, wherein the number of logical bits is lower than the number of physical bits.
[0017] Optionally, before determining the calculation range of each basic parameter according to the computing power resource information of the quantum computing device, the method further includes:
[0018] Determine the target type of the generated quantum error correction code and the target storage format corresponding to the quantum error correction code;
[0019] For each value strategy, at least one quantum error correction code is generated according to the values of different types of basic parameters under the value strategy, specifically including:
[0020] For each value-taking strategy, generating at least one quantum error correction code of the target type according to the values of different types of basic parameters under the value-taking strategy;
[0021] According to the basic parameters and matching parameters corresponding to each quantum error correction code, each quantum error correction code is stored in the quantum error correction code database, specifically including:
[0022] According to the basic parameters and matching parameters corresponding to each quantum error correction code, each quantum error correction code is stored in a quantum error correction code database based on the target storage format.
[0023] Optionally, storing each quantum error correction code in a quantum error correction code database based on the target storage format specifically includes:
[0024] For each quantum error correction code, the non-zero elements in the stable submatrix corresponding to the quantum error correction code are saved in a database file of a specified format, and the information header of the database file is determined according to the position information of each non-zero element in the stable submatrix.
[0025] Optionally, at least one quantum error correction code is generated according to the values of different types of basic parameters under the value strategy, specifically including:
[0026] For each value strategy, according to the values of different types of basic parameters under the value strategy, a stable sub-matrix is determined as a candidate stable sub-matrix;
[0027] Converting the candidate stable submatrix into a unit matrix and a non-zero matrix, wherein the complexity of the non-zero matrix is lower than the complexity of the candidate stable submatrix;
[0028] Determining whether the candidate stable submatrix meets the generation condition of the quantum error correction code according to the structural information of the non-zero matrix;
[0029] If so, at least one quantum error correction code is determined according to the candidate stable submatrix.
[0030] Optionally, the candidate stable submatrix includes: a Pauli X-type stable submatrix;
[0031] Determining at least one quantum error correction code according to the candidate stable submatrix specifically includes:
[0032] Analyzing the Pauli X-type stable submatrix to determine a matrix core of the Pauli X-type stable submatrix;
[0033] Determining a value range of the number of rows of the Pauli Z-type stabilizer matrix based on a calculation range of the at least part of the basic parameters by the computing device;
[0034] Determining a value range of a random matrix according to a value range of the number of rows of the Pauli Z-type stabilizer matrix;
[0035] Determine each Pauli Z-type stable submatrix according to the matrix core of the Pauli X-type stable submatrix and the values of different random matrices within the value range of the random matrix;
[0036] The at least one quantum error correction code is determined based on the Pauli X-type stable submatrix and each Pauli Z-type stable submatrix.
[0037] Optionally, before searching the quantum error correction code database for a quantum error correction code that matches the error correction parameter to perform quantum error correction on the data to be processed, the method further includes:
[0038] Each quantum error correction code in the database and the number of quantum error correction codes under different parameters are verified, and the quantum error correction codes that fail the verification are deleted.
[0039] This specification provides a quantum error correction processing device, including:
[0040] A receiving module, used to receive a request for generating a quantum error correction code, and determine, according to the request, the type of parameters required to generate the quantum error correction code, wherein the parameters include basic parameters and matching parameters;
[0041] A determination module, configured to determine a calculation range of at least part of the basic parameters of the computing device according to computing power resource information of the quantum computing device;
[0042] A generating module, configured to determine several value strategies for each basic parameter based on the calculation range, and for each value strategy, generate at least one quantum error correction code according to the values of different types of basic parameters under the value strategy, and use the values as the basic parameters corresponding to the at least one quantum error correction code;
[0043] A parsing module is used to parse each quantum error correction code to obtain matching parameters corresponding to the quantum error correction code;
[0044] A storage module, used to store each quantum error correction code in a quantum error correction code database according to basic parameters and matching parameters corresponding to each quantum error correction code;
[0045] The processing module is used for, when receiving an error correction instruction, obtaining the data to be processed and the error correction parameters corresponding to the data to be processed according to the error correction instruction, and searching the quantum error correction code database for a quantum error correction code matching the error correction parameters to perform quantum error correction on the data to be processed.
[0046] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned quantum error correction processing method is implemented.
[0047] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned quantum error correction processing method when executing the program.
[0048] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0049] In the quantum error correction processing method provided in the present specification, the parameter type required to be determined when generating a quantum error correction code is determined; the calculation range of each basic parameter is determined according to the computing power resource information of the quantum computing device; based on the calculation range, several value strategies of the basic parameters are determined, and at least one quantum error correction code is generated according to the values of different types of basic parameters under each value strategy, and the values are used as the corresponding basic parameters; for each quantum error correction code, the quantum error correction code and its basic parameters are parsed to obtain the matching parameters corresponding to the quantum error correction code; according to the basic parameters and matching parameters corresponding to each quantum error correction code, each quantum error correction code is stored in a quantum error correction code database, so that the quantum error correction code matching the error correction parameters is queried in the quantum error correction code database to perform quantum error correction processing on the data to be processed.
[0050] It can be seen from the above method that this scheme can determine the calculation range of the parameters required for generating quantum error correction codes based on the computing power resource information of the computing power equipment, and then generate quantum error correction codes based on the value strategy of each basic parameter on the basis of the calculation range, and build a quantum error correction code database. In this way, in the actual process of quantum calculation, the quantum error correction code with matching parameters can be queried in the quantum error correction code database according to the error correction parameters of the data to be processed, and quantum error correction processing can be performed on it. Compared with the existing method, this scheme can accurately query the appropriate quantum error correction code, improve the accuracy of quantum error correction, and fully meet business needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0052] Figure 1 A schematic diagram of a quantum error correction method provided in this specification;
[0053] Figure 2 A schematic diagram of a process for determining a quantum error correction code provided in this specification;
[0054] Figure 3 A schematic diagram of a storage list of a quantum error correction code provided in the note of this specification;
[0055] Figure 4 A schematic diagram of the construction process of a quantum error correction code database provided in this specification;
[0056] Figure 5 A schematic diagram of a quantum error correction processing device provided in this specification;
[0057] Figure 6A method corresponding to the Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0059] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0060] Figure 1 A schematic diagram of a quantum error correction method provided in this specification includes the following steps:
[0061] S101: receiving a request for generating a quantum error correction code, and determining, according to the request, types of parameters required for generating the quantum error correction code, wherein the parameters include basic parameters and matching parameters.
[0062] The core concepts of quantum computing include quantum superposition and quantum entanglement. The quantum superposition principle allows quantum bits (qubits) to exist in multiple states at the same time, while quantum entanglement allows the states of qubits to be interdependent. These characteristics enable quantum computing to solve some problems that traditional computers cannot solve, such as large-scale optimization problems and cryptography problems.
[0063] Although quantum computing has great potential and advantages, quantum information is also very fragile and easily interfered and destroyed by environmental noise. Therefore, quantum error correction technology has become one of the key technologies to achieve large-scale and reliable quantum computing.
[0064] Among them, different quantum error correction codes correspond to different encoding methods for encoding physical bits into logical bits. Due to the diversity of encoding methods, finding the optimal encoding method (quantum error correction code) to perform quantum error correction on data has become an exponentially difficult problem. Based on this, this manual provides a quantum error correction processing method, which explores the calculation range of various attributes of the error correction code through random sampling and traversal methods, and organizes it into a quantum error correction code database for query and use in subsequent quantum error correction processes. Greatly improve the development efficiency of the encoding method of quantum error correction codes and accelerate the update and iteration of optimization algorithms.
[0065] In this specification, the execution subject used to implement a quantum error correction processing method can be a designated device such as a server, and of course, it can also be a terminal such as a laptop computer, a desktop computer, etc. For the sake of ease of description, the following will only take the server as the execution subject as an example to illustrate a quantum error correction processing method provided in this specification.
[0066] Before actually performing the quantum error correction task, the server can pre-build a quantum error correction code database, wherein the server can pre-regulate the target type, format, and storage method of the quantum error correction code.
[0067] In this specification, the target type of quantum error correction code may include but is not limited to stable subcode, CSS (Calderbank-Shor-Steane) code, hypergraph product code, subsystem product code, etc.
[0068] Taking CSS code as an example, the quantum error correction code can be composed of two reciprocal binary matrices and To uniquely define, and Pauli Type and Pauli Type of stabilizer measurement (hereinafter referred to as Pauli Type stabilizer and Pauli type stabilizer), because all stabilizer measurements must satisfy the reciprocity condition in quantum mechanics, so these two stabilizer matrices must satisfy The stable submatrices of the two-word error correction code can also be combined and expressed as form.
[0069] In addition, the server can also set the storage format of the quantum error correction code. Taking CSS code as an example, the information to be stored is two binary matrices Therefore, it can be saved in two text files using the MatrixMarket format. In addition to the header of the feature information, each line of the MatrixMarket file stores three data , representing Line The column value is If the value is 0, it does not need to be saved. For sparse matrices, the storage volume can be greatly reduced. For binary matrices, non-zero element values Fixed to 1, so the only information that needs to be saved is the position of the non-zero elements in the matrix . MatrixMarket has common C, Python, and Matlab interfaces.
[0070] Furthermore, the server may receive a request for generating a quantum error correction code, and determine, based on the request, the types of parameters required to generate the quantum error correction code, wherein the parameters include basic parameters and matching parameters.
[0071] In this specification, basic parameters are used to generate stabilizers and to query quantum error correction codes during error correction. The basic parameters may include: the number of stabilizers corresponding to the quantum error correction code, the number of physical bits that the quantum error correction code can process, .
[0072] The matching parameters are determined by the stable submatrix of the error correction code and are also used to query the quantum error correction code during the error correction process, including the number of logical bits obtained after the quantum error correction code encodes the physical bits. , the distance corresponding to the quantum error correction code And the weights corresponding to the quantum error correction code , where the number of logical bits after encoding is lower than the number of physical bits.
[0073] Specifically, the value of the above physical bit number is It can be directly generated by sampling and traversal. Please see below for details. This manual will not go into details here.
[0074] Since the stabilizers include Pauli Type stabilizer and Pauli type stabilizer, therefore, the number of stabilizers corresponding to the quantum error correction code can be divided into Pauli The number of Pauli type stabilizers The number of type stabilizers, that is, the number of stabilizers including Pauli The number of Pauli type stabilizers The sum of the number of type stabilizers. The number of stabilizers of type If the matrix is full rank, then Pauli The number of type stabilizers is equal to the number of rows in the matrix. Each row of the matrix represents a stabilizer measurement. The number of stabilizers of type For non-full rank matrices, the rank of the matrix can be obtained by Gaussian elimination. For binary matrices, Gaussian elimination must follow the mod 2 rule.
[0075] Number of logical bits is the number of logical bits when the quantum error correction code performs logical calculations on physical bits. Logical calculations are implemented by applying logical operators to logical bits. Logical operators are composed of pairs of and Z type operators, respectively, consisting of binary matrices and The number of logical bits , which is the number of pairs of logical operators, and the corresponding matrix or The rank of a logical matrix is mathematically defined as , ,in is the kernel of the matrix. For any stable submatrix , the matrix satisfies the following relationship:
[0076]
[0077]
[0078] Therefore, the number of logical bits It can be expressed as:
[0079]
[0080] Symmetrical, It can be calculated by the following formula:
[0081]
[0082] The distance corresponding to the quantum error correction code is the minimum weight of all legal logical operators, also divided into Type and Types are divided into definitions:
[0083]
[0084]
[0085] The total distance is the smaller of the two The distance can be determined by exhaustive method or sampling method.
[0086] The weights corresponding to quantum error correction codes It is divided into column weight and row weight. An error correction code is Sparse if the weight of all rows does not exceed , the weight of all columns does not exceed This is the same as the definition of a sparse graph. Row transformations of the stabilizer matrix do not change the measurement space of the stabilizer, but the weights may be different, thus making a difference in the measurement circuit and the computing device hardware configuration.
[0087] In addition, the server can also determine the structure and software framework of the quantum error correction code database based on the above information. Taking the file system as an example, it is necessary to standardize the file naming rules and folder classification rules.
[0088] S102: Determine, based on the computing power resource information of the quantum computing device, a computing range of the computing device for at least part of the basic parameters.
[0089] The server can determine the calculation range of the computing device for at least some basic parameters based on the computing power resource information of the computing device (such as the central processing unit (CPU), graphics processing unit (GPU), neural network processing unit (NPU), etc.), and the calculation range further specifies the value range of these basic parameters in the process of generating quantum error correction codes.
[0090] For example, the server can determine the range of the number of physical bits that the computing device can perform quantum entanglement on based on the computing power of the computing device, as the calculation range of the number of physical bits by the computing device.
[0091] S103: Based on the calculation range, several value strategies for each basic parameter are determined, and for each value strategy, at least one quantum error correction code is generated according to the values of different types of basic parameters under the value strategy, and the values are used as the basic parameters corresponding to the at least one quantum error correction code.
[0092] The server can determine the value range of each basic parameter based on the above calculation range. In the process of generating quantum error correction code, the value range of the number of physical bits is equivalent to the calculation range of the computing device for the number of physical bits.
[0093] In addition, the server may further determine the value range of the number of stabilizers and the value range of the number of logical bits according to the calculation range of the number of physical bits.
[0094] In one embodiment provided in this specification, if the computing device is for the number of physical bits The calculation range is , then the number of logical bits The value range is .
[0095] In addition, for the number of stabilizers, when Pauli The number of stabilizers Value , this quantum error correction code will be simplified to a classical error correction code, so the limit is The maximum value of , whose value range is ; Pauli The number of stabilizers The value is , the number of logical bits of this quantum error correction code is 0, which has no practical meaning, so it is limited to The maximum value of , whose value range is .
[0096] Then, several value combinations of each basic parameter are determined within the value range of each basic parameter by random sampling, and each value combination corresponds to a value strategy. For each value strategy, the server can generate at least one quantum error correction code according to the values of different types of basic parameters under the value strategy, and use the values of each type of basic parameters under the value strategy as the basic parameters corresponding to the quantum error correction codes.
[0097] In one embodiment provided in this specification, the server can use a binary random number generator to set the threshold. , generates a uniform random number between 0 and 1 ,if , then return , otherwise return . You can adjust , to change the density and weight of random numbers generated in batches:
[0098]
[0099] Then construct a binary random array generator, including vectors, matrices, etc. For a random vector or random matrix of a given size, traverse each position and assign a value using the above random number generator. , the resulting array density is Positive correlation affects the weight and sparsity of the array. The random numbers mentioned in the following steps can all be generated by this method.
[0100] For the above range of values , the server can traverse all possible value combinations in turn through a loop program and generate error correction codes based on different value strategies. For example, setting the number of physical bits The maximum value of , then traverse:
[0101]
[0102] Thus, at least one value-taking strategy is determined.
[0103] In this specification, the server can convert the stable submatrix into a unit matrix and a non-zero matrix by Gaussian elimination. ,in is the identity matrix, whose size is , is a non-zero matrix of size . Here is the definition , then the non-zero matrix The complexity is lower than the stable submatrix complexity.
[0104] The server can then solve the matrix The core :
[0105]
[0106]
[0107] Furthermore, the server can generate a binary random matrix Size The server can then The core And the random matrix ,Sure ,Right now . From this the server can obtain the stable submatrix and Uniquely deterministic quantum error-correcting codes.
[0108] In another embodiment provided in the present specification, the server traverses the values of all basic parameters through an exhaustive method, and then determines several value strategies to perform equivalent optimization on multiple matrices in the process, thereby achieving an exponential reduction in the search space.
[0109] For each value strategy, the server can determine the stable submatrix as a candidate stable submatrix according to the values of different types of basic parameters under the value strategy; then convert the candidate stable submatrix into a unit matrix and a non-zero matrix, wherein the candidate stable submatrix can be a Pauli X-type stable submatrix .
[0110] For a given The server can take values in turn through a loop program and generate a quantum error correction code in the following way. For ease of understanding, this manual provides a schematic diagram of the determination process of a quantum error correction code, such as Figure 2 shown.
[0111] Figure 2 A schematic diagram of the determination process of a quantum error correction code provided in this specification.
[0112] Among them, the server can convert the form of the stable submatrix into the identity matrix I and the non-zero matrix M, , thereby reducing its complexity, we then traverse M and perform the following steps for each candidate stable submatrix.
[0113] The server can determine whether the candidate stable submatrix meets the generation conditions of the quantum error correction code based on the structural information of the non-zero matrix. If so, at least one quantum error correction code is determined based on the candidate stable submatrix, otherwise the candidate stable submatrix is discarded and the next value selection strategy is determined.
[0114] Specifically, the server determines whether the binary numbers corresponding to the columns of the matrix M are increasing sequences from left to right. If so, it is determined that the generation conditions of the quantum error correction code are met. The method by which the server converts each column of the matrix M into a binary number is from high to low from top to bottom, such as:
[0115]
[0116] In practical applications, other equivalent processing methods or transformation methods may also be included, such as replacing the increasing sequence with a decreasing sequence, replacing the binary numbers generated corresponding to each column with the sequence corresponding to the binary numbers of each row, etc. In an embodiment provided in this specification, a sequence of binary numbers corresponding to each column may be used, and may be increased from left to right.
[0117] In addition, the server also determines the matrix Whether it conforms to the compact format, if so, it is determined to meet the generation conditions of quantum error correction code.
[0118] The server can convert the column vector Divide into free space and compact space .in can be any vector, and All 1s in must be at the bottom, and the part with values of 1 forms a new compact space and is applied to the adjacent vector on the right. Therefore, the matrix that conforms to the compact format has the following form:
[0119]
[0120] in is a column vector of varying length (can be 0) whose elements all have the value 1. Represents a compact space, can be any column vector, and the other parts are 0.
[0121] In practical applications, the server can use one or more of the above methods to determine whether the candidate stable submatrix meets the generation conditions of the quantum error correction code. Of course, the generation conditions of the quantum error correction code can also be determined by other methods, which are not specifically limited in this specification.
[0122] Further, after it is confirmed that the candidate error correction code matrix meets the generation conditions of the quantum error correction code, the server can parse it to determine the matrix core of the Pauli X-type stable submatrix, and then determine the value range of the number of rows of the Pauli Z-type stable submatrix based on the calculation range of the number of physical bits by the computing device, and determine the value range of the random matrix according to the value range of the number of rows of the Pauli Z-type stable submatrix, and determine each Pauli Z-type stable submatrix according to the matrix core of the Pauli X-type stable submatrix and the values of different random matrices within the value range of the matrix, and then determine at least one quantum error correction code according to the Pauli X-type stable submatrix and each Pauli Z-type stable submatrix.
[0123] Specifically, the server can solve the matrix The matrix kernel of :
[0124]
[0125]
[0126] because Satisfaction form According to basic linear algebra rules, we can quickly get its matrix kernel as , The size of the matrix is . This can be verified:
[0127]
[0128] in, yes A subset of the row space of Conform to the form . Random Matrix The size is , , the value range is . Traverse within this range , and. Traverse the random matrix The value of .
[0129] Then judge the random matrix Does it satisfy the reduced row echelon form? If so, then calculate , otherwise continue to judge the next matrix The value of .
[0130] S104: For each quantum error correction code, the quantum error correction code is parsed to obtain a matching parameter corresponding to the quantum error correction code.
[0131] For each quantum error correction code determined in the above manner, the server can calculate the corresponding logical bit according to the quantum error correction code. The server can use the quantum error correction code and Construct a matrix by stacking the columns , and then perform Gaussian elimination to obtain the matrix .in and Have the same row space and are the same size. The size is A full-rank matrix, that is, a Pauli Z-type logical matrix, "0" is a matrix of size A zero matrix. Further, the position and dimension relationship of the corresponding matrix can be expressed as:
[0132]
[0133] At the same time, the server can also determine the logical bit through the above method Matrix, from which we can derive the logical bits and number of logical bits corresponding to the quantum error correction code .
[0134] For the distance of the quantum error correction code, the server calculates the Pauli Type distance and Pauli Type distance, Pauli Type of distance It can be expressed as:
[0135]
[0136] Among them, the distance It can be traversed by exhaustive method It is also possible to obtain an estimated value through a certain amount of random sampling.
[0137] Pauli Type of distance It can be expressed as:
[0138]
[0139] The method of determining same.
[0140] From this server, we can get the distance corresponding to the quantum error correction code. .
[0141] The weight of the quantum error correction code is its corresponding stable submatrix The minimum weight of each row in , and the minimum weight of each column The weight of a vector is defined as the number of 1s in the vector. For example , then the weight .
[0142] S105: storing each quantum error correction code in a quantum error correction code database according to the basic parameters and matching parameters corresponding to each quantum error correction code.
[0143] After determining the matching parameters corresponding to each quantum error correction code, the server can build a quantum error correction code database and store the quantum error correction code according to the basic parameters and matching parameters corresponding to each quantum error correction code.
[0144] The server may store each quantum error correction code in accordance with the quantum error correction code storage format described in step S101, that is, for each stable submatrix corresponding to the quantum error correction code, the server may store the non-zero elements in the stable submatrix in a database file of a specified format, and determine the information header of the database file according to the position information of each non-zero element in the stable submatrix.
[0145] In this specification, the quantum error correction code definition depends on the matrix and It can be saved in a text file in the common MartrixMarket format, and related parameters can be saved in a text file in JSON format, including the number of physical bits. , number of stabilizers, number of logical bits ,distance , weight wait.
[0146] In order to distinguish each error correction code independently, its naming convention needs to have recognizable characteristics, such as n <n> k <k>d<>dx <dx>d <dz> w <w> i <index> <datatype>.<suffix>, fill in the corresponding value in the square brackets. Among them, index is the serial number of the error correction code with the same parameters. In this manual, its value range is 0-9, that is, up to 10 instances are saved. Datatype includes hx, hz, null, and the suffixes include .mm file types for saving matrices and .json types for saving parameters. For example, n11k2d3dx3dz5w5i2hx.mm, n11k2d3dx3dz5w5i2hz.mm, n11k2d3dx3dz5w5i2para.json.
[0147] Based on the above naming rules, a rough estimate of the data volume is made for n=30. The number of data items of the error correction code can reach:
[0148]
[0149] A single folder in the file system cannot handle such a large number of files. For example, the maximum number of files in a single folder in Windows is 65535. Therefore, it is necessary to set up a folder hierarchy so that the number of files in a single folder does not exceed this limit. <index> / n <n> / k <k>Create multi-level folders. The number of files in a single folder has been reduced by about times, with an average of less than 10,000.
[0150] Because the manual provides two algorithms, random sampling and traversal generation, two parallel databases can be set up for storage and analysis respectively.
[0151] In addition, the server can analyze the integrity and accuracy of the database, verify each quantum error correction code in the database, and the number of quantum error correction codes under different parameters, and delete the quantum error correction codes that have not passed the verification.
[0152] Specifically, for parameters with certain statistical regularities, analysis can be performed through lists. For example, the maximum d that can be obtained for each value of n and k. For data generated by random sampling, in order to facilitate understanding, this specification provides a storage list diagram of a quantum error correction code, such as Figure 3 shown.
[0153] Figure 3 This is a schematic diagram of a storage list of a quantum error correction code provided in the note of this specification.
[0154] Among them, for each parameter combination of the number of physical bits n and the number of quantum bits k, at least one quantum error correction code can be determined under the combination.
[0155] In addition, the server can traverse all the data and analyze whether the json data is correct, thereby verifying the accuracy.
[0156] In addition, the server can also perform data integrity analysis to determine whether the number of quantum error correction codes under each parameter has reached the upper limit.
[0157] For ease of understanding, this specification provides a schematic diagram of the construction process of a quantum error correction code database, such as Figure 4 shown.
[0158] Figure 4 The following is a schematic diagram of the construction process of a quantum error correction code database provided in this specification.
[0159] Among them, the server can determine the quantum error correction code under different basic parameter value strategies based on the preset parameter types and the calculation range of different parameters through random sampling or traversal generation, and then parse the quantum error correction code to obtain the basic parameters and matching parameters corresponding to each quantum error correction code, and then store the quantum error correction code according to these parameters to synthesize a quantum error correction code database, and parse the database to ensure the accuracy and integrity of the data.
[0160] S106: When an error correction instruction is received, the data to be processed and the error correction parameters corresponding to the data to be processed are obtained according to the error correction instruction, and a quantum error correction code matching the error correction parameters is searched in the quantum error correction code database to perform quantum error correction processing on the data to be processed.
[0161] In the actual process of executing quantum computing, when the server receives an error correction instruction, it can obtain the data to be processed and the error correction parameters corresponding to the data to be processed (including the number of physical bits corresponding to the data to be processed, and the number of logical bits, distance and weight required for the computing task, etc.) according to the error correction instruction, and query the quantum error correction code whose parameters (including basic parameters and matching parameters) match the error correction parameters in the quantum error correction code database, and then perform quantum error correction processing on the data to be processed through the quantum error correction code.
[0162] It should be noted that the number of physical bits in the above error correction parameters can be determined based on the data to be processed itself, while the number of logical bits, distance and weight, etc. can be determined based on the actual computing task requirements or the computing power resource information of the computing device.
[0163] It can be seen from the above method that this scheme can determine the calculation range of the parameters required for generating quantum error correction codes based on the computing power resource information of the computing power equipment, and then generate quantum error correction codes based on the value strategy of each basic parameter on the basis of the calculation range, and build a quantum error correction code database. In this way, in the actual process of quantum calculation, the quantum error correction code with matching parameters can be queried in the quantum error correction code database according to the error correction parameters of the data to be processed, and quantum error correction processing can be performed on it. Compared with the existing method, this scheme can accurately query the appropriate quantum error correction code, improve the accuracy of quantum error correction, and fully meet business needs.
[0164] The above are one or more quantum error correction processing methods implemented in this specification. Based on the same idea, this specification also provides a corresponding quantum error correction processing device, such as Figure 5 shown.
[0165] Figure 5 A schematic diagram of a quantum error correction processing device provided in this specification includes:
[0166] A receiving module 501 is used to receive a request for generating a quantum error correction code, and determine, according to the request, the type of parameters required to generate the quantum error correction code, wherein the parameters include basic parameters and matching parameters;
[0167] A determination module 502, configured to determine a calculation range of at least part of the basic parameters of the computing device according to computing power resource information of the quantum computing device;
[0168] A generating module 503 is used to determine several value strategies for each basic parameter based on the calculation range, and for each value strategy, generate at least one quantum error correction code according to the values of different types of basic parameters under the value strategy, and use the values as the basic parameters corresponding to the at least one quantum error correction code;
[0169] The parsing module 504 is used to parse each quantum error correction code to obtain a matching parameter corresponding to the quantum error correction code;
[0170] A storage module 505 is used to store each quantum error correction code in a quantum error correction code database according to the basic parameters and matching parameters corresponding to each quantum error correction code;
[0171] The processing module 506 is used for, when receiving an error correction instruction, obtaining the data to be processed and the error correction parameters corresponding to the data to be processed according to the error correction instruction, and searching the quantum error correction code database for a quantum error correction code matching the error correction parameters to perform quantum error correction on the data to be processed.
[0172] Optionally, for each quantum error correction code, the basic parameters corresponding to the quantum error correction code include: the number of stabilizers corresponding to the quantum error correction code, and the number of physical bits that can be processed by the quantum error correction code;
[0173] The matching parameters corresponding to the quantum error correction code include: the number of logical bits of the logical bits obtained after the quantum error correction code encodes the physical bits, the distance corresponding to the quantum error correction code, and the weight corresponding to the quantum error correction code, wherein the number of logical bits is lower than the number of physical bits.
[0174] Optionally, before determining the calculation range of each basic parameter according to the computing power resource information of the quantum computing device, the determination module 502 is further used to determine the target type of the generated quantum error correction code and the target storage format corresponding to the quantum error correction code;
[0175] The generating module 503 is specifically configured to generate, for each value taking strategy, at least one quantum error correction code of the target type according to the values of different types of basic parameters under the value taking strategy;
[0176] The storage module 505 is specifically used to store each quantum error correction code in the quantum error correction code database based on the target storage format according to the basic parameters and matching parameters corresponding to each quantum error correction code.
[0177] Optionally, the storage module 505 is specifically used to, for each quantum error correction code, save the non-zero elements in the stable submatrix corresponding to the quantum error correction code in a database file of a specified format, and determine the information header of the database file according to the position information of each non-zero element in the stable submatrix.
[0178] Optionally, the generating module 503 is specifically used to, for each value-taking strategy, determine a stable submatrix as a candidate stable submatrix according to the values of different types of basic parameters under the value-taking strategy; convert the candidate stable submatrix into a unit matrix and a non-zero matrix, wherein the complexity of the non-zero matrix is lower than the complexity of the candidate stable submatrix; determine whether the candidate stable submatrix meets the generation condition of the quantum error correction code according to the structural information of the non-zero matrix; and if so, determine at least one quantum error correction code according to the candidate stable submatrix.
[0179] Optionally, the candidate stable submatrix includes: a Pauli X-type stable submatrix;
[0180] The generating module 503 is specifically used to analyze the Pauli X-type stable submatrix to determine the matrix core of the Pauli X-type stable submatrix;
[0181] Based on the calculation range of the at least part of the basic parameters by the computing device, a value range of the number of rows of the Pauli Z-type stable submatrix is determined; according to the value range of the number of rows of the Pauli Z-type stable submatrix, a value range of the random matrix is determined; according to the matrix core of the Pauli X-type stable submatrix and the values of different random matrices within the value range of the random matrix, each Pauli Z-type stable submatrix is determined; according to the Pauli X-type stable submatrix and each Pauli Z-type stable submatrix, the at least one quantum error correction code is determined.
[0182] Optionally, before searching the quantum error correction code database for a quantum error correction code that matches the error correction parameter to perform quantum error correction processing on the data to be processed, the storage module 505 is further used to verify each quantum error correction code in the database and the number of quantum error correction codes under different parameters, and delete the quantum error correction code that has not passed the verification.
[0183] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A quantum error correction processing method is provided.
[0184] This manual also provides Figure 6 The one shown corresponds to Figure 1 A schematic diagram of the electronic device. Figure 6 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The quantum error correction processing method described. Of course, in addition to the software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0185] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0186] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0187] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0188] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0189] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0190] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0191] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0193] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0194] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0195] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0196] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the existence of other identical elements in the process, method, commodity or device including the element.
[0197] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0198] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0199] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0200] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.< / k> < / n> < / index> < / datatype> < / index> < / w> < / dz> < / dx> < / k> < / n>
Claims
1. A quantum error correction processing method, characterized in that: include: Receiving a request for generating a quantum error correction code, and determining, according to the request, types of parameters required to generate the quantum error correction code, wherein the parameters include basic parameters and matching parameters; Determining, based on computing power resource information of the quantum computing device, a computing range of the computing device for at least part of the basic parameters; Based on the calculation range, determining several value strategies for each basic parameter, for each value strategy, generating at least one quantum error correction code according to the values of different types of basic parameters under the value strategy, and using the values as the basic parameters corresponding to the at least one quantum error correction code; For each quantum error correction code, the quantum error correction code is parsed to obtain a matching parameter corresponding to the quantum error correction code; According to the basic parameters and matching parameters corresponding to each quantum error correction code, each quantum error correction code is stored in a quantum error correction code database; When an error correction instruction is received, the data to be processed and the error correction parameters corresponding to the data to be processed are obtained according to the error correction instruction, and a quantum error correction code matching the error correction parameters is queried in the quantum error correction code database to perform quantum error correction processing on the data to be processed.
2. The method according to claim 1, characterized in that For each quantum error correction code, the basic parameters corresponding to the quantum error correction code include: the number of stabilizers corresponding to the quantum error correction code, the number of physical bits that the quantum error correction code can process; The matching parameters corresponding to the quantum error correction code include: the number of logical bits of the logical bits obtained after the quantum error correction code encodes the physical bits, the distance corresponding to the quantum error correction code, and the weight corresponding to the quantum error correction code, wherein the number of logical bits is lower than the number of physical bits.
3. The method according to claim 1, characterized in that Before determining the calculation range of each basic parameter according to the computing power resource information of the quantum computing device, the method further includes: Determine the target type of the generated quantum error correction code and the target storage format corresponding to the quantum error correction code; For each value strategy, at least one quantum error correction code is generated according to the values of different types of basic parameters under the value strategy, specifically including: For each value-taking strategy, generating at least one quantum error correction code of the target type according to the values of different types of basic parameters under the value-taking strategy; According to the basic parameters and matching parameters corresponding to each quantum error correction code, each quantum error correction code is stored in the quantum error correction code database, specifically including: According to the basic parameters and matching parameters corresponding to each quantum error correction code, each quantum error correction code is stored in a quantum error correction code database based on the target storage format.
4. The method according to claim 3, characterized in that Storing each quantum error correction code in a quantum error correction code database based on the target storage format specifically includes: For each quantum error correction code, the non-zero elements in the stable submatrix corresponding to the quantum error correction code are saved in a database file of a specified format, and the information header of the database file is determined according to the position information of each non-zero element in the stable submatrix.
5. The method according to claim 1, characterized in that According to the values of different types of basic parameters under the value strategy, at least one quantum error correction code is generated, specifically including: For each value strategy, according to the values of different types of basic parameters under the value strategy, a stable sub-matrix is determined as a candidate stable sub-matrix; Converting the candidate stable submatrix into a unit matrix and a non-zero matrix, wherein the complexity of the non-zero matrix is lower than the complexity of the candidate stable submatrix; Determining whether the candidate stable submatrix meets the generation condition of the quantum error correction code according to the structural information of the non-zero matrix; If so, at least one quantum error correction code is determined according to the candidate stable submatrix.
6. The method according to claim 5, characterized in that The candidate stable submatrices include: Pauli X-type stable submatrices and Pauli Z-type stable submatrices; Determining at least one quantum error correction code according to the candidate stable submatrix specifically includes: Analyzing the Pauli X-type stable submatrix to determine a matrix core of the Pauli X-type stable submatrix; Determining a value range of the number of rows of the Pauli Z-type stabilizer matrix based on a calculation range of the at least part of the basic parameters by the computing device; Determining a value range of a random matrix according to a value range of the number of rows of the Pauli Z-type stabilizer matrix; Determine each Pauli Z-type stable submatrix according to the matrix core of the Pauli X-type stable submatrix and the values of different random matrices within the value range of the random matrix; The at least one quantum error correction code is determined based on the Pauli X-type stable submatrix and each Pauli Z-type stable submatrix.
7. The method according to claim 1, characterized in that Before searching the quantum error correction code database for a quantum error correction code that matches the error correction parameter to perform quantum error correction on the data to be processed, the method further includes: Each quantum error correction code in the database and the number of quantum error correction codes under different parameters are verified, and the quantum error correction codes that fail the verification are deleted.
8. A quantum error correction processing device, characterized in that: include: A receiving module, used to receive a request for generating a quantum error correction code, and determine, according to the request, the type of parameters required to generate the quantum error correction code, wherein the parameters include basic parameters and matching parameters; A determination module, configured to determine a calculation range of at least part of the basic parameters of the computing device according to computing power resource information of the quantum computing device; A generating module, configured to determine several value strategies for each basic parameter based on the calculation range, and for each value strategy, generate at least one quantum error correction code according to the values of different types of basic parameters under the value strategy, and use the values as the basic parameters corresponding to the at least one quantum error correction code; A parsing module is used to parse each quantum error correction code to obtain matching parameters corresponding to the quantum error correction code; A storage module, used to store each quantum error correction code in a quantum error correction code database according to basic parameters and matching parameters corresponding to each quantum error correction code; The processing module is used for, when receiving an error correction instruction, obtaining the data to be processed and the error correction parameters corresponding to the data to be processed according to the error correction instruction, and searching the quantum error correction code database for a quantum error correction code matching the error correction parameters to perform quantum error correction on the data to be processed.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 7 is implemented.
