Bose sampling inspection method, system, and medium
By forming clusters through a uniformly distributed cluster construction method and machine learning, the problem in existing technologies that it is difficult to distinguish Bose sampling from other distributed sampling within polynomial time is solved, and a more efficient Bose sampling test is achieved.
Patent Information
- Application Number
- CN202111586399.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2041-12-20
AI Technical Summary
Existing classical verification methods are difficult to effectively distinguish Bose sampling from other similar distribution samplings in polynomial time, and existing pattern recognition verification methods have high computing resource requirements in large-scale Bose sampling, making them difficult to achieve large-scale application.
A uniformly distributed clustering construction method is adopted to form clusters through machine learning, and a uniformly distributed sample set is used to distinguish between Bose sampling and completely different boson sampling samples, thereby reducing the amount of calculation and forming a stable clustering structure.
It achieves a wide distinction between Bose sampling and other similar distribution sampling within polynomial time complexity, reduces the amount of computation, and improves the visibility of the test effect.
Smart Images

Figure CN114358300B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Bose sampling classical testing, and in particular to a simple Bose sampling classical testing method, and more particularly to a Bose sampling testing method, system and medium. Background Art
[0002] Quantum computers, theoretically capable of exponentially accelerating classical computers on certain complex problems, have been a hot topic of research in recent years. However, current technology remains elusive for a highly reliable, general-purpose quantum computer. Therefore, the development of specialized quantum computers, such as the Bose sampling machine, holds great practical significance. Firstly, specialized quantum computers can solve problems too complex for classical computers, enabling breakthroughs in certain areas. Secondly, specialized quantum computers have the potential to achieve "quantum advantage" in the near term, thus overturning the broad "Church-Turing" thesis and laying the foundation for the development of quantum computers. The Bose sampling machine, a typical example of a specialized quantum computer, boasts a simple structure, diverse types, and ease of scalability. It demonstrates potential applications in fields such as quantum chemistry and artificial intelligence, and is currently one of the most promising approaches to achieving true "quantum advantage."
[0003] For samples generated by a Bose sampling machine, classical, polynomial-time verification methods are required to ensure that they do not come from similar distributions, such as, more importantly, completely different boson sampling distributions. Classical verification of Bose sampling is crucial for its application and the realization of quantum advantage, as it directly determines the reliability of the Bose sampling machine. However, classical verification methods for Bose sampling still face several challenges. For example, classical row norm estimation methods can only distinguish between Bose sampling and uniformly distributed samples, but cannot distinguish between Bose sampling and the more important completely different boson sampling. While methods such as likelihood ratio tests and Bayesian tests can effectively distinguish between Bose sampling and completely different boson sampling, they require computing a large number of complex matrix products and sums, resulting in time complexity far exceeding polynomials for classical computers and requiring significant computational resources.
[0004] So, is there a classical test method that can broadly distinguish Bose sampling from other similarly distributed samples while also having polynomial time complexity for classical computers? The pattern recognition test method proposed in 2019 provides a positive answer to this question. This method uses machine learning principles to form clusters and distinguishes samples by counting the number of samples in the clusters. Specifically, for Bose sampling and another type of sample to be distinguished, clusters are first formed using the Bose sampling samples. The samples to be distinguished are then added to the clusters based on proximity. The number of samples in each cluster is then counted and parameters calculated. The two samples are distinguished based on the differences in the distribution patterns formed by the statistical parameters. The effectiveness of the pattern recognition test method presupposes a "precise" Bose sampling machine. However, in reality, as the scale of Bose sampling increases, such a "precise" Bose sampling machine becomes difficult to build because errors, such as photon non-identity and photon loss, increase significantly with scale. At this point, a Bose sampling machine containing errors is often not simulated by classical algorithms in polynomial time, meaning that the Bose sampling machine loses its "quantum advantage." Based on this, this pattern recognition test method is difficult to apply on a large scale in reality. Summary of the Invention
[0005] In view of the defects in the prior art, the present invention provides a Bose sampling inspection method, system and medium.
[0006] According to a Bose sampling inspection method, system, and medium provided by the present invention, the scheme is as follows:
[0007] In a first aspect, a Bose sampling inspection method is provided, the method comprising:
[0008] Uniform distribution cluster construction steps: construct clusters based on the simulated sampling results that conform to the uniform distribution, and define the cluster center and cluster radius;
[0009] The step of distinguishing the samples to be distinguished: the clusters formed according to the uniformly distributed cluster construction step are used to distinguish the Bose sampling samples to be distinguished from completely different Boson sampling samples.
[0010] Preferably, the step of constructing evenly distributed clusters includes:
[0011] Generate uniform distribution sample set: Use computer to generate uniform distribution sample set that meets certain photon number and mode number;
[0012] Constructing clusters: Based on the uniformly distributed sample set, a machine learning clustering method is used to form clusters, and cluster centers and cluster radii are defined.
[0013] Preferably, the step of distinguishing the samples to be distinguished includes:
[0014] Generating a sample set to be distinguished: the Bose sampling sample set is generated by a Bose sampling machine in a real physical experiment or by computer simulation;
[0015] The completely different boson sampling sample sets are generated by computer simulation;
[0016] Fill the samples to be distinguished into clusters: For each sample in each set of samples to be distinguished, fill the sample into a cluster according to the second-order norm distance from the sample to the center of each cluster;
[0017] Differentiate the samples to be differentiated: Count the number of samples to be differentiated that are filled into the clusters and calculate the parameters to form a parameter distribution graph.
[0018] Preferably, the Bose sampling and the uniform sampling can also be distinguished, and it is only necessary to replace the completely different Boson sampling sample set generated by computer simulation with the uniform distribution sample set generated by computer simulation when generating the sample set to be distinguished.
[0019] In a second aspect, a Bose sampling inspection system is provided, the system comprising:
[0020] Uniformly distributed cluster construction module: constructs clusters based on simulated sampling results that conform to uniform distribution, and defines cluster centers and cluster radius;
[0021] A distinguishing module for samples to be distinguished: a cluster formed according to the evenly distributed cluster construction module to distinguish the Bose sampling samples to be distinguished from completely different Boson sampling samples.
[0022] Preferably, the evenly distributed cluster construction module includes:
[0023] Generate uniform distribution sample set: Use computer to generate uniform distribution sample set that meets certain photon number and mode number;
[0024] Constructing clusters: Based on the uniformly distributed sample set, a machine learning clustering method is used to form clusters, and cluster centers and cluster radii are defined.
[0025] Preferably, the distinguishing module for the samples to be distinguished includes:
[0026] Generating a sample set to be distinguished: the Bose sampling sample set is generated by a Bose sampling machine in a real physical experiment or by computer simulation;
[0027] The completely different boson sampling sample sets are generated by computer simulation;
[0028] Fill the samples to be distinguished into clusters: For each sample in each set of samples to be distinguished, fill the sample into a cluster according to the second-order norm distance from the sample to the center of each cluster;
[0029] Differentiate the samples to be differentiated: Count the number of samples to be differentiated that are filled into the clusters and calculate the parameters to form a parameter distribution graph.
[0030] Preferably, the Bose sampling and the uniform sampling can also be distinguished, and it is only necessary to replace the completely different Boson sampling sample set generated by computer simulation with the uniform distribution sample set generated by computer simulation when generating the sample set to be distinguished.
[0031] In a second aspect, a computer-readable storage medium storing a computer program is provided, wherein the computer program implements the steps in the method when executed by a processor.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] 1. Compared with traditional classical test methods, the present invention can simultaneously achieve a wide range of distinctions between Bose sampling and other similar distribution sampling, and has a polynomial level of time complexity for classical computers;
[0034] 2. Compared with the original pattern recognition test method, the present invention significantly reduces the amount of calculation required to form clusters by introducing uniformly distributed samples as the sample set for forming clusters, and is suitable for larger-scale Bose sampling classical tests;
[0035] 3. Since the clusters formed by uniformly distributed samples are more stable, the statistical parameter distribution patterns finally formed by the present invention are more clearly distinguishable, so the test effect is better. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0037] Figure 1 Statistical parameter distribution patterns generated for uniform distribution samples, Bose sampling samples, and completely different boson sampling samples. DETAILED DESCRIPTION
[0038] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.
[0039] The embodiment of the present invention provides a Bose sampling inspection method, referring to Figure 1 As shown, the method includes:
[0040] Uniformly distributed cluster construction steps: construct clusters based on simulated sampling results that conform to uniform distribution, and define cluster centers and cluster radius;
[0041] Specifically, the step includes: generating a uniformly distributed sample set: using a computer to generate a uniformly distributed sample set that meets a certain number of photons and mode numbers;
[0042] Construct clusters: Based on the uniformly distributed sample set, use typical machine learning clustering methods to form clusters and define the cluster center and cluster radius.
[0043] The step of distinguishing the samples to be distinguished: the clusters formed according to the uniformly distributed cluster construction step are used to distinguish the two samples to be distinguished, namely, the Bose sampling sample and the completely different boson sampling sample.
[0044] This step includes: generating a set of samples to be distinguished: the Bose sampling sample set is generated by a Bose sampling machine in a real physical experiment, or by computer simulation; the completely different boson sampling sample set is generated by computer simulation; filling the samples to be distinguished into clusters: for each sample in each set of samples to be distinguished, the sample is filled into the cluster according to the second-order norm distance from the sample to the center of each cluster; distinguishing the samples to be distinguished: counting the number of samples to be distinguished filled into the clusters respectively and performing parameter calculation to form a parameter distribution diagram, and finding that the two distribution diagrams have obvious differences, thereby realizing the distinction between the Bose sampling samples and the completely different boson sampling samples.
[0045] The classical test method for Bose sampling can not only distinguish the Bose sampling from the completely different boson sampling, but also distinguish Bose sampling from the uniform sampling. It only requires replacing the completely different boson sampling sample set generated by computer simulation with the uniformly distributed sample set generated by computer simulation when generating the sample set to be distinguished.
[0046] Next, the present invention will be described in more detail.
[0047] The Bose sampling process can be described as a process in which n identical photons enter an m-dimensional optical network to form multiphoton interference and are sampled at the end of the optical network. In order not to reduce the time complexity of Bose sampling for classical computers, it is usually agreed that m = O(n 2 ). In this case, due to the boson birthday paradox, the probability of two or more photons appearing in the same mode at the time of sampling is almost zero. Based on this, for an input mode S, the unitary matrix of the optical network is U, and the probability of the output mode T can be expressed as:
[0048] P=|Per(U (T,S) )| 2
[0049] Among them, Per() represents the matrix product function, U (T,S) Represents the n-dimensional submatrix of the optical network corresponding matrix U, t and s traverse all elements of T and S respectively.
[0050] U (T,S) The construction method is as follows: for the kth (k=1,2,...,m) element t in T k , take the kth row of U and copy t k Part, traverse all elements in T to obtain the transition matrix U T ; For the kth (k=1,2,...,m) element s in S k , take U T and copy the kth column of s k Part, traverse all elements in S to get U (T,S) Since the probability calculation process of the output pattern involves the calculation of complex matrix products and sums, it is a #P-hard problem with exponential time complexity. The calculation of complex matrix products and sums can be obtained using the Glynn method, which is as follows:
[0051]
[0052] Among them, M is a complex matrix, m i,j is the element in the i-th row and j-th column of M; the first element of the n-dimensional vector δ is fixed to 1, and the subsequent elements are 1 or -1, and δ traverses all combinations of the permutation.
[0053] Correspondingly, for completely different bosonic sampling processes, the probability of their output modes can be expressed as:
[0054] P=Per(|U (T,S) | 2 )
[0055] Because |U (T,S) | 2 Each term in is a non-negative real number, and the evaluation of its product-sum formula has been shown to be polynomial time complexity for classical computers. Based on this, we can obtain samples of uniform distribution sampling, Bose sampling, and completely different boson sampling.
[0056] For uniformly distributed samples, computer simulation method is used to obtain the result, and the time complexity of the process is at the polynomial level.
[0057] The process is as follows:
[0058] 1. Generate an m-dimensional list [0] m ;
[0059] 2. Randomly select an element from the list and add 1 to replace the original element. Repeat this process n times.
[0060] This way, we get a sample that conforms to the uniform distribution. Repeat the above process to get multiple samples that conform to the uniform distribution.
[0061] Bose sampling samples can be obtained directly through a real Bose sampling machine or through computer simulation. The computer simulation methods of Bose sampling include Brute-force method, MCMC method and Clifford-Clifford method. Here we use Clifford-Clifford method to obtain Bose sampling samples. The time complexity of this process is O(n2 n +ploy(m,n)). The process of obtaining a Bose sampling sample using the Clifford-Clifford method is as follows:
[0062] 1. For the kth (k=1,2,...,m) element s in S k , take the kth column of U and copy s k Part, traverse all elements in S to get U S ;
[0063] 2. Change U S The columns of are shuffled to obtain the matrix A;
[0064] 3. Initialize the list R to be an empty set. The first element of R is sampled from the order of the elements according to a probability distribution proportional to the square of the modulus of each element in the first column of matrix A. For example, if the probability of the first and second elements in the first column of matrix A being 20% and 30% respectively, then the probability of the first element of R being 1 and 2 is 20% and 30% respectively.
[0065] 4. For each number t from 2 to n, perform the following operations in sequence: ① For element r in R, take the rth row of A, traverse all elements in R, and obtain the matrix A R ; For element u in [1,2,...,t], take A R The u-th column of , traverse [1,2,...,t], and get the matrix And the matrix Assign to ②For each element l in [1,2,...,t], perform the following operations: Delete the lth column of And calculated by Glynn method The process uses Gray code and other means to significantly reduce the computational time complexity, making it possible to calculate a set of The time complexity is only O(t2 t ). ③For each element i in [1,2,...,m], for each element l in [1,2,...,t], let a i,l For the element in the ith row and lth column of matrix A, calculate And assign it to w i . After getting m groups w i Then we get [w1,w2,...,w m ], then w i Perform normalization. i As a probability, i is sampled and the sampling results are expanded into R.
[0066] 5. Generate m-dimensional list T = [0] m For element r in R, add 1 to the r-th element of T and traverse R. T is a Bose sampling result generated by the Clifford-Clifford method.
[0067] For completely different boson sampling samples, we simulate them on a classical computer using the MCMC method.
[0068] The process is as follows:
[0069] 1. Generate uniformly distributed samples g;
[0070] 2. According to the probability distribution of g, randomly generate the first sample x;
[0071] 3. Randomly generate a second sample x' that obeys g and accept the sample with probability T, which can be expressed as:
[0072]
[0073] Where f is the probability of sampling completely different bosons.
[0074] 4. Repeat step 3 to generate a series of sample sets;
[0075] 5. From the tth burn Samples start to generate a Markov chain;
[0076] 6. To remove sample autocorrelation, every t thin One sample is taken from the samples as a valid sample to form a sample set that conforms to the probability distribution of completely different boson sampling f.
[0077] After obtaining uniformly distributed samples, Bose sampling samples, and completely different boson sampling samples, we use an improved pattern recognition method to distinguish between Bose sampling and the other two types of samples. First, we use the uniformly sampled samples to form clusters. The clustering method is K-means++ and the majority voting method. The process is as follows:
[0078] 1. Use computer simulation to generate uniformly distributed sample set S u , the dimension of each sample in the sample set is m, and the sum of the elements in the sample is n;
[0079] 2. From S u A sample is randomly selected as the first center, the second-order norm distance from the remaining samples to the center is calculated, and the second center is selected with a probability proportional to the square of the distance. The second-order norm distance between two samples can be expressed as:
[0080]
[0081] in, and φ are two samples respectively.
[0082] 3. Calculate the second-order norm distance from the remaining samples to the nearest center, select a new center with a probability proportional to the square of the distance, and repeat the process until the K groups of initial centers are determined;
[0083] 4. Place the samples into clusters with fixed centers according to the principle of proximity, generating K groups of clusters;
[0084] 5. Re-cluster with the centroid of the K clusters as the center, and repeat the process until the clusters formed no longer change. In fact, the final cluster may also appear to change repeatedly between two states. At this time, one of the states is randomly selected as the formed cluster;
[0085] 6. Repeat steps 2 to 5 for an odd number of repetitions. Perform majority voting on the clusters formed in the odd number of repetitions to select the final cluster.
[0086] 7. After obtaining the clusters, the two samples to be tested are placed in the clusters according to the principle of proximity, and the number of the two samples to be tested in the clusters is counted to calculate χ 2 , χ 2 It can be expressed by the following formula:
[0087]
[0088] E ij =N i N j / N c
[0089]
[0090]
[0091] Among them, N c is the number of clusters, N ij is the number of samples of type j in the i-th cluster. It is worth noting that χ is calculated twice here. 2 The values correspond to two samples to be distinguished, such as Bose sampling samples and completely different boson sampling samples. And each time the calculation is performed, the samples in the cluster are uniformly distributed samples and one of the samples to be distinguished.
[0092] 8. Repeat steps 1 to 7 multiple times to generate two types of χ 2 The distribution graphs correspond to the two samples to be distinguished. If the two samples to be distinguished conform to the same distribution, such as the Bose sampling distribution, the distribution graphs are very similar; conversely, if the two samples come from two different distributions, the distribution graphs are very different. At this point, the test is complete.
[0093] Figure 1 The χ values of the three samples of 3-photon 9-mode are shown. 2 The distribution diagrams are shown in Figure 1, where A corresponds to a uniformly distributed sample, B corresponds to a Bose sampling sample, and C corresponds to a completely different Boson sampling sample. The distribution diagrams corresponding to the three samples are clearly different, indicating that the present invention can easily implement a classical test for Bose sampling.
[0094] The embodiments of the present invention provide a Bose sampling test method, system and medium. By introducing a third simpler sample, namely a uniformly distributed sample, in addition to the two samples to be distinguished, namely the Bose sampling sample and the completely different boson sampling sample, a more stable clustering structure is formed, which not only reduces the computational difficulty of the classical test, but also achieves a more obvious distinction effect, providing technical support for the classical test of Bose sampling.
[0095] Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same functions of the system and its various devices, modules, and units provided by the present invention in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; the devices, modules, and units for implementing various functions can also be considered as both software modules implementing the method and structures within the hardware component.
[0096] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.
Claims
1. A Bose sampling test method, characterized in that: include: Uniform distribution cluster construction steps: construct clusters based on the simulated sampling results that conform to the uniform distribution, and define the cluster center and cluster radius; A step of distinguishing samples to be distinguished: using clusters formed in the uniformly distributed cluster construction step to distinguish between the Bose sampling samples to be distinguished and completely different Boson sampling samples; The evenly distributed cluster construction step includes: Generate uniform distribution sample set: Use computer to generate uniform distribution sample set that meets certain photon number and mode number; Constructing clusters: forming clusters based on the uniformly distributed sample set using a machine learning clustering method, and defining cluster centers and cluster radii; The step of distinguishing the samples to be distinguished includes: Generating a sample set to be distinguished: the Bose sampling sample set is generated by a Bose sampling machine in a real physical experiment or by computer simulation; The completely different boson sampling sample sets are generated by computer simulation; Fill the samples to be distinguished into clusters: For each sample in each set of samples to be distinguished, fill the sample into a cluster according to the second-order norm distance from the sample to the center of each cluster; Differentiate the samples to be differentiated: Count the number of samples to be differentiated that are filled into the clusters and calculate the parameters to form a parameter distribution graph.
2. The Bose sampling inspection method according to claim 1, characterized in that: It is also possible to distinguish between the Bose sampling and uniform sampling, and it is only necessary to replace the completely different Boson sampling sample set generated by computer simulation with the uniform distribution sample set generated by computer simulation when generating the sample set to be distinguished.
3. A Bose sampling inspection system, characterized in that: include: Uniformly distributed cluster construction module: constructs clusters based on simulated sampling results that conform to uniform distribution, and defines cluster centers and cluster radius; A distinguishing module for samples to be distinguished: a cluster formed according to the uniformly distributed cluster construction module to distinguish between the Bose sampling samples to be distinguished and completely different Boson sampling samples; The evenly distributed clustering construction module includes: Generate uniform distribution sample set: Use computer to generate uniform distribution sample set that meets certain photon number and mode number; Constructing clusters: forming clusters based on the uniformly distributed sample set using a machine learning clustering method, and defining cluster centers and cluster radii; The distinguishing module of the sample to be distinguished includes: Generating a sample set to be distinguished: the Bose sampling sample set is generated by a Bose sampling machine in a real physical experiment or by computer simulation; The completely different boson sampling sample sets are generated by computer simulation; Fill the samples to be distinguished into clusters: For each sample in each set of samples to be distinguished, fill the sample into a cluster according to the second-order norm distance from the sample to the center of each cluster; Differentiate the samples to be differentiated: Count the number of samples to be differentiated that are filled into the clusters and calculate the parameters to form a parameter distribution graph.
4. The Bose sampling inspection system according to claim 3, characterized in that: It is also possible to distinguish between the Bose sampling and uniform sampling, and it is only necessary to replace the completely different Boson sampling sample set generated by computer simulation with the uniform distribution sample set generated by computer simulation when generating the sample set to be distinguished.
5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.