Efficient post-processing method and system for reducing quantum random number bias

By splitting and sliding window comparison of the original random sequence of the quantum random number generator, combined with the use of permutation alternative sequences, the bias problem existing in the post-processing process of the quantum random number generator is solved, and efficient and real-time random number generation is achieved.

WO2025093045A1PCT designated stage expired Publication Date: 2025-05-08CHINA TELECOM QUANTUM TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/131223
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-31
Filing Date
2024-11-11
Publication Date
2025-05-08

AI Technical Summary

Technical Problem

The existing quantum random number generator has bias problems during post-processing, resulting in insufficient randomness and low generation rate.

Method used

By splitting the original random sequence generated by the quantum random source into multiple subsequences, and aligning and replacing them using sliding windows and permutation alternative sequences, unrepeated subsequences or permutation sequences are output to break the autocorrelation of the original random sequence.

Benefits of technology

It effectively reduces the bias of random numbers, improves the random random number generation rate, and realizes real-time output, without occupying a large amount of space for storage and preprocessing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024131223_08052025_PF_FP_ABST
    Figure CN2024131223_08052025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses an efficient post-processing method and system for reducing quantum random number bias. The method comprises: splitting an original random sequence generated by a quantum random source into a plurality of sub-sequences; traversing the plurality of sub-sequences, and for the traversed current sub-sequence, using a sliding window to cover sub-sequences before the current sub-sequence, and comparing the current sub-sequence with the sub-sequences in the sliding window one by one; when there is no duplication between the current sub-sequence and the sub-sequences in the sliding window, outputting the current sub-sequence; and when there is a duplication between the current sub-sequence and the sub-sequences in the sliding window, selecting a replacement sequence from replacement alternative sequences to replace the current sub-sequence, and outputting the replacement sequence. According to the present application, on the basis of a sliding window algorithm, sub-sequences obtained by splitting the original random sequence are replaced, the autocorrelation of the original random sequence is overcome, and random numbers having reduced bias and improved randomness are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Efficient post-processing method and system for reducing quantum random number bias

[0001] This application claims priority to a Chinese patent application filed with the Patent Office of China on October 31, 2023, with application number 202311424429.9 and invention name “Efficient post-processing method and system for reducing quantum random number bias”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the technical field of quantum random number post-processing, and in particular to an efficient post-processing method and system for reducing quantum random number bias. Background Art

[0003] The unpredictability of random numbers makes them widely used in various fields such as cryptography, simulation, and statistical research. The randomness of random numbers directly affects the security, effectiveness, and fairness of the application process.

[0004] A quantum random number generator (QRNG) is a physical random number generator that generates random numbers based on the principles of quantum mechanics. The fundamental principle of uncertainty in quantum mechanics guarantees the absolute randomness of a QRNG. Because the implementation of a quantum random source may involve device imperfections and non-uniform electronic noise introduced by the circuits, QRNGs typically use post-processing methods to extract randomness from the original random sequence. Currently, the post-processing methods used by QRNGs are generally quantum-proven, unconditionally secure extractors: the Toeplitz matrix-based universal 2-hash function and the Trevisan extractor. Both types of extractors require an additional random number seed to construct the random matrix. To prevent attackers from inverting the post-processing, the random number seed must be regularly replaced, which consumes a large amount of generated random numbers and significantly reduces the final random number generation rate.

[0005] In the related art, a possible design proposed in patent application publication number CN110472739A avoids the use of a Toeplitz matrix. However, forward encoding requires a pre-set random number encoding table, and forward encoding is generated based on the proportion of subsequences. This requires storage and evaluation of the entire random number sequence, which takes up a large amount of storage space and cannot output random numbers in real time. Patent application publication number CN116107541A uses a preset pseudo-random source to scramble the input entropy data, encrypts the calculated entropy data, and then adjusts the data order through permutation. Finally, a new pseudo-random source is introduced to the permuted entropy data for scrambling. This solution requires a true random number generator to rely on a pseudo-random source to generate random numbers and uses the SM4 algorithm as the encryption algorithm. This has high computational complexity and affects the random number output rate.

[0006] Summary of the Invention

[0007] The technical problem to be solved by this application is how to obtain a random number with reduced bias and improved randomness.

