A quantum random number post-processing method and device

Through the post-processing method of quantum random numbers in blocks, the minimum entropy lower bound and the random seed extractor are used to shorten the random seed length and processing time, solve the problem of low random number generation rate in the existing technology, and realize efficient real-time random number generate.

CN115361127BActive Publication Date: 2024-10-18INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202211017396.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2024-10-18
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

In existing quantum random number post-processing methods, the randomness extractor requires a long random seed length and overall processing of the original data, resulting in a low real-time output rate of random numbers, and random seeds are scarce resources, and information theory-safe quantum randomness The calculation time in the number post-processing method is long, which affects the random number generation rate.

Method used

By obtaining the minimum entropy lower bound of the original data generated by the quantum random number generator, processing the original data in blocks, and extracting random seeds from the last processing output of each block data, shortening the random seed length and increasing the random number generation rate, Implement online random number generation.

Benefits of technology

While ensuring the quality of random numbers, it reduces the waiting time for random number generation, shortens the length of random seeds, improves the real-time generation rate of random numbers, and can process raw data of any length, faster than offline post-processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115361127B_ABST
    Figure CN115361127B_ABST
Patent Text Reader

Abstract

The present invention provides a quantum random number post-processing method for post-processing raw data generated in real time by a quantum random number generator, the method comprising: determining the initial block data length based on the minimum entropy lower bound obtained; taking the initial block data length as the starting point, acquiring multiple block raw data with different block data lengths, and randomly extracting the random seed corresponding to each block raw data from the output after the previous block raw data of each block raw data is processed, post-processing the obtained each block raw data with its corresponding random seed to obtain the output corresponding to each block raw data, and extracting the random number corresponding to each block raw data from the output corresponding to each block raw data; splicing the multiple random numbers according to the order in which the corresponding block data are generated to obtain the final random number. The present invention improves the real-time generation rate of random numbers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum communication technologies, specifically to the field of quantum cryptography technologies, and more specifically to a method and device for post-processing quantum random numbers. Background Art

[0002] Post-processing of quantum random numbers is a very important link in the field of quantum cryptography. The effect and rate of post-processing of quantum random numbers directly affect the effect of quantum cryptography applications. The traditional method for post-processing quantum random numbers is to use a randomness extractor to purify a long but imperfect original data input into a short but approximately uniformly distributed random number. As shown in the appendix Figure 1 In the quantum random number post-processing process, as shown, the random seed and the original random data output by the quantum random number generator are input into the post-processing module (randomness extractor) for post-processing to obtain random numbers.

[0003] Currently, the randomness extractor used in the quantum random number post-processing method is mainly a Toeplitz matrix, which is a random matrix constructed by a random seed and needs to multiply the random seed with the entire original data matrix to obtain the final random number. In other words, before using the current quantum random number post-processing method, all the original data needs to be obtained first, and it is not possible to output random numbers segment by segment in real time during the generation of the original data, which belongs to an offline random number generation method.

[0004] Secondly, the random seed length required for constructing the Toeplitz matrix in the prior art is relatively long. For example, if the length of the original data for generating random numbers is n and the length of the finally output random numbers is m (m < n), then the seed length required for constructing the Toeplitz matrix is n + m - 1, which is much larger than the length of the original data. Moreover, the generation of random seeds in the prior art is restricted by a harsh environment (for example, generated by a device-independent quantum random number generator), that is, random seeds are a scarce resource.

[0005] In addition, the randomness extractor in the information-theoretically secure quantum random number post-processing method performs matrix multiplication operations after receiving all the original data, which requires a relatively long operation time, and this will also result in a relatively low rate of obtaining random numbers after post-processing the original data output by the quantum random number generator. Therefore, the post-processing algorithms adopted in the prior art with a long random seed length and an algorithm for processing the entire original data restrict the rate of real-time output of random numbers. Summary of the Invention

