Signal spectrum analysis method, device, electronic device and readable storage medium
By determining the target sampling number and measuring the quantum superposition state in the quantum Fourier transform, the accuracy problem of quantum Fourier transform in spectrum analysis is solved, and higher accuracy of signal spectrum analysis is achieved.
Patent Information
- Application Number
- CN202411241031.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-05
AI Technical Summary
The quantum Fourier transform is not very accurate in spectrum analysis, which leads to inaccurate results in the analysis of signal frequency components.
By acquiring quantum superposition states, mapping relationships, and preset tolerance errors, the target number of samplings is determined, and measurements are performed to obtain the target quantum probability distribution, ensuring that the difference between the statistical results and the true probability distribution does not exceed the preset tolerance error.
It improves the accuracy of quantum Fourier transform in spectrum analysis, makes the target quantum probability distribution closer to the true probability distribution, and enhances the precision of signal spectrum analysis.
Smart Images

Figure CN118759255B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of quantum technology, and in particular to a signal spectrum analysis method, device, electronic device and readable storage medium. Background Art
[0002] In the field of modern signal processing, spectrum analysis of signals is one of the core tasks, and its purpose is to reveal the frequency components of signals and their distribution characteristics. Traditional signal spectrum analysis methods mainly include Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT). However, with the explosive growth of data volume and the increasing complexity of processing, traditional signal processing methods have gradually failed to meet actual needs.
[0003] In recent years, with the rapid development of quantum computing technology, quantum signal processing has gradually attracted people's attention as an emerging technical field. Quantum signal processing uses the principles of quantum mechanics to represent and operate quantum superposition states, thereby realizing efficient processing of quantum signals. However, despite the huge potential of quantum signal processing, its application still faces some challenges in the field of spectrum analysis. For example, in classical signal processing, the probability distribution of the signal in the frequency domain can be directly obtained through Fourier transform, thereby revealing the frequency components of the signal. However, in quantum signal processing, due to the randomness of quantum measurement and other reasons, for example, when measuring quantum states, even if we measure the same quantum state multiple times, the results of each measurement may be different. This is because the measurement randomly selects a possible state as the result, and the probability of this selection is determined by the amplitude of the quantum state. Therefore, after the signal is subjected to quantum Fourier transform (QFT), the probability distribution of the original state of the signal cannot be accurately determined, which leads to inaccurate results of spectrum analysis. Therefore, how to improve the accuracy of quantum Fourier transform in spectrum analysis is an urgent problem to be solved.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a signal spectrum analysis method, device, electronic device and readable storage medium, aiming to solve the technical problem of low accuracy of quantum Fourier transform in spectrum analysis.
[0006] To achieve the above object, the present application provides a signal spectrum analysis method, comprising:
[0007] Obtaining a quantum superposition state of a signal to be analyzed after a quantum Fourier transform, obtaining a first mapping relationship and a preset tolerance error;
[0008] Searching for a target sampling number that matches the preset tolerance error in the first mapping relationship, where the target sampling number is inversely proportional to the preset tolerance error, and the preset tolerance error is characterized by the gap between the quantum probability distribution and the true probability distribution of the same signal;
[0009] Measuring the target sampling number of times on the quantum superposition state to obtain measurement results equal to the target sampling number of times;
[0010] According to each of the measurement results, a target quantum probability distribution of the signal to be analyzed is determined.
[0011] In one embodiment, the step of acquiring the first mapping relationship includes:
[0012] Obtaining a first true probability distribution of a verification signal, obtaining a plurality of different first quantum probability distributions corresponding to the verification signal, and obtaining a target output number output after the verification signal is subjected to quantum Fourier transformation, wherein the target output number is the number of different quantum superposition states;
[0013] Comparing a first gap between each of the first quantum probability distributions and the first true probability distribution;
[0014] Determining a second mapping relationship corresponding to the target output quantity according to the target output quantity, each of the first gaps, and the preset number of sampling times corresponding to each of the first quantum probability distributions;
[0015] Determine a first mapping relationship according to the second mapping relationship and the first output quantity of different quantum superposition states outputted after the acquired signal to be analyzed undergoes quantum Fourier transform;
[0016] The second mapping relationship includes a mapping set corresponding to the target output quantity, and the mapping set includes a mapping relationship between each of the first gaps and a corresponding preset sampling number.
[0017] In one embodiment, the step of obtaining a first true probability distribution of the verification signal includes:
[0018] Performing a fast Fourier transform on the verification signal to obtain a first true probability distribution of the verification signal in the frequency domain; or,
[0019] Performing a discrete Fourier transform on the verification signal to obtain a first true probability distribution of the verification signal in the frequency domain.
[0020] In one embodiment, the step of obtaining a plurality of different first quantum probability distributions corresponding to the verification signal comprises:
[0021] Performing a quantum Fourier transform on the verification signal, sampling all quantum superposition states obtained after the verification signal is subjected to the quantum Fourier transform for a preset number of sampling times, obtaining sampling results having a number of preset sampling times, and counting the cumulative number of times the verification signal is subjected to the quantum Fourier transform;
[0022] Determine the probability of each first sampling result in all the sampling results appearing in all the sampling results, and obtain a first quantum probability distribution of the verification signal in the frequency domain, wherein the first sampling results are sampling results of the same type;
[0023] If the accumulated number is less than the preset number of transformations, the preset number of samplings is updated, and the step of performing quantum Fourier transformation on the verification signal is returned to until the accumulated number is greater than or equal to the preset number of transformations, and the quantum Fourier transformation on the verification signal is stopped;
[0024] Among them, the preset sampling times corresponding to the first quantum probability distributions are different.
[0025] In one embodiment, the step of determining the second mapping relationship corresponding to the target output quantity according to the target output quantity, each of the first gaps, and the preset number of sampling times corresponding to each of the first quantum probability distributions includes:
[0026] When the number of different quantum superposition states of the verification signal is the target output number, the expectation of each of the first gaps when each of the preset sampling times satisfies a preset infinite condition is calculated to obtain a second mapping relationship;
[0027] The preset infinite condition indicates that the preset sampling times tends to infinity.
[0028] In one embodiment, the step of determining the first mapping relationship according to the second mapping relationship and the first output quantity of different quantum superposition states outputted after the acquired signal to be analyzed undergoes quantum Fourier transform includes:
[0029] When the target output quantity in the second mapping relationship is different from the first output quantity, modifying the target output quantity in the second mapping relationship to the first output quantity to obtain the first mapping relationship;
[0030] When the target output quantity in the second mapping relationship is the same as the first output quantity, the second mapping relationship is used as the first mapping relationship.
[0031] In one embodiment, the step of obtaining the target output quantity of the verification signal after the quantum Fourier transform further includes:
[0032] Obtaining a preset second mapping relationship, and obtaining a target number of quantum bit positions of the quantum system in which the verification signal is located when performing a quantum Fourier transform;
[0033] A target output quantity matching the target number of bits is determined in the preset second mapping relationship, where the preset second mapping relationship is a mapping relationship between the number of bits and the number of outputs.
[0034] In addition, to achieve the above purpose, the present application also provides a signal spectrum analysis device, the device comprising:
[0035] An acquisition module is used to obtain a quantum superposition state obtained after the signal to be analyzed undergoes quantum Fourier transform, obtain a first mapping relationship and a preset tolerance error;
[0036] A number determination module, used to search the first mapping relationship for a target sampling number that matches the preset tolerance error, where the target sampling number is inversely proportional to the preset tolerance error, and the preset tolerance error is characterized by the gap between the quantum probability distribution and the true probability distribution of the same signal;
[0037] A measuring module, used to measure the target sampling number of the quantum superposition state to obtain a measurement result equal to the target sampling number;
[0038] A statistical module is used to determine the target quantum probability distribution of the signal to be analyzed according to each of the measurement results.
[0039] In addition, to achieve the above-mentioned purpose, the present application also provides an electronic device, which includes: a memory, a processor, and a program of a signal spectrum analysis method stored in the memory and executable on the processor. When the program of the signal spectrum analysis method is executed by the processor, the steps of the signal spectrum analysis method as described above can be implemented.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which is stored a program for implementing the signal spectrum analysis method. When the program of the signal spectrum analysis method is executed by a processor, the steps of the signal spectrum analysis method as described above are implemented.
[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned signal spectrum analysis method when executed by a processor.
[0042] One or more technical solutions proposed in the present application have at least the following technical effects: since the present application can measure the target sampling number of the quantum superposition state obtained after the signal to be analyzed is subjected to the quantum Fourier transform, the target quantum probability distribution of the signal to be analyzed after the quantum Fourier transform can be restored, and since the target sampling number is determined by the first mapping relationship of the signal to be analyzed and the preset tolerance error, and the preset tolerance error is characterized by the difference between the quantum probability distribution of the same signal and the true probability distribution, the target sampling number is determined by the first mapping relationship and the preset tolerance error, and then the sampling number of the quantum superposition state of the signal to be analyzed in the frequency domain can be measured, so that the difference between the statistically obtained target quantum probability distribution and the true probability distribution will not exceed the preset tolerance error, and the target sampling number is inversely proportional to the preset tolerance error, that is, the smaller the preset tolerance error, the larger the target sampling number, so when the preset tolerance error is small enough, the target quantum probability distribution obtained by measuring the target sampling number is closer to the true probability distribution, thereby facilitating the improvement of the accuracy of the target quantum probability distribution, and then the accuracy of the quantum Fourier transform in spectrum analysis can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description, are used to explain the principles of the present application.
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 This is a flow chart of an embodiment of a signal spectrum analysis method of the present application;
[0046] Figure 2 This is a schematic diagram of the trend of KL divergence changing with the number of sampling times in the signal spectrum analysis method of this application;
[0047] Figure 3 A schematic diagram of a quantum probability distribution in the signal spectrum analysis method of the present application;
[0048] Figure 4 A schematic diagram of another quantum probability distribution in the signal spectrum analysis method of the present application;
[0049] Figure 5 A schematic diagram of the changing trend of the time complexity of the fast Fourier transform and the time complexity of the quantum Fourier transform in the signal spectrum analysis method of the present application;
[0050] Figure 6 This is a schematic diagram of the system structure of the signal spectrum analysis device according to an embodiment of the present application;
[0051] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the signal spectrum analysis method in the embodiment of the present application.
[0052] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0054] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0055] Quantum signal processing is a technology that uses the principles of quantum mechanics to process signals. It includes the representation of quantum superposition states and the use of quantum operations to process signals. Quantum information processing uses some special properties in quantum mechanics, such as quantum entanglement and quantum parallel computing characteristics, to achieve some tasks that are difficult to achieve or require a lot of computation in classical information processing.
[0056] Traditional signal spectrum analysis methods include discrete Fourier transform (DFT) and fast Fourier transform (FFT). Discrete Fourier transform is a discrete form of Fourier transform in both time domain and frequency domain. It transforms the sampling of time domain signals into sampling in the discrete-time Fourier transform (DTFT) frequency domain, but its computational complexity is high. For large-scale signal processing tasks, the computation time of discrete Fourier transform will be very long because it requires multiple matrix and vector product operations. The time complexity is O(N*N), where N is the data length. In order to improve the computational efficiency of discrete Fourier transform, fast Fourier transform came into being. This algorithm uses the symmetry and periodicity of the discrete Fourier transform calculation formula to decompose the original sequence into short sequences, thereby greatly reducing the number of multiplications required for the computer to calculate the discrete Fourier transform, achieving the purpose of deleting repeated calculations, reducing multiplication operations and simplifying the structure. The time complexity is O(N*logN). However, the above two methods often require more computing and storage space when processing large data, which increases the complexity and difficulty of the calculation.
[0057] In order to improve the efficiency and accuracy of quantum signal spectrum analysis, this application obtains multiple quantum superposition states of the signal in the frequency domain by performing a quantum Fourier transform on the signal, and measures the number of sampling times of each quantum superposition state to determine the quantum probability distribution of the signal. That is, this application determines the quantum probability distribution of the signal by performing a quantum Fourier transform on the signal, decomposes the signal into a simpler unitary matrix product to greatly improve the computational efficiency, and also utilizes quantum properties such as quantum entanglement and quantum computing parallelism to achieve large-scale quantum computing to process larger data sets than classical computers. Compared with traditional signal spectrum processing methods, using quantum Fourier transform to perform rapid spectrum analysis of signals is simpler, more accurate, real-time, and economical.
[0058] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a quantum computer, or an electronic device that can realize the above functions.
[0059] Based on this, the embodiment of the present application provides a signal spectrum analysis method, including steps S10 to S40:
[0060] Step S10, obtaining a quantum superposition state of the signal to be analyzed after the quantum Fourier transform, obtaining a first mapping relationship and a preset tolerance error;
[0061] It should be noted that the signal to be analyzed can be a group of signals, such as a discrete signal of finite length. The signal to be analyzed can be subjected to quantum Fourier transform on a quantum system, and the quantum system can be a quantum computer. Different quantum systems may correspond to different numbers of quantum bits. Different numbers of quantum bits result in different numbers of different quantum superposition states output after the signal is subjected to quantum Fourier transform. For example, for a quantum system with n quantum bits, the number of different quantum superposition states output is 2. n indivual.
[0062] The first mapping relationship corresponding to the signal to be analyzed is characterized as: when the number of bits of the quantum bit of the quantum system corresponding to the signal to be analyzed is the first digit, the mapping relationship between each sampling number and the corresponding tolerance error. The mapping relationship between each sampling number and the corresponding tolerance error may be different for different numbers of bits of the quantum bit of the quantum system. The number of bits of the quantum bit of the quantum system determines the number of outputs of different quantum superposition states after the signal is quantum Fourier transformed on the quantum system.
[0063] The preset tolerance error refers to the difference between the target quantum probability distribution corresponding to the same signal that can be tolerated and the target true probability distribution of the signal to be analyzed. The preset tolerance error can be a value. For example, the preset tolerance error can be expressed by ε precision, and ε precision can represent a concept of measurement accuracy or error range. The preset tolerance errors of different signals can be the same or different. In this embodiment, the preset tolerance error can be adjusted based on actual conditions. The first mapping relationship includes the corresponding relationship between the number of sampling times and the tolerance error.
[0064] Exemplarily, all quantum superposition states in the frequency domain obtained after the signal to be analyzed is subjected to quantum Fourier transform on the corresponding quantum system are obtained, and a first mapping relationship and a preset tolerance error corresponding to the signal to be analyzed are obtained. The first mapping relationship and the preset tolerance error can be stored in the quantum system, so that when performing quantum Fourier transform on the quantum system, they can be directly obtained from the quantum system.
[0065] In a feasible embodiment, step S10 further includes steps S11 to S14:
[0066] Step S11, obtaining a first true probability distribution of the verification signal, obtaining a plurality of different first quantum probability distributions corresponding to the verification signal, and obtaining a target output number of the verification signal after the verification signal is subjected to quantum Fourier transform, where the target output number is the number of different quantum superposition states;
[0067] It should be noted that the first true probability distribution is the true probability distribution of the verification signal in the frequency domain after being outputted through a traditional Fourier transform. The traditional Fourier transform may be a discrete Fourier transform or a fast Fourier transform.
[0068] The first quantum probability distribution is a probability distribution in the frequency domain obtained by measuring each quantum superposition state after the verification signal is quantum Fourier transformed. Since the first quantum probability distribution is obtained by measurement, there may be a certain error between the first quantum probability distribution and the first true probability distribution. The verification signal can be quantum Fourier transformed repeatedly, and the quantum superposition state output by each quantum Fourier transform can be sampled and measured multiple times to determine the first quantum probability distribution corresponding to each quantum Fourier transform. The preset number of sampling times corresponding to each quantum Fourier transform is different.
[0069] The target output number is the target output number of different quantum superposition states output by the quantum system corresponding to the verification signal when performing a quantum Fourier transform. The target output number can be determined based on the target number of quantum bits of the quantum system corresponding to the verification signal.
[0070] Exemplarily, a first true probability distribution of the verification signal is obtained, a first quantum probability distribution of the verification signal is obtained, a quantum system corresponding to the verification signal is obtained, and a target output number corresponding to the verification signal is determined based on a target number of quantum bits of the quantum system.
[0071] In a feasible embodiment, step S11 further includes steps S111 to S112:
[0072] Step S111, obtaining a preset second mapping relationship, and obtaining a target number of quantum bit positions of the quantum system in which the verification signal is located when performing a quantum Fourier transform;
[0073] Step S112, determining a target output quantity that matches the target bit number in a preset second mapping relationship, where the preset second mapping relationship is a mapping relationship between bit numbers and output quantities.
[0074] It should be noted that the second mapping relationship is a mapping relationship between the number of bits and the number of outputs, where the number of bits is the number of quantum bits, and the number of outputs is the number of bits of different quantum superposition states output by the quantum system after performing a quantum Fourier transform on the signal.
[0075] When the verification signal undergoes a quantum Fourier transform on the corresponding quantum system, the number of different quantum superposition states of the verification signal output by the quantum system in the frequency domain is related to the target number of quantum bits of the quantum system.
[0076] For example, for a quantum system with n quantum bits, the different quantum superposition states of its outputs correspond to a total of , n is the number of quantum bits, and N is the number of outputs.
[0077] In a feasible embodiment, step S11 further includes step A10 or step A20:
[0078] Step A10, performing a fast Fourier transform on the verification signal to obtain a first true probability distribution of the verification signal in the frequency domain;
[0079] Step A20: Perform discrete Fourier transform on the verification signal to obtain a first true probability distribution of the verification signal in the frequency domain.
[0080] It should be noted that the first true probability distribution can be obtained by fast Fourier transforming the verification signal or by discrete Fourier transforming. This embodiment does not limit this, but it can be preferred to perform fast Fourier transform on the verification signal to improve the efficiency of spectrum analysis.
[0081] Exemplarily, the discrete Fourier transform DFT calculation formula for the verification signal is:
[0082]
[0083] in, The rth signal in the time domain can be verified. is the kth signal of the verification signal in the frequency domain, R represents the data length, j is the imaginary unit, π is the circumference of a circle, and They are all complex exponential modulation factors, r is the index of the signal in the time domain, r ranges from 0 to R-1, and k is the index of the signal in the frequency domain, k ranges from 0 to R-1.
[0084] For example, the principle of fast Fourier transform is to decompose the original R point sequence into a series of short sequences in sequence. The symmetry and periodicity of the exponential factors in the discrete Fourier calculation formula are fully utilized to obtain the corresponding DFT of these short sequences and make appropriate combinations to achieve the purpose of deleting repeated calculations, reducing multiplication operations and simplifying the structure.
[0085] The fast Fourier transform formula is:
[0086]
[0087] Where, e is the base of natural logarithm, s is a natural number, and the range of s is 0 to (R / 2)-1. To verify the representation of the corresponding even index in the signal in the time domain, To verify the representation of the corresponding odd index in the signal in the time domain. For The complex exponential modulation factor is against The complex exponential modulation factor is It can be considered Another form of expression.
[0088] After discrete Fourier transform or fast Fourier transform, the verification signal in the frequency domain can be obtained, and the first true probability distribution of the verification signal can be determined by power spectrum density analysis method or signal reconstruction method.
[0089] In other embodiments, the theoretical first true probability distribution of the verification signal can also be directly determined. For example, for a quantum system with n quantum bits, different quantum superposition states of its output correspond to a total of Each different quantum superposition state can be recorded as , n is the number of quantum bits, N is the number of outputs, assuming theoretically The corresponding output probabilities are , and the following conditions are met:
[0090]
[0091] Among them, k is the subscript, the first true probability distribution The sum of is 1.
[0092] In a feasible embodiment, step S11 further includes steps B10 to B30:
[0093] Step B10, performing a quantum Fourier transform on the verification signal, sampling all quantum superposition states obtained after the verification signal is subjected to the quantum Fourier transform for a preset number of sampling times, obtaining sampling results for a preset number of sampling times, and counting the cumulative number of times the verification signal is subjected to the quantum Fourier transform;
[0094] Step B20, determining the probability of each first sampling result in all sampling results appearing in all sampling results, and obtaining a first quantum probability distribution of the verification signal in the frequency domain, wherein the first sampling results are sampling results of the same type;
[0095] Step B30, if the accumulated number is less than the preset number of transformations, then update the preset number of samplings, and return to the step of performing quantum Fourier transform on the verification signal until the accumulated number is greater than or equal to the preset number of transformations, and then stop performing quantum Fourier transform on the verification signal;
[0096] Among them, the preset sampling times corresponding to each first quantum probability distribution are different.
[0097] It should be noted that the cumulative number is the number of times the current verification signal is quantum Fourier transformed. The initial value of the cumulative number can be 0, or it can be set based on the actual situation, and this embodiment does not specifically limit this. The preset sampling times corresponding to each first quantum probability distribution are different. It can be understood that the predicted sampling times after the verification signal is quantum Fourier transformed each time are different. The preset number of transformations can be set based on the actual situation, the preset number of transformations is not equal to 1, and the number of first quantum probability distributions is the integer of the preset number of transformations.
[0098] For any quantum Fourier transform of a verification signal, there are multiple first sampling results among all sampling results corresponding to the verification signal in this quantum Fourier transform. The first sampling results are sampling results of the same type. The sampling results of the same type are the same sampling results in all sampling results, or are sampling results that are different from other sampling results in all sampling results.
[0099] In this embodiment, after each pair of quantum superposition states after quantum Fourier transformation is measured a preset number of times, the verification signal can be re-quantum Fourier transformed, and then the quantum superposition state after quantum Fourier transformation is measured a preset number of times. Since the quantum superposition state collapses after being measured, that is, the basis vector corresponding to the quantum superposition state after measurement is not the state before measurement, if multiple different first quantum probability distributions are to be obtained, it is necessary to repeatedly perform quantum Fourier transformation on the verification signal to obtain multiple first quantum probability distributions of the verification signal. Repeated quantum Fourier transformation of the verification signal is performed on the same quantum system.
[0100] The sampling result is obtained by measuring the basis vectors corresponding to the quantum superposition state outputted by the verification signal after the quantum Fourier transform. For any quantum Fourier transform of the verification signal, the basis vectors corresponding to the quantum superposition states outputted by the quantum Fourier transform are measured for a preset number of sampling times, and the sampling results with the preset number of sampling times are obtained. The number of times different sampling results appear in all sampling results corresponding to the quantum Fourier transform is counted to determine the probabilities corresponding to the different sampling results, so that the first quantum probability distribution corresponding to the quantum Fourier transform can be obtained by statistics.
[0101] Exemplarily, the quantum Fourier calculation formula for performing a quantum Fourier transform on the verification signal is:
[0102]
[0103] in, To verify that the signal corresponds to the quantum state of the input subscript d, To verify the quantum superposition state of the signal after the quantum Fourier transform, X d represents the linear combination of the orthogonal basis of quantum states with subscript d, y k The linear combination of the orthogonal basis of the quantum superposition state with the subscript k representing the output. n is the number of qubits in the quantum system. e is the base of the natural logarithm, 2πidk / n is the phase factor in the quantum Fourier transform, and N is the number of different quantum superposition states output.
[0104] The quantum Fourier transform cannot directly obtain the amplitude of the basis vector corresponding to the quantum superposition state, so it is necessary to measure the quantum superposition states obtained after the quantum Fourier transform for a preset number of sampling times to obtain multiple sampling results in order to determine the first quantum probability distribution.
[0105] For example, the preset sampling times can be expressed as M. For any quantum Fourier transform of the verification signal, the quantum superposition state output after the quantum Fourier transform is measured, and finally the sampling results with the preset sampling times are obtained. The sampling results can be recorded as , N is the number of outputs corresponding to different quantum superposition states of the verification signal output.
[0106] For any quantum Fourier transform of the verification signal, when measuring the preset sampling times M, where M can be used to represent the preset sampling times, M is a positive integer, and the measurement is obtained The number of times is , the following conditions are met:
[0107]
[0108] The sampling results are The number of times is , then the sampling result The probability of occurrence is Where M is the preset sampling number, and the first quantum probability distribution can be expressed as .
[0109] Step S12, comparing a first gap between each first quantum probability distribution and the first true probability distribution;
[0110] Step S13, determining a second mapping relationship corresponding to the target output number according to the target output number, each first gap, and the preset sampling number corresponding to each first quantum probability distribution; wherein the second mapping relationship includes a mapping set corresponding to the target output number, and the mapping set includes a mapping relationship between each first gap and the corresponding preset sampling number;
[0111] It should be noted that the first gap is the gap between the first true probability distribution and the first quantum probability distribution. The first gap is determined by comparing the gap between the sampling probability of each sampling result in the first quantum probability distribution and the true probability in the corresponding first true probability distribution. The first quantum probability distribution is determined by measuring the quantum superposition state obtained after the verification signal is quantum Fourier transformed for a preset number of sampling times. The preset number of sampling times can be determined based on actual conditions. The second mapping relationship can be considered as a mapping relationship between the gap, the number of sampling times, and the number of outputs. The first gap can be obtained by calculating the relative entropy between the first true probability distribution and the first quantum probability distribution; calculating the relative entropy can be calculating the KL divergence (Kullback-Leibler divergence, relative entropy). Exemplarily, for any first quantum probability distribution, the KL divergence between the first quantum probability distribution and the first true probability distribution is calculated to obtain the first gap corresponding to the first quantum probability distribution.
[0112] Exemplarily, the second mapping relationship can be determined by each first gap, the preset sampling number corresponding to the first quantum probability distribution corresponding to each first gap, and the target output quantity. The mapping relationship between each first gap and the corresponding preset sampling number is not necessarily the same for different target output quantities.
[0113] Step S14, determining the first mapping relationship according to the second mapping relationship and the first output quantity of different quantum superposition states outputted after the acquired signal to be analyzed undergoes quantum Fourier transform.
[0114] It should be noted that since quantum systems with different numbers of quantum bits output different numbers of quantum superposition states when performing quantum Fourier transform on signals, and the number of output quantum superposition states will also affect the number of sampling times, after determining the second mapping relationship, the first output number can be determined based on the first number of quantum bits of the quantum system corresponding to the signal to be analyzed, and then the second mapping relationship can be adjusted based on the first output number to determine the first mapping relationship.
[0115] Exemplarily, a first digit of the quantum bit of the quantum system corresponding to the signal to be analyzed is obtained, a first output quantity matching the first digit is determined in the second mapping relationship, and a target output quantity in the second mapping relationship is adjusted according to the first output quantity to obtain the first mapping relationship.
[0116] The present application adjusts the second mapping relationship to determine the first mapping relationship through the number of quantum bits of the quantum system, so that the number of sampling times can be determined more accurately to improve the accuracy of the target quantum probability distribution.
[0117] In a feasible embodiment, step S13 further includes: step S131 to step S132:
[0118] Step S131, when the target output quantity in the second mapping relationship is different from the first output quantity, modify the target output quantity in the second mapping relationship to the first output quantity to obtain the first mapping relationship;
[0119] Step S132: When the target output quantity in the second mapping relationship is the same as the first output quantity, the second mapping relationship is used as the first mapping relationship.
[0120] It should be noted that when determining the second mapping relationship, a quantum Fourier transform can be performed on any quantum system to determine the second mapping relationship. Since the number of qubits corresponding to different quantum systems may be different, the number of qubits will affect the number of different quantum superposition states output after the signal undergoes quantum Fourier transform, and the number of output quantum superposition states will also affect the number of sampling times. For example, when the number of quantum superposition states is large, even with the same preset tolerance error, the target number of sampling times required may be more.
[0121] Therefore, when it is necessary to determine the target sampling number corresponding to the signal to be analyzed, it is necessary to determine the first number of the quantum bits of the quantum system corresponding to the signal to be analyzed, and then determine the first output number corresponding to the different quantum superposition states of the output, so that the second mapping relationship can be adjusted based on the first output number to determine the first mapping relationship.
[0122] Exemplarily, it is determined whether the target output quantity in the second mapping relationship is the same as the first output quantity. If the target output quantity in the second mapping relationship is different from the first output quantity, the target output quantity in the second mapping relationship is modified to the first output quantity to obtain the first mapping relationship; if the target output quantity in the second mapping relationship is the same as the first output quantity, the second mapping relationship is used as the first mapping relationship.
[0123] In other embodiments, it is also possible to determine whether the target number of qubits corresponding to the second mapping relationship is the same as the first number of qubits of the quantum system corresponding to the signal to be analyzed. If the target number of qubits is the same as the first number of qubits, the second mapping relationship is used as the first mapping relationship. If the target number of qubits is different from the first number of qubits, the target number of qubits corresponding to the second mapping relationship is adjusted to the first number of qubits. This can improve the accuracy of the target sampling times.
[0124] Step S20, searching the first mapping relationship for a target sampling number that matches a preset tolerance error, where the target sampling number is inversely proportional to the preset tolerance error, and the preset tolerance error is characterized by the gap between the quantum probability distribution and the true probability distribution of the same signal;
[0125] It should be noted that the target sampling number is the number of times each quantum superposition state of the signal to be analyzed is measured after the quantum Fourier transform. The smaller the preset tolerance error, the more target sampling times. It can be understood that when the target sampling number is more, the gap between the target quantum probability distribution corresponding to the signal to be analyzed and the real probability distribution is smaller. Therefore, when the preset tolerance error is smaller, the measured target probability distribution is closer to the real probability distribution of the signal to be analyzed.
[0126] The first mapping relationship may be expressed as a table or a formula. Exemplarily, the target sampling number matching the preset tolerance error may be searched in the first mapping relationship, or the target sampling number may be calculated based on the preset first mapping relationship and the preset tolerance error.
[0127] Step S30, measuring the quantum superposition state for a target sampling number of times to obtain a measurement result having a number equal to the target sampling number of times;
[0128] It should be noted that the target sampling times can be performed on all quantum superposition states of the signal to be analyzed in the frequency domain to obtain the measurement results of each sampling, and the measurement results are the basis vectors corresponding to the measured quantum superposition state. The basis vectors of the quantum superposition state are the basis for describing and calculating the state of the quantum system in quantum mechanics.
[0129] Exemplarily, the target sampling times are measured for basis vectors of all quantum superposition states of the signal to be analyzed in the frequency domain to obtain measurement results equal to the target sampling times.
[0130] Step S40: determining the target quantum probability distribution of the signal to be analyzed according to each measurement result.
[0131] It should be noted that when measuring all quantum superposition states of the signal to be analyzed in the frequency domain, the same measurement result may be measured, and the probability of the basis vectors corresponding to different quantum superposition states being measured is different, and this probability will be reflected in the target quantum probability distribution. In this embodiment, the probability of each measurement result appearing in all measurement results is determined to determine the probability of each different measurement result being measured, so as to determine the target quantum probability distribution. Specifically, the probability of each first measurement result appearing in all measurement results is counted in all measurement results to obtain the target quantum probability distribution of the signal to be analyzed in the frequency domain, wherein the first measurement result is a measurement result of the same type. When measuring, the same measurement result may be measured, or different measurement results may be measured. The first measurement result refers to the measurement result of the same type, and the measurement result of the same type refers to the same measurement result in each measurement result, or a measurement result that is different from other measurement results in all measurement results.
[0132] Exemplarily, the probability of different measurement results appearing in all measurement results is statistically analyzed to obtain the target quantum probability distribution of the signal to be analyzed in the frequency domain.
[0133] Since the embodiment of the present application can measure the target sampling number, the target quantum probability distribution of the signal to be analyzed after the quantum Fourier transform can be restored, and since the target sampling number is determined by the first mapping relationship of the signal to be analyzed and the preset tolerance error, and the preset tolerance error is characterized by the difference between the quantum probability distribution of the same signal and the true probability distribution, the target sampling number is determined by the first mapping relationship and the preset tolerance error, and then the sampling number of all quantum superposition states of the signal to be analyzed in the frequency domain can be measured, so that the difference between the statistically obtained target quantum probability distribution and the true probability distribution will at least not exceed the preset tolerance error, and the target sampling number is inversely proportional to the preset tolerance error, that is, the smaller the preset tolerance error, the larger the target sampling number, so when the preset tolerance error is small enough, the target quantum probability distribution obtained by measuring the target sampling number is closer to the true probability distribution, thereby facilitating the improvement of the accuracy of the target quantum probability distribution, and then the accuracy of the quantum Fourier transform in spectrum analysis can be improved.
[0134] Furthermore, in a feasible embodiment, step S12 further includes step S121:
[0135] Step S121, when the number of different quantum superposition states of the verification signal is the target output number, the expectation of each first gap when each preset sampling number satisfies a preset infinite condition is calculated to obtain a second mapping relationship;
[0136] The preset infinity condition means that the preset number of sampling times tends to infinity.
[0137] It should be noted that the first gap can be obtained by calculating the KL divergence between the first true probability distribution and the first quantum probability distribution. The KL divergence can calculate the gap between the first quantum probability distribution and the first true probability distribution. The calculated KL divergence can be used as the first gap. Any first quantum probability distribution can calculate the KL divergence between the first true probability distribution, so that the first gap corresponding to each first quantum probability distribution can be determined. When the preset sampling number is greater than or equal to the preset infinity value, it is determined that the preset sampling number meets the preset infinity condition, and the preset infinity value can be set based on the actual situation. Each preset sampling number meets the preset infinity condition, and each preset sampling number is different.
[0138] Exemplarily, the first true probability distribution can be expressed as , the first quantum probability distribution corresponding to M samplings of any quantum Fourier transform of the verification signal can be expressed as The KL divergence can be used as a measure of the first gap between two different probability distributions. For any first quantum probability distribution, the formula for calculating the KL divergence between the first quantum probability distribution and the first true probability distribution is:
[0139]
[0140] in, is the first gap. k is a subscript, and N is the target output number of the output quantum superposition state. is the kth probability in the first true probability distribution, is the kth probability in the first quantum probability distribution. Since the first true probability distribution The sum of is 1, so the following equation can exist:
[0141]
[0142] It can be seen that the quantum Fourier transform of the verification signal is run on the quantum system and repeated sampling times, M is the preset sampling times, represents m1,…,m N is a natural number between 0 and M, m1,…,m N The sum of is M, For p N of Second power, The sampling results Number of occurrences.
[0143] set up The sampling results Number of occurrences ( ), k is a subscript, k is an integer, where the sampling result Appear The probability of this is:
[0144]
[0145] where ! represents a factorial, e.g. Expressed as the factorial of M, Expressed as The factorial of the first quantum probability distribution can also be expressed as , the calculation formula of the KL divergence between the first quantum probability distribution and the first true probability distribution can also be expressed as:
[0146]
[0147] For a better understanding of this embodiment, refer to Figure 2 , Figure 2The vertical axis of the coordinate graph is KL divergence, and the horizontal axis is the sampling number corresponding to the quantum Fourier transform of 11 quantum bits. The theoretical result refers to the theoretical KL divergence, and the actual measurement result refers to the determination of the quantum probability distribution by performing a quantum Fourier transform on the same signal, and calculating the KL divergence between the quantum probability distribution and the true probability distribution. Figure 2 It can be seen that when the number of sampling times increases, the KL divergence corresponding to the actual measurement results and the KL divergence corresponding to the theoretical results approach 0, and the fewer the sampling times, the larger the KL divergence.
[0148] And for the same signal, the more times it is sampled, the more complete the quantum probability distribution is. For example, you can refer to Figure 3 and Figure 4 , Figure 3 and Figure 4 These are schematic diagrams of different quantum probability distributions corresponding to the same signal. Figure 4 This is a schematic diagram of the quantum probability distribution corresponding to 128 sampling times. The vertical axis is the probability and the horizontal axis is the sampling result. Figure 4 This is a schematic diagram of the quantum probability distribution corresponding to 32768 sampling times. Figure 3 and Figure 4 Discover, Figure 4 The quantum probability distribution ratio shown Figure 3 The quantum probability distribution shown is more complete.
[0149] It should be noted that the second mapping relationship can also be used to describe the mapping relationship between the number of quantum bit bits, tolerance error and sampling times. The number of quantum bit bits determines the number of outputs of different quantum superposition states after quantum Fourier transform on the quantum system. The tolerance error represents the tolerable gap between the quantum probability distribution of the same signal and the true probability distribution. The sampling times are the number of times the quantum superposition state obtained after the quantum Fourier transform is measured.
[0150] Exemplarily, the expected formula for calculating the KL divergence corresponding to each first quantum probability distribution is:
[0151]
[0152] in, is the expectation of the KL divergence, that is, the expectation of each first difference, Represented as m1,…,m N The value of is a natural number between 0 and M, m1,…,m N The sum is M, with k as the subscript.
[0153] When the preset sampling times When , the mathematical expectation of KL divergence will be close to the true divergence, that is, the first gap will be close to the true gap. According to the law of large numbers, it can be assumed that all frequencies The true probability are very close, so we get:
[0154]
[0155] Therefore, the expectation of each KL divergence can be expressed as:
[0156]
[0157] remember , then the above formula is transformed into:
[0158]
[0159] Based on the above KL divergence expression formula, when The average KL divergence when the number of times (large enough) is about , that is, the KL divergence is about Inversely proportional to M, that is, the first gap is inversely proportional to M. It is proved that when M is large enough, the smaller the average value of KL divergence is, the smaller the gap between the quantum probability distribution and the true probability distribution is. represents the first gap, then we get , since N is the number of outputs corresponding to different quantum superposition states after the quantum Fourier transform, and N can be determined based on the number of quantum bits n of the quantum system, N=2 n , and then we can get the second mapping relationship:
[0160]
[0161] in, It can be expressed as the output quantity. Since the tolerance error is the difference between the true probability distribution and the quantum probability distribution of the same signal, It can also be expressed as tolerance error, The first mapping relationship may be determined according to the second mapping relationship and the first digit of the quantum bit of the quantum system corresponding to the signal to be analyzed. For example, when the first digit of the quantum bit of the quantum system corresponding to the signal to be analyzed is 9, the first mapping relationship is:
[0162]
[0163] in, The first output number of different quantum superposition states output by the quantum system corresponding to the signal to be analyzed after performing quantum Fourier transform on the signal to be analyzed. The above is just one example, and the first digit of the quantum bit corresponding to the signal to be analyzed can also be other natural numbers, etc., which is not limited in this embodiment.
[0164] And when the number of qubits n is larger, the KL divergence is smaller, and the number of qubits is proportional to the KL divergence. Figure 5 , Figure 5 This is a graph showing the changing trend of the time complexity of the fast Fourier transform and the time complexity of the quantum Fourier transform. Figure 5 The vertical axis indicates time complexity, and the horizontal axis indicates the number of physical bits. For the fast Fourier transform FFT, the number of physical bits is the number of storage units used to store and process data in a classical computer. For the quantum Fourier transform QFT, the number of physical bits is the number of quantum bits corresponding to the quantum computer. Figure 5 As can be seen from the figure, as the number of physical bits increases, the time complexity of the fast Fourier transform gradually increases, while the time complexity of the quantum Fourier transform remains at a relatively small value. Therefore, it can be shown that when the quantum Fourier transform processes large data, the corresponding time complexity will also be smaller than the complexity of the fast Fourier transform, and the quantum Fourier transform can provide faster and more accurate spectrum analysis.
[0165] This embodiment provides a second mapping relationship for determining the number of sampling times, so that when performing quantum Fourier transform on a signal, the corresponding number of sampling times can be determined in order to determine the quantum probability distribution, so as to improve the accuracy of the quantum probability distribution. Moreover, since the quantum Fourier transform has better efficiency than the traditional Fourier transform, this embodiment can quickly and accurately perform spectrum analysis by determining the corresponding number of sampling times, thereby improving the efficiency of spectrum analysis.
[0166] The present application also provides a signal spectrum analysis device, please refer to Figure 6 , the signal spectrum analysis device comprises:
[0167] An acquisition module 10 is used to acquire a quantum superposition state obtained after the signal to be analyzed undergoes quantum Fourier transform, and to acquire a first mapping relationship and a preset tolerance error;
[0168] A number determination module 20 is used to search a target sampling number that matches a preset tolerance error in the first mapping relationship, where the target sampling number is inversely proportional to the preset tolerance error, and the preset tolerance error is characterized by the gap between the quantum probability distribution and the true probability distribution of the same signal;
[0169] A measuring module 30 is used to measure the target sampling number of the quantum superposition state to obtain a measurement result having the target sampling number;
[0170] The statistical module 40 is used to determine the target quantum probability distribution of the signal to be analyzed according to each of the measurement results.
[0171] The signal spectrum analysis device provided by the present application adopts the signal spectrum analysis method in the above-mentioned embodiment, aiming to solve the technical problem that the accuracy of quantum Fourier transform in spectrum analysis is not high. Compared with the prior art, the beneficial effects of the signal spectrum analysis method provided by the embodiment of the present application are the same as the beneficial effects of the signal spectrum analysis method provided by the above-mentioned embodiment, and the other technical features in the signal spectrum analysis device are the same as the features disclosed by the above-mentioned embodiment method, which will not be repeated here. The embodiment of the present application provides an electronic device, which can be a playback device, and the electronic device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that at least one processor can execute the signal spectrum analysis method in the above-mentioned embodiment.
[0172] Reference below Figure 7 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure may include but is not limited to quantum computers, quantum registers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0173] like Figure 7As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. In RAM 1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM 1002, and RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the electronic device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have instead.
[0174] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0175] The electronic device provided by the present application adopts the signal spectrum analysis method in the above embodiment 1 to solve the technical problem that the accuracy of quantum Fourier transform in spectrum analysis is not high. Compared with the prior art, the beneficial effect of product flow data distribution provided by the embodiment of the present application is the same as the beneficial effect of the signal spectrum analysis method provided by the above embodiment, and the other technical features in the signal spectrum analysis device are the same as the features disclosed by the above embodiment method, which will not be repeated here. It should be understood that the various parts of the present disclosure can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples. The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims. The present embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the signal spectrum analysis method in the above embodiment 1. The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, equipment or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable EPROM (Electrical Programmable Read Only Memory) or flash memory, an optical fiber, a portable compact disk CD-ROM (compact disc read-only memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution device, device or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency, radio frequency), etc., or any suitable combination of the above. The above-mentioned computer-readable storage medium may be contained in an electronic device; it may also exist alone without being assembled into an electronic device.The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device: obtains a quantum superposition state obtained after the signal to be analyzed is subjected to quantum Fourier transform, obtains a first mapping relationship and a preset tolerance error; searches for a target sampling number that matches the preset tolerance error in the first mapping relationship, wherein the target sampling number is inversely proportional to the preset tolerance error, and the preset tolerance error is characterized by the gap between the quantum probability distribution and the true probability distribution of the same signal; measures the quantum superposition state for the target sampling number to obtain measurement results equal to the target sampling number; and counts the probability of each first measurement result appearing in all the measurement results to obtain the target quantum probability distribution of the signal to be analyzed in the frequency domain, wherein the first measurement results are measurement results of the same type.
[0176] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a LAN (local area network) or a WAN (Wide Area Network), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0177] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based device that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0178] The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The name of the module does not constitute a limitation on the unit itself under certain circumstances. The computer-readable storage medium provided in the present application stores computer-readable program instructions for executing the above-mentioned signal spectrum analysis method, aiming to solve the technical problem that the accuracy of quantum Fourier transform in spectrum analysis is not high. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiments of the present application are the same as the beneficial effects of the signal spectrum analysis method provided in the above-mentioned embodiments, which will not be repeated here.
[0179] The present application also provides a computer program product, including a computer program, which implements the steps of the signal spectrum analysis method as described above when the computer program is executed by a processor. The computer program product provided by the present application is intended to solve the technical problem that the accuracy of quantum Fourier transform in spectrum analysis is not high. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the signal spectrum analysis method provided by the above embodiment, which will not be repeated here. The above is only a preferred embodiment of the present application, and the patent scope of the present application is not limited thereto. All equivalent structures or equivalent process transformations made using the contents of the specification and drawings of this application, or directly or indirectly used in other related technical fields, are similarly included in the patent processing scope of the present application.
Claims
1. A signal spectrum analysis method, characterized in that: The method includes: Obtaining a quantum superposition state of a signal to be analyzed after a quantum Fourier transform, obtaining a first mapping relationship and a preset tolerance error; Searching the first mapping relationship for a target sampling number that matches the preset tolerance error, the target sampling number is inversely proportional to the preset tolerance error, the preset tolerance error is characterized by the gap between the quantum probability distribution and the true probability distribution of the same signal, the true probability distribution is the true probability distribution obtained by the signal after the traditional Fourier transform, the traditional Fourier transform is a discrete Fourier transform or a fast Fourier transform, wherein the first mapping relationship is characterized by the mapping relationship between each sampling number and the corresponding tolerance error when the number of bits of the quantum bit of the quantum system corresponding to the signal to be analyzed is the first digit; Measuring the target sampling number of times on the quantum superposition state to obtain measurement results equal to the target sampling number of times; According to each of the measurement results, a target quantum probability distribution of the signal to be analyzed is determined.
2. The method according to claim 1, characterized in that The step of obtaining the first mapping relationship includes: Obtaining a first true probability distribution of a verification signal, obtaining a plurality of different first quantum probability distributions corresponding to the verification signal, and obtaining a target output number output after the verification signal is subjected to quantum Fourier transformation, wherein the target output number is the number of different quantum superposition states; Comparing a first gap between each of the first quantum probability distributions and the first true probability distribution; Determining a second mapping relationship corresponding to the target output quantity according to the target output quantity, each of the first gaps, and the preset number of sampling times corresponding to each of the first quantum probability distributions; Determine a first mapping relationship according to the second mapping relationship and the first output quantity of different quantum superposition states outputted after the acquired signal to be analyzed undergoes quantum Fourier transform; The second mapping relationship includes a mapping set corresponding to the target output quantity, and the mapping set includes a mapping relationship between each of the first gaps and a corresponding preset sampling number.
3. The method according to claim 2, characterized in that The step of obtaining a first true probability distribution of the verification signal comprises: Performing a fast Fourier transform on the verification signal to obtain a first true probability distribution of the verification signal in the frequency domain; or, Performing a discrete Fourier transform on the verification signal to obtain a first true probability distribution of the verification signal in the frequency domain.
4. The method according to claim 2, characterized in that The step of obtaining a plurality of different first quantum probability distributions corresponding to the verification signal comprises: Performing a quantum Fourier transform on the verification signal, sampling all quantum superposition states obtained after the verification signal is subjected to the quantum Fourier transform for a preset number of sampling times, obtaining sampling results having a number of preset sampling times, and counting the cumulative number of times the verification signal is subjected to the quantum Fourier transform; Determine the probability of each first sampling result in all the sampling results appearing in all the sampling results, and obtain a first quantum probability distribution of the verification signal in the frequency domain, wherein the first sampling results are sampling results of the same type; If the accumulated number is less than the preset number of transformations, the preset number of samplings is updated, and the step of performing quantum Fourier transformation on the verification signal is returned to, until the accumulated number is greater than or equal to the preset number of transformations, and the quantum Fourier transformation on the verification signal is stopped; Among them, the preset sampling times corresponding to each of the first quantum probability distributions are different.
5. The method according to claim 2, characterized in that The step of determining the second mapping relationship corresponding to the target output quantity according to the target output quantity, each of the first gaps, and the preset number of sampling times corresponding to each of the first quantum probability distributions comprises: When the number of different quantum superposition states of the verification signal is the target output number, the expectation of each of the first gaps when each of the preset sampling times satisfies a preset infinite condition is calculated to obtain a second mapping relationship; The preset infinite condition indicates that the preset sampling times tends to infinity.
6. The method according to claim 2, characterized in that The step of determining the first mapping relationship according to the second mapping relationship and the first output quantity of different quantum superposition states outputted by the acquired signal to be analyzed after the quantum Fourier transform comprises: When the target output quantity in the second mapping relationship is different from the first output quantity, modifying the target output quantity in the second mapping relationship to the first output quantity to obtain the first mapping relationship; When the target output quantity in the second mapping relationship is the same as the first output quantity, the second mapping relationship is used as the first mapping relationship.
7. The method according to claim 2, characterized in that The step of obtaining the target output quantity of the verification signal after the quantum Fourier transform also includes: Obtaining a preset second mapping relationship, and obtaining a target number of quantum bit positions of the quantum system in which the verification signal is located when performing a quantum Fourier transform; A target output quantity matching the target number of bits is determined in the preset second mapping relationship, where the preset second mapping relationship is a mapping relationship between the number of bits and the number of outputs.
8. A signal spectrum analysis device, characterized in that: The device comprises: An acquisition module is used to obtain a quantum superposition state obtained after the signal to be analyzed undergoes quantum Fourier transform, obtain a first mapping relationship and a preset tolerance error; A number determination module, used for searching the target sampling number that matches the preset tolerance error in the first mapping relationship, the target sampling number is inversely proportional to the preset tolerance error, the preset tolerance error is characterized by the gap between the quantum probability distribution and the real probability distribution of the same signal, the real probability distribution is the real probability distribution obtained by the signal after the traditional Fourier transform, the traditional Fourier transform is a discrete Fourier transform or a fast Fourier transform, wherein the first mapping relationship is characterized by the mapping relationship between each sampling number and the corresponding tolerance error when the number of bits of the quantum bit of the quantum system corresponding to the signal to be analyzed is the first digit; A measuring module, used to measure the target sampling number of the quantum superposition state to obtain a measurement result equal to the target sampling number; A statistical module is used to determine the target quantum probability distribution of the signal to be analyzed according to each of the measurement results.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the signal spectrum analysis method described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium is a computer-readable storage medium, on which is stored a program for implementing the signal spectrum analysis method. The program for implementing the signal spectrum analysis method is executed by a processor to implement the steps of the signal spectrum analysis method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Quantum noise process analysis method and device, equipment and storage medium
CN110210073A
Method and device for eliminating quantum noise, electronic equipment and medium
CN112990472A