[0008] This application solves the above technical problems through the following technical means:

[0009] In a first aspect, the present application proposes an efficient post-processing method for reducing quantum random number bias, the method comprising:

[0010] Split the original random sequence generated by the quantum random source into multiple subsequences;

[0011] Traverse multiple subsequences, and for the current subsequence traversed, use a sliding window to cover the subsequence before the current subsequence, and compare the current subsequence with the subsequences in the sliding window one by one;

[0012] When the current subsequence does not repeat with the subsequence in the sliding window, output the current subsequence;

[0013] When the current subsequence is repeated with the subsequence in the sliding window, a replacement sequence is selected from the replacement candidate sequence to replace the current subsequence, and the replacement sequence is output.

[0014] Furthermore, the process of splitting the original random sequence generated by the quantum random source into multiple subsequences includes:

[0015] The original random sequence is split into multiple subsequences of length m, and the subsequences do not overlap.

[0016] Furthermore, the length m is ≥ 3 and is an odd number.

[0017] Furthermore, the initial length of the sliding window is a subsequence length;

[0018] When traversing to the first subsequence, the sliding window is empty and the first subsequence is output directly;

[0019] When traversing to the second subsequence, the sliding window covers the first subsequence.

[0020] Furthermore, after outputting the current subsequence when the current subsequence and the subsequence in the sliding window do not overlap, or after selecting an alternative subsequence from the replacement candidate sequence to replace the current subsequence when the current subsequence and the subsequence in the sliding window overlap, and outputting the alternative subsequence, the method further includes:

[0021] Traversing to the next subsequence as the current subsequence, and determining whether the length of the sliding window has reached the maximum;

[0022] If not, the length of the sliding window is increased by a set bit to cover the previous subsequence of the current subsequence;

[0023] If so, the sliding window is slid backward by a set number of bits, where the set number of bits is the same as the subsequence length.

[0024] Furthermore, the maximum length of the sliding window is l,2 m-1 <l<2 m-1 +2 m-2 , m is the length of the subsequence.

[0025] Furthermore, the replacement candidate sequence is a sequence of size 2 m A circular queue, wherein each element in the replacement candidate sequence is a binary number with a length of m.

[0026] Furthermore, when the current subsequence is repeated with the subsequence in the sliding window, selecting a replacement sequence from the replacement candidate sequence to replace the current subsequence, and outputting the replacement sequence, includes:

[0027] Determining whether a replacement sequence located at a replacement starting position in the replacement candidate sequence is repeated with a subsequence in the sliding window;

[0028] If yes, determining whether the next replacement sequence at the replacement starting position is repeated with the subsequence in the sliding window;

[0029] If not, the current subsequence is replaced with the replacement sequence located at the replacement starting position, and the replacement sequence is output.

[0030] Furthermore, during the initial replacement, the starting sequence of the replacement candidate sequence is used as the replacement starting position.

[0031] Furthermore, after completing at least one permutation, the next permutation sequence of the permutation sequence selected by the current permutation is used as the permutation starting position.

[0032] In a second aspect, the present application proposes an efficient post-processing system for reducing quantum random number bias, the system comprising:

[0033] Sequence splitting module, used to split the original random sequence generated by the quantum random source into multiple subsequences;

[0034] The traversal comparison module is used to traverse multiple subsequences and, for the current subsequence traversed, use a sliding window to cover the subsequence before the current subsequence, and compare the current subsequence with the subsequences in the sliding window one by one;

[0035] The sequence output module is used to output the current subsequence when the current subsequence does not repeat with the subsequence in the sliding window; and when the current subsequence does repeat with the subsequence in the sliding window, select a replacement sequence from the replacement candidate sequence to replace the current subsequence and output the replacement sequence.

[0036] In a third aspect, the present application proposes a computing processing device, which includes: a memory storing computer-readable code; and one or more processors. When the computer-readable code is executed by one or more processors, the computing processing device executes the efficient post-processing method for reducing quantum random number bias proposed in the first aspect above.

[0037] In a fourth aspect, the present application proposes a computer program comprising a computer-readable code. When the computer-readable code is run on a computing processing device, the computing processing device is caused to execute the efficient post-processing method for reducing quantum random number bias proposed in the first aspect above.