[0006] Therefore, the purpose of the present invention is to overcome the above-mentioned defects of the prior art and provide a method and device for post-processing quantum random numbers.

[0007] The objective of the present invention is achieved through the following technical solutions:

[0008] According to a first aspect of the present invention, a quantum random number post-processing method is provided, the method comprising: S1, obtaining a minimum entropy lower bound corresponding to original data generated by a quantum random number generator; S2, determining an initial block data length based on the minimum entropy lower bound obtained in step S1; S3, taking the initial block data length as a starting point, acquiring multiple block original data with different block data lengths according to a preset rule of increasing block data length, and determining a random seed length corresponding to each block initial data based on the minimum entropy lower bound and each block data length, and randomly extracting a random seed corresponding to each block initial data according to its corresponding random seed length from the output after the last block initial data of each block initial data is processed, post-processing the obtained each block initial data with its corresponding random seed to obtain an output corresponding to each block original data, and extracting a random number vector corresponding to each block original data from the output corresponding to each block original data; S4, splicing the multiple random number vectors according to the order in which the corresponding block original data are generated to obtain a final random number vector.

[0009] Preferably, the preset rule for increasing the data length is: the length of the next block data is the length of the previous block data plus 1.

[0010] Preferably, each time the block original data is obtained, post-processing is performed after all the original data of the current block data length is obtained.

[0011] In some embodiments of the present invention, the initial block data length in step S2 is determined by the following steps: S21, obtaining the total failure probability of a given final random number; S22, performing inverse processing on the minimum entropy lower bound obtained in step S1 and the total failure probability of the given final random number based on the following rules to determine the initial block data length:

[0012]

[0013] Among them, P is the total failure probability of the final random number, δ is the minimum entropy lower bound, and n is the length of the initial block data.

[0014] In some embodiments of the present invention, in step S3, a random seed corresponding to each block of original data is obtained through steps S31 and S32.

[0015] S31, based on the minimum entropy lower bound obtained in step S1 and the length of the current block data, the random seed length corresponding to the original data of the current block is calculated using the following formula:

[0016]

[0017] Among them, s l is the length of the current random seed, n l is the length of the current block data, and δ is the minimum entropy lower bound.

[0018] S32, randomly extracting data of the current random seed length from the output after the previous block raw data of the current block raw data is processed as the random seed required for the current block raw data to be post-processed. It should be noted that in step S32, if the first block raw data is post-processed, the given initial random seed is used.

[0019] In some embodiments of the present invention, step S3 also includes: S33, using an extractor to calculate the random seed corresponding to the current sub-block original data and the obtained current sub-block original data in step S3, to obtain the output of the current sub-block original data after processing; S34, calculating the random number length corresponding to the current sub-block original data according to the minimum entropy lower bound obtained in step S1 and the current block data length; S35, randomly extracting data of the random number length corresponding to the current sub-block original data from the output after the current sub-block original data is processed as the random number vector corresponding to the current sub-block original data.

[0020] In some embodiments of the present invention, in step S34, the random number length corresponding to the original data of the current sub-block is calculated based on the following formula:

[0021]

[0022] Among them, r l is the random number length corresponding to the original data of the current block, n l is the length of the current block data, and δ is the minimum entropy lower bound.

[0023] In some embodiments of the present invention, the number of block divisions of the block original data in step S3 is obtained through the following steps: T1, obtaining the length of the given final random number; T2, based on the length of the given final random number obtained in step T1, inversely solving the number of block divisions according to the increasing rule of the block data length and the initial block data length.

[0024] According to a second aspect of the present invention, a quantum random number processing device is provided, comprising a quantum random number generator and a post-processing module, wherein the post-processing module is configured to post-process original data generated by the quantum random number generator using a quantum random number processing method provided in the first aspect to obtain a corresponding random number.

