Spatial light modulation method, device and equipment for quantum random number encoding and medium
By using a quantum random number generator to screen and construct the coding basis, the security and anti-interference issues of random matrix coding in existing technologies are solved, achieving high-precision spatial light modulation and improving imaging quality.
Patent Information
- Application Number
- CN202610226375.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-26
- Publication Date
- 2026-05-01
- Estimated Expiration
- 2046-02-26
AI Technical Summary
In existing technologies, random matrix coding combined with lightweight neural networks has issues with security, anti-interference and imaging quality in spatial beam modulation. Pseudo-random number coding matrices have problems with predictability, coding failure and non-convergence of the iterative process.
A quantum random number generator is used as an entropy source to verify, screen, and extract entropy from the original quantum random number sequence, construct a target coding basis, and convert it into a driving signal that is compatible with a spatial light modulator to achieve random coding modulation.
It improves the security, anti-interference and imaging accuracy of spatial light modulation, ensures the randomness and unpredictability of coding, and enhances the accuracy and flexibility of modulation.
Smart Images

Figure CN121727651B_ABST
Abstract
Description
Spatial light modulation methods, devices, equipment and media using quantum random number encoding Technical Field
[0001] This application relates to the field of spatial light modulation technology, and in particular to a spatial light modulation method, apparatus, device and medium using quantum random number encoding. Background Technology
[0002] In recent years, with the development of compressed sensing technology and neural networks, compressed sensing reconstruction or neural network reconstruction based on random matrix coding has become a popular research direction. Existing research has confirmed that by combining random matrix coding with lightweight neural networks, beam modulation and image reconstruction at a 10% undersampling rate can be achieved, fully demonstrating the enormous research potential and broad development prospects of random matrices in the field of spatial optical coding.
[0003] However, current technological approaches still have many limitations: neural network reconstruction schemes typically rely on pre-trained models and reconstruction probes, which not only increases the overall system complexity but also weakens the flexibility and applicability of random matrices; compressed sensing reconstruction technology places extremely high demands on the randomness quality of random matrices, while the pseudo-random number encoding matrices widely used in existing schemes have several performance shortcomings. From a security perspective, pseudo-random number-generated encoding matrices are theoretically predictable and reproducible. Once an attacker masters the generation algorithm, they can crack the encoding scheme and then carry out eavesdropping or interference, seriously threatening communication security. From an anti-interference perspective, when a light beam passes through turbulent atmosphere, turbid water, or complex media, scattering occurs, causing severe distortion of the light field distribution. Traditional pseudo-encoding methods are difficult to adapt to such complex environments and are prone to encoding failure. At the algorithm optimization level, in the process of iteratively solving for the optimal pre-encoding matrix, the initial pseudo-random numbers have internal correlations, which can easily lead to the iteration process getting stuck in local optima and failing to converge to the global optimum. From the perspective of image quality, pseudo-random matrices often have "structural defects" that compressed sensing theory avoids. This leads to more measurements being required during image reconstruction, and the reconstruction results are prone to artifacts, affecting imaging accuracy. Summary of the Invention
[0004] In view of this, this application provides a quantum random number encoded spatial light modulation method, device, equipment and medium, the main purpose of which is to solve the problems of security, anti-interference and imaging quality of existing technologies that use random matrix encoding combined with lightweight neural networks to achieve spatial beam modulation.
[0005] The first aspect provides a spatial light modulation method using quantum random number encoding, the method comprising:
[0006] A quantum random number generator is used as an entropy source, and a verification and screening operation is performed on its output original quantum random number sequence to obtain an effective quantum random number sequence;
[0007] An entropy extraction operation is performed on the effective quantum random number sequence according to a set sampling number to construct a target coding basis. The set sampling number is determined based on the number of coding bases and the minimum information entropy of the effective quantum random number sequence.
[0008] The quantum random coding matrix corresponding to the target coding basis is converted into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to perform random coding modulation on the incident spatial light through the driving signal, thereby obtaining modulated light.
[0009] Furthermore, the step of using a quantum random number generator as an entropy source to perform a verification and screening operation on its output original quantum random number sequence to obtain a valid quantum random number sequence includes:
[0010] A quantum random number generator is used as the entropy source to obtain the original quantum random number sequence output by it;
[0011] The original quantum random number sequence is subjected to a statistical randomness test, and the statistical test results are obtained.
[0012] Based on the statistical test results passing the first test condition, the minimum information entropy of the original quantum random number sequence is calculated;
[0013] If the minimum information entropy passes the second test condition, then the original quantum random number sequence is determined to be an effective quantum random number sequence.
[0014] Further, the statistical randomness test performed on the original quantum random number sequence to obtain the statistical test result includes:
[0015] Perform a bit balance test on the original quantum random number sequence to obtain the balance test result; and / or
[0016] Perform a run-length check on the original quantum random number sequence to obtain the run-length check result; and / or
[0017] The original quantum random number sequence is subjected to a discrete Fourier transform test to obtain the Fourier transform test result;
[0018] The balance test is performed through the following process: a standardized balance test statistic is calculated based on the frequency of a set number in the original quantum random number sequence. The balance test statistic is used to measure the deviation between the observed proportion and the expected proportion. The balance test result is then calculated based on the test statistic.
[0019] The run test is performed through the following process: a standardized run test statistic is calculated based on the total number of runs in the original quantum random number sequence, the run test statistic being used to measure the degree of sequence oscillation; and the run test result is calculated based on the run test statistic.
[0020] The Discrete Fourier Transform (DFT) test is performed through the following process: mapping the original quantum random number sequence to a numerical sequence; performing a Discrete Fourier Transform on the numerical sequence to obtain the DFT test result;
[0021] Accordingly, if the balance test result, the runs test result, and the Fourier transform test result are all greater than their respective set statistical thresholds, the statistical test result is determined to pass the first test condition.
[0022] If the minimum information entropy is greater than the set information entropy threshold, the minimum information entropy is determined to pass the second test condition.
[0023] Furthermore, before performing entropy extraction on the effective quantum random number sequence according to a set sampling number to construct the target coding basis, the method further includes:
[0024] The number of bits and elements required to construct the coding base are determined based on the resolution and coding mode of the spatial light modulator.
[0025] The number of encoding bases is determined based on the number of bits and the number of elements.
[0026] The set sampling number is calculated based on the number of encoding bases and the minimum information entropy of the effective quantum random number sequence.
[0027] Further, the step of performing entropy extraction on the effective quantum random number sequence according to a set sampling number to construct the target coding basis includes:
[0028] According to the set sampling quantity, a sampling sequence of corresponding length is extracted from the effective quantum random number sequence;
[0029] An entropy extraction operation is performed on the sampled sequence using a defined entropy extraction algorithm to obtain a statistically uniform and mutually independent binary sequence, which is used as the target coding base.
[0030] Further, the step of converting the quantum random coding matrix corresponding to the target coding basis into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to perform random coding modulation on the incident spatial light through the driving signal to obtain modulated light, includes:
[0031] The spatial light modulator and the encoding matrix type adapted to the spatial light modulator are pre-selected according to the imaging task;
[0032] According to the encoding matrix type, the target encoding basis is constructed into a quantum random encoding matrix of the corresponding encoding matrix type. The quantum random encoding matrix is composed of several statistically uniform and mutually independent target encoding bases arranged according to a preset rule.
[0033] The quantum random coding matrix is subjected to signal conversion processing to convert the binary coding information of the quantum random coding matrix into a driving signal adapted to the spatial light modulator. The driving signal is an electrical signal or an optical signal that can be recognized by the spatial light modulator.
[0034] The driving signal is applied to the spatial light modulator so that each pixel unit of the spatial light modulator is controlled by the driving signal to randomly encode and modulate the incident spatial light according to the encoding rules of the quantum random coding matrix, thereby obtaining modulated light that meets the requirements of the imaging task.
[0035] Further, after converting the quantum random coding matrix corresponding to the target coding basis into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to perform random coding modulation on the incident spatial light through the driving signal to obtain modulated light, the method further includes:
[0036] A single-pixel detector is used to collect the modulated light signal after the modulated light is reflected or transmitted through the target object;
[0037] The modulated optical signal is preprocessed into a measurement vector, which, together with the measurement matrix formed by the quantum random coding matrix, is input into the reconstruction algorithm to reconstruct the image of the target object and obtain the image of the target object.
[0038] Secondly, a quantum random number encoded spatial light modulation device is provided, the device comprising:
[0039] The verification unit is used to perform verification and screening operations on the original quantum random number sequence output by the quantum random number generator as an entropy source to obtain a valid quantum random number sequence.
[0040] A construction unit is used to perform entropy extraction operation on the effective quantum random number sequence according to a set sampling number to construct a target coding basis. The set sampling number is determined based on the number of coding bases and the minimum information entropy of the effective quantum random number sequence.
[0041] The modulation unit is used to convert the quantum random coding matrix corresponding to the target coding basis into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to perform random coding modulation on the incident spatial light through the driving signal to obtain modulated light.
[0042] Furthermore, the verification unit includes:
[0043] The acquisition module is used to acquire the original quantum random number sequence output by the quantum random number generator as an entropy source;
[0044] The first verification module is used to perform a statistical randomness test on the original quantum random number sequence and obtain the statistical test result.
[0045] The calculation module is used to calculate the minimum information entropy of the original quantum random number sequence based on the statistical test result passing the first test condition;
[0046] The second verification module is used to determine the original quantum random number sequence as a valid quantum random number sequence if the minimum information entropy passes the second verification condition.
[0047] Furthermore, the first verification module is specifically used for:
[0048] Perform a bit balance test on the original quantum random number sequence to obtain the balance test result; and / or
[0049] Perform a run-length check on the original quantum random number sequence to obtain the run-length check result; and / or
[0050] The original quantum random number sequence is subjected to a discrete Fourier transform test to obtain the Fourier transform test result;
[0051] The balance test is performed through the following process: a standardized balance test statistic is calculated based on the frequency of a set number in the original quantum random number sequence. The balance test statistic is used to measure the deviation between the observed proportion and the expected proportion. The balance test result is then calculated based on the test statistic.
[0052] The run test is performed through the following process: a standardized run test statistic is calculated based on the total number of runs in the original quantum random number sequence, the run test statistic being used to measure the degree of sequence oscillation; and the run test result is calculated based on the run test statistic.
[0053] The Discrete Fourier Transform (DFT) test is performed through the following process: mapping the original quantum random number sequence to a numerical sequence; performing a Discrete Fourier Transform on the numerical sequence to obtain the DFT test result;
[0054] Accordingly, if the balance test result, the runs test result, and the Fourier transform test result are all greater than their respective set statistical thresholds, the statistical test result is determined to pass the first test condition.
[0055] If the minimum information entropy is greater than the set information entropy threshold, the minimum information entropy is determined to pass the second test condition.
[0056] Furthermore, the device also includes:
[0057] The first determining unit is used to determine the number of bits and the number of elements required to construct the coding base according to the resolution and coding mode of the spatial light modulator before performing entropy extraction operation on the effective quantum random number sequence according to the set sampling number to construct the target coding base;
[0058] The second determining unit is used to determine the number of coding bases based on the number of bits and the number of elements;
[0059] The calculation unit is used to calculate the set number of samples based on the number of encoding bases and the minimum information entropy of the effective quantum random number sequence.
[0060] Furthermore, the construction unit is specifically used for:
[0061] According to the set sampling quantity, a sampling sequence of corresponding length is extracted from the effective quantum random number sequence;
[0062] An entropy extraction operation is performed on the sampled sequence using a defined entropy extraction algorithm to obtain a statistically uniform and mutually independent binary sequence, which is used as the target coding base.
[0063] Furthermore, the modulation unit is specifically used for:
[0064] The spatial light modulator and the encoding matrix type adapted to the spatial light modulator are pre-selected according to the imaging task;
[0065] According to the encoding matrix type, the target encoding basis is constructed into a quantum random encoding matrix of the corresponding encoding matrix type. The quantum random encoding matrix is composed of several statistically uniform and mutually independent target encoding bases arranged according to a preset rule.
[0066] The quantum random coding matrix is subjected to signal conversion processing to convert the binary coding information of the quantum random coding matrix into a driving signal adapted to the spatial light modulator. The driving signal is an electrical signal or an optical signal that can be recognized by the spatial light modulator.
[0067] The driving signal is applied to the spatial light modulator so that each pixel unit of the spatial light modulator is controlled by the driving signal to randomly encode and modulate the incident spatial light according to the encoding rules of the quantum random coding matrix, thereby obtaining modulated light that meets the requirements of the imaging task.
[0068] Furthermore, the device also includes:
[0069] The acquisition unit is used to convert the quantum random coding matrix corresponding to the target coding basis into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to randomly code and modulate the incident spatial light through the driving signal to obtain the modulated light, and then use a single pixel detector to acquire the modulated light signal after the modulated light is reflected or transmitted by the target object.
[0070] The reconstruction unit is used to preprocess the modulated optical signal into a measurement vector, and input it together with the measurement matrix formed by the quantum random coding matrix into the reconstruction algorithm, so as to reconstruct the image of the target object through the reconstruction algorithm and obtain the image of the target object.
[0071] Thirdly, a quantum random number encoded spatial light modulation device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-mentioned quantum random number encoded spatial light modulation method.
[0072] Fourthly, a storage medium is provided on which a computer program is stored, which, when executed by a processor, implements the above-described quantum random number encoded spatial light modulation method.
[0073] By employing the above technical solution, this application provides a spatial light modulation method, apparatus, device, and medium using quantum random number encoding. Compared with the current method of achieving spatial light modulation through random matrix encoding combined with lightweight neural networks, this application uses a quantum random number generator as an entropy source to perform a verification and screening operation on the original quantum random number sequence output by the generator to obtain an effective quantum random number sequence. An entropy extraction operation is then performed on the effective quantum random number sequence according to a set sampling number to construct a target encoding basis. The set sampling number is determined based on the number of encoding bases and the minimum information entropy of the effective quantum random number sequence. The quantum random encoding matrix corresponding to the target encoding basis is converted into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to perform random encoding modulation on the incident spatial light through the driving signal, thereby obtaining modulated light. The entire process employs a quantum random number generator as an entropy source to perform verification and screening operations on the original quantum random number sequence. This fundamentally ensures the natural randomness and unpredictability of the original quantum random number sequence, accurately eliminating redundant information and abnormal data that do not meet the requirements of statistical randomness, ensuring that the effective quantum random number sequence possesses excellent statistical properties. Combined with a preset sampling quantity, entropy extraction is performed on the effective quantum random number sequence, achieving a precise match between the sampling quantity and the coding basis requirements and random number quality. This avoids problems such as insufficient coding basis randomness and poor modulation effect caused by insufficient sampling. Furthermore, the quantum random coding matrix corresponding to the target coding basis is converted into a driving signal adapted to the spatial light modulator, achieving seamless adaptation between quantum random coding and spatial light modulator hardware. This ensures that the driving signal can accurately control the spatial light modulator to perform random coding modulation on the incident spatial light, effectively improving the accuracy and flexibility of spatial light modulation, and giving the modulated light better randomness and anti-interference capabilities.
[0074] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0075] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0076] Figure 1 is a flowchart of a spatial light modulation method using quantum random number encoding in one embodiment of this application;
[0077] Figure 2 is a flowchart of a spatial light modulation method using quantum random number encoding in another embodiment of this application;
[0078] Figure 3 is a flowchart of the verification and screening process performed on the original electronic random number sequence in one embodiment of this application;
[0079] Figure 4 is a flowchart of a spatial light modulation method using quantum random number encoding in another embodiment of this application;
[0080] Figure 5 is a flowchart of an entropy extraction operation performed on an effective quantum random number sequence in one embodiment of this application;
[0081] Figure 6 is a flowchart of a specific implementation method for step 103 in Figure 1;
[0082] Figure 7 is a flowchart of a spatial light modulation method using quantum random number encoding in another embodiment of this application;
[0083] Figure 8a shows an embodiment of this application at a sampling rate of 10% and Bar charts showing the reconstruction error of quantum random matrix and pseudo-random matrix modulation signals of different original images under the TVAL3 algorithm, given the modulation matrix size;
[0084] Figure 8b is an embodiment of this application where a fixed original image and Piecewise plots of reconstruction errors of quantum random matrix and pseudo-random matrix modulated signals with different sampling rates under the TVAL3 algorithm, considering modulation matrix of different sizes;
[0085] Figure 8c is the original image of the handwritten digit 3 as a test in one embodiment of this application;
[0086] Figure 8d shows the reconstruction result of the handwritten digit 3 at a sampling rate of 10% using a pseudo-random matrix modulation in one embodiment of this application;
[0087] Figure 8e shows the reconstruction result of the handwritten digit 3 at a sampling rate of 10% using quantum random matrix modulation in one embodiment of this application;
[0088] Figure 9 is a diagram of a quantum random number modulation and demodulation system based on a mask in one embodiment of this application;
[0089] Figure 10 is a structural block diagram of a quantum random number encoded spatial light modulation device according to an embodiment of this application;
[0090] Figure 11 is a schematic diagram of the device structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0091] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0092] In related technologies, compressed sensing reconstruction or neural network reconstruction based on random matrix encoding has become a popular research direction. However, current technical approaches still have many limitations: neural network reconstruction schemes usually rely on pre-trained models and reconstruction probes, which not only increases the overall complexity of the system but also weakens the flexibility and applicability of random matrices; compressed sensing reconstruction technology places extremely high demands on the randomness quality of random matrices, while the pseudo-random number encoding matrices widely used in existing schemes have many performance shortcomings.
[0093] To address this problem, this embodiment provides a spatial light modulation method using quantum random number encoding, as shown in Figure 1, comprising the following steps:
[0094] Step 101: Using a quantum random number generator as an entropy source, perform a verification and screening operation on the original quantum random number sequence it outputs to obtain a valid quantum random number sequence.
[0095] In this embodiment, a quantum random number generator based on the single-photon detection principle can be selected. The output frequency of this quantum random number generator is set to 100 Mbps, and the output original quantum random number sequence is a binary sequence containing both 0 and 1 bits. Using the quantum random number generator as an entropy source leverages the inherent randomness and unpredictability of quantum physics processes to fundamentally ensure the high quality and non-replicability of the random number sequence. However, due to factors such as the actual hardware environment, noise interference, and system errors, the original quantum random number sequence output by the quantum random number generator may still exhibit statistical bias or local non-randomness. Therefore, after the quantum random number generator has been operating stably and continuously outputting the original quantum random number sequence, a verification and screening operation needs to be performed on the original quantum random number sequence to ensure that it possesses stable and reliable statistical properties.
[0096] Specifically, the verification and screening operation employs a combination of statistical randomness testing and minimum information entropy testing. The statistical randomness testing involves extracting a sufficiently long one-dimensional quantum random number sequence from the output of the quantum random number generator and subjecting it to a series of statistical tests. These tests include, but are not limited to, bit balance testing, runs testing, and discrete Fourier transform testing. The results of each statistical test are then calculated and compared to a predetermined significance level. The original quantum random number sequence is considered to have passed the statistical randomness test if and only if all test results are greater than the significance level. The significance level can be set as a single value for all statistical tests. For example, a significance level of 0.01 requires all test results to be greater than 0.01 for the original quantum random number sequence to pass the statistical randomness test. Alternatively, the significance level can be set separately for different statistical tests. For instance, a significance level of 0.008 could be set for the bit balance test, 0.005 for the runs test, and 0.01 for the discrete Fourier transform test. Each test result must be greater than its respective significance level for the original quantum random number sequence to pass the statistical randomness test. Based on passing the statistical randomness test, the minimum information entropy of the original quantum random number sequence is further calculated. The minimum information entropy is then checked to see if it is less than a preset information entropy threshold. This minimum information entropy quantifies the unpredictability of the random source in the worst-case scenario. If the minimum information entropy is less than the preset information entropy threshold, the original quantum random number sequence is considered to have passed the minimum information entropy test. If any test result does not meet the above conditions, the sequence segment is discarded, and the original quantum random number sequence output by the quantum random number generator is obtained again, and the above verification and screening process is repeated until an effective quantum random number sequence that meets all verification conditions is obtained.
[0097] Step 102: Perform entropy extraction on the effective quantum random number sequence according to the set sampling number to construct the target coding basis.
[0098] To extract pure random bits that meet the coding basis length requirement from an effective quantum random number sequence, the length of the sequence to be extracted from the effective quantum random number sequence needs to be determined in advance. Here, the number of samples is set to be determined based on the number of coding bases and the minimum information entropy of the effective quantum random number sequence. Specifically, this can be achieved through the formula... The calculation is obtained to ensure that a length of [length] can be obtained after entropy extraction. , statistically uniform and mutually independent pure coding bases. Here To set the number of samples, For the number of coding bases, It represents the minimum information entropy.
[0099] Specifically, sequence segments of corresponding length can be continuously extracted from the effective quantum random number sequence according to a set sampling number as the original acquisition sequence for entropy extraction. During the extraction process, the continuity and integrity of the sequence segments must be ensured to avoid the loss, misalignment, or introduction of correlation of sequence bits due to the extraction operation, ensuring that the acquisition sequence can completely retain the randomness characteristics of the effective quantum random number sequence. Subsequently, entropy extraction is performed on the extracted acquisition sequence. In this embodiment, entropy extraction can adopt an extraction algorithm that conforms to cryptographic security standards. During the entropy extraction process, the acquisition sequence is used as input, and the algorithm performs entropy extraction on the sequence to obtain the target coding base. It can be understood that the target coding base carries the high randomness advantage of the effective quantum random number sequence and can fully adapt to the subsequent construction requirements of the quantum random coding matrix, providing a coding foundation for the subsequent conversion of the coding matrix into a spatial optical modulator driving signal and the realization of high-precision random coding modulation.
[0100] Step 103: Convert the quantum random coding matrix corresponding to the target coding basis into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to perform random coding modulation on the incident spatial light through the driving signal to obtain modulated light.
[0101] Understandably, the target coding basis is usually a one-dimensional sequence, which cannot directly form a one-to-one correspondence with the pixel array of a two-dimensional spatial light modulator. By using the quantum random coding matrix corresponding to the target coding basis, the one-dimensional target coding basis can be arranged into a two-dimensional matrix according to preset rules, so that the number of rows and columns of the matrix strictly matches the number of pixel rows and columns of the spatial light modulator. In this way, each element in the matrix corresponds to a pixel unit of the spatial light modulator, which can ensure that the random coding information is accurately and without distortion transmitted to the spatial light modulator, realizing high-fidelity random coding modulation of the incident spatial light. In other words, the matrix dimension and coding rules of the quantum random coding matrix are pre-adapted to the resolution and coding mode of the selected spatial light modulator. Thus, the number of rows and columns of the matrix corresponds to the number of pixel rows and columns of the spatial light modulator. Accordingly, the binary coding value of each element in the matrix corresponds to the bit information of the target coding basis, and all form a preset correspondence with the modulation state of the pixel unit of the spatial light modulator.
[0102] Since the quantum random coding matrix is essentially an abstract matrix carrying binary encoded information, it cannot be directly recognized by the spatial light modulator. A dedicated signal conversion module is needed to convert each binary encoded element in the matrix into a driving signal recognizable by the spatial light modulator. In this embodiment, the selected spatial light modulator is a binary amplitude modulator, and its driving signal is an electrical signal. Therefore, the conversion process can be as follows: convert the encoded element corresponding to 1 in the quantum random coding matrix into a high-level driving signal, and convert the encoded element corresponding to 0 in the quantum random coding matrix into a low-level driving signal. Specifically, during the conversion process, a signal calibration operation needs to be performed simultaneously to ensure that the converted driving signal meets the driving specifications of the spatial light modulator, avoiding modulation errors caused by signal distortion and level deviation. The calibration mainly includes two aspects: first, level calibration, ensuring that the amplitude of the high and low level signals is stable within the preset driving level range; second, timing calibration, ensuring that the transmission timing of the driving signal is synchronized with the pixel response timing of the spatial light modulator, so that the driving signal corresponding to each pixel unit can be accurately and synchronously transmitted to the control end of the corresponding pixel, avoiding encoding and modulation chaos caused by timing misalignment.
[0103] Correspondingly, after the driving signal is loaded into the spatial light modulator, it is stably transmitted to the control module of the spatial light modulator according to a preset transmission protocol. The control module distributes the driving signal to each pixel unit, establishing a corresponding control relationship between the driving signal and the pixel unit. This allows each pixel unit to control the spatial light modulator to perform random coding modulation on the incident spatial light according to the driving signal it receives. In the specific random coding modulation process, each pixel unit modulates the spatial light incident on its pixel region according to the coding rules of the quantum random coding matrix based on the driving signal it receives. That is, pixel units that receive high-level driving signals allow the incident light to pass through and maintain stable light intensity, while pixel units that receive low-level driving signals block the incident light from passing through. Through the coordinated modulation of all pixel units, the coding coupling between the incident spatial light and the quantum random coding matrix is achieved.
[0104] Furthermore, after modulation, a preset fiber collector can be used to collect the outgoing light after it has been encoded and modulated by the spatial light modulator, and simple stray light filtering can be performed on the outgoing light to ensure that the collected light is all effective light that has been randomly encoded and modulated.
[0105] The spatial light modulation method using quantum random number encoding provided in this application differs from current methods that combine random matrix encoding with lightweight neural networks. This application employs a quantum random number generator as an entropy source, performs verification and screening operations on its output original quantum random number sequence to obtain an effective quantum random number sequence, performs entropy extraction on the effective quantum random number sequence according to a set sampling number, constructs a target encoding basis, and determines the sampling number based on the number of encoding bases and the minimum information entropy of the effective quantum random number sequence. The quantum random encoding matrix corresponding to the target encoding basis is converted into a driving signal adapted to the spatial light modulator, thereby controlling the spatial light modulator to perform random encoding modulation on the incident spatial light to obtain modulated light. The entire process employs a quantum random number generator as an entropy source to perform verification and screening operations on the original quantum random number sequence. This fundamentally ensures the natural randomness and unpredictability of the original quantum random number sequence, accurately eliminating redundant information and abnormal data that do not meet the requirements of statistical randomness, ensuring that the effective quantum random number sequence possesses excellent statistical properties. Combined with a preset sampling quantity, entropy extraction is performed on the effective quantum random number sequence, achieving a precise match between the sampling quantity and the coding basis requirements and random number quality. This avoids problems such as insufficient coding basis randomness and poor modulation effect caused by insufficient sampling. Furthermore, the quantum random coding matrix corresponding to the target coding basis is converted into a driving signal adapted to the spatial light modulator, achieving seamless adaptation between quantum random coding and spatial light modulator hardware. This ensures that the driving signal can accurately control the spatial light modulator to perform random coding modulation on the incident spatial light, effectively improving the accuracy and flexibility of spatial light modulation, and giving the modulated light better randomness and anti-interference capabilities.
[0106] In practical applications, quantum random number generators, based on the inherent randomness and unpredictability of quantum physical processes, can fundamentally guarantee the high quality and non-replicability of random number sequences, providing highly secure and highly random foundational data for subsequent coding basis construction and spatial light modulation. Specifically, as shown in Figure 2, step 101 includes the following steps:
[0107] Step 201: Use a quantum random number generator as an entropy source to obtain the original quantum random number sequence output by it.
[0108] Step 202: Perform a statistical randomness test on the original quantum random number sequence to obtain the statistical test results.
[0109] Step 203: Based on the statistical test results passing the first test condition, calculate the minimum information entropy of the original quantum random number sequence.
[0110] Step 204: If the minimum information entropy passes the second test condition, then the original quantum random number sequence is determined as an effective quantum random number sequence.
[0111] In this embodiment, based on the inherent unpredictability of quantum physics, a raw quantum random number sequence can be continuously output. This raw quantum random number sequence is a binary sequence containing only two types of bit information: 0 and 1. The output rate and sequence length can be flexibly set according to the requirements of subsequent verification, screening, and encoding.
[0112] After obtaining the original quantum random number sequence, a statistical randomness test is first performed on it to preliminarily determine the statistical uniformity and lack of correlation of the sequence, obtaining the corresponding statistical test results. The statistical randomness test employs a multi-factor collaborative testing approach, including but not limited to bit balance tests, runs tests, and discrete Fourier transform tests. These multiple tests comprehensively verify the statistical characteristics of the original quantum random number sequence, avoiding the limitations of single tests and ensuring the accuracy and reliability of the test results. Furthermore, the randomness test can also incorporate arbitrary terms such as the longest 1 addition test and the random binary matrix rank test.
[0113] Furthermore, in pursuit of the highest level of security, quantum random number generators can employ device-independent quantum random number generation systems. By performing Bell tests and verifying that the results violate Bell's inequality, the true randomness in the output can be proven and guaranteed at the physical principle level.
[0114] Specifically, the statistical randomness test of the original quantum random number sequence includes the following steps:
[0115] Perform a bit balance test on the original quantum random number sequence to obtain the balance test result; and / or
[0116] Perform a run-length check on the original quantum random number sequence to obtain the run-length check result; and / or
[0117] The original quantum random number sequence is subjected to a discrete Fourier transform test to obtain the Fourier transform test result.
[0118] The specific balance test is achieved through the following process: the standardized balance test statistic is calculated based on the frequency of the set numbers in the original quantum random number sequence. The balance test statistic is used to measure the deviation between the observed proportion and the expected proportion. The balance test result is calculated based on the test statistic.
[0119] The above balance check assesses whether the ratio of 0s to 1s in a random sequence is close to the ideal 1:1. During the balance check, a null hypothesis can be given. The probability of 0 and 1 occurring is 1 / 2 each, then the frequency of 1 is calculated. This can be achieved using the following formula:
[0120]
[0121] in, The bit sequence output by the quantum random number generator, i.e., the original quantum random number sequence. The sequence length is given.
[0122] Then, the standardized equilibrium test statistic is calculated. This statistic measures the deviation between the observed proportion and the expected proportion and approximately follows a standard normal distribution. Specific equilibrium test statistic This can be achieved using the following formula:
[0123]
[0124] Further calculation of the equilibrium test results This can be achieved using the following formula:
[0125]
[0126] in, This is a complementary error function.
[0127] The specific run test is implemented through the following process: the standardized run test statistic is calculated based on the total number of runs in the original quantum random number sequence. The run test statistic is used to measure the degree of sequence oscillation. The run test result is calculated based on the run test statistic.
[0128] The aforementioned run is defined as a continuous segment of the same type of bits. The run test examines whether the length and number of runs in a sequence conform to the expectations of a random sequence, and whether there are patterns of oscillation that are too fast or too slow. During the run test, a null hypothesis can be given. The sequence is random, and the number and length of runs conform to the theoretical expectations of a random sequence. Then, the frequency of 1s in the sequence is calculated. This can be achieved using the following formula:
[0129]
[0130] Correspondingly, the frequency of 0 in the sequence is Further calculate the total expected value of the run. and variance This can be achieved using the following formula:
[0131]
[0132]
[0133] Then, the standardized runs test statistic is calculated. This statistic measures the oscillation of the sequence and approximately follows a standard normal distribution. Specific runs test statistic This can be achieved using the following formula:
[0134]
[0135] in, This represents the total number of runs in the sequence.
[0136] Further calculation of the run test results This can be achieved using the following formula:
[0137]
[0138] The specific Discrete Fourier Transform (DFT) test is implemented through the following process: mapping the original quantum random number sequence into a numerical sequence; performing a Discrete Fourier Transform on the numerical sequence to obtain the DFT test result.
[0139] The Discrete Fourier Transform (DFT) test described above detects the presence of hidden periodicity, repetitive patterns, or symmetry in a sequence. These patterns may be difficult to detect in the time domain, but after a Fourier transform to the frequency domain, they will manifest as abnormally high power in certain frequency components. The null hypothesis can be given. The power spectrum of the sequence is flat. Then the bit sequence is... Mapped to numerical sequences This can be achieved using the following formula:
[0140]
[0141] Further performing a discrete Fourier transform on the numerical sequence, the following formula can be simplified using conjugate symmetry:
[0142]
[0143] Pick Calculate the threshold This can be achieved using the following formula:
[0144]
[0145] in, It is the theoretical percentage The magnitude of the value should not exceed a threshold under the random assumption. Take the theoretical expected value. , The actual observed modulus Medium less than the threshold The number of [values]. Then calculate the discrete Fourier test statistic. This statistic measures the flatness of a sequence in the discrete Fourier domain and approximately follows a standard normal distribution. Specific Discrete Fourier Test Statistic This can be achieved using the following formula:
[0146]
[0147] Further calculation of the discrete Fourier test results This can be achieved using the following formula:
[0148]
[0149] Accordingly, if the results of the balance test, the runs test, and the Fourier transform test are all greater than their respective set statistical thresholds, the statistical test result is determined to pass the first test condition.
[0150] For example, setting a statistical threshold Statistical randomness tests were performed on the original quantum random number sequence, and the results were obtained respectively. , , All test results were above the statistical threshold. The original quantum random number sequence is determined to pass the first test condition, that is, the original quantum random number sequence passes the statistical randomness test.
[0151] For easier practical application, statistical randomness testing can also utilize mature random number statistical testing suites, such as the NIST SP 800-22 test suite. This suite contains 15 different statistical tests, each targeting one or more specific non-random patterns that a random sequence may possess. It is a globally recognized and authoritative benchmark for randomness testing in the fields of cryptography and information security. The original quantum random number sequence passed all 15 tests of the NIST SP 800-22 suite.
[0152] Further calculation of the minimum information entropy of the original quantum random number It should be noted that for simple calculations under the condition of independent and identically distributed systems, ,in, The 0-1 frequency entropy is obtained by counting the frequencies of 0 and 1 in the sequence. This process can be achieved using the following formula:
[0153]
[0154] Accordingly, if the minimum information entropy is greater than the set information entropy threshold, the minimum information entropy is determined to pass the second test condition.
[0155] For example, this embodiment sets an information entropy threshold. The minimum information entropy obtained by calculating the original sequence of original quantum random numbers. Above the information entropy threshold The original quantum random number sequence is determined to pass the second test condition, that is, the original quantum random number sequence passes the minimum information entropy test.
[0156] In practical applications, the process of verifying and screening the original electronic random number sequence can be seen in Figure 3. In Figure 3, the quantum random number generator is first started to generate the original quantum random sequence. This was used as the initial input data for verification and screening; subsequently, three cooperative statistical randomness tests were performed on the original quantum random sequence, and the significance level of each test was calculated. The uniformity of the distribution of 0 and 1 in the sequence is verified by the 0-1 frequency test, and the results are obtained. The run-length test verifies whether the length distribution of consecutive 0s or 1s conforms to random characteristics, yielding the following results. The discrete Fourier test is used to verify whether the sequence has hidden periodicity or frequency correlation. Next, all inspection items will be... Compare with the preset significance level α. If all conditions are met... If the result is ≥α, then the sequence passes the statistical randomness test; if any test condition is not met, return to the starting point of the process and regenerate the original quantum random sequence; for sequences that pass the statistical randomness test, further calculate their minimum entropy. This is used to quantify the unpredictability of the sequence in the worst-case scenario; then the calculated minimum entropy is... With the preset minimum entropy threshold Perform a comparison; if the conditions are met... ≥ If the sequence passes all the verification screenings, it is determined that the sequence has passed all the verification screenings; if it does not meet the requirements, the process returns to the starting point and the original quantum random sequence is regenerated; when the sequence passes both verification conditions at the same time, the original quantum random sequence is determined to be a valid quantum random number sequence, the process ends and the verification result is output, and the valid sequence can be directly used for the construction of the subsequent target coding basis.
[0157] In practical applications, although effective quantum random number sequences have been verified and screened, their minimum information entropy may not reach the ideal bit / symbol ratio due to minor factors such as hardware noise and system errors, exhibiting weak bit correlation or bias. Directly truncating a sequence of a set length as the encoding basis cannot guarantee its complete randomness. Therefore, before entropy extraction, a set sampling number needs to be calculated to ensure that after extracting the entropy from the effective quantum random number sequence, a pure encoding basis of the set length that meets the requirements can be accurately obtained, avoiding problems such as insufficient randomness and modulation distortion caused by an unreasonable sampling number. Furthermore, as shown in Figure 4, before step 102, the method also includes the following steps:
[0158] Step 301: Determine the number of bits and elements required to construct the coding base based on the resolution and coding mode of the spatial light modulator.
[0159] Step 302: Determine the number of encoding bases based on the number of bits and the number of elements.
[0160] Step 303: Calculate the set sampling number based on the number of encoding bases and the minimum information entropy of the effective quantum random number sequence.
[0161] In this embodiment, the resolution of the spatial light modulator determines the number of rows and columns of its pixel array, while the coding mode clarifies the bit information required for encoding and modulation of a single pixel unit. Combining the dual requirements of hardware and modulation rules, the number of bits corresponding to each element in a single coding base can be accurately defined, as well as the total number of coding base elements required to complete one complete optical modulation, providing a basis for determining the number of coding bases in the future.
[0162] Further, based on the number of bits and the number of elements, the number of coding bases is determined. Here, the determination of the number of coding bases is matched with the overall coding and modulation logic of the spatial light modulator. Combining the bit carrying capacity and element scale of a single coding base, the total number of target coding bases required to complete the optical modulation task in the full pixel array and full coding mode of the spatial light modulator is calculated to ensure that the overall scale of the coding bases can cover all the modulation requirements of the spatial light modulator.
[0163] Finally, based on the calculated number of coding bases and the minimum information entropy of the effective quantum random number sequence obtained after preliminary verification and screening, the set sampling number is calculated using the correspondence between Shannon entropy and the number of bits. The minimum information entropy of the effective quantum random number sequence quantifies the actual random information content of its unit element. Combined with the total number of target coding bases, the required scale of elements in the effective quantum random number sequence to be collected is calculated using the corresponding algorithm, which is the set sampling number. This value can compensate for the potential small randomness deviations of the effective quantum random number sequence, ensuring that after sampling at this number and performing entropy extraction, a target coding base that meets all parameter requirements and possesses complete randomness can be constructed.
[0164] Understandably, the target coding basis is the fundamental random unit of the quantum random coding matrix. The quantum random coding matrix is a two-dimensional pixel structure adapted to the spatial light modulator based on the target coding basis. It uses the bit information of the target coding basis as its sole data source and completely inherits the quantum randomness of the coding basis. In other words, the number of samples can be set based on the numerical type of the quantum random coding matrix to determine the number of bits required to construct each coding element. To further determine the total number of elements required for the encoding matrix So let's set the number of samples to be For constructing ordinary random matrices, ,in, This represents the number of rows and columns of the matrix; for a cyclic random matrix, ,in, This represents the number of column elements in the matrix. The length of any segment is... A continuous bit sequence is processed according to its numerical type to obtain a sequence of length . A random numerical sequence. Finally, any one of the following methods is selected: SHA-1, SHA-224, SHA-256, von Neumann corrector, or cyclic redundancy check for a length of... Entropy extraction is performed on the sequence to obtain a sequence of length [length missing]. random numerical sequences That is, the target coding base.
[0165] In practical applications, the process of performing entropy extraction on an effective quantum random number sequence can be seen in Figure 5. In Figure 5, the first step is to determine the number of elements required to construct the encoding basis. Minimum information entropy of an effective quantum random sequence Through formula The set number of samples was calculated. This step ensures that the sampled sequence contains sufficient random information to provide ample raw data for subsequent entropy extraction; then, from the original quantum random sequence... The continuous cut length is The sampling sequence is divided into several segments of length [missing information]. Each segment is then expanded to 512 bits by adding random bits, forming an extended sequence consisting of multiple 512-bit blocks. This provides a standard-length input unit for the entropy extraction operation; then, the extended sequence is subjected to the SHA-256 entropy extraction operation to remove residual bit correlation and statistical bias, resulting in a statistically uniform and mutually independent pure binary sequence.
[0166] The pure sequence described above can be used directly as the target coding basis, or it can be further reshaped into a quantum random coding matrix. Specifically, various quantum random coding matrices can be generated through different construction methods:
[0167] An orthogonal random matrix is constructed by QR decomposition;
[0168] A staircase random matrix is obtained by constructing a staircase mapping;
[0169] A cyclic random matrix is obtained by cyclic shifting.
[0170] Accordingly, step 102 includes the following steps:
[0171] A sampling sequence of corresponding length is extracted from the effective quantum random number sequence according to the set sampling quantity;
[0172] An entropy extraction algorithm is used to perform entropy extraction on the sampled sequence to obtain a statistically uniform and mutually independent binary sequence, which is used as the target coding base.
[0173] The entropy extraction algorithm used in this embodiment is a randomness purification algorithm that conforms to cryptographic security standards. It can effectively remove residual minute bit correlations, redundant information, and potential statistical biases in the sampled sequence, further improving the randomness purity of the sequence. During entropy extraction, the sampled sequence is used as the algorithm input. The sequence is purified according to preset operational rules, accurately eliminating invalid and redundant components and retaining only the core random bits with excellent statistical properties. After entropy extraction, a binary sequence with a length adapted to the coding base construction requirements, statistically completely uniform, and with mutually independent bits is output. This binary sequence is determined as the target coding base. This target coding base fully inherits the inherent high randomness characteristics of quantum random numbers, and its bit size and statistical properties precisely match the requirements for constructing the subsequent quantum random coding matrix. It provides a pure and reliable core random basic unit for the structured arrangement of the coding matrix and the driving signal conversion of the spatial light modulator.
[0174] In practical applications, because the quantum random coding matrix is an abstract digital data structure, it cannot directly drive the spatial light modulator. Therefore, it needs to be converted into a driving signal adapted to the hardware. By controlling the spatial light modulator to perform random coding modulation on the incident spatial light through this driving signal, the quantum random information in the coding matrix can be transformed into the physical characteristic distribution of the light field, enabling the output modulated light to carry high quantum-level randomness, providing the core basic optical signal for subsequent downstream optical applications. Specifically, as shown in Figure 6, step 103 includes the following steps:
[0175] Step 401: Pre-select a spatial light modulator and a coding matrix type that is compatible with the spatial light modulator according to the imaging task.
[0176] Step 402: Based on the encoding matrix type, construct the target encoding base into a quantum random encoding matrix of the corresponding encoding matrix type.
[0177] Step 403: Perform signal conversion processing on the quantum random coding matrix to convert the binary coding information of the quantum random coding matrix into a driving signal adapted to the spatial light modulator.
[0178] Step 404: The driving signal is loaded onto the spatial light modulator so that each pixel unit of the spatial light modulator is controlled by the driving signal to randomly encode and modulate the incident spatial light according to the encoding rules of the quantum random coding matrix, so as to obtain the modulated light that meets the requirements of the imaging task.
[0179] In this embodiment, the requirements of the imaging task, such as resolution, imaging rate, and modulation accuracy, determine the selection criteria for the spatial light modulator, including parameters such as pixel resolution, modulation type, and response rate. At the same time, based on the hardware working principle and pixel array arrangement of the selected spatial light modulator, an encoding matrix type that is compatible with its hardware characteristics and modulation logic is selected to ensure that the subsequently constructed quantum random encoding matrix can fully match the working requirements of the spatial light modulator, thus laying the hardware and type foundation for subsequent encoding matrix construction and optical modulation operations.
[0180] Furthermore, in the process of constructing a quantum random coding matrix of the corresponding coding matrix type based on the target coding base, the quantum random coding matrix is composed of several statistically uniform and mutually independent target coding bases arranged according to a preset rule. The target coding base is a one-dimensional binary basic unit with complete randomness. Specifically, according to the structural requirements of the selected coding matrix type, a corresponding number of target coding bases are selected, and the one-dimensional target coding bases are integrated into a quantum random coding matrix that meets the type requirements according to preset row and column arrangement, unit combination, and other rules. In this process, each target coding base maintains its statistically uniform and mutually independent characteristics through entropy extraction processing, ensuring that the constructed quantum random coding matrix as a whole inherits high quantum-level randomness, has no redundant correlation, and that the structure and dimension of the matrix completely match the selected coding matrix type and the hardware specifications of the spatial light modulator.
[0181] The aforementioned spatial light modulator can be any of a liquid crystal light valve, a digital micromirror device, a rotating mask, or a deformable film. For constructing a quantum random coding matrix of the ordinary random matrix type, a random numerical sequence can be used. Directly rearranged as The encoding matrix is sufficient. For constructing a quantum random encoding matrix of the orthogonal random matrix type, first, the random numerical sequence... Rearranged as matrix Then, the QR decomposition method is used to decompose the components. Decompose into orthogonal matrices and upper triangular matrix The product of This is the orthogonal random matrix we are looking for. For constructing quantum random encoded matrices of the cyclic random matrix type, the random numerical sequence can be... As the first row of the encoding matrix, the first row is cyclically shifted. The position is the first This allows us to construct a cyclic random matrix. For constructing a quantum random encoding matrix of the echelon matrix type, we first process the random numerical sequence... Rearranged as matrix Given the order length as ladder sequence Further, according to the following formula, Map to the corresponding ladder element.
[0182]
[0183] After obtaining the aforementioned quantum random coding matrix, to ensure its accurate adaptation to the spatial light modulator hardware operating characteristics, the constructed coding matrix can be limited and mapped according to actual hardware requirements. Limiting primarily constrains the numerical range of each element in the coding matrix. An effective threshold is set based on the driving parameters of the spatial light modulator, eliminating or adjusting coding values exceeding the threshold to ensure all elements are within the range where the hardware can respond normally, avoiding modulation failure or hardware damage without altering the matrix's randomness. Mapping then maps the limited coding values to a form directly recognizable by the hardware, according to the type and coding rules of the spatial light modulator, establishing a one-to-one correspondence between coding elements and pixel modulation states. This entire process allows the quantum random coding matrix to fully adapt to hardware specifications while retaining its original high randomness, preparing for subsequent drive signal conversion and optical modulation, and ensuring accurate and reliable modulation results.
[0184] Accordingly, during the signal conversion process of the quantum random coding matrix, the driving signal is an electrical or optical signal recognizable by the spatial light modulator. This process can be achieved through a dedicated signal conversion module, which converts the binary coding information of each element in the matrix into a physical signal that matches the hardware driving specifications of the spatial light modulator. For an electrically driven spatial light modulator, the signal is converted into a corresponding TTL level, analog voltage, or other electrical signal; for an optically driven spatial light modulator, the signal is converted into a corresponding light intensity, light phase, or other optical signal, ensuring that the converted driving signal conforms to the recognition and execution standards of the spatial light modulator in terms of signal type, amplitude, and timing.
[0185] Finally, after the driving signal is loaded into the spatial light modulator, it can be stably loaded into the control module of the spatial light modulator through a dedicated signal transmission link. The control module distributes the driving signal to the corresponding pixel unit one by one, so that each pixel unit enters a preset working state according to the received driving signal. When the incident spatial light shines on the modulation surface of the spatial light modulator, each pixel unit works together according to the encoding rules of the quantum random coding matrix to perform targeted random coding modulation on the physical characteristics of the incident spatial light, such as amplitude, phase or polarization. The final output light completely carries the high randomness characteristics of the quantum random coding matrix in the light field distribution, and its modulation effect accurately matches the core requirements of the imaging task, such as resolution and contrast, which is the modulated light that meets the requirements of the imaging task.
[0186] In practical applications, the encoded and modulated measurement vector is merely abstract digital data carrying information about the target object. It lacks intuitive spatial distribution features and cannot be directly presented as a visual image. The reconstruction algorithm possesses data processing, feature extraction, and spatial mapping capabilities. It can eliminate redundant encoded information through computation, restore the core imaging features of the target object such as spatial grayscale and contour, and transform the abstract digital information into a two-dimensional / three-dimensional visual image that conforms to human vision, thus realizing the transformation from digital light signals to an actual observable image of the target object. Furthermore, as shown in Figure 7, before step 103, the method also includes the following steps:
[0187] Step 501: Use a single-pixel detector to collect the modulated light signal after the modulated light is reflected or transmitted through the target object.
[0188] Step 502: The modulated optical signal is preprocessed into a measurement vector, and the measurement matrix formed by the quantum random coding matrix is input into the reconstruction algorithm to reconstruct the image of the target object and obtain the image of the target object.
[0189] In this embodiment, the single-pixel detector, as the core device for optical signal acquisition, possesses high sensitivity and high response speed, enabling it to accurately capture weak modulated light signals after being acted upon by a target object. During the acquisition process, modulated light shines onto the surface of the target object; some light is reflected by the target object, while some penetrates the target object to form transmitted light. This process can employ either reflection or transmission modes, preset according to the imaging task and the characteristics of the target object. Both methods result in the modulated light carrying spatial distribution information of the target object. The single-pixel detector receives this modulated light signal carrying target information in real time, converting the light intensity signal in the optical domain into an electrical signal, completing the initial conversion from optical signal to electrical signal, and providing an operable basic signal for subsequent signal preprocessing.
[0190] Understandably, the electrical signal output by a single-pixel detector suffers from weak noise and amplitude fluctuations, and being a continuous analog signal, it cannot be directly input into the reconstruction algorithm. Therefore, preprocessing of the electrical signal is necessary. This preprocessing can include, but is not limited to, compensating for system nonlinearity and drift, temporal or spatial filtering, histogram equalization or contrast stretching, and ROI extraction. Specifically, environmental noise and equipment interference are first removed from the signal, retaining the effective modulation signal. Then, the continuous electrical signal is converted into a discrete digital signal. Finally, the digital signal is normalized to a preset numerical range, ultimately forming a structured, digitized measurement vector. This measurement vector fully carries the modulated light signal information after being acted upon by the target object and meets the input requirements of the reconstruction algorithm.
[0191] The measurement matrix is formed by adapting the quantum random coding matrix to the reconstruction algorithm's operational rules after amplitude limiting and mapping preprocessing. It accurately records all the random coding logic of the previous optical modulation and serves as the core basis for the algorithm's reverse calculation. Specifically, after receiving the measurement vector and measurement matrix, the reconstruction algorithm cancels the modulation effect of the quantum random coding on the optical signal through matrix operations and reverse decoding, extracting the spatial distribution features of the target object carried in the measurement vector. Then, through data fitting and spatial mapping, the abstract digital features are transformed into a two-dimensional visual image that conforms to human visual habits, ultimately outputting a clear and complete image of the target object, completing the closed loop of the entire imaging process.
[0192] Throughout the process, single-pixel detection ensures the accuracy of light signal acquisition, signal preprocessing realizes the conversion of light signals into digital vectors, and reconstruction algorithms complete the restoration of digital information into visualized images. The three work together to effectively ensure the reconstruction accuracy of the target object image.
[0193] Based on the aforementioned spatial light modulation process encoded by quantum random numbers, this embodiment uses a double-precision ordinary quantum random matrix for testing, with a matrix size of [missing information]. The SHA-256 algorithm is used for entropy extraction. A common quantum random matrix refers to a matrix that maps the entropy-extracted random numerical sequence to... and reconstructed into A coding matrix of a certain size was used, and the Total Variation Minimization Algorithm (TVAL3) based on the Augmented Lagrange Alternating Direction Method was selected as the reconstruction and restoration algorithm. The modulation and demodulation process of the image was simulated, and the restoration effect of the quantum random matrix and pseudo-random matrix modulated signal under the TVAL3 algorithm was compared. For a specific comparison of the error of quantum random number and pseudo-random number reconstruction, please refer to the following flowchart. Among them, Figure 8a shows the reconstruction results at a sampling rate of 10% and Figure 8b shows the reconstruction error bar charts of quantum random matrices and pseudo-random matrices modulated signals of different original images under the TVAL3 algorithm, with modulation matrices of varying sizes; Figure 8b shows the reconstruction error bar charts of quantum random matrices and pseudo-random matrices modulated signals of different original images with fixed original images and Figure 8c shows the reconstruction error of the handwritten digit 3 modulated by quantum random matrix and pseudo-random matrix at different sampling rates under the TVAL3 algorithm, with modulation matrix of different sizes. Figure 8d shows the reconstruction result of the handwritten digit 3 modulated by pseudo-random matrix at a sampling rate of 10%, with the following specific reconstruction results: relative error: 17.70%, CPU: 0.06s. Figure 8e shows the reconstruction result of the handwritten digit 3 modulated by quantum random matrix at a sampling rate of 10%, with the following specific reconstruction results: relative error: 13.56%, CPU: 0.44s.
[0194] Another embodiment uses a rotating mask as a spatial light modulator, and a binary numerical ladder quantum random matrix is selected for testing, with a matrix size of [missing information]. The SHA-256 algorithm was used for entropy extraction. The entropy-extracted random numerical sequence was then mapped to... and reconstructed into A coding matrix of size . Element 1 indicates that the beam is completely transmitted within the modulation unit, and element -1 indicates that the beam is completely reflected within the modulation unit. A modulation and demodulation system using a rotating mask as a spatial light modulator is given; the specific quantum random number modulation and demodulation system based on the mask is shown in Figure 9.
[0195] Furthermore, as a specific implementation of the above method, this application provides a quantum random number encoded spatial light modulation device, as shown in FIG10. The device includes: a verification unit 61, a construction unit 62, and a modulation unit 63.
[0196] Verification unit 61 is used to perform verification and screening operations on the original quantum random number sequence output by the quantum random number generator as an entropy source to obtain a valid quantum random number sequence;
[0197] Construction unit 62 is used to perform entropy extraction operation on the effective quantum random number sequence according to a set sampling number to construct a target coding basis. The set sampling number is determined based on the number of coding bases and the minimum information entropy of the effective quantum random number sequence.
[0198] The modulation unit 63 is used to convert the quantum random coding matrix corresponding to the target coding basis into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to perform random coding modulation on the incident spatial light through the driving signal to obtain modulated light.
[0199] The quantum random number encoded spatial light modulation device provided in this invention, compared with the current method of realizing spatial light modulation by combining random matrix encoding with lightweight neural networks, uses a quantum random number generator as an entropy source to perform a verification and screening operation on the original quantum random number sequence output by the generator to obtain an effective quantum random number sequence; an entropy extraction operation is performed on the effective quantum random number sequence according to a set sampling number to construct a target encoding basis. The set sampling number is determined based on the number of encoding bases and the minimum information entropy of the effective quantum random number sequence; the quantum random encoding matrix corresponding to the target encoding basis is converted into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to perform random encoding modulation on the incident spatial light through the driving signal to obtain modulated light. The entire process employs a quantum random number generator as an entropy source to perform verification and screening operations on the original quantum random number sequence. This fundamentally ensures the natural randomness and unpredictability of the original quantum random number sequence, accurately eliminating redundant information and abnormal data that do not meet the requirements of statistical randomness, ensuring that the effective quantum random number sequence possesses excellent statistical properties. Combined with a preset sampling quantity, entropy extraction is performed on the effective quantum random number sequence, achieving a precise match between the sampling quantity and the coding basis requirements and random number quality. This avoids problems such as insufficient coding basis randomness and poor modulation effect caused by insufficient sampling. Furthermore, the quantum random coding matrix corresponding to the target coding basis is converted into a driving signal adapted to the spatial light modulator, achieving seamless adaptation between quantum random coding and spatial light modulator hardware. This ensures that the driving signal can accurately control the spatial light modulator to perform random coding modulation on the incident spatial light, effectively improving the accuracy and flexibility of spatial light modulation, and giving the modulated light better randomness and anti-interference capabilities.
[0200] In specific application scenarios, the verification unit includes:
[0201] The acquisition module is used to acquire the original quantum random number sequence output by the quantum random number generator as an entropy source;
[0202] The first verification module is used to perform a statistical randomness test on the original quantum random number sequence and obtain the statistical test result.
[0203] The calculation module is used to calculate the minimum information entropy of the original quantum random number sequence based on the statistical test result passing the first test condition;
[0204] The second verification module is used to determine the original quantum random number sequence as a valid quantum random number sequence if the minimum information entropy passes the second verification condition.
[0205] In specific application scenarios, the first verification module is specifically used for:
[0206] Perform a bit balance test on the original quantum random number sequence to obtain the balance test result; and / or
[0207] Perform a run-length check on the original quantum random number sequence to obtain the run-length check result; and / or
[0208] The original quantum random number sequence is subjected to a discrete Fourier transform test to obtain the Fourier transform test result;
[0209] The balance test is performed through the following process: a standardized balance test statistic is calculated based on the frequency of a set number in the original quantum random number sequence. The balance test statistic is used to measure the deviation between the observed proportion and the expected proportion. The balance test result is then calculated based on the test statistic.
[0210] The run test is performed through the following process: a standardized run test statistic is calculated based on the total number of runs in the original quantum random number sequence, the run test statistic being used to measure the degree of sequence oscillation; and the run test result is calculated based on the run test statistic.
[0211] The Discrete Fourier Transform (DFT) test is performed through the following process: mapping the original quantum random number sequence to a numerical sequence; performing a Discrete Fourier Transform on the numerical sequence to obtain the DFT test result;
[0212] Accordingly, if the balance test result, the runs test result, and the Fourier transform test result are all greater than their respective set statistical thresholds, the statistical test result is determined to pass the first test condition.
[0213] If the minimum information entropy is greater than the set information entropy threshold, the minimum information entropy is determined to pass the second test condition.
[0214] In specific application scenarios, the device further includes:
[0215] The first determining unit is used to determine the number of bits and the number of elements required to construct the coding base according to the resolution and coding mode of the spatial light modulator before performing entropy extraction operation on the effective quantum random number sequence according to the set sampling number to construct the target coding base;
[0216] The second determining unit is used to determine the number of coding bases based on the number of bits and the number of elements;
[0217] The calculation unit is used to calculate the set number of samples based on the number of encoding bases and the minimum information entropy of the effective quantum random number sequence.
[0218] In specific application scenarios, the construction unit is specifically used for:
[0219] According to the set sampling quantity, a sampling sequence of corresponding length is extracted from the effective quantum random number sequence;
[0220] An entropy extraction operation is performed on the sampled sequence using a defined entropy extraction algorithm to obtain a statistically uniform and mutually independent binary sequence, which is used as the target coding base.
[0221] In specific application scenarios, the modulation unit is specifically used for:
[0222] The spatial light modulator and the encoding matrix type adapted to the spatial light modulator are pre-selected according to the imaging task;
[0223] According to the encoding matrix type, the target encoding basis is constructed into a quantum random encoding matrix of the corresponding encoding matrix type. The quantum random encoding matrix is composed of several statistically uniform and mutually independent target encoding bases arranged according to a preset rule.
[0224] The quantum random coding matrix is subjected to signal conversion processing to convert the binary coding information of the quantum random coding matrix into a driving signal adapted to the spatial light modulator. The driving signal is an electrical signal or an optical signal that can be recognized by the spatial light modulator.
[0225] The driving signal is applied to the spatial light modulator so that each pixel unit of the spatial light modulator is controlled by the driving signal to randomly encode and modulate the incident spatial light according to the encoding rules of the quantum random coding matrix, thereby obtaining modulated light that meets the requirements of the imaging task.
[0226] In specific application scenarios, the device further includes:
[0227] The acquisition unit is used to convert the quantum random coding matrix corresponding to the target coding basis into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to randomly code and modulate the incident spatial light through the driving signal to obtain the modulated light, and then use a single pixel detector to acquire the modulated light signal after the modulated light is reflected or transmitted by the target object.
[0228] The reconstruction unit is used to preprocess the modulated optical signal into a measurement vector, and input it together with the measurement matrix formed by the quantum random coding matrix into the reconstruction algorithm, so as to reconstruct the image of the target object through the reconstruction algorithm and obtain the image of the target object.
[0229] Based on the above-described quantum random number encoded spatial light modulation method, this application embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described quantum random number encoded spatial light modulation method.
[0230] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.
[0231] Based on the above-described quantum random number encoded spatial light modulation method and the corresponding virtual device embodiment, in order to achieve the above objectives, this application embodiment also provides a physical device for quantum random number encoded spatial light modulation, which can be a computer, smartphone, tablet computer, smartwatch, server, or network device, etc. The physical device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to implement the above-described quantum random number encoded spatial light modulation method.
[0232] Optionally, the physical device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0233] In an exemplary embodiment, referring to FIG11, the aforementioned physical device includes a communication bus, a processor, a memory, and a communication interface. It may also include an input / output interface and a display device. The various functional units can communicate with each other via the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the quantum random number encoded spatial light modulation method in the above embodiment.
[0234] Those skilled in the art will understand that the physical device structure for spatial light modulation with quantum random number encoding provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0235] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device for spatial light modulation using quantum random number encoding, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0236] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms, or it can be implemented by hardware. By applying the technical solution of this application, compared with the existing methods, this application uses a quantum random number generator as an entropy source to perform verification and screening operations on the original quantum random number sequence, which fundamentally guarantees the natural randomness and unpredictability of the original quantum random number sequence, and can accurately remove redundant information and abnormal data in the sequence that do not meet the requirements of statistical randomness, ensuring that the effective quantum random number sequence has excellent statistical characteristics; combined with the preset sampling quantity, the entropy extraction operation of the effective quantum random number sequence is performed to achieve precise matching between the sampling quantity and the coding base requirements and the quality of random numbers, avoiding the problems of insufficient coding base randomness and poor modulation effect caused by insufficient sampling; furthermore, the quantum random coding matrix corresponding to the target coding base is converted into a driving signal adapted to the spatial light modulator, realizing seamless adaptation between quantum random coding and spatial light modulator hardware, ensuring that the driving signal can accurately control the spatial light modulator to perform random coding modulation on the incident spatial light, effectively improving the accuracy and flexibility of spatial light modulation, and making the modulated light have better randomness and anti-interference ability.
[0237] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.
[0238] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A spatial light modulation method using quantum random number encoding, characterized in that, include: A quantum random number generator is used as an entropy source. A verification and screening operation is performed on the original quantum random number sequence output by the generator to obtain an effective quantum random number sequence. The verification and screening operation combines statistical randomness testing and minimum information entropy testing. An entropy extraction operation is performed on the effective quantum random number sequence according to a set sampling number, which is determined based on the number of coding bases and the minimum information entropy of the effective quantum random number sequence. The quantum random coding matrix corresponding to the target coding base is converted into a driving signal adapted to a spatial light modulator. The driving signal controls the spatial light modulator to perform random coding modulation on the incident spatial light, obtaining modulated light.
2. The method according to claim 1, characterized in that, The method of using a quantum random number generator as an entropy source to perform a verification and screening operation on its output original quantum random number sequence to obtain a valid quantum random number sequence includes: using a quantum random number generator as an entropy source to obtain its output original quantum random number sequence; performing a statistical randomness test on the original quantum random number sequence to obtain a statistical test result; calculating the minimum information entropy of the original quantum random number sequence based on the statistical test result passing a first test condition; and determining the original quantum random number sequence as a valid quantum random number sequence if the minimum information entropy passes a second test condition.
3. The method according to claim 2, characterized in that, The statistical randomness test of the original quantum random number sequence to obtain the statistical test result includes: performing a bit balance test on the original quantum random number sequence to obtain a balance test result; and / or performing a run test on the original quantum random number sequence to obtain a run test result; and / or performing a discrete Fourier transform test on the original quantum random number sequence to obtain a Fourier transform test result; the balance test is implemented through the following process: calculating a standardized balance test statistic based on the frequency of a set number in the original quantum random number sequence, the balance test statistic being used to measure the deviation between the observed proportion and the expected proportion; calculating the balance test result based on the test statistic; the run test is implemented through the following process: root A standardized run test statistic is calculated based on the total number of runs in the original quantum random number sequence. This run test statistic measures the degree of sequence oscillation. A run test result is calculated based on the run test statistic. The discrete Fourier transform test is implemented through the following process: mapping the original quantum random number sequence to a numerical sequence; performing a discrete Fourier transform on the numerical sequence to obtain a discrete Fourier test result; if the balance test result, the run test result, and the Fourier transform test result are all greater than their respective set statistical thresholds, the statistical test result is determined to pass the first test condition; if the minimum information entropy is greater than a set information entropy threshold, the minimum information entropy is determined to pass the second test condition.
4. The method according to claim 1, characterized in that, Before performing entropy extraction on the effective quantum random number sequence according to the set sampling number to construct the target coding base, the method further includes: determining the number of bits and elements required to construct the coding base according to the resolution and coding mode of the spatial light modulator; determining the number of coding bases according to the number of bits and elements; and calculating the set sampling number according to the number of coding bases and the minimum information entropy of the effective quantum random number sequence.
5. The method according to claim 1, characterized in that, The step of performing entropy extraction on the effective quantum random number sequence according to a set sampling number to construct a target coding base includes: extracting a sampling sequence of a corresponding length from the effective quantum random number sequence according to the set sampling number; and performing entropy extraction on the sampling sequence using a set entropy extraction algorithm to obtain a statistically uniform and mutually independent binary sequence as the target coding base.
6. The method according to any one of claims 1-5, characterized in that, The step of converting the quantum random coding matrix corresponding to the target coding base into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to randomly code and modulate the incident spatial light to obtain modulated light, includes: pre-selecting a spatial light modulator and a coding matrix type adapted to the spatial light modulator according to the imaging task; constructing the target coding base into a quantum random coding matrix of the corresponding coding matrix type according to the coding matrix type, wherein the quantum random coding matrix is composed of several statistically uniform and mutually independent target coding bases arranged according to a preset rule; performing signal conversion processing on the quantum random coding matrix to convert the binary coding information of the quantum random coding matrix into a driving signal adapted to the spatial light modulator, wherein the driving signal is an electrical signal or optical signal recognizable by the spatial light modulator; and loading the driving signal onto the spatial light modulator so as to control each pixel unit of the spatial light modulator to randomly code and modulate the incident spatial light according to the coding rule of the quantum random coding matrix to obtain modulated light that meets the requirements of the imaging task.
7. The method according to any one of claims 1-5, characterized in that, After converting the quantum random coding matrix corresponding to the target coding basis into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to randomly code and modulate the incident spatial light to obtain modulated light, the method further includes: using a single-pixel detector to collect the modulated light signal after the modulated light is reflected or transmitted through the target object; preprocessing the modulated light signal into a measurement vector, and inputting it together with the measurement matrix formed by the quantum random coding matrix into a reconstruction algorithm, so as to reconstruct the image of the target object through the reconstruction algorithm to obtain the image of the target object.
8. A spatial light modulation device encoded with quantum random numbers, characterized in that, include: The verification unit is used to perform a verification and screening operation on the original quantum random number sequence output by the quantum random number generator as an entropy source to obtain a valid quantum random number sequence. The verification and screening operation adopts a combination of statistical randomness test and minimum information entropy test. A construction unit is used to perform entropy extraction operation on the effective quantum random number sequence according to a set sampling number to construct a target coding basis. The set sampling number is determined based on the number of coding bases and the minimum information entropy of the effective quantum random number sequence. The modulation unit is used to convert the quantum random coding matrix corresponding to the target coding basis into a driving signal adapted to the spatial light modulator, so as to control the spatial light modulator to perform random coding modulation on the incident spatial light through the driving signal to obtain modulated light.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Optical fiber signal transmission system and method based on quantum noise encryption
CN120601999A
Quantum communications system using talbot effect image position and associated methods
US20210152346A1