[0038] The advantages of this application are:

[0039] (1) This application combines the implementation principle of the sliding window algorithm with the replacement idea of ​​the least recently used algorithm to split the original random sequence output by the quantum random source. When the current subsequence traversed is repeated with the subsequence in the sliding window, a replacement sequence is selected from the replacement candidate sequence to replace the current subsequence. By sequence replacement, the autocorrelation of the original random sequence is broken, and a random number with reduced bias and improved randomness is obtained. In addition, the random number sequence is processed by streaming operation, which does not require a large amount of space to store and preprocess the random numbers. There is no mathematical operation in the processing process, and the random number can be output in real time.

[0040] (2) Since the lengths of the multiple subsequences obtained by splitting the original random sequence are set to odd numbers, the situation where there is a large frequency gap between 0 and 1 in the original sequence can be effectively adjusted.

[0041] (3) This application is an online algorithm, which reduces the waiting time of the generated raw data, shortens the total post-processing time of the raw data, does not require a random seed, and improves the generation rate of random numbers.

[0042] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] FIG1 is a flow chart of an efficient post-processing method for reducing quantum random number bias according to an embodiment of the present application;

[0044] FIG2 is a schematic diagram of a random number post-processing process in one embodiment of the present application;

[0045] FIG3 is a schematic diagram of a sliding window comparison and replacement process in one embodiment of the present application;

[0046] FIG4 is a schematic diagram of a replacement alternative sequence in one embodiment of the present application;

[0047] FIG5 is a schematic diagram of a random sequence processing process according to an embodiment of the present application;

[0048] FIG6 is a schematic diagram of the structure of an efficient post-processing system for reducing quantum random number bias according to an embodiment of the present application;

[0049] FIG7 is a schematic diagram of the structure of a computing and processing device for an efficient post-processing method for reducing quantum random number bias proposed in an embodiment of the present application;

[0050] FIG8 is a schematic diagram of the structure of a computer program for an efficient post-processing method for reducing quantum random number bias proposed in an embodiment of the present application. Specific embodiments

[0051] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0052] As shown in FIG1 , an embodiment of the present application discloses an efficient post-processing method for reducing quantum random number bias, the method comprising the following steps:

[0053] S10, splitting the original random sequence generated by the quantum random source into multiple subsequences;

[0054] It should be noted that this embodiment obtains an original binary random sequence generated by a quantum random source, and then splits the original binary random sequence into multiple subsequences of length m.

[0055] S20, traversing multiple subsequences, and for the traversed current subsequence, using a sliding window to cover the subsequence before the current subsequence, and comparing the current subsequence with the subsequences in the sliding window one by one;

[0056] S30, when the current subsequence does not repeat with the subsequence in the sliding window, output the current subsequence;

[0057] S40: When the current subsequence is repeated with the subsequence in the sliding window, a replacement sequence is selected from the replacement candidate sequence to replace the current subsequence, and the replacement sequence is output.

[0058] It should be noted that this embodiment processes each split subsequence using a streaming operation. For each traversed subsequence, a sliding window algorithm is combined to determine the subsequence that needs to be replaced. This does not require a large amount of space to store and preprocess the random numbers, and the processing process does not require any mathematical operations, and random numbers can be output in real time. In addition, the sequence replacement breaks the autocorrelation of the original random sequence, thereby obtaining random numbers with reduced bias and improved randomness.

[0059] In one embodiment, the step S10 of splitting the original random sequence generated by the quantum random source into multiple subsequences is specifically as follows:

[0060] The original random sequence is split into n subsequences of length m, with no overlap between the subsequences.

[0061] In one embodiment, the length m is ≥ 3 and is an odd number.

[0062] In this embodiment, the subsequence length is set to an odd number, which can effectively adjust the situation where there is a large frequency difference between 0 and 1 that may exist in the original random sequence.

[0063] In one embodiment, the initial length of the sliding window is a subsequence length;

[0064] When traversing to the first subsequence, the sliding window is empty and the first subsequence is output directly;

[0065] When traversing to the second subsequence, the sliding window covers the first subsequence.