[0025] Compared with the prior art, the advantages of the present invention are: the quantum random number post-processing method provided by the present invention reduces the waiting time for obtaining all the original random data in the post-processing in the existing scheme for generating the final random number while ensuring the quality of the final random number, and the length of the random seed required in the whole process of quantum random number post-processing is constant (that is, when the first block original data is post-processed in the block processing process, after using the initial random seed, the random seed required for the subsequent block original data to be post-processed is extracted from the output of the previous block original data being post-processed, and no additional random seed needs to be input). Therefore, the present invention can process original data of any length, and can improve the real-time generation rate of random numbers compared to offline post-processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The embodiments of the present invention are further described below with reference to the accompanying drawings, in which:

[0027] Figure 1 A schematic diagram of quantum random number post-processing according to an embodiment of the present invention;

[0028] Figure 2 A schematic diagram of a process of a quantum random number post-processing method according to an embodiment of the present invention;

[0029] Figure 3 Schematic diagram of the operation of an extractor according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail by specific embodiments below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0031] As mentioned in the background technology part, the quantum random number post-processing method in the prior art uses a longer random seed length and processes the original data as a whole, which restricts the rate of real-time output of random numbers. In order to solve the above problems, the present invention proposes a quantum random number post-processing scheme by shortening the random seed and processing the original data in blocks. In the process of studying the existing quantum random number post-processing algorithm, the inventor found that the fastest way to generate original random numbers is a quantum random number scheme based on measuring the phase fluctuations of the laser. The original random numbers generated by this random number scheme have a reverse block source property, and the minimum entropy lower bound of the original random number can be calculated by this property. In short, this property of the original random number makes it feasible to use an extractor to extract random numbers from part of the data (blocked original data) in the original random number, and does not affect the properties of the final random number. Based on this characteristic of the original random number, the present invention proposes a random number post-processing method that constructs a suitable random seed and block data length through the minimum entropy lower bound of the original random number to process the original random number in real time, effectively improving the rate of real-time output of random numbers by the quantum random number post-processing method. In summary, if Figure 2As shown, a quantum random number post-processing method of the present invention is used for post-processing the original data generated in real time by a quantum random number generator, and the method includes: S1, obtaining the minimum entropy lower bound corresponding to the original data generated by the random number generator; S2, obtaining the initial block data length based on the minimum entropy lower bound obtained in step S1 and a preset rule; S3, taking the initial block data length obtained in step S2 as the starting point, obtaining multiple block original data with different data lengths according to a preset data length increasing rule, and determining the random seed length corresponding to each block original data based on the minimum entropy lower bound obtained in step S1 and the length of each block data, and randomly extracting the random seed corresponding to each block original data according to the random seed length from the output after the previous block original data of each block original data is processed, post-processing the obtained block data each time with its corresponding random seed to obtain the output corresponding to each block original data, and randomly extracting the random number vector corresponding to each block original data from the output corresponding to each block original data; S4, splicing the multiple random number vectors according to the order in which the corresponding block original data are generated to obtain the final random number vector. Therefore, the present invention processes the raw data generated by the quantum random number generator in real time in blocks in sequence, thereby improving the random number generation rate. It should be further pointed out that in the process of generating random numbers in the present invention, each time the block raw data is obtained, the length of the current block raw data obtained reaches the corresponding length, and then post-processing will be performed. In other words, the present invention belongs to an online algorithm, which reduces the waiting time of the generated raw data and shortens the total post-processing time of the raw data. Each step is described in detail below.

[0032] In step S1, the minimum entropy lower bound corresponding to the original data generated by the quantum random number generator is obtained. It should be noted that the minimum entropy lower bound corresponding to the original data generated by the quantum random number generator is calculated based on the properties of the random numbers generated by the quantum random number generator, and can be calculated before the quantum random number post-processing provided by the present invention. During the quantum random number post-processing process, the total failure probability of the final random number can be obtained through a simple data acquisition operation, which is known to those skilled in the art and will not be described in detail here. Specifically, the minimum entropy lower bound corresponding to the original data generated by the quantum random number generator is calculated based on the reverse block source (reverse blocksource) property of the original data generated by the quantum random number generator. As described in the background technology, the original data generated by the quantum random number generator has a reverse block source (reverse block source) property, then:

