A multi-qubit reading result correction method, device and medium
By iteratively optimizing the ideal distribution vector to reduce the deviation after the read error response matrix correction, the fidelity problem of multi-bit read results in high-noise environments is solved, achieving higher read accuracy and efficiency.
Patent Information
- Application Number
- CN202510947981.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-07-10
AI Technical Summary
In existing quantum computing, the fidelity of multi-qubit readout results is difficult to meet the more stringent accuracy requirements in high-noise environments. In particular, the readout error rate increases exponentially with the increase of the number of qubits, and existing readout error response matrix correction methods cannot further improve the fidelity of the readout results.
By initializing the ideal distribution vector and using the minimum deviation between the noisy distribution vector corrected by the read error response matrix and the ideal distribution vector as a constraint, the ideal distribution vector is iteratively optimized to obtain an ideal distribution vector that is closer to the true probability distribution, so as to correct the multi-bit read results.
It significantly improves the fidelity of multi-bit read results, meets the accuracy requirements of quantum computing in more demanding scenarios, and improves optimization efficiency by simplifying the calculation method of the read error response matrix and pre-building an index dictionary.
Smart Images

Figure CN120450067B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of quantum computing, and in particular, to a multi-qubit read result correction method, device and medium. BACKGROUND
[0002] In the application of quantum computing, due to the existence of read noise, there is a certain probability of reading an incorrect state when reading the state of a quantum bit. Moreover, the read error rate will increase exponentially with the increase of the number of quantum bits. For example, assuming that the probability of correct reading of a single quantum bit is 95%, when reading a binary string corresponding to 20 quantum bits, the probability of correct reading is only 0.95 20 = 35.85%, which will obviously cause serious adverse effects on the fidelity of the quantum computing result and needs to be optimized.
[0003] At present, the most widely used read error mitigation strategy is to calibrate the read error response matrix R, and after obtaining the noisy read probability distribution vector p noise , the ideal probability distribution vector p -1 can be obtained by calculating R noise p ideal .
[0004] Although the above scheme can correct the quantum read result and improve the fidelity of the read result, it still has some deficiencies. For example, in some scenarios where the fidelity of the read result is required to be higher, the above scheme still cannot meet the needs.
[0005] Therefore, there is an urgent need for a multi-qubit read result correction method in the art to further improve the fidelity of the corrected read result on the basis of the original read result correction scheme through the read error response matrix. SUMMARY
[0006] The purpose of the present application is to provide a multi-qubit read result correction method, device and medium for further improving the fidelity of the corrected multi-qubit read result to meet the accuracy requirements of quantum computing in more demanding scenarios.
[0007] To solve the above technical problems, the present application provides a multi-qubit read result correction method, comprising:
[0008] Obtaining a noisy multi-bit read result in a quantum computer and determining a noisy distribution vector and a read error response matrix corresponding to the multi-bit read result;
[0009] Initializing an ideal distribution vector as a vector with the same length as the noisy distribution vector but with all values being 0;
[0010] iterating the ideal distribution vector under the constraint that the deviation between the noise-containing distribution vector corrected by the read error response matrix and the ideal distribution vector is the lowest, and obtaining the iteration result of the ideal distribution vector when the deviation is the lowest as the final ideal distribution vector;
[0011] correcting the noisy multi-bit read result in the quantum computer by the ideal distribution vector.
[0012] In an optional embodiment, iterating the ideal distribution vector under the constraint that the deviation between the noise-containing distribution vector corrected by the read error response matrix and the ideal distribution vector is the lowest, and obtaining the iteration result of the ideal distribution vector when the deviation is the lowest as the final ideal distribution vector includes:
[0013] determining the minimum value of the target function by using a gradient or non-gradient iteration method under a preset stopping condition, and determining the value of the ideal distribution vector when the target function takes the minimum value as the final ideal distribution vector;
[0014] wherein the target function is:
[0015] ;
[0016] R represents a read error response matrix; represents the ideal distribution vector; represents the noise-containing distribution vector; represents the Euclidean norm.
[0017] In an optional embodiment, the preset stopping condition includes:
[0018] the result value of the target function in two consecutive iterations is less than a first threshold value, or the number of iterations reaches a second threshold value.
[0019] In an optional embodiment, when the ideal distribution vector is iterated, the method further includes:
[0020] limiting the minimum value of the ideal distribution vector to 0 and the maximum value to 1.
[0021] In an optional embodiment, determining the read error response matrix corresponding to the multi-bit read result includes:
[0022] obtaining the single-bit read fidelity of the corresponding quantum bit in the multi-bit read result, and determining the matrix element in the error response matrix by an error response matrix element calculation formula to obtain the error response matrix;
[0023] wherein the error response matrix element calculation formula is:
[0024] ;
[0025] row and col are both binary strings, row is the row index of the matrix, indicating the read result of the multi-qubit, and col is the column index of the matrix, indicating the true state of the multi-qubit; R row,col represents the matrix element of the row-th row and the col-th column in the error response matrix; k represents the number of qubits contained in the multi-bit read result; represents the read fidelity of the read fidelity matrix of the i-th bit qubit, row-th row and col-th column.
[0026] In an optional embodiment, when calculating the matrix element in the error response matrix, it further comprises:
[0027] If the Hamming distance of the matrix element is greater than a third threshold, the matrix element is set to 0;
[0028] Wherein, the Hamming distance is the number of different bit qubits contained in the row index and the column index of the matrix element.
[0029] In an optional embodiment, obtaining the single-bit read fidelity of the corresponding qubit in the multi-bit read result comprises:
[0030] From the pre-established index dictionary, the corresponding single-bit read fidelity is called by the index of the corresponding qubit;
[0031] Wherein, the index dictionary saves various single-bit read fidelities corresponding to any qubit in the quantum computer.
[0032] In an optional embodiment, the establishment of the index dictionary comprises:
[0033] Encoding all qubits contained in the quantum computer to obtain the index of each qubit in the quantum computer, and adding the corresponding index item in the pre-established dictionary according to the index of each qubit;
[0034] Obtaining the single-bit read fidelity matrix of each qubit;
[0035] Saving the first single-bit read fidelity and the second single-bit read fidelity in the single-bit read fidelity matrix in the corresponding index item in the dictionary;
[0036] The first single-bit read fidelity is a read fidelity of a current quantum bit real state being |0> state and reading |0> state.
[0037] In an optional embodiment, obtaining the single-bit read fidelity matrix comprises:
[0038] Preparation of the current quantum bit into |0> state, and repeating multiple readings;
[0039] According to the number of times of reading |0> state in the repeated multiple reading results, the first single-bit read fidelity is determined; and the third single-bit read fidelity is determined according to the difference between 1 and the first single-bit read fidelity; wherein the third single-bit read fidelity is a read fidelity of a current quantum bit real state being |0> state but reading |1> state.
[0040] Preparation of the current quantum bit into |1> state, and repeating multiple readings;
[0041] According to the number of times of reading |1> state in the repeated multiple reading results, the second single-bit read fidelity is determined; and the fourth single-bit read fidelity is determined according to the difference between 1 and the second single-bit read fidelity; wherein the fourth single-bit read fidelity is a read fidelity of a current quantum bit real state being |1> state but reading |0> state.
[0042] In an optional embodiment, determining the noise-containing distribution vector corresponding to the multi-bit read result comprises:
[0043] Repeating multiple readings on the quantum circuit corresponding to the multi-bit read result in the quantum computer, and obtaining a binary result string read each time;
[0044] Counting the number of occurrences of each different binary result string in each binary result string to determine the occurrence probability of each binary result string;
[0045] According to the occurrence probability of each binary result string, the noise-containing distribution vector is determined.
[0046] In an optional embodiment, after the multiple readings on the quantum circuit corresponding to the multi-bit read result in the quantum computer, and obtaining a binary result string read each time, it further comprises:
[0047] According to the theoretical read result of the multi-bit read result, the binary result string is completed; wherein the number of occurrences of the completed binary result string is 0.
[0048] sort all binary result strings.
[0049] To solve the above technical problems, the application further provides a multi-qubit reading result correction device, comprising:
[0050] An acquisition module is configured to acquire a noisy multi-bit reading result in a quantum computer, and determine a noisy distribution vector and a reading error response matrix corresponding to the multi-bit reading result;
[0051] An initialization module is configured to initialize an ideal distribution vector as a vector with the same length as the noisy distribution vector but with all values being 0;
[0052] An iteration module is configured to iteratively correct the ideal distribution vector with the constraint that the deviation between the corrected noisy distribution vector and the ideal distribution vector is the lowest, and obtain the ideal distribution vector iteration result at the lowest deviation as the final ideal distribution vector;
[0053] A correction module is configured to correct the noisy multi-bit reading result in the quantum computer by using the ideal distribution vector.
[0054] To solve the above technical problems, the application further provides a computer program product comprising computer programs / instructions, which, when executed by a processor, implement the steps of the multi-qubit reading result correction method described above.
[0055] To solve the above technical problems, the application further provides a multi-qubit reading result correction device, comprising:
[0056] A memory is configured to store a computer program;
[0057] A processor is configured to implement the steps of the multi-qubit reading result correction method described above when executing the computer program.
[0058] To solve the above technical problems, the application further provides a non-volatile storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the multi-qubit reading result correction method described above.
[0059] The multi-qubit reading result correction method provided by the application, after obtaining a noisy distribution vector p noise and a reading error response matrix R, no longer obtains an ideal probability distribution vector p -1 p noise by directly calculating R idealBut by setting up "the deviation of the noise-containing distribution vector after the reading error response matrix correction from the ideal distribution vector is the lowest" as a constraint condition to the ideal probability distribution vector p ideal Iterate, so that the ideal probability distribution vector p ideal More close to the real situation of multi-qubit reading results in quantum computers. Further, in the ideal probability distribution vector p ideal When correcting the multi-bit reading results in quantum computers, the fidelity of the corrected reading results can be further improved, and the demand for quantum computing accuracy in more demanding scenarios can be met.
[0060] The multi-qubit reading result correction device and the non-volatile storage medium provided by the present application correspond to the above method and have the same effect. BRIEF DESCRIPTION OF DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0062] Figure 1 A flowchart of a multi-qubit reading result correction method provided by an embodiment of the present application;
[0063] Figure 2 A frequency distribution diagram of a noise-containing sampling result provided by an embodiment of the present application;
[0064] Figure 3 An iteration diagram of a target function minimization provided by an embodiment of the present application;
[0065] Figure 4 An optimized frequency distribution diagram provided by an embodiment of the present application;
[0066] Figure 5 A single-bit |0> state reading fidelity measurement circuit diagram provided by an embodiment of the present application;
[0067] Figure 6 A single-bit |1> state reading fidelity measurement circuit diagram provided by an embodiment of the present application;
[0068] Figure 7 A structure diagram of a multi-qubit reading result correction device provided by an embodiment of the present application;
[0069] Figure 8 A structure diagram of another multi-qubit reading result correction device provided by an embodiment of the present application. Detailed Implementation
[0070] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0071] The core of this invention is to provide a method, device, and medium for correcting multi-qubit readout results.
[0072] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0073] Currently, quantum computing is still in the research stage, and mitigating readout noise remains one of the major challenges facing quantum computers. Readout noise refers to the probability that, for any single qubit, if it is in the |0> state (|1> state), it will be incorrectly read as the |1> state (|0> state) during actual sampling. For multiple qubits, the probability of correctly reading a multi-bit binary string can be simply viewed as the product of the probabilities of correctly reading a single bit. In other words, if the readout fidelity of a single qubit is similar, the readout fidelity of multiple qubits will decrease exponentially with the increase of the number of qubits.
[0074] For example, assuming the probability of correctly reading |0> or |1> with a single qubit is 95%, and a certain calculation result in a quantum computer is a binary string of 20 qubits |11101000010001000010>, then the probability of correctly reading this binary string is only 0.95%. 20 =35.85%. It is clear that increasing the number of qubits significantly negatively impacts the fidelity of quantum computing results. Therefore, optimization of multi-qubit readouts is necessary.
[0075] Currently, the most widely used read error optimization strategy is to optimize multi-bit read results by using the read error response matrix R. Specifically, first, the read error response matrix R is calibrated; then, the noisy read probability distribution p is obtained. noise Then R can be calculated -1 p noise To obtain the true probability distribution p ideal Finally, the true probability distribution p is used. ideal Implement correction and optimization of multi-bit read results.
[0076] For example, for two qubits q0q1, the method for obtaining the read error response matrix is to prepare the two qubits q0q1 to |00> state, and obtain the probabilities of the read results being |00>, |01>, |10>, and |11>, respectively. Then, the two qubits q0q1 are prepared to |01>, |10>, and |11> states, respectively, and the probabilities of the read results being |00>, |01>, |10>, and |11> under each preparation state are obtained, and finally the read error response matrix R can be constructed as:
[0077] ;
[0078] In the above formula, represents the probability that the qubit is in the j state but the read result is in the i state. In addition, it can be seen from the above formula that there is a normalization relationship:
[0079] ;
[0080] And the true read result can be calculated by the following formula:
[0081] (1);
[0082] However, the above scheme also has many problems. First of all, the true probability distribution p ideal obtained by the above formula is only a calculated value, not the true value. If the determined read error response matrix R and the sampled noisy read probability distribution p noise deviate from the true value, the calculated p ideal is not a real formal probability distribution. Therefore, the optimization effect of the multi-bit read result still needs to be further improved, and it cannot meet the needs of more and more stringent quantum computing scenarios for the fidelity of multi-bit read results.
[0083] To solve the above problems, the present application provides a multi-qubit read result correction method, as shown in Figure 1 , the method comprises:
[0084] S11: Obtain the noisy multi-bit read result in the quantum computer, and determine the noisy distribution vector corresponding to the multi-bit read result and the read error response matrix.
[0085] S12: Initialize the ideal distribution vector to a vector with the same length as the noisy distribution vector, but with all values being 0.
[0086] S13: With the lowest deviation of the noisy distribution vector corrected by the read error response matrix and the ideal distribution vector as the constraint condition, iterate the ideal distribution vector, and obtain the ideal distribution vector iteration result when the deviation is the lowest as the final ideal distribution vector.
[0087] S14: correcting the noisy multi-bit read result in the quantum computer by the ideal distribution vector.
[0088] For steps S11 and S14, the noisy distribution vector therein, that is, the noisy read probability distribution p noise in the related art, only exists in the form of a vector to facilitate subsequent calculation. The embodiment is not limited to the way of obtaining the noisy distribution vector p noise and the read error response matrix R. The same way as in the related art can be used to obtain the noisy distribution vector p noise and the read error response matrix R. Similarly, after the ideal distribution vector (that is, the real probability distribution) p ideal is determined, how to realize the correction of the multi-bit read result in the quantum computer can also use the same way as in the related art, and the embodiment does not limit this. The focus of the method is how to optimize the real probability distribution to obtain an ideal distribution vector p ideal that is more in line with the real situation of multi-bit reading.
[0089] For steps S12 and S13, as described above in relation to the related art, the real probability distribution p -1 in the related art is obtained by calculating R noise p ideal . The real probability distribution p ideal is also the ideal distribution vector in step S12, which is used to realize the correction of the multi-bit read result. However, unlike the related art, the ideal distribution vector p ideal in the method is not obtained directly by calculating R -1 p noise , but is obtained by iteration of the ideal distribution vector p ideal , the noisy distribution vector p noise and the read error response matrix R. Specifically, in the method, the deviation between the noisy distribution vector (that is, R -1 p noise ) after correction by the read error response matrix and the ideal distribution vector p ideal is the lowest constraint condition, and the iteration of the ideal distribution vector is realized. The noisy distribution vector after correction by the read error response matrix represents the new probability distribution of the noisy read probability distribution after correction by the read error response matrix R, and the closer it is to the real probability distribution p ideal , the better the correction effect and the better the effect of improving the read fidelity. Therefore, the method iteratively approaches the real probability distribution p ideal to obtain better optimization effect of the multi-bit read result. That is, the corresponding ideal distribution vector pideal as the final probability distribution for correcting the multi-bit read result of the quantum computer in step S4.
[0090] In an alternative embodiment, the present embodiment provides a method for quantifying the deviation between the noise distribution vector p ideal corrected by the read error response matrix and the ideal distribution vector p ideal and performing iterative optimization on the ideal distribution vector p ideal . That is, the above step S13 specifically includes:
[0091] iteratively determining the minimum value of the objective function using gradient or non-gradient iterative method under a preset stopping condition, and determining the value of the ideal distribution vector when the objective function takes the minimum value as the final ideal distribution vector.
[0092] wherein the objective function is:
[0093] (2).
[0094] R represents the read error response matrix; represents the ideal distribution vector; represents the noise distribution vector; represents the Euclidean norm.
[0095] In the present method, the length of the vector is calculated by the Euclidean norm (L2 norm), i.e., the square root of the sum of squares of each component. As can be seen from equation (1), is a variant of equation (1), which is used to measure the Euclidean distance between the ideal distribution vector p ideal after transformation by the read error response matrix R and the original noise, i.e., the deviation between the noise distribution vector (R -1 p noise ) corrected by the read error response matrix and the ideal distribution vector p ideal . Further, the constraint condition in step S3 is to perform gradient or non-gradient iterative optimization to obtain an ideal distribution vector p ideal closer to the true value with the result value of the objective function being the minimum as the target.
[0096] In addition, the present embodiment does not limit the preset stopping condition in the above iterative process. In a general embodiment, the maximum number of iterations can be set, and the iteration is stopped when the number of iterations reaches the set maximum value, so as to avoid the problems such as infinite loop, overfitting or local optimum.
[0097] However, the present embodiment also provides an alternative embodiment of the preset stopping condition, and the above preset stopping condition specifically includes:
[0098] the result value of the objective function in two continuous iterations is less than the first threshold value, or the number of iterations reaches the second threshold value.
[0099] In the embodiment, the first threshold value is not limited to a specific value, but should be a small value. That is, when the result value of the objective function is less than the first threshold value, it can be considered that it is close to 0, that is, the ideal distribution vector p ideal is close to the real probability distribution. In addition, in the embodiment, the iteration is stopped only when the result value of the objective function in two continuous iterations is less than the first threshold value, in order to prevent problems such as local optimum. In addition to the sub-condition that the result value of the objective function in two continuous iterations is less than the first threshold value, the preset stopping condition provided by the embodiment also includes another sub-condition that the number of iterations reaches the second threshold value, and the iteration is stopped when any one of the two sub-conditions is met. The second sub-condition is to set the maximum number of iterations to avoid problems such as entering a dead loop or overfitting.
[0100] Further, the multi-bit reading result correction scheme proposed in the related art has another problem. In actual applications, the number of samplings is not infinite, so there is a certain deviation between the sampling result and the real noisy reading probability distribution p noise . This deviation may cause the probability corresponding to some quantum states to be negative in subsequent calculation of the real probability distribution, which obviously does not conform to the real situation.
[0101] Therefore, according to this principle, the embodiment also provides a further implementation scheme for obtaining the ideal distribution vector p ideal . The step S13 further includes the following steps when the ideal distribution vector p ideal is iteratively optimized:
[0102] limiting the minimum value of the ideal distribution vector to 0 and the maximum value to 1.
[0103] As described above, the value of the ideal distribution vector p ideal should not be negative. If it is, it may be caused by the deviation between the sampling result and the real noisy reading probability distribution p noise , which will inevitably affect the optimization effect of the multi-bit reading result. Therefore, when the ideal distribution vector p ideal is iteratively optimized, its value is directly limited to [0, 1] to avoid negative numbers, that is, to a certain extent, the adverse effects of the deviation between the sampling result and the real noisy reading probability distribution p noise on the optimization effect of the multi-bit reading result can be reduced.
[0104] To further illustrate the improvement of the method on the fidelity of multi-bit read results, the embodiment further provides a possible test case: assuming that the multi-bit read result is a quantum bit string composed of 10 quantum bits, the distribution of the noisy sampling results obtained by repeated reading for ten thousand times is as shown in Figure 2 The process of iterative optimization of the ideal distribution vector p ideal based on the method is as shown in Figure 3 The multi-bit read result after optimization based on the ideal distribution vector p ideal is as shown in Figure 4 It can be seen from Figures 2 to 4 that Figure 4 the number of times of reading the real state of the quantum bit string after optimization in has approached ten thousand times, and there is a significant effect of improving the fidelity of the multi-bit read result.
[0105] In summary, the present application provides a multi-qubit read result correction method, which iteratively optimizes the ideal probability distribution vector p ideal by setting the constraint condition that the deviation between the noisy distribution vector after correction by the read error response matrix and the ideal distribution vector is the lowest, so that the subsequently obtained ideal probability distribution vector p ideal is closer to the real situation of the multi-qubit read result in the quantum computer. Furthermore, when the ideal probability distribution vector p ideal obtained by the method is used to correct the multi-bit read result in the quantum computer, the fidelity of the corrected read result can be further improved to meet the demand for quantum computing accuracy in more demanding scenarios.
[0106] On the other hand, as can be seen from the above embodiment, the method does not impose too many restrictions on the way of obtaining the read error response matrix R, and the obtaining method in the related art can be used. That is, the target quantum bit string is prepared in each possible state, and the reading is repeatedly performed multiple times in each possible preparation state, the number of times of reading each different read result is counted to determine the corresponding read probability.
[0107] However, this scheme also reflects another problem existing in the related art: with the increase of the number of quantum bits k, the possible quantum states increase exponentially (i.e. 2 k ). At this time, when obtaining the read error response matrix R, the k-bit quantum bit string needs to be prepared in 2 k possible quantum states, and then the probability of reading 2 k quantum states in each preparation state is determined. This obtaining method is obviously impossible to implement for large-scale quantum bit reading.
[0108] To this end, the embodiment further provides another acquisition scheme of the read error response matrix R. The process of acquiring the read error response matrix R in step S11 includes:
[0109] S11-A: acquiring the single-bit read fidelity of the corresponding quantum bit in the multi-bit read result, and determining the matrix element in the error response matrix through the error response matrix element calculation formula to obtain the error response matrix.
[0110] The error response matrix element calculation formula is:
[0111] (3);
[0112] Both row and col are binary strings; row is the row index of the matrix, representing the read result of the multi-qubit; col is the column index of the matrix, representing the real state of the multi-qubit; for example, assuming that row is 110 and col is 010, that is, the real state of a 3-bit quantum bit string is 010, but the probability of reading the result as 110. R row,col represents the matrix element in the error response matrix at the row and col; k represents the number of quantum bits contained in the multi-bit read result; represents the read fidelity in the single-bit read fidelity matrix of the i-th quantum bit at the row and col.
[0113] As can be seen from the above, the method acquires each matrix element in the read error response matrix R of the k-bit quantum bit through formula (3) respectively, realizes the determination of the read error response matrix R, and obtains another acquisition method of the read error response matrix R by calculating the tensor product of the single-bit read fidelity of the related quantum bit.
[0114] Further, on the basis of the acquisition scheme of the read error response matrix R provided in the above embodiment, the embodiment further provides a further implementation scheme to simplify the calculation complexity. When calculating the matrix element of the read error response matrix R through the above embodiment, the method further includes:
[0115] If the Hamming distance of the matrix element is greater than the third threshold, the matrix element is set to 0.
[0116] wherein the Hamming distance is the number of different bits of the row index and the column index of the matrix element. From the above embodiment, it can be seen that the row index represents the result read by the current quantum bit string, and the column index represents the real state of the current quantum bit string. For example, assuming that row is 110 and col is 010, since only the state of the first bit quantum bit is different in the row index and the column index, the Hamming distance of the matrix element R 110,010 is 1.
[0117] It should be noted that the specific value of the third threshold is not limited in the embodiment, and a suitable value can be freely selected according to actual needs. It is easy to know that the greater the value of the third threshold, the more the matrix elements retained in the read error response matrix R, and the better the optimization effect of the multi-bit read result fidelity, but the greater the calculation complexity. The smaller the value of the third threshold, the fewer the matrix elements retained in the read error response matrix R, and the slightly worse the optimization effect of the multi-bit read result fidelity, but the smaller the calculation complexity. In actual application, the third threshold can be taken as 5 to ensure the optimization effect of the multi-bit read result. However, in demonstration or simulation test, the third threshold can be taken as 1 or 2 to improve the optimization efficiency of the multi-bit read result.
[0118] As can be seen from the above, for the matrix elements with a Hamming distance greater than the third threshold, the calculation by the above formula (3) is not needed, and the matrix elements are directly assigned a value of 0, so as to greatly simplify the calculation process of the matrix elements. Moreover, for the read error response matrix R itself, the matrix elements with a value of 0 can also not participate in the calculation of the real probability distribution in the subsequent process, further reducing the calculation difficulty of the whole process of optimizing the multi-bit read result by the method.
[0119] On the other hand, for the matrix element calculation method corresponding to formula (3) provided in the above embodiment, the single-bit read fidelity of the corresponding quantum bit in the multi-bit read result needs to be obtained to complete the calculation. As for how to obtain the single-bit read fidelity, in addition to the preparation and re-reading reading mentioned in the above related technology, the embodiment further provides another optional implementation scheme:
[0120] The single-bit read fidelity of the corresponding quantum bit is called from the pre-established index dictionary.
[0121] The index dictionary stores various single-bit read fidelities corresponding to any quantum bit in the quantum computer.
[0122] It should be noted that the index dictionary is also a dictionary (dict). The dictionary is a common structure in the operating system using Python (an object-oriented programming language), which stores data through key-value pairs, and its essence is a hash table implementation. Therefore, the above index is the key (key) in the key-value pair in the dictionary, and the single-bit read fidelity is the value (value) corresponding to the index key.
[0123] In the present embodiment, as long as the index dictionary establishment process is completed once in advance, the corresponding single-bit read fidelity in the index dictionary can be called to complete the correction of the single-bit read result or be used to calculate each matrix element of the read error response matrix R based on formula (3) when correcting the multi-bit read result in the subsequent quantum computer reading result optimization of any time, without repeating the preparation of quantum bits and multiple repeated readings, greatly improving the optimization efficiency.
[0124] In the above embodiment, the index dictionary is pre-established and saves various (all four) single-bit read fidelities of all quantum bits in the quantum computer. Then, in the index dictionary establishment process, the way to obtain the single-bit read fidelity can refer to the scheme for obtaining the read error response matrix R in the related art, and the single-bit read fidelity matrix is obtained by preparing all possible quantum states and repeatedly reading to count the probability of each read quantum state.
[0125] In an alternative embodiment, the index dictionary establishment process includes:
[0126] S21: Encode all quantum bits contained in the quantum computer to obtain the index of each quantum bit in the quantum computer, and add the corresponding index item in the pre-established dictionary according to the index of each quantum bit.
[0127] Wherein, the index can be represented by q [i] For example, if the quantum computer contains 20 bits, the index {q1, q2, …, q 20} can be established for 20 quantum bits.
[0128] S22: Obtain the single-bit read fidelity matrix of each quantum bit.
[0129] S23: Save the first single-bit read fidelity and the second single-bit read fidelity in the single-bit read fidelity matrix in the corresponding index item in the dictionary.
[0130] Wherein, the first single-bit read fidelity f 00 is the read fidelity when the current quantum bit is in the |0> state and the read state is |0>; and the second single-bit read fidelity f 11the read fidelity of the current quantum bit real state being |1> state and reading |1> state.
[0131] It should be noted that a complete single-bit read fidelity matrix should include the third single-bit read fidelity f 00 and the fourth single-bit read fidelity f 11 in addition to the first single-bit read fidelity f 10 and the second single-bit read fidelity f 01 . The third single-bit read fidelity f 10 is the read fidelity of the current quantum bit real state being |0> state but reading |1> state. The fourth single-bit read fidelity f 01 is the read fidelity of the current quantum bit real state being |1> state but reading |0> state.
[0132] However, since f 10 =1- f 00 , f 01 =1- f 11 . Therefore, the third single-bit read fidelity f 10 can be quickly determined from the first single-bit read fidelity f 00 , and the fourth single-bit read fidelity f 01 can be quickly determined from the second single-bit read fidelity f 11 without the need for re-preparation and multiple sampling. Therefore, in order to further reduce the data size stored in the index dictionary, only the first single-bit read fidelity f 00 and the second single-bit read fidelity f 11 are saved for each quantum bit in the index dictionary, reducing the data amount by half.
[0133] Assuming that the first single-bit read fidelity f 00 is the i-th quantum bit among all quantum bits of the quantum computer, its first single-bit read fidelity is denoted as f . Taking the quantum computer containing 20 bits as an example, the index dictionary established in this embodiment is { q1:( ), q2:( ), …, q 20 :( )}.
[0134] Further, in order to better illustrate how the formula (3) provided in the above embodiment realizes the calculation of matrix elements under the index dictionary provided in this embodiment, this embodiment further provides a possible example:
[0135] Suppose that the quantum computer needs to use three qubits for this time, and the three qubits are the first, third and fourth qubits among all 20 qubits of the quantum computer, and the index dictionary is ]. If the read error response matrix element to be calculated is , then the corresponding calculation formula based on the above formula (3) is:
[0136] ;
[0137] Further, for how to obtain the single-bit read fidelity matrix in the above step S22, the embodiment also provides an optional implementation scheme, and step S22 further includes:
[0138] S221: Prepare the current qubit to be in the |0> state, and repeat multiple readings.
[0139] S222: Determine the first single-bit read fidelity according to the number of times of reading the |0> state in the repeated multiple readings, and determine the third single-bit read fidelity according to the difference between 1 and the first single-bit read fidelity.
[0140] S223: Prepare the current qubit to be in the |1> state, and repeat multiple readings.
[0141] S224: Determine the second single-bit read fidelity according to the number of times of reading the |1> state in the repeated multiple readings, and determine the fourth single-bit read fidelity according to the difference between 1 and the second single-bit read fidelity.
[0142] It should be noted that since the index dictionary is pre-established, an optional implementation scheme is to establish the index dictionary at the beginning of the start of the quantum computer. At this time, the initial state of all qubits in the quantum computer is defaulted to be in the |0> state. At this time, the multiple readings in step S221 are also multiple readings on the circuit as shown in Figure 5 , that is, directly reading the qubit. The multiple readings in step S223 are also multiple readings on the circuit as shown in Figure 6 , that is, reading the qubit after preparing the qubit from the initial state |0> to |1> by the quantum NOT gate.
[0143] In summary, the application further provides a scheme for improving the optimization efficiency of quantum computer reading results by using an index dictionary. The single-bit reading fidelity of all quantum bits in the quantum computer is obtained in advance and stored through the index dictionary. When the optimization of the quantum bit reading results is performed subsequently (both single-bit and multi-bit are applicable), the corresponding single-bit reading fidelity can be directly called from the index dictionary based on the index of the corresponding quantum bit, without the need to re-perform preparation and sampling, thereby greatly improving the optimization efficiency and having better performance in large bit scales.
[0144] On the other hand, the acquisition of the noise-containing distribution vector p noise is not limited in the above embodiments, but the present embodiment provides an optional acquisition scheme. The determination of the noise-containing distribution vector corresponding to the multi-bit reading result in step S11 specifically includes:
[0145] S11-B1: The quantum circuit corresponding to the multi-bit reading result in the quantum computer is repeatedly read multiple times, and the binary result string read each time is obtained.
[0146] S11-B2: The occurrence frequency of each different binary result string in each binary result string is counted to determine the occurrence probability of each binary result string.
[0147] S11-B3: The noise-containing distribution vector is determined according to the occurrence probability of each binary result string.
[0148] For a quantum bit string composed of k quantum bits, there are 2 k k possible binary results that can be read. Although the present embodiment does not limit the number of times of repeated reading of the quantum circuit, it can be arbitrarily selected according to actual needs. However, in general, the running number of the same circuit in the current common quantum cloud is usually not more than 10000, which leads to a new problem:
[0149] When the number of quantum bits exceeds 14, the number of quantum states that can exist in the quantum bit string exceeds 10000. At this time, it is impossible to obtain each possible quantum state through multiple repeated sampling in actual application.
[0150] To this end, the present embodiment further provides a corresponding solution, which further includes:
[0151] S11-B4: The binary result string is completed according to the theoretical reading result of the multi-bit reading result.
[0152] The occurrence frequency of the completed binary result string is 0.
[0153] S11-B5: All binary result strings are sorted.
[0154] That is, in the embodiment, the obtained binary result string is completed to avoid loss of elements in the noise-containing distribution vector. Moreover, for the part of the binary result string that needs to be completed, since it is not read in multiple repeated readings, it is side that the reading probability of the binary result string is very small and can be ignored. Therefore, in the embodiment, the statistical number of the completed binary result string can be directly assigned as 0, that is, the corresponding reading probability is 0, which simplifies the complexity of the noise-containing distribution vector p noise , that is, reduces the subsequent calculation difficulty.
[0155] In addition, after the binary result string is completed, all the binary result strings are sorted (that is, the probabilities of the binary result strings obtained in step S11-B2 are also sorted). The embodiment does not limit the order used for sorting, which can be a size order, such as from large to small or from small to large. It can also be a bit pattern characteristic, such as the number of 1s, lexicographic order, etc., which can be freely selected according to actual needs. It should be noted that one of the main purposes of the embodiment for sorting the binary result string is to adapt to the subsequent calculation of the read error response matrix R, so the sorting order can be based on the order of the matrix elements of the read error response matrix R.
[0156] In addition to the embodiment of the method for correcting the multi-qubit reading result provided in the above embodiment, the present application also provides an embodiment corresponding to a computer program product. The computer program product comprises computer programs / instructions, which, when executed by a processor, can implement the steps of the method for correcting the multi-qubit reading result as described in any of the above embodiments.
[0157] Since the embodiments of the computer program product part correspond to the embodiments of the method part, the embodiments of the computer program product part are described in the description of the embodiments of the method part, which will not be described here.
[0158] In the above embodiment, a method for correcting a multi-qubit reading result is described in detail, and the present application also provides an embodiment corresponding to a multi-qubit reading result correction device. It should be noted that the embodiments of the device part are described from two angles, one is based on the functional module angle, and the other is based on the hardware angle.
[0159] Based on the functional module angle, as shown in Figure 7 , the embodiment provides a multi-qubit reading result correction device, which comprises:
[0160] The acquisition module 11 is configured to acquire the noisy multi-bit read result of the quantum computer and determine a noisy distribution vector corresponding to the multi-bit read result and a read error response matrix.
[0161] The initialization module 12 is configured to initialize an ideal distribution vector as a vector with the same length as the noisy distribution vector but with all values being 0.
[0162] The iteration module 13 is configured to perform iteration on the ideal distribution vector with the constraint that the deviation between the noisy distribution vector corrected by the read error response matrix and the ideal distribution vector is the lowest, and obtain the ideal distribution vector iteration result at the time when the deviation is the lowest as the final ideal distribution vector.
[0163] The correction module 14 is configured to correct the noisy multi-bit read result of the quantum computer by using the ideal distribution vector.
[0164] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part are described in the description of the embodiments of the method part, and are not described here.
[0165] Figure 8 A structural diagram of a multi-qubit read result correction device provided by another embodiment of the present application is shown in FIG. 2, which includes a memory 20 configured to store a computer program. Figure 8
[0166] The processor 21 is configured to implement the steps of the multi-qubit read result correction method of any of the above embodiments when executing the computer program.
[0167] The multi-qubit read result correction device provided by the embodiment can include but is not limited to a quantum computer, any processor with data processing capability in the quantum computer, or an external processing device connected with the quantum computer, etc.
[0168] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array. The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0169] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of a multi-qubit readout result correction method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, a multi-qubit readout result correction method.
[0170] In some embodiments, a multi-qubit readout result correction device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0171] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on a multi-qubit readout result correction device and may include more or fewer components than shown.
[0172] The embodiment of the present application provides a multi-qubit reading result correction device, which comprises a memory and a processor, and the processor can realize the following method when executing the program stored in the memory: a multi-qubit reading result correction method.
[0173] Finally, the present application also provides an embodiment corresponding to a nonvolatile storage medium. The nonvolatile storage medium stores a computer program, and the computer program is executed by a processor to realize the steps recorded in the above method embodiment.
[0174] It can be understood that if the method in the above embodiment is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a nonvolatile storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and executes all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk and various program code storage media.
[0175] The above describes in detail the multi-qubit reading result correction method, device and medium provided by the present application. The embodiments in the specification are described in a progressive manner, and each embodiment mainly describes the difference from other embodiments. The same or similar parts of each embodiment can be referred to. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the related parts can be referred to the method part. It should be pointed out that for ordinary skilled in the art, without departing from the principle of the present application, the present application can be improved and modified, and these improvements and modifications also fall within the protection scope of the present application.
[0176] It also needs to be explained that in the present specification, the relational terms such as first and second and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Claims
1. A method for correcting multi-qubit readout results, characterized in that, include: Obtain noisy multi-bit readout results from a quantum computer, and determine the noisy distribution vector and readout error response matrix corresponding to the multi-bit readout results; The ideal distribution vector is initialized as a vector with the same length as the noisy distribution vector, but with all values being 0; Under a preset cutoff condition, the minimum value of the objective function is determined iteratively using gradient or non-gradient iterative methods, and the value of the ideal distribution vector when the objective function reaches its minimum value is determined as the final ideal distribution vector; The objective function is: ; R indicates reading the error response matrix; Represents the ideal distribution vector; Represents the noise-containing distribution vector; Denotes the Euclidean norm; The noisy multi-bit readout results in the quantum computer are corrected using the ideal distribution vector; The determination of the read error response matrix corresponding to the multi-bit read result includes: Obtain the single-bit read fidelity of the corresponding qubit in the multi-bit read result, and determine the matrix elements in the error response matrix through the error response matrix element calculation formula to obtain the error response matrix; The formula for calculating the elements of the error response matrix is as follows: ; Both `row` and `col` are binary strings. `row` is the row index of the matrix, representing the reading result of the multiple qubits, and `col` is the column index of the matrix, representing the actual state of the multiple qubits; R row,col The matrix element in the row-th row and column-th column of the error response matrix; k represents the number of qubits contained in the multi-bit readout result; This represents the read fidelity in the row-th row and column-th column of the single-bit read fidelity matrix for the i-th qubit.
2. The method for correcting multi-qubit readout results according to claim 1, characterized in that, The preset cutoff conditions include: The result value of the objective function is less than the first threshold in two consecutive iterations, or the number of iterations reaches the second threshold.
3. The method for correcting multi-qubit readout results according to claim 1 or 2, characterized in that, The iteration of the ideal distribution vector also includes: The minimum value of the ideal distribution vector is 0, and the maximum value is 1.
4. The method for correcting multi-qubit readout results according to claim 1, characterized in that, The calculation of the matrix elements in the error response matrix also includes: If the Hamming distance of the matrix element is greater than the third threshold, the matrix element is set to 0. The Hamming distance is the number of distinct qubits contained in the row and column indices of the matrix elements.
5. The method for correcting multi-qubit readout results according to claim 1, characterized in that, Obtaining the single-bit read fidelity of the corresponding qubit in the multi-bit read result includes: From a pre-established index dictionary, the corresponding single-bit read fidelity is retrieved by indexing the corresponding qubit. The index dictionary stores various single-bit read fidelity values corresponding to any qubit in the quantum computer.
6. The method for correcting multi-qubit readout results according to claim 5, characterized in that, The creation of the index dictionary includes: All qubits contained in the quantum computer are encoded to obtain an index corresponding to each qubit in the quantum computer, and corresponding index entries are added to a pre-built dictionary according to the index of each qubit. Obtain the single-bit readout fidelity matrix for each of the aforementioned qubits; The first single-bit read fidelity and the second single-bit read fidelity in the single-bit read fidelity matrix are stored under the corresponding index entries in the dictionary; Wherein, the first single-bit read fidelity is the read fidelity when the current quantum bit is in the |0> state and the |0> state is read; the second single-bit read fidelity is the read fidelity when the current quantum bit is in the |1> state and the |1> state is read.
7. The method for correcting multi-qubit readout results according to claim 6, characterized in that, Obtaining the single-bit read fidelity matrix includes: The current qubit is prepared as the |0> state and read repeatedly; The first single-bit read fidelity is determined based on the number of times the |0> state is read in the repeated read results; and the third single-bit read fidelity is determined based on the difference between 1 and the first single-bit read fidelity; wherein, the third single-bit read fidelity is the read fidelity when the current quantum bit is in the |0> state but the |1> state is read. The current qubit is prepared as a |1> state and read repeatedly; The second single-bit read fidelity is determined based on the number of times the |1> state is read in the repeated read results; and the fourth single-bit read fidelity is determined based on the difference between 1 and the second single-bit read fidelity; wherein, the fourth single-bit read fidelity is the read fidelity when the current quantum bit is in the |1> state but the |0> state is read.
8. The method for correcting multi-qubit readout results according to claim 1, characterized in that, Determining the noisy distribution vector corresponding to the multi-bit read result includes: The quantum circuit corresponding to the multi-bit read result in the quantum computer is repeatedly read multiple times, and the binary result string obtained each time is obtained; The occurrence frequency of each different binary result string in each binary result string is counted to determine the probability of occurrence of each binary result string; The noisy distribution vector is determined based on the occurrence probabilities of the various binary result strings.
9. The method for correcting multi-qubit readout results according to claim 8, characterized in that, After repeatedly reading the quantum circuit corresponding to the multi-bit read result in the quantum computer and obtaining the binary result string of each read, the method further includes: The binary result string is padded according to the theoretical reading result of the multi-bit reading result; wherein the number of occurrences of the padded binary result string is 0; Sort all binary result strings.
10. A multi-qubit readout result correction device, characterized in that, include: An acquisition module is used to acquire noisy multi-bit readout results from a quantum computer and determine the noisy distribution vector and readout error response matrix corresponding to the multi-bit readout results; wherein, determining the readout error response matrix corresponding to the multi-bit readout results includes: Obtain the single-bit read fidelity of the corresponding qubit in the multi-bit read result, and determine the matrix elements in the error response matrix through the error response matrix element calculation formula to obtain the error response matrix; The formula for calculating the elements of the error response matrix is as follows: ; Both `row` and `col` are binary strings. `row` is the row index of the matrix, representing the reading result of the multiple qubits, and `col` is the column index of the matrix, representing the actual state of the multiple qubits; R row,col The matrix element in the row-th row and column-th column of the error response matrix; k represents the number of qubits contained in the multi-bit readout result; This represents the read fidelity in the row-th row and column-th column of the single-bit read fidelity matrix for the i-th qubit. An initialization module is used to initialize the ideal distribution vector as a vector with the same length as the noisy distribution vector, but with all values being 0; An iterative module is used to iteratively determine the minimum value of the objective function using gradient or non-gradient iterative methods under a preset cutoff condition, and to determine the value of the ideal distribution vector when the objective function reaches its minimum value as the final ideal distribution vector; wherein, the objective function is: ; R indicates reading the error response matrix; Represents the ideal distribution vector; Represents the noise-containing distribution vector; Denotes the Euclidean norm; The correction module is used to correct noisy multi-bit reads in the quantum computer using the ideal distribution vector.
11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the multi-qubit readout result correction method as described in any one of claims 1 to 9.
12. A multi-qubit readout result correction device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the multi-qubit readout result correction method as described in any one of claims 1 to 9 when executing the computer program.
13. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a computer program, which, when executed by a processor, implements the steps of the multi-qubit readout result correction method as described in any one of claims 1 to 9.