[0066] It should be noted that the sliding window comparison starts from the second subsequence. At this time, the sliding window only covers the sequence before the subsequence. If the second subsequence is different from the first subsequence in the sliding window, the second subsequence is directly output. If the second subsequence is repeated with the first subsequence in the sliding window, a sequence that does not repeat the first subsequence is selected from the replacement alternative sequences to replace the second subsequence, and the replaced subsequence is output.

[0067] In one embodiment, after step S30 or step S40, the method further includes the following steps:

[0068] Traversing to the next subsequence as the current subsequence, and determining whether the length of the sliding window has reached the maximum;

[0069] If not, the length of the sliding window is increased by a set bit to cover the previous subsequence of the current subsequence;

[0070] If so, the sliding window is slid backward by a set number of bits, where the set number of bits is the same as the subsequence length.

[0071] Specifically, as shown in FIG2 , as the processed subsequence gradually moves backward, the sliding window moves backward and expands accordingly. When the sliding window size is expanded to the maximum, the size no longer expands, and it only slides backward following the processing process.

[0072] It should be understood that the next subsequence traversed is used as the current subsequence, and the current subsequence is compared with the subsequences in the sliding window from front to back one by one, and when repetition occurs, a replacement sequence is selected from the replacement alternative sequence to replace the current subsequence.

[0073] In one embodiment, the maximum length of the sliding window is 1,2 m-1 <l<2 m-1 +2 m-2 , m is the length of the subsequence.

[0074] In one embodiment, the replacement candidate sequence is a sequence of size 2 m Circular queue, each element in the replacement candidate sequence is a binary number of length m, and the content is from 0 to 2 m -1.

[0075] In one embodiment, in step S40, when the current subsequence and the subsequence in the sliding window are repeated, selecting a replacement sequence from the replacement candidate sequence to replace the current subsequence and outputting the replacement sequence includes the following steps:

[0076] Determining whether a replacement sequence located at a replacement starting position in the replacement candidate sequence is repeated with a subsequence in the sliding window;

[0077] If yes, determining whether the next replacement sequence at the replacement starting position is repeated with the subsequence in the sliding window;

[0078] If not, the current subsequence is replaced with the replacement sequence located at the replacement starting position, and the replacement sequence is output.

[0079] Specifically, as shown in Figure 3, when the i-th subsequence is processed, it is used as the current subsequence and compared with the subsequences in the sliding window from front to back. If there are no duplicates, the current subsequence is output; if there are duplicates, the current subsequence is permuted. The permutation sequence is selected from the candidate permutation sequences, skipping any permutation sequences that duplicate the subsequence in the current sliding window. The first permutation sequence in the queue that meets the requirements is selected to replace the current subsequence, and the replaced subsequence is then output.

[0080] In one embodiment, during the initial replacement, the starting sequence of the replacement candidate sequence is used as the replacement starting position.

[0081] In one embodiment, after completing at least one permutation, the next permutation sequence of the permutation sequence selected by the current permutation is used as the permutation starting position.

[0082] In the process of generating random numbers, this embodiment performs post-processing each time subsequence data is obtained. In other words, it is an online algorithm, which reduces the waiting time for the generated original data and the total post-processing time of the original data. It does not require a random seed and improves the random number generation rate.

[0083] Specifically, as shown in FIG4 and FIG5, taking the original binary random sequence 100011100101010000001100011 as an example, the efficient post-processing process for reducing the quantum random number bias proposed in this embodiment is described in detail:

[0084] (1) Split the original binary random sequence into 9 subsequences of length 3: 100, 011, 100, 101, 010, 000, 001, 100, 011.

[0085] (2) The replacement candidate sequence is set to: 000, 001, 010, 011, 100, 101, 110, 111, as shown in FIG4 ; the maximum size of the sliding window is 5.

[0086] (3) Directly output the first subsequence 100 as a random sequence.

[0087] (4) Starting from the second subsequence 011, a sliding window comparison is performed. At this time, the sliding window only covers the sequence before the subsequence. The current subsequence 011 is compared with the sequence in the sliding window. If no duplication is found, the current subsequence 011 is output and the next subsequence is processed. The sliding window is increased by one position.