[0033] H min (X i |X i+1 =x i+1 ,Xi+2 =x i+2 ,…X t =x t )≥δ (1)

[0034] Among them, H min (*) is the minimum entropy function, x t is the value of the random variable representing the original data obtained by t rounds of sampling, δ is the minimum entropy lower bound, and the original data is represented as a random variable Then, by solving the formula (1) satisfied by the minimum entropy lower bound δ, the minimum entropy lower bound is obtained. It should be further explained that it is known in the art that the quantum random number generator has the function of generating original random numbers. Based on the properties of the random numbers generated by it, the minimum entropy lower bound can be calculated. The sampling rounds of the original data involved in the calculation process are set according to the experimental purpose. The length of the original data in solving the minimum entropy lower bound is not limited or elaborated here.

[0035] In step S2, the initial block data length is obtained based on the minimum entropy lower bound and a preset rule. According to one embodiment of the present invention, the initial block data length is obtained through steps S21 and S22:

[0036] S21, obtaining the total failure probability of the given final random number. Before the quantum random number post-processing, the total failure probability of the final random number is given and stored, and then during the quantum random number post-processing, the total failure probability of the final random number can be obtained through a simple data acquisition operation, which is known to those skilled in the art and will not be described in detail here.

[0037] S22, the minimum entropy lower bound obtained in step S1 and the total failure probability of the given final random number are reversed based on the following rules to determine the initial block data length:

[0038]

[0039] Wherein, P is the total failure probability of the final random number, δ is the minimum entropy lower bound, and n is the initial block data length. The present invention calculates the initial block data length by the total failure probability of the final random number and the minimum entropy lower bound, so that the initial block data length can reasonably improve the calculation rate of the final random number while meeting the requirements.

[0040] In step S3, taking the initial block data length obtained in step S2 as the starting point, multiple block original data are obtained with different block data lengths according to the preset data length increasing rule, and the random seed lengths corresponding to the multiple block data are determined based on the minimum entropy lower bound obtained in step S1 and the multiple block data lengths, and the random seeds corresponding to each block original data are randomly extracted from the output after the previous block original data of each block original data is processed according to the corresponding random seed length, and the obtained each block original data and its corresponding random seed are post-processed to obtain the output corresponding to each block original data, and the random number vector corresponding to each block original data is randomly extracted from the output corresponding to each block original data.

[0041] According to an embodiment of the present invention, in step S3, the random seed corresponding to each block of original data is obtained through the following steps S31 and S32.

[0042] S31, using the minimum entropy lower bound obtained in step S1 and the length of the current block data, calculate the random seed length corresponding to the original data of the current block using the following rules:

[0043]

[0044] Among them, s l is the length of the current random seed, n l is the length of the current block data, and δ is the minimum entropy lower bound.

[0045] S32, randomly extracting data of the current random seed length from the output (target data string) of the previous processed block original data of the current block original data as the random seed required for the post-processing of the current block original data. For example, assuming that the current block original data is the 5th block original data, then: the previous block original data of the current block original data is the 4th block original data, the random seed required for the post-processing of the current block original data is the random seed required for the post-processing of the 5th block original data, and the output of the previous processed block original data of the current block original data is: the 4th block original data and the random seed required for the post-processing of the 4th block original data are directly output after post-processing, and the random seed length corresponding to the current block original data is the random seed length required for the post-processing of the 5th block original data. (Where the phrase “output from the last processed original data of the block” appears in the text, if there is no other explanation, it shall be understood in the manner here, and no further elaboration shall be made elsewhere) It needs to be further explained that: if the original data of the first block is post-processed, a given initial random seed is used, wherein the given initial random seed is randomly extracted from the post-processed output of other existing quantum random number generators according to the required length. The random seed may be randomly extracted in any manner to extract a data string of a corresponding length of the random seed from the corresponding target data string as the random seed. If the target data string is a bit string 101 of length 3, and if the length of the random seed is 2, the extracted random seed may be 10, 11 or 01 (where the phrase “random extraction” appears in the text, it shall be understood in the manner here, and no further elaboration shall be made elsewhere). According to one embodiment of the present invention, step S3 also includes:

