ZCA whitening-based quantum random number generator post-processing method, medium and device
Through the original random sequence of the quantum random number generator system, ZCA albinization treatment is performed, its autocorrification and spectrum characteristics are improved, and the random number of random numbers generated by the limited bandwidth of the detector is solved. rate.
Patent Information
- Application Number
- CN202411406676.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-28
Smart Images

Figure CN119376692A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of quantum random number generators (QRNG), and in particular to a quantum random number generator post-processing method, medium and device based on ZCA whitening. Background Art
[0002] Random numbers are an important basic resource that plays an important role in many fields of scientific research and daily life, such as cryptography, simulation computing, and the gaming industry. The device that generates random numbers is called a random number generator, which is a key component of the cryptographic system. In a confidential communication system with high security requirements, true random numbers with unpredictable and non-repeatable characteristics are a better choice than pseudo-random numbers generated by deterministic computer algorithms. The quantum random number generator generates random number sequences based on the inherent randomness of quantum mechanics theory. It is the random number generation technology that is closest to ideal true randomness to date, and has theoretically strictly provable information-theoretic security.
[0003] At present, various types of quantum random number generation schemes have been widely proposed and studied in depth by scholars, and the corresponding engineering technology of quantum random number generators has become more and more mature. Although the quantum physical processes observed by different QRNG schemes and the physical devices used are different, their basic structures and workflows are roughly the same. Figure 1 The structure of a typical QRNG system is roughly divided into modules such as quantum state preparation, quantum state detection, discrete sampling and data post-processing. Specifically:
[0004] Quantum state preparation: The function of the quantum state preparation module is to generate the measured quantum state, which contains the intrinsic random characteristics guaranteed by the basic principles of quantum mechanics. This is the fundamental source of randomness of the QRNG system;
[0005] Quantum state detection: The quantum state detection module uses the detection device to perform photoelectric detection on the prepared quantum state characteristics to obtain the original random signal. Depending on the prepared quantum state, the corresponding detection device and detection output signal characteristics are also different.
[0006] Discrete sampling: In most high-speed QRNG schemes, the original random signal output by the detector is generally an analog signal, which needs to be converted into a digital signal through discrete sampling to obtain the original random sequence.
[0007] Data post-processing: In the actual QRNG system, due to the inherent statistical properties of the quantum entropy source itself, some classical electrical noise, and the imperfect characteristics of the system components, there will be certain biases and correlations in the original random sequence, which does not meet the statistical uniformity and independence characteristics. In order to overcome these problems and make the final random bit sequence have independent uniformity characteristics, it is necessary to perform data post-processing on the original random sequence. Specifically, data post-processing mainly includes two steps: entropy estimation and randomness extraction.
[0008] For high-speed QRNG systems, the bandwidth of the photon signal obtained in the quantum state preparation step is usually very large, usually much larger than the detection bandwidth BW of the detector. Therefore, it can be equivalently considered that the bandwidth of the original random signal obtained after detection is equal to the bandwidth BW of the detector. When the original random signal is discretely sampled and output as the original random sequence, in order to avoid oversampling resulting in excessive autocorrelation of the original random sequence and decreased randomness, the sampling rate f s cannot be significantly greater than the bandwidth BW. The sampling rate f s It has a great impact on the final random number generation rate of QRNG. At present, in the data post-processing methods of existing QRNG systems, entropy evaluation and randomness extraction are generally performed directly on the original random sequence obtained after discrete sampling based on information theory and cryptography methods. However, these methods do not consider improving the statistical characteristics of the original random sequence to improve the overall performance of the QRNG system. At the same time, in the actual system, the sampling rate f s The random number generation rate is directly limited by the detector bandwidth BW. When we use a sampling rate f that is much larger than the detector bandwidth BW s Therefore, we can try to perform some mathematical transformation operations on the original random sequence before entropy evaluation and randomness extraction to improve its statistical characteristics, thereby increasing the original random sequence signal bandwidth to BW 1 (W 1 >>BW). In fact, this operation is physically equivalent to improving the spectral response characteristics of the detector, which can be equivalent to improving its spectral response flatness and bandwidth. Then, according to the signal bandwidth BW after processing 1 The actual sampling rate is adjusted according to the application requirements. 1 It is significantly larger than the bandwidth BW of the detector, so the actual sampling rate that the QRNG system can support is effectively improved, which can ultimately improve the final random number generation rate of the QRNG. Summary of the invention
[0009] In view of the problems of limited detection bandwidth and limited random number generation rate of detectors in existing quantum random number generator systems, the present invention provides a quantum random number generator post-processing method, medium and device based on ZCA whitening.
[0010] The present invention provides a quantum random number generator post-processing method based on ZCA whitening, comprising the following steps:
[0011] Generate original random sequence;
[0012] Perform ZCA whitening on the original random sequence;
[0013] The autocorrelation coefficient and spectrum analysis are performed on the random sequence after ZCA whitening, and then the sampling rate of the random sequence after ZCA whitening is adjusted according to the calculation and analysis results;
[0014] The entropy value of the random sequence after ZCA whitening after adjusting the sampling rate is evaluated, and randomness is extracted based on the entropy evaluation result to obtain the final quantum random number sequence.
[0015] Further, the generating of the original random sequence comprises:
[0016] The quantum state preparation module generates a light quantum noise signal;
[0017] The quantum state detection module performs photoelectric detection on the light quantum noise signal and outputs a random electrical signal. Assume that the photoelectric detection bandwidth is BW;
[0018] The discrete sampling module discretizes the random electrical signal output by the quantum state detection module to obtain the original random sequence. Assuming the sampling rate is f s And satisfy f s >>BW.
[0019] In some embodiments, the quantum state preparation module is implemented based on a scheme of vacuum fluctuation noise, laser phase noise, or amplified spontaneous emission noise.
[0020] In some embodiments, the quantum state detection module is implemented based on a photodetector or balanced homodyne detection.
[0021] In some implementations, the discretization sampling module is implemented based on an oscilloscope or an analog-to-digital converter.
[0022] Further, performing ZCA whitening processing on the original random sequence includes:
[0023] Take the original random sequence of length N, denoted as {a i};
[0024] Arrange the original random sequence in the following manner: each row of the data matrix X is n continuous data in the time domain, and a total of m rows are arranged, satisfying n×m=N; arrange the data in this manner to obtain the data matrix X;
[0025] According to the steps of ZCA whitening algorithm, the data matrix X is whitened to obtain the processed data matrix X ZCA ;
[0026] The data matrix X ZCA Rearrange into a one-dimensional sequence, and get the random sequence after ZCA whitening, denoted as {b i}.
[0027] Furthermore, the step of calculating the autocorrelation coefficient and performing spectrum analysis on the random sequence after ZCA whitening, and adjusting the sampling rate of the random sequence after ZCA whitening according to the calculation and analysis results includes:
[0028] Calculate the original random sequence {a i} and the random sequence after ZCA whitening {b i}'s autocorrelation coefficient and spectrum;
[0029] Confirm the random sequence {b i Compared with the original random sequence {a i The autocorrelation coefficient is significantly reduced, verifying that ZCA whitening can effectively improve the randomness of the original random sequence;
[0030] Determine the random sequence {b after ZCA whitening based on the spectrum calculation results i The spectrum bandwidth of} is BW 1 Then, based on the actual application requirements, the random sequence {b i}The sampling rate can be adjusted.
[0031] In some embodiments, the random sequence {b i}Sampling rate adjustments include:
[0032] For application scenarios with high randomness requirements, the random sequence {b i}The sampling rate is adjusted to BW 1 or lower;
[0033] For application scenarios with high generation rate requirements, the random sequence {b i}The sampling rate is adjusted to 2BW 1 .
[0034] The present invention also provides a computer terminal storage medium storing computer terminal executable instructions, wherein the computer terminal executable instructions are used to execute the above-mentioned quantum random number generator post-processing method based on ZCA whitening.
[0035] The present invention also provides a computing device, comprising:
[0036] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above-mentioned quantum random number generator post-processing method based on ZCA whitening.
[0037] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0038] The present invention first performs ZCA whitening on the original random sequence obtained by discrete sampling, and then performs entropy value evaluation and randomness extraction. By performing ZCA whitening on the original data, the autocorrelation coefficient of the original random sequence can be effectively reduced, and the sequence spectrum flatness and spectrum bandwidth can be significantly improved, which is equivalent to improving the quantum entropy source output signal bandwidth of the system, thereby significantly improving the random number generation rate of the QRNG system. This method does not need to change the hardware structure of the QRNG system, and can be fully and efficiently implemented based on digital signal processing technology (such as field programmable gate array FPGA, complex programmable logic device CPLD, digital signal processing device DSP, microcontroller MCU, etc.), and the specific parameters can be flexibly adjusted and configured, which is applicable to a variety of mainstream QRNG schemes, and has strong practicality and scalability. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a schematic diagram of a typical QRNG system structure.
[0040] Figure 2 Flow chart of a quantum random number generator post-processing method based on ZCA whitening in an embodiment of the present invention.
[0041] Figure 3 This is a result diagram of calculating the autocorrelation coefficient of the original random sequence and the random sequence after ZCA whitening in an embodiment of the present invention.
[0042] Figure 4 This is a diagram showing the spectrum calculation results of the original random sequence and the random sequence after ZCA whitening in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0044] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] In order to facilitate understanding of the quantum random number generator post-processing method based on ZCA whitening provided in an embodiment of the present invention, the technical terms involved are briefly introduced:
[0046] ZCA whitening is an important data processing method widely used in the field of machine learning, which can significantly reduce the correlation of input data. The specific algorithm steps are as follows:
[0047] 1. Input sample data: X∈R n×m , where n is the data dimension and m is the number of samples;
[0048] 2. Zero-mean each row of X to get the matrix X C ;
[0049] 3. Calculate the zero-mean data X C The covariance matrix of is:
[0050] 4. Perform eigenvalue decomposition on the covariance matrix: ∑=UΛU T ;
[0051] 5. Calculate the whitening matrix W:
[0052] 6. Multiply the matrix X by the whitening matrix W C , get the ZCA whitened data matrix X ZCA :
[0053]
[0054] Figure 2 A flowchart of a quantum random number generator post-processing method based on ZCA whitening proposed in an embodiment of the present invention. The quantum random number generator post-processing method based on ZCA whitening comprises the following steps:
[0055] Step 1: Generate the original random sequence:
[0056] The quantum state preparation module generates a light quantum noise signal;
[0057] The quantum state detection module performs photoelectric detection on the light quantum noise signal and outputs a random electrical signal. Assume that the photoelectric detection bandwidth is BW;
[0058] The discrete sampling module discretizes the random electrical signal output by the quantum state detection module to obtain the original random sequence. Assuming the sampling rate is f s And satisfy f s >>BW.
[0059] Some implementation schemes are given in the embodiments of the present invention: the quantum state preparation module can be implemented based on vacuum fluctuation noise, laser phase noise, amplified spontaneous emission noise and other schemes; the quantum state detection module can be implemented based on a photodetector (PD) and a balanced homodyne detection (BHD) and other schemes; the discrete sampling module can be implemented based on an oscilloscope (DSO) and an analog-to-digital converter (ADC) and other schemes.
[0060] To verify the effectiveness of the method, a practical verification experiment was carried out based on the amplified spontaneous emission (ASE) noise scheme. An ultra-bright light-emitting diode was used to generate ASE photon noise signals, PD was used for photoelectric detection, and DSO was used for discrete sampling to obtain the original random sequence. Among them, the PD detection bandwidth is BW = 2GHz, and the DSO sampling rate is f s =10GHz, satisfying f s >>BW.
[0061] Step 2: Perform ZCA whitening on the original random sequence:
[0062] Take the original random sequence of length N, denoted as {a i};
[0063] Arrange the original random sequence in the following manner: each row of the data matrix X is n continuous data in the time domain, and a total of m rows are arranged, satisfying n×m=N; arrange the data in this manner to obtain the data matrix X;
[0064] According to the steps of ZCA whitening algorithm, the data matrix X is whitened to obtain the processed data matrix X ZCA ;
[0065] The data matrix X ZCA Rearrange into a one-dimensional sequence, and get the random sequence after ZCA whitening, denoted as {b i}.
[0066] Step 3: Calculate the autocorrelation coefficient and perform spectrum analysis on the random sequence after ZCA whitening, and then adjust the sampling rate of the random sequence after ZCA whitening according to the calculation and analysis results:
[0067] Calculate the original random sequence {a i} and the random sequence after ZCA whitening {b i}, confirming that the random sequence {b i Compared with the original random sequence {a i The autocorrelation coefficient is significantly reduced, which verifies that ZCA whitening can effectively improve the randomness of the original random sequence. Based on the spectrum calculation results, the random sequence after ZCA whitening is determined to be {b i The spectrum bandwidth of} is BW 1 Then, based on the actual application requirements, the random sequence {b i} The sampling rate can be adjusted. For example, for application scenarios with high randomness requirements, the random sequence {b i}The sampling rate is adjusted to BW 1 Or lower, and for application scenarios with higher generation rate requirements, the random sequence {b i}The sampling rate is adjusted to 2BW 1 .
[0068] In a verification experiment, the original random sequence {a i} and the random sequence after ZCA whitening {b i The autocorrelation coefficient and spectrum calculation results are as follows: Figure 3 and Figure 4 As shown. Figure 3 It can be seen from the experiment that due to the sampling rate f s (10GHz) is much larger than the detection bandwidth BW (2GHz), resulting in the original random sequence {a i} has a high autocorrelation coefficient; while the random sequence {b i The autocorrelation coefficient of} is significantly reduced, proving that ZCA whitening can effectively improve the randomness of the original random sequence. Figure 4 It can be seen that at the Nyquist frequency Within the range, the original random sequence {a i The spectrum curve of the random sequence {b i The spectrum curve of the} is significantly improved in flatness within the Nyquist frequency, and its 3dB bandwidth is increased to BW 1 =5GHz, so the random sequence {bi}The sampling rate is adjusted to ≤5GHz (one time BW 1 ) or 10GHz (twice BW 1 Compared with the general QRNG system in which the sampling rate is directly set to one or two times the detector bandwidth, the actual sampling rate of the data after whitening processing is effectively improved, thereby supporting a higher random number generation rate.
[0069] Step 4: perform entropy evaluation on the random sequence after ZCA whitening after adjusting the sampling rate, extract randomness based on the entropy evaluation result, and obtain the final quantum random number sequence.
[0070] In addition, in some embodiments, a computer terminal storage medium is proposed, which stores computer terminal executable instructions, and the computer terminal executable instructions are used to execute the quantum random number generator post-processing method based on ZCA whitening as described in the previous embodiment. Examples of computer storage media include magnetic storage media (e.g., floppy disks, hard disks, etc.), optical recording media (e.g., CD-ROMs, DVDs, etc.) or memories, such as memory cards, ROMs or RAMs, etc. Computer storage media can also be distributed on network-connected computer systems, such as application stores.
[0071] In addition, in some embodiments, a computing device is proposed, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the quantum random number generator post-processing method based on ZCA whitening as described in the above embodiments. Examples of computing devices include PCs, tablet computers, smart phones, or PDAs.
[0072] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A quantum random number generator post-processing method based on ZCA whitening, characterized in that: The steps include: Generate original random sequence; Perform ZCA whitening on the original random sequence; The autocorrelation coefficient and spectrum analysis are performed on the random sequence after ZCA whitening, and then the sampling rate of the random sequence after ZCA whitening is adjusted according to the calculation and analysis results; The entropy value of the random sequence after ZCA whitening after adjusting the sampling rate is evaluated, and randomness is extracted based on the entropy evaluation result to obtain the final quantum random number sequence.
2. The quantum random number generator post-processing method based on ZCA whitening according to claim 1 is characterized in that: The generating of the original random sequence comprises: The quantum state preparation module generates a light quantum noise signal; The quantum state detection module performs photoelectric detection on the light quantum noise signal and outputs a random electrical signal. Assume that the photoelectric detection bandwidth is BW; The discrete sampling module discretizes the random electrical signal output by the quantum state detection module to obtain the original random sequence. Assuming the sampling rate is f s And satisfy f s >>BW.
3. The quantum random number generator post-processing method based on ZCA whitening according to claim 2 is characterized in that: The quantum state preparation module is implemented based on vacuum fluctuation noise, laser phase noise or amplified spontaneous emission noise.
4. The quantum random number generator post-processing method based on ZCA whitening according to claim 2 is characterized in that: The quantum state detection module is implemented based on a photodetector or balanced homodyne detection.
5. The quantum random number generator post-processing method based on ZCA whitening according to claim 2 is characterized in that: The discrete sampling module is implemented based on an oscilloscope or an analog-to-digital converter.
6. The quantum random number generator post-processing method based on ZCA whitening according to claim 1 is characterized in that: The ZCA whitening process on the original random sequence comprises: Take the original random sequence of length N, denoted as {a i }; Arrange the original random sequence in the following manner: each row of the data matrix X is n continuous data in the time domain, and a total of m rows are arranged, satisfying n×m=N; arrange the data in this manner to obtain the data matrix X; According to the steps of ZCA whitening algorithm, the data matrix X is whitened to obtain the processed data matrix X ZCA ; The data matrix X ZCA Rearrange into a one-dimensional sequence, and get the random sequence after ZCA whitening, denoted as {b i }.
7. The quantum random number generator post-processing method based on ZCA whitening according to claim 6 is characterized in that: The step of calculating the autocorrelation coefficient and performing spectrum analysis on the random sequence after ZCA whitening, and adjusting the sampling rate of the random sequence after ZCA whitening according to the calculation and analysis results includes: Calculate the original random sequence {a i } and the random sequence after ZCA whitening {b i }'s autocorrelation coefficient and spectrum; Confirm the random sequence {b i Compared with the original random sequence {a i The autocorrelation coefficient is significantly reduced, verifying that ZCA whitening can effectively improve the randomness of the original random sequence; Determine the random sequence {b after ZCA whitening based on the spectrum calculation results i The spectrum bandwidth of} is BW1, and then the random sequence {b i }The sampling rate can be adjusted.
8. The quantum random number generator post-processing method based on ZCA whitening according to claim 7 is characterized in that: The random sequence {b i }Sampling rate adjustments include: For application scenarios with high randomness requirements, the random sequence {b i }The sampling rate is adjusted to BW1 or lower; For application scenarios with high generation rate requirements, the random sequence {b i }The sampling rate is adjusted to 2BW1.
9. A computer terminal storage medium storing computer terminal executable instructions, characterized in that: The computer terminal executable instructions are used to execute the quantum random number generator post-processing method based on ZCA whitening as described in any one of claims 1-8.
10. A computing device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the quantum random number generator post-processing method based on ZCA whitening as described in any one of claims 1 to 8.