[0088] (5) The third subsequence 100 is compared with the sequence in the sliding window and found to be identical to the first subsequence in the sliding window. The process then begins selecting a replacement sequence from the candidate replacement sequences. The current replacement sequence 000 is selected from the candidate replacement sequences and compared with the sequence in the sliding window. No duplication is found, so the current subsequence 100 is replaced with 000. The current position sequence is then output, and the next subsequence is prepared for processing. The sliding window is increased by one position.

[0089] (6) For the fourth subsequence 101 and the fifth subsequence 010, they are compared with the sequences in the sliding window. No duplication is found. Subsequences 101 and 010 are output and the next subsequence is ready for processing. The sliding window is increased by one position.

[0090] (7) For the sixth subsequence 000, it is compared with the sequence in the sliding window and found to be the same as the third subsequence in the sliding window. So, a replacement sequence is selected from the replacement candidate sequence. The current replacement sequence 001 in the replacement candidate sequence is selected and compared with the sequence in the sliding window. No duplication is found, so 001 is used to replace the current subsequence 000. Then the current position sequence is output and the next subsequence is prepared for processing. The sliding window size has reached the maximum value and is shifted back one position.

[0091] (8) For the seventh subsequence 001, it is compared with the sequence in the sliding window and found to be the same as the fifth subsequence in the sliding window, so the replacement sequence is selected from the replacement candidate sequence. The current replacement sequence 010 in the replacement candidate sequence is selected and compared with the sequence in the sliding window. If a duplicate is found, the current replacement position is shifted back one position. The replacement sequence 011 is selected and compared with the sequence in the sliding window. If a duplicate is found, the current replacement position is shifted back one position. The replacement sequence 100 is selected and compared with the sequence in the sliding window. No duplicate is found, so the current subsequence 001 is replaced with 100. The current position sequence is then output and the next subsequence is processed. The sliding window is shifted back one position.

[0092] (9) For the eighth subsequence 100, it is compared with the sequence in the sliding window and found to be the same as the fifth subsequence in the sliding window. Therefore, a replacement sequence is selected from the replacement candidate sequence. The current replacement sequence 101 in the replacement candidate sequence is selected and compared with the sequence in the sliding window. If a duplicate is found, the current replacement position is shifted back one position. The replacement sequence 110 is selected and compared with the sequence in the sliding window. No duplicate is found, so 110 is used to replace the current subsequence 100. Then the current position sequence is output and the next subsequence is processed. The sliding window is shifted back one position.

[0093] (10) For the ninth subsequence 011, it is compared with the sequence in the sliding window. No duplication is found, and subsequence 011 is output.

[0094] At this point, the original random sequence is processed and outputted, and the output sequence is 1000011000101010001100110011. The processing process is shown in Figure 5.

[0095] In addition, as shown in FIG6 , an embodiment of the present application discloses an efficient post-processing system for reducing quantum random number bias, the system comprising:

[0096] A sequence splitting module 10 is used to split the original random sequence generated by the quantum random source into multiple subsequences;

[0097] A traversal comparison module 20 is used to traverse multiple subsequences, and for a current subsequence traversed, use a sliding window to cover the subsequences before the current subsequence, and compare the current subsequence with the subsequences in the sliding window one by one;

[0098] The sequence output module 30 is configured to output the current subsequence when the current subsequence does not overlap with the subsequences in the sliding window; and to select a replacement sequence from the replacement candidate sequence to replace the current subsequence when the current subsequence overlaps with the subsequences in the sliding window, and output the replacement sequence.

[0099] This embodiment combines the implementation principle of the sliding window algorithm with the replacement idea of ​​the least recently used algorithm to split and replace the original random sequence output by the quantum random source. The sequence replacement breaks the autocorrelation of the original random sequence, thereby obtaining random numbers with reduced bias and improved randomness. In addition, the random number sequence is processed using streaming operations, which does not require a large amount of space for storage and preprocessing of random numbers. The processing process does not require mathematical operations and can output random numbers in real time.

[0100] In one embodiment, the sequence splitting module 10 is specifically configured to:

[0101] The original random sequence is split into multiple subsequences of length m, and the subsequences do not overlap.

[0102] Furthermore, the length m is ≥ 3 and is an odd number.

[0103] By setting the subsequence length to an odd number, the large frequency gap between 0 and 1 that may exist in the original sequence can be effectively adjusted.