[0046] S33. Use an extractor to calculate the random seed corresponding to the current sub-block original data and the obtained current sub-block original data in step S3, and obtain the processed output of the current sub-block original data (for example, if the current time is the 5th time, the current sub-block original data is a block data block formed by the 5th sub-block original data).

[0047] S34, according to the minimum entropy lower bound obtained in step S1 and the length of the current block data, the random number length corresponding to the original data of the current block is calculated using the following rules:

[0048]

[0049] Among them, r l is the random number length corresponding to the original data of the current block, n l is the length of the current block data, and δ is the minimum entropy lower bound.

[0050] S35. Randomly extract data of a random number length corresponding to the original data of the current sub-block from the processed output of the original data of the current sub-block as the random number corresponding to the original data of the current sub-block.

[0051] According to one embodiment of the present invention, the number of block divisions of the block original data in step S3 is calculated by the following steps: T1, obtaining the length of the given final random number; T2, based on the length of the given final random number obtained in step T1, the number of block divisions is obtained by inversely solving the increasing rule of the length of the block data and the length of the initial block data. Before the post-processing of the quantum random number, the length of the final random number to be generated is given and stored, and then in the post-processing of the quantum random number, the length of the given final random number can be obtained through a simple data acquisition operation, which is known to those skilled in the art and will not be described in detail here. According to an example of the present invention, it is assumed that by solving the formula (1) that satisfies the minimum entropy lower bound δ, the minimum entropy lower bound δ=1 / 25 is obtained, and it is assumed that the total failure probability of the final random number P=0.014, and then the inverse solution is performed based on the above formula 2 to determine that the initial block data length is 100 (it should be noted that when the initial block data length obtained is a decimal, it is necessary to round up the initial block data length obtained to obtain the initial block data length. The rounding operation is a technology known to those skilled in the art and will not be repeated here). Therefore, the increasing rule of the block data length is 100, 101, ... 100+r-1, where r is the number of blocks, and the relationship between the length of the final random number (the length of the final random number is assumed to be 1000) and the number of blocks is:

[0052] (100+100+r-1)r / 2=1000 (3)

[0053] Then, Formula 3 is solved to obtain a positive solution r. If the positive solution is not an integer, the value of the positive solution is rounded up as the number of blocks r. In the example here, after solving Formula (3), r=9.57 is obtained, and after rounding up, the final r=10.

[0054] The following is a detailed description of the solution recorded in step S3 of the quantum random number post-processing method provided by the present invention in conjunction with a specific example. According to an example of the present invention, Figure 3 As shown, S0, S1, S l-1 The random seed lengths of the original data of the first block to the original data of the lth block are shown in the figure. are the random seeds required for post-processing of the original data of the first block to the original data of the lth block), n, n+1, ..., n+l-1 are the block data lengths of the original data of the first block to the lth block, and n is the initial block data length (according to one embodiment of the present invention, the preset rule of increasing data length is: the length of the next block data is the length of the previous block data plus 1. It should be noted that the rule of increasing the length of the block data is not limited to this. Different length increasing rules can be adopted according to the specific scenario of the application, such as adding 2, adding 3, etc. in sequence). It should be noted that the length of the block data not shown in the figure is not limited to this. They are the random number vectors output by post-processing from the original data of the first block to the original data of the lth block, respectively. Ext is an extractor, wherein the extractor can use the Toeplitz matrix or be replaced by any quantum-proof strong extractor. In the present invention, a real-time online processing method is adopted, and post-processing begins each time the original data of the corresponding block data length is obtained in real time, without paying attention to whether subsequent random numbers are generated. For example, the post-processing of the original data of the first block is to start the following processing when the original random number obtained reaches the initial block data length n: Based on the calculated minimum entropy lower bound δ and the first block data length (initial block data length) n, the following rule is used to calculate the first random seed length The present invention extracts the data of the first random seed length s0 in any way as the first block original data corresponding to the given initial random seed Then the original data with the block data length equal to the initial block data length n and the initial random seed given by the first block original data are obtained. Input the extractor and get the output of the extractor for the first block of raw data Then in any way The length of random extraction is The data is used as the random number vector corresponding to the original data of the first block Starting from the second processing of the original block data, the random seeds required for the subsequent post-processing of the original block data are extracted from the output of the previous post-processing of the original block data, and no additional random seeds need to be input. Each time (represented by the jth time, j is an integer greater than or equal to 1) the block data calculation is when the original random number obtained reaches the length n+j of the original block data of this time, the same rule is used to calculate the jth random seed length based on the calculated minimum entropy lower bound δ and the current block data length n+j: The present invention uses any method to output the original data corresponding to the last block The length of the randomly extracted data is s jThe data is used as the random seed for the jth block original data calculation. Thus, the random seed required for each block data in the post-processing algorithm is randomly extracted from the output after the last block original data is processed, so that the length of the random seed required in the whole process of quantum random number post-processing is constant (that is, only when the first block original data is processed, the given initial random seed is input), which greatly reduces the length of the random seed and is not dependent on the overall length of the original data.

[0055] In step S4, the obtained multiple random number vectors are concatenated in the order in which the corresponding block original data are generated to obtain the final random number vector. According to one embodiment of the present invention, the random number vector corresponding to each block original data is obtained according to the above steps. When the number of block calculations in the original data post-processing reaches the maximum number of block calculations l, the random number vector Combine the final random numbers in the form of matrix splicing It should be further explained that when the method provided by the present invention processes raw data of any length, the final random number

[0056] According to an example of the present invention, the algorithm pseudo code for implementing the method of the present invention is shown in Table 1.

[0057] Table 1

[0058]

[0059] It can be seen from the pseudo code in Table 1 that, compared with the random seed used in the background technology, the method of the present invention shortens the seed length, the random seed length is constant, and the original random number data is divided into blocks for post-processing, which is independent of the overall length of the original data, thereby improving the random number generation rate.

[0060] In order to better illustrate the technical effect of the present invention, the present invention is analyzed and verified from the following two aspects (the rate of generating random numbers of the present invention and the uniform distribution quality of the final random numbers generated by the present invention).

[0061] 1. The rate of generating random numbers of the present invention

[0062] Through the introduction of the above specific embodiments, it can be seen that the scheme of generating the final random number of the present invention is a scheme for generating random numbers online, that is, the original random data is divided into blocks for original data calculation, and the random number corresponding to the block original data is output in real time, wherein, after the initial random seed required for the first block original data to be post-processed is randomly extracted from the first block original data during the block processing process, the random seed required for the post-processing of the subsequent block original data is extracted from the output of the previous block original data to be post-processed, and no additional seed is required. When the data in the block original data reaches the corresponding data length, the block data and its corresponding random seed are input into the extractor for post-processing, and the random number corresponding to the block data is output in real time (when the matrix is ​​spliced, the random number is expressed as a random number vector). The scheme of generating the final random number online in the present invention at least reduces the waiting time for obtaining all the original random data in the existing scheme for generating the final random number in the post-processing, and improves the real-time generation rate of random numbers; because the random seed length required in the whole process of quantum random number post-processing in the present invention is constant, the demand for random seeds is greatly reduced.

[0063] 2. Uniform distribution quality of the final random numbers generated by the present invention

[0064] Regarding the uniform distribution quality of the final random numbers generated by the present invention, those skilled in the art know that the final random numbers generated must meet the requirements of approximate uniform distribution. Therefore, as long as it is proved that the final random numbers generated by the present invention meet the requirements of approximate uniform distribution, it can be shown that the uniform distribution quality of the random numbers generated by the present invention meets the requirements.