[0104] In one embodiment, the initial length of the sliding window is a subsequence length;

[0105] When traversing to the first subsequence, the sliding window covers the first subsequence and directly outputs the first subsequence.

[0106] In one embodiment, the system further includes a sliding window adjustment module, configured to:

[0107] Traversing to the next subsequence as the current subsequence, and determining whether the length of the sliding window has reached the maximum;

[0108] If not, the length of the sliding window is increased by a set bit to cover the previous subsequence of the current subsequence;

[0109] If so, the sliding window is slid backward by a set number of bits, where the set number of bits is the same as the subsequence length.

[0110] In one embodiment, the maximum length of the sliding window is 1,2 m-1 <l<2 m-1 +2 m-2 , m is the length of the subsequence.

[0111] It should be noted that the purpose of setting the maximum value of the sliding window in this way is to make the window as large as possible (greater than half the length of all types of sequences when they appear in sequence, that is, (2m) / 2) to reduce the repetition of the output sequence within a certain length range and weaken the correlation; the window is as small as possible to ensure that there must be sequences in the replacement alternative sequences that are inconsistent with those in the sliding window, and to leave a certain amount of room for selection to avoid replacing repeated sequences during the replacement process (that is, leaving 2m-2 selection spaces in the (2m) types of sequences); if it is larger than the maximum value, the efficiency of comparison and selection from the alternative sequences will be greatly reduced.

[0112] In one embodiment, the replacement candidate sequence is a sequence of size 2 m A circular queue, wherein each element in the replacement candidate sequence is a binary number with a length of m.

[0113] In one embodiment, the sequence output module 30 is further specifically configured to:

[0114] Determining whether a replacement sequence located at a replacement starting position in the replacement candidate sequence is repeated with a subsequence in the sliding window;

[0115] If yes, determining whether the next replacement sequence at the replacement starting position is repeated with the subsequence in the sliding window;

[0116] If not, the current subsequence is replaced with the replacement sequence located at the replacement starting position, and the replacement sequence is output.

[0117] In one embodiment, during the initial permutation, the starting sequence of the permutation candidate sequence is used as the permutation starting position; after completing at least one permutation, the next permutation sequence of the permutation sequence selected by the current permutation is used as the permutation starting position.

[0118] It should be noted that other embodiments or implementation methods of the efficient post-processing system for reducing quantum random number bias described in the present application can refer to the above-mentioned method embodiments, which will not be repeated here.

[0119] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0120] The various component embodiments of the present application can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the computing processing equipment according to the embodiment of the present application. The application can also be implemented as a device or apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0121] For example, FIG7 illustrates a computing device that can implement the methods according to the present application. The computing device typically includes a processor 1010 and a computer program product or computer-readable medium in the form of a memory 1020. Memory 1020 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, a hard disk, or ROM. Memory 1020 has storage space 1030 for program code 1031 for executing any of the method steps described above. For example, storage space 1030 for program code can include individual program codes 1031 for implementing various steps in the method described above. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are typically portable or fixed storage units, as described with reference to FIG8 . This storage unit can have storage segments, storage space, and the like arranged similarly to memory 1020 in the computing device of FIG7 . The program code can, for example, be compressed in a suitable form. Typically, the storage unit includes computer-readable codes 1031 ′, ie, codes that can be read by a processor such as 1010 , which, when executed by a computing device, cause the computing device to perform the steps of the method described above.

[0122] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0123] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0124] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. An efficient post-processing method for reducing quantum random number bias, wherein: The method comprises: Splitting an original random sequence generated by a quantum random source into multiple subsequences, including splitting the original random sequence into n subsequences of length m, wherein the subsequences do not overlap, and the length m is ≥ 3 and is an odd number; Traverse multiple subsequences, and take the currently traversed subsequence as the current subsequence, use a sliding window to cover the subsequence before the current subsequence, and compare the current subsequence with the subsequences in the sliding window one by one, wherein when traversing to the next subsequence, the length of the sliding window slides backward by a set position, and the set position is the same as the length of the subsequence; When the current subsequence does not repeat with the subsequence in the sliding window, output the current subsequence; When the current subsequence is repeated with the subsequence in the sliding window, a replacement sequence is selected from the replacement candidate sequence to replace the current subsequence, and the replacement sequence is output.

2. The efficient post-processing method for reducing quantum random number bias as claimed in claim 1, wherein: The initial length of the sliding window is a subsequence length; When traversing to the first subsequence, the sliding window is empty and the first subsequence is directly output; When traversing to the second subsequence, the sliding window covers the first subsequence.

3. The efficient post-processing method for reducing quantum random number bias as claimed in claim 1, wherein: After outputting the current subsequence when the current subsequence and the subsequence in the sliding window are not repeated, or after selecting an alternative subsequence from the replacement candidate sequence to replace the current subsequence when the current subsequence and the subsequence in the sliding window are repeated, and outputting the alternative subsequence, the method further includes: Traversing to the next subsequence and taking it as the current subsequence, and determining whether the length of the sliding window reaches the maximum; If not, the length of the sliding window is increased by a set bit to cover the previous subsequence of the current subsequence; If yes, the sliding window is slid backward by a set position, and the set position is proportional to the subsequence length. same.

4. The efficient post-processing method for reducing quantum random number bias as claimed in claim 3, wherein: The maximum length of the sliding window is l,2 m-1 <l<2 m-1 +2 m-2 , m is the length of the subsequence.

5. The efficient post-processing method for reducing quantum random number bias as claimed in claim 1, wherein: The replacement candidate sequence is a sequence of size 2 m A circular queue, wherein each element in the permutation candidate sequence is a binary number with a length of m.

6. The efficient post-processing method for reducing quantum random number bias as claimed in claim 1, wherein: When the current subsequence is repeated with the subsequence in the sliding window, a replacement sequence is selected from the replacement candidate sequence to replace the current subsequence, and the replacement sequence is output, including: Determine whether a replacement sequence located at a replacement start position in the replacement candidate sequence is repeated with a subsequence in the sliding window; If yes, determining whether the next replacement sequence located at the replacement start position is repeated with the subsequence in the sliding window; If not, the current subsequence is replaced with the replacement sequence located at the replacement starting position, and the replacement sequence is output.

7. The efficient post-processing method for reducing quantum random number bias as claimed in claim 6, wherein: During the initial replacement, the starting sequence of the replacement candidate sequence is used as the replacement starting position.

8. The efficient post-processing method for reducing quantum random number bias as claimed in claim 6, wherein: After completing at least one permutation, the next permutation sequence of the permutation sequence selected by the current permutation is used as the permutation starting position.

9. An efficient post-processing system for reducing quantum random number bias, wherein: The system comprises: A sequence splitting module, used to split the original random sequence generated by the quantum random source into multiple subsequences, including splitting the original random sequence into n subsequences of length m, with no overlap between the subsequences, and the length m ≥ 3 and is an odd number; The traversal comparison module is used to traverse multiple subsequences and take the currently traversed subsequence as the current subsequence, use the sliding window to cover the subsequence before the current subsequence, and The sequence is compared with the subsequences in the sliding window one by one, wherein when traversing to the next subsequence, the length of the sliding window slides backward by a set position, and the set position is the same as the length of the subsequence; The sequence output module is used to output the current subsequence when the current subsequence does not repeat with the subsequence in the sliding window; and when the current subsequence repeats with the subsequence in the sliding window, select a replacement sequence from the replacement candidate sequence to replace the current subsequence, and output the replacement sequence.

10. A computing device, wherein: include: a memory having computer readable code stored therein; One or more processors, when the computer readable code is executed by the one or more processors, the computing processing device performs the efficient post-processing method for reducing quantum random number bias according to any one of claims 1 to 8.

11. A computer program, comprising a computer readable code, which, when executed on a computing processing device, causes the computing processing device to execute the efficient post-processing method for reducing quantum random number bias according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Identity authentication method during quantum secret key application process

    CN105763563A

  • Fault diagnosis method of insulated gate bipolar transistor (IGBT) module

    CN107621782A

  • Quantum random number post-processing method and device and quantum random number generator

    CN110471644A

  • Efficient post-processing method and device for quantum random numbers and quantum random number generator

    CN110472739A

  • IO operation prediction method and device and related equipment

    CN115421668A