[0065] Mathematically speaking, it only needs to be proved that when the length n1 of the first block of data in the original random data in the present invention is large enough, the random number generated by the present invention is The distance between the uniform distribution and the random number can be arbitrarily small, that is, the final random number generated by the present invention can be arbitrarily close to the uniform distribution, satisfying the uniform distribution quality of the final random number in the art. Arbitrary approximation here means decaying at an exponential rate with n1. The following is an overview of the uniform distribution quality proof process of the final random number generated by the present invention.

[0066] This proof is based on mathematical induction. Let the number of blocks from which random numbers have been extracted be k. First, k = 0 obviously satisfies the requirement of arbitrarily small distance from uniform distribution. Assume that the random numbers generated in the first k times (assuming ) and the uniform distribution distance satisfies

[0067]

[0068] where ||·|| represents the distance between two quantum states, η krepresents the total length of random numbers extracted in the first k rounds, E represents the quantum system of the eavesdropper, and the subscript I k+1:∞ It means the original data from the k+1th block to infinite blocks. is a random source from k+1 blocks to infinite blocks, is the seed required for k+1 blocks, is the quantum state corresponding to the extraction of the first k blocks, η k is the sum of the lengths of random numbers extracted from the first k blocks, η k +S k+1 It is the length of the random number after the first k blocks are extracted plus the seed length required for k+1 blocks. is the corresponding quantum state, which is a maximum mixed state. is the joint quantum state of the unextracted part and the eavesdropper system, is the direct product operation, n l is the length of the current block data, δ is the minimum entropy lower bound, is the direct product of the two quantum states mentioned above, The failure probability of random extraction. Next, we extract the k+1th segment of original data, then we can get

[0069]

[0070] This is because the randomness extractor can be viewed as a trace-preserving quantum operation, in which the distance between two quantum states does not increase. Considering the properties of the randomness extractor itself, we have

[0071]

[0072] in, is the quantum state corresponding to the extraction of the k+1 segment, is the joint quantum state of the maximal mixed state, the unextracted part and the eavesdropper system, is the failure probability of a random extraction. The failure probability of a random extraction is set to the negative exponent of the minimum entropy, and the two quantum states in formula (6) are respectively Do the direct product and we get

[0073]

[0074] Combining formula (5) and (7), we can obtain using the triangle inequality:

[0075]

[0076] Using the geometric series summation, the right side of formula (8) satisfies

[0077]

[0078] Among them, k is the number of blocks, n1 is the length of the initial block data, δ is the minimum entropy lower bound, and Δ is the length of each increase when the original data is blocked.

[0079] It can be seen that as the initial block data length n1 increases, the upper limit value of formula (9) It can be arbitrarily small, that is, the distance between the random numbers generated in the first k+1 times and the uniform distribution meets the quality requirements. That is, the distance between the random numbers generated by the present invention and the uniform distribution can be arbitrarily small, which shows that the random numbers generated by the present invention meet the approximate uniform distribution.

[0080] In summary, the quantum random number post-processing method provided by the present invention reduces the waiting time for obtaining all the original random data in the post-processing in the existing scheme for generating the final random number while ensuring the quality of the final random number, and the length of the random seed required in the whole process of quantum random number post-processing is constant (that is, after the initial random seed required for the first block original data to be post-processed is extracted from the first block original data in the block processing process, the random seed required for the subsequent block original data to be post-processed is extracted from the output of the previous block original data to be post-processed, and no additional seed needs to be input). Therefore, the present invention can process original data of any length, and can improve the real-time generation rate of random numbers compared to offline post-processing.

[0081] It should be noted that although the above describes the various steps in a specific order, it does not mean that the various steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently or even in a different order as long as the required functions can be achieved.

[0082] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0083] Computer readable storage medium can be a tangible device that holds and stores instructions used by an instruction execution device. Computer readable storage medium can include, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof.

[0084] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A quantum random number post-processing method for post-processing raw data generated in real time by a quantum random number generator, characterized in that: The method comprises: S1. Obtain the minimum entropy lower bound corresponding to the original data generated by the quantum random number generator; S2, determining the initial block data length based on the minimum entropy lower bound obtained in step S1; wherein the initial block data length in step S2 is obtained by the following steps: S21, obtaining the total failure probability of a given final random number; S22, the minimum entropy lower bound obtained in step S1 and the total failure probability of the given final random number are reversed based on the following rules to determine the initial block data length: Among them, P is the total failure probability of the final random number, δ is the minimum entropy lower bound, and n is the length of the initial block data; S3, starting from the initial block data length, acquiring multiple block original data with different block data lengths according to the preset data length increasing rule, and determining the random seed length corresponding to each block original data based on the minimum entropy lower bound and each block data length, and randomly extracting the random seed corresponding to each block original data according to the length of its corresponding random seed from the output after the previous block original data of each block original data is processed, post-processing the obtained each block original data and its corresponding random seed to obtain the output corresponding to each block original data, and extracting the random number vector corresponding to each block original data from the output corresponding to each block original data; wherein, each time the block original data is acquired, the post-processing starts after all the original data of the current block data length is obtained; when the first block original data is post-processed, the given initial random seed is used; wherein, the random seed corresponding to each block original data is obtained by the following steps: S31, based on the minimum entropy lower bound obtained in step S1 and the length of the current block data, the random seed length corresponding to the original data of the current block is calculated using the following formula: Among them, s l is the length of the current random seed, n l is the length of the current block data, δ is the minimum entropy lower bound; S32, randomly extracting data of the current random seed length from the output of the previous processed original block data of the current original block data as the random seed required for the post-processing of the original block data of the current original block; S4. Concatenate the multiple random number vectors according to the order in which the corresponding block original data are generated to obtain a final random number vector.

2. The method according to claim 1, characterized in that The preset rule for increasing the data length is: the length of the next block data is the length of the previous block data plus 1.

3. The method according to claim 1, characterized in that The step S3 further comprises: S33, using an extractor to calculate the random seed corresponding to the current sub-block original data and the obtained current sub-block original data in step S3, to obtain an output after the current sub-block original data is processed; S34, calculating the random number length corresponding to the original data of the current block according to the minimum entropy lower bound obtained in step S1 and the length of the current block data; S35. Randomly extract data of a random number length corresponding to the original data of the current sub-block from the processed output of the original data of the current sub-block as a random number vector corresponding to the original data of the current sub-block.

4. The method according to claim 3, characterized in that: In step S34, the random number length corresponding to the original data of the current sub-block is calculated based on the following formula: Among them, r l is the random number length corresponding to the original data of the current block, n l is the length of the current block data, and δ is the minimum entropy lower bound.

5. The method according to claim 1, characterized in that: The number of block calculations of the block original data in step S3 is obtained by the following steps: T1. Get the length of the given final random number; T2. Based on the given final random number length, reverse the block number according to the increasing rule of the block data length and the initial block data length.

6. A quantum random number processing device, comprising a quantum random number generator and a post-processing module, characterized in that: The post-processing module is configured to post-process the original data generated by the quantum random number generator using the method described in any one of claims 1 to 5 to obtain a corresponding random number.

7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program can be executed by a processor to implement the steps of any method described in claims 1 to 5.

8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the steps of the method as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • High-speed real-time random number processor and implementing method thereof

    CN106155629A

  • Method for achieving high-speed random extraction in random number generator

    CN108319448A

  • Method of real-time high-speed quantum random number generation based on chaos amplifying quantum noise

    US20210385064A1

  • Method for upgrading apparatus, device, and configuration point

    WO2017190547A1

  • Random number generator

    WO2021224605A1