Signal spectrum analysis method and apparatus, electronic device, and readable storage medium

By acquiring quantum superposition states and mapping relationships, the target sampling number is determined for measurement, thus solving the accuracy problem of quantum Fourier transform in spectrum analysis and achieving higher accuracy in signal spectrum analysis.

WO2026051414A1PCT designated stage Publication Date: 2026-03-12YANGTZE DELTA IND INNOVATION CENT OF QUANTUM SCI & TECH
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2026-03-12

AI Technical Summary

Technical Problem

The quantum Fourier transform is not very accurate in spectral analysis and cannot accurately determine the probability distribution of the original state of a signal.

Method used

By acquiring quantum superposition states, mapping relationships, and preset tolerance errors, the target sampling number is determined, and measurements are performed to determine the target quantum probability distribution. Quantum entanglement and parallelism are used to improve computational efficiency.

Benefits of technology

It improves the accuracy of quantum Fourier transform in spectrum analysis, ensuring that the difference between the target quantum probability distribution and the true probability distribution does not exceed the preset tolerance error, thus enhancing the accuracy of signal spectrum analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025094555_12032026_PF_FP_ABST
    Figure CN2025094555_12032026_PF_FP_ABST
Patent Text Reader

Abstract

A signal spectrum analysis method and apparatus, an electronic device, and a readable storage medium. The signal spectrum analysis method comprises: acquiring quantum superposition states obtained by performing quantum Fourier transform on signals to be analyzed, and acquiring a first mapping relationship and a preset tolerance error (S10); searching the first mapping relationship for a target sampling count matching the preset tolerance error, the target sampling count being inversely proportional to the preset tolerance error, and the preset tolerance error being characterized as a difference between a quantum probability distribution and an actual probability distribution of a same signal (S20); measuring the quantum superposition states a number of times equal to the target sampling count to obtain measurement results, the quantity of the measurement results being the target sampling count (S30); and, on the basis of the measurement results, determining a target quantum probability distribution of the signals to be analyzed (S40). The method solves the technical problem of low accuracy of quantum Fourier transform in spectral analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Signal spectrum analysis method and device, electronic equipment and readable storage medium TECHNICAL FIELD

[0001] The present application relates to the technical field of quantum, in particular to a signal spectrum analysis method and device, electronic equipment and readable storage medium. BACKGROUND

[0002] In the field of modern signal processing, frequency spectrum analysis of signals is one of the core tasks, and the purpose is to reveal the frequency components and their distribution characteristics of the signal. 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 the actual needs.

[0003] In recent years, with the rapid development of quantum computing technology, quantum signal processing as a new emerging technical field has gradually attracted people's attention. Quantum signal processing uses quantum mechanics to represent and operate on quantum superposition states, thereby achieving efficient processing of quantum signals. However, although quantum signal processing has great potential, its application in the field of spectrum analysis still faces some challenges. For example, in classical signal processing, the probability distribution of the signal in the frequency domain can be directly obtained by 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 a quantum state, even if we measure the same quantum state multiple times, the result of each measurement may be different. This is because the measurement will randomly select one possible state as the result, and the probability of this selection is determined by the amplitude of the quantum state. Therefore, after performing quantum Fourier transform (QFT) on the signal, 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 a problem that needs to be solved at present.

[0004] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0005] The main purpose of the present application is to provide a signal spectrum analysis method, device, electronic equipment and readable storage medium, which aims to solve the technical problem of low accuracy of quantum Fourier transform in spectrum analysis.

[0006] To achieve the above purpose, the present application provides a signal spectrum analysis method, comprising:

[0007] obtaining a quantum superposition state of the signal to be analyzed after quantum Fourier transform, obtaining a first mapping relationship and a preset tolerance error;

[0008] finding a target sampling number matching the preset tolerance error in the first mapping relationship, the target sampling number being inversely proportional to the preset tolerance error, and the preset tolerance error representing a gap between a quantum probability distribution and a real probability distribution of the same signal;

[0009] performing measurement on the quantum superposition state for the target sampling number to obtain measurement results with a quantity of the target sampling number;

[0010] determining a target quantum probability distribution of the signal to be analyzed according to the measurement results.

[0011] In an embodiment, the step of obtaining the first mapping relationship comprises:

[0012] obtaining a first real 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 quantity output by the verification signal after quantum Fourier transform, the target output quantity being a quantity of different quantum superposition states;

[0013] comparing a first gap between each of the first quantum probability distributions and the first real probability distribution;

[0014] determining a second mapping relationship corresponding to the target output quantity according to the target output quantity, the first gaps, and preset sampling numbers corresponding to the first quantum probability distributions respectively;

[0015] determining the first mapping relationship according to the second mapping relationship and a first output quantity of different quantum superposition states output by the signal to be analyzed after quantum Fourier transform;

[0016] The second mapping relationship comprises a mapping set corresponding to the target output quantity, and the mapping set comprises mapping relationships between the first gaps and corresponding preset sampling numbers.

[0017] In an embodiment, the step of obtaining the first real probability distribution of the verification signal comprises:

[0018] performing fast Fourier transform on the verification signal to obtain a first real probability distribution of the verification signal in a frequency domain; or,

[0019] performing discrete Fourier transform on the verification signal to obtain a first real probability distribution of the verification signal in a frequency domain.

[0020] In an embodiment, the step of obtaining a plurality of different first quantum probability distributions corresponding to the verification signal comprises:

[0021] performing quantum Fourier transform on the verification signal, sampling all quantum superposition states obtained after the quantum Fourier transform on the verification signal by a preset sampling number, obtaining a plurality of sampling results, and counting a cumulative number of times of performing quantum Fourier transform on the verification signal;

[0022] determining a probability of each first sampling result in all the sampling results, to obtain a first quantum probability distribution of the verification signal in a frequency domain, wherein the first sampling result is a sampling result of the same type;

[0023] if the cumulative number of times is less than a preset transformation number, updating the preset sampling number, and returning to the step of performing quantum Fourier transform on the verification signal, until the cumulative number of times is greater than or equal to the preset transformation number, and stopping the quantum Fourier transform on the verification signal;

[0024] wherein the preset sampling number corresponding to each first quantum probability distribution is different.

[0025] In an embodiment, the step of determining the second mapping relationship corresponding to the target output number according to the target output number, each first difference, and the preset sampling number corresponding to each first quantum probability distribution comprises:

[0026] in a case where the number of different quantum superposition states of the verification signal is a target output number, calculating an expectation of each first difference when each preset sampling number satisfies a preset infinity condition, to obtain a second mapping relationship;

[0027] the preset infinity condition indicates that the preset sampling number tends to infinity.

[0028] In an embodiment, the step of determining the first mapping relationship according to the second mapping relationship and a first output number of different quantum superposition states output after quantum Fourier transform on the to-be-analyzed signal comprises:

[0029] in a case where the target output number in the second mapping relationship is different from the first output number, modifying the target output number in the second mapping relationship to the first output number to obtain the first mapping relationship;

[0030] in a case where the target output number in the second mapping relationship is the same as the first output number, taking the second mapping relationship as the first mapping relationship.

[0031] In an embodiment, the step of obtaining the target output quantity of the verification signal after quantum Fourier transform further comprises:

[0032] obtaining a preset second mapping relationship and obtaining a target bit number of a quantum bit of a quantum system in which the verification signal is located when the quantum Fourier transform is performed;

[0033] determining a target output quantity matching the target bit number in the preset second mapping relationship, the preset second mapping relationship being a mapping relationship between a bit number and an output quantity.

[0034] In addition, to achieve the above-mentioned purposes, the present application also provides a signal spectrum analysis device, the device comprising:

[0035] an obtaining module, configured to obtain a quantum superposition state obtained by performing quantum Fourier transform on a signal to be analyzed, obtain a first mapping relationship and a preset tolerance error;

[0036] a number determining module, configured to find a target sampling number matching the preset tolerance error in the first mapping relationship, the target sampling number being inversely proportional to the preset tolerance error, the preset tolerance error representing a gap between a quantum probability distribution and a real probability distribution of the same signal;

[0037] a measuring module, configured to perform measurement on the quantum superposition state for the target sampling number, to obtain measurement results with a quantity of the target sampling number;

[0038] a statistical module, configured to determine a 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 purposes, the present application also provides an electronic device, the electronic device comprising a memory, a processor and a signal spectrum analysis method program stored in the memory and executable on the processor, the signal spectrum analysis method program being executable by the processor to implement the steps of the signal spectrum analysis method as described above.

[0040] In addition, to achieve the above-mentioned purposes, the present application also provides a computer readable storage medium, the computer readable storage medium storing a signal spectrum analysis method program, the signal spectrum analysis method program being executable by the processor to implement the steps of the signal spectrum analysis method as described above.

[0041] In addition, to achieve the above-mentioned purposes, the present application also provides a computer program product, comprising a computer program, the computer program being executable by the processor to implement the steps of the signal spectrum analysis method as described above.

[0042] The one or more technical solutions provided in the application have at least the following technical effects: the application can measure the target sampling number of the quantum superposition state obtained after quantum Fourier transform of the to-be-analyzed signal, thereby restoring the target quantum probability distribution of the to-be-analyzed signal after quantum Fourier transform, and the target sampling number is determined by the first mapping relationship of the to-be-analyzed signal and the preset tolerance error, and the preset tolerance error represents the gap between the quantum probability distribution and the real probability distribution of the same signal, so by the first mapping relationship and the preset tolerance error, the target sampling number is determined, and the quantum superposition state of the to-be-analyzed signal in the frequency domain can be measured, so that the gap between the target quantum probability distribution obtained by statistics and the real probability distribution does 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 real probability distribution, thereby improving the accuracy of the target quantum probability distribution, and thereby improving the accuracy of quantum Fourier transform in frequency spectrum analysis. BRIEF DESCRIPTION OF DRAWINGS

[0043] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the application.

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor.

[0045] FIG. 1 is a flowchart of an embodiment of the signal spectrum analysis method of the present application;

[0046] FIG. 2 is a trend diagram of the change of KL divergence with sampling number in the signal spectrum analysis method of the present application;

[0047] FIG. 3 is a diagram of a quantum probability distribution in the signal spectrum analysis method of the present application;

[0048] FIG. 4 is a diagram of another quantum probability distribution in the signal spectrum analysis method of the present application;

[0049] FIG. 5 is a diagram of the change trend of the time complexity of fast Fourier transform and the time complexity of quantum Fourier transform in the signal spectrum analysis method of the present application;

[0050] FIG. 6 is a system structure diagram of the signal spectrum analysis device of the embodiment of the present application;

[0051] Fig. 7 is a schematic diagram of a device structure of a hardware running environment involved in a signal spectrum analysis method according to an embodiment of the present application.

[0052] The purposes, functional features and advantages of the present application will be further explained with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0053] It should be understood that the specific embodiments described herein are merely illustrative of the present application and do not limit the present application.

[0054] In order to better understand the technical solutions of the present application, the following will be described in detail with reference to the accompanying drawings and specific embodiments.

[0055] Quantum signal processing is a technology for signal processing using principles of quantum mechanics, which includes representation of quantum superposition states and processing of signals using quantum operations. Quantum information processing utilizes some special properties in quantum mechanics, such as quantum entanglement and quantum parallel computing characteristics, and can achieve some tasks that are difficult to achieve or have a large amount 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 form of Fourier transform that is discrete in both time domain and frequency domain, which transforms sampling of a time domain signal into sampling in a discrete-time Fourier transform (DTFT) frequency domain. However, the calculation complexity of the discrete Fourier transform is high, and for large-scale signal processing tasks, the calculation time of the discrete Fourier transform will be very long because it needs to perform multiple matrix and vector multiplication operations, and the time complexity is O(N*N), where N is the data length. In order to improve the operation efficiency of the discrete Fourier transform, fast Fourier transform is developed, which utilizes 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 by the computer to calculate the discrete Fourier transform, achieving the purpose of deleting repeated calculation, reducing multiplication operation and simplifying structure, and the time complexity is O(N*logN). However, the above two methods often require more calculation and storage space when processing large data, increasing the complexity and difficulty of calculation.

[0057] In order to improve the efficiency and accuracy of quantum signal spectrum analysis, the present application obtains a plurality of quantum superposition states of the signal in the frequency domain by performing quantum Fourier transform on the signal, and determines the quantum probability distribution of the signal by measuring the sampling number of each quantum superposition state. That is, the present application determines the quantum probability distribution of the signal by performing quantum Fourier transform on the signal, decomposes the signal into a simpler unitary matrix product to greatly improve the calculation efficiency, and utilizes quantum entanglement and quantum computing parallelism to realize large-scale quantum computing to process larger data sets than classical computers. Compared with the traditional signal spectrum processing method, the quantum Fourier transform is used for fast spectrum analysis of the signal, which is simpler, more accurate, real-time and economical.

[0058] It should be noted that the execution subject of the 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 capable of realizing the above functions.

[0059] Based on this, the embodiment of the present application provides a signal spectrum analysis method, comprising steps S10-S40:

[0060] Step S10, obtaining a quantum superposition state obtained by performing quantum Fourier transform on a signal to be analyzed, 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 finite-length discrete signal. The quantum Fourier transform can be performed on the signal to be analyzed on a quantum system. The quantum system can be a quantum computer. Different quantum systems can correspond to different numbers of quantum bit positions. Different numbers of quantum bit positions can correspond to different numbers of different quantum superposition states output after the quantum Fourier transform of the signal. For example, for a quantum system with n quantum bit positions, the number of different quantum superposition states output is 2 n .

[0062] The first mapping relationship corresponding to the signal to be analyzed is that in the case where the number of quantum bit positions of the quantum system corresponding to the signal to be analyzed is the first number, the mapping relationship between each sampling number and the corresponding tolerance error. Different numbers of quantum bit positions of the quantum system can correspond to different mapping relationships between the sampling number and the corresponding tolerance error. The number of quantum bit positions of the quantum system determines the number of different quantum superposition states output after the quantum Fourier transform of the signal on the quantum system.

[0063] The preset tolerance error refers to a gap between the target quantum probability distribution corresponding to the same signal and the target real probability distribution of the signal to be analyzed. The preset tolerance error can be a value, for example, the preset tolerance error can be represented by an epsilon accuracy, and the epsilon accuracy can represent a concept of a measurement accuracy or an 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.

[0064] For example, all quantum superposition states of the signal to be analyzed in the frequency domain obtained after quantum Fourier transform on the corresponding quantum system are acquired, the first mapping relationship corresponding to the signal to be analyzed and the preset tolerance error are acquired. The first mapping relationship and the preset tolerance error can be stored in the quantum system, so that they can be directly acquired from the quantum system when the quantum Fourier transform is performed on the quantum system.

[0065] In a feasible embodiment, step S10 further includes steps S11-S14:

[0066] In step S11, the first real probability distribution of the verification signal is acquired, a plurality of different first quantum probability distributions corresponding to the verification signal are acquired, and a target output quantity output after quantum Fourier transform of the verification signal is acquired, the target output quantity being a quantity of different quantum superposition states;

[0067] It should be noted that the first real probability distribution is a real probability distribution in the frequency domain output by the verification signal after traditional Fourier transform, and the traditional Fourier transform can be discrete Fourier transform or 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 quantum Fourier transform of the verification signal. Since the first quantum probability distribution is measured, the first quantum probability distribution can have a certain error with the first real probability distribution. The verification signal can be repeatedly subjected to quantum Fourier transform, and each quantum superposition state output by each quantum Fourier transform can be measured multiple times to determine the first quantum probability distribution corresponding to each quantum Fourier transform. The preset sampling times corresponding to each quantum Fourier transform are different.

[0069] The target output quantity is a target output quantity of different quantum superposition states output by the quantum system corresponding to the verification signal when the quantum Fourier transform is performed. The target output quantity can be determined based on a target bit number of quantum bits of the quantum system corresponding to the verification signal.

[0070] Exemplarily, a first real 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 quantity corresponding to the verification signal is determined according to a target bit number of a quantum bit of the quantum system.

[0071] In an example embodiment, the step S11 further comprises steps S111-S112.

[0072] In the step S111, a preset second mapping relationship is obtained, and a target bit number of a quantum bit of a quantum system in which the quantum Fourier transform on the verification signal is performed is obtained.

[0073] In the step S112, a target output quantity matching the target bit number is determined in the preset second mapping relationship, and the preset second mapping relationship is a mapping relationship between a bit number and an output quantity.

[0074] It should be noted that the second mapping relationship is a mapping relationship between a bit number and an output quantity, the bit number is a bit number of a quantum bit, and the output quantity is a bit number of different quantum superposition states output by the quantum system after the quantum Fourier transform on the signal.

[0075] When the verification signal is subjected to the quantum Fourier transform on the corresponding quantum system, the number of different quantum superposition states of the verification signal corresponding to the output in the frequency domain by the quantum system is related to the target bit number of the quantum bit of the quantum system.

[0076] Exemplarily, for a quantum system of n-bit quantum bits, the different quantum superposition states corresponding to the output have N=2 n n is a bit number of a quantum bit, and N is an output quantity.

[0077] In an example embodiment, the step S11 further comprises a step A10 or a step A20.

[0078] In the step A10, a fast Fourier transform is performed on the verification signal to obtain a first real probability distribution of the verification signal in the frequency domain.

[0079] In the step A20, a discrete Fourier transform is performed on the verification signal to obtain the first real probability distribution of the verification signal in the frequency domain.

[0080] It should be noted that the first real probability distribution can be obtained by performing the fast Fourier transform on the verification signal or by performing the discrete Fourier transform, and the present embodiment does not limit this, but the fast Fourier transform on the verification signal can be preferred to improve the efficiency of the frequency spectrum analysis.

[0081] Exemplarily, a discrete Fourier calculation formula of the discrete Fourier transform DFT performed on the verification signal is as follows:

[0082] where x(r) can verify the signal in the time domain of the r signal, X(k) is the verification signal in the frequency domain of the k signal, R represents the data length, j is the imaginary unit, π is the circular constant, and are complex exponential modulation factors, r is the index of the signal in the time domain, r is from 0 to R-1, k is the index of the signal in the frequency domain, k is from 0 to R-1.

[0083] For example, the principle of fast Fourier transform is to decompose the original R-point sequence into a series of short sequences in turn. By taking advantage of the symmetry and periodicity of the exponential factor in the discrete Fourier calculation formula, the corresponding DFT of these short sequences is calculated and appropriately combined to achieve the purpose of deleting repeated calculation, reducing multiplication operation and simplifying structure.

[0084] The fast Fourier calculation formula of fast Fourier transform is:

[0085] where e is the base of natural logarithm, s is a natural number, the range of s is 0 to (R / 2)-1, x(2s) is the representation of the corresponding even index in the time domain in the verification signal, and x(2s+1) is the representation of the corresponding odd index in the time domain in the verification signal. is the complex exponential modulation factor for x(2s), the complex exponential modulation factor for x(2s+1), can be regarded as another form of .

[0086] After the discrete Fourier transform or fast Fourier transform, the signal of the verification signal in the frequency domain can be obtained, and the first real probability distribution of the verification signal is determined by the power spectral density analysis method or the signal reconstruction method.

[0087] In other embodiments, the first real probability distribution of the verification signal can also be directly determined. For example, for a quantum system with n quantum bit positions, the different quantum superposition states output correspond to N=2 n , each different quantum superposition state can be denoted as h1, h2,..., h N , n is the number of quantum bit positions, N is the output quantity, and h1, h2,..., h N corresponding output probabilities are p1, p2,..., p N , and satisfy the following conditions:

[0088] where k is the subscript, the first real probability distribution p1, p2,..., pN The sum is 1.

[0089] In a feasible embodiment, step S11 further includes steps B10 to B30:

[0090] Step B10: Perform a quantum Fourier transform on the verification signal, sample all quantum superposition states obtained after the quantum Fourier transform of the verification signal for a preset number of times, obtain sampling results of a preset number of sampling times, and count the cumulative number of quantum Fourier transforms performed on the verification signal.

[0091] Step B20: Determine the probability of each first sampling result appearing in all sampling results to obtain the first quantum probability distribution of the verification signal in the frequency domain, wherein the first sampling results are sampling results of the same class;

[0092] Step B30: If the cumulative number of times 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 cumulative number of times is greater than or equal to the preset number of transformations, and stop performing quantum Fourier transform on the verification signal.

[0093] The preset number of samplings is different for each of the first quantum probability distributions.

[0094] It should be noted that the cumulative count refers to the number of times the quantum Fourier transform is performed on the current verification signal. The initial value of the cumulative count can be 0, or it can be set based on the actual situation; this embodiment does not impose a specific limitation on this. The preset sampling count corresponds to different first quantum probability distributions. It is understandable that the number of predicted samples after each quantum Fourier transform of the verification signal is different. The preset transformation count can be set based on the actual situation; the preset transformation count is not equal to 1, and the number of first quantum probability distributions is the integer part of the preset transformation count.

[0095] For any quantum Fourier transform of the verification signal, there are multiple first sampling results in all the 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, the sampling results are different from other sampling results in all sampling results.

[0096] In the embodiment, after the quantum superposition state after each pair of quantum Fourier transform is measured for a preset number of times, the verification signal can be re-quantum Fourier transformed, and the quantum superposition state after the re-quantum Fourier transform can be measured for a preset number of times of sampling. Since the quantum superposition state will collapse 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, the verification signal needs to be repeatedly quantum Fourier transformed multiple times to obtain multiple first quantum probability distributions of the verification signal. Repeatedly quantum Fourier transforming the verification signal multiple times is performed on the same quantum system.

[0097] The sampling result is obtained by measuring the basis vector corresponding to the quantum superposition state output after the quantum Fourier transform of the verification signal. For any quantum Fourier transform of the verification signal, the basis vector corresponding to each quantum superposition state output by the quantum Fourier transform is measured for a preset number of times of sampling, and a number of sampling results equal to the preset number of times of sampling is obtained. The number of different sampling results in all sampling results corresponding to this quantum Fourier transform is counted to determine the probability corresponding to each different sampling result, so that the first quantum probability distribution corresponding to this quantum Fourier transform can be counted.

[0098] For example, the quantum Fourier calculation formula for the quantum Fourier transform of the verification signal is:

[0099] where |d> is the quantum state corresponding to the input of the verification signal with subscript d, |k> is the quantum superposition state output after the quantum Fourier transform of the verification signal with subscript k, X d represents a linear combination of the orthogonal basis of the quantum state with subscript d, y k represents a linear combination of the orthogonal basis of the quantum superposition state output with subscript k. n is the number of quantum bit positions in the quantum system. e is the base number of 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.

[0100] The quantum Fourier transform cannot directly obtain the amplitude of the basis vector corresponding to the quantum superposition state, so the quantum superposition state obtained after the quantum Fourier transform needs to be measured for a preset number of times of sampling to obtain multiple sampling results, so as to determine the first quantum probability distribution.

[0101] For example, the preset number of times of sampling can be represented 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 a number of sampling results equal to the preset number of times of sampling is obtained. Each sampling result can be recorded as h1, h2,..., h NN is the output quantity corresponding to the different quantum superposition states of the verification signal output.

[0102] For any quantum Fourier transform of the verification signal, when a preset number of samplings M is measured, where M represents the preset number of samplings, M is a positive integer, and it is assumed that h k is measured m k times, the following conditions are met:

[0103] The number of sampling results of h k is m k , and the probability of the occurrence of h k in the sampling results is q k = m k / M. Where M is the preset number of samplings, and the first quantum probability distribution can be represented as {q k} k=1,...,N .

[0104] Step S12, comparing the first gap between each first quantum probability distribution and the first real probability distribution;

[0105] Step S13, determining the second mapping relationship corresponding to the target output quantity according to the target output quantity, the first gap, and the preset number of samplings corresponding to each first quantum probability distribution; Wherein the second mapping relationship contains a mapping set corresponding to the target output quantity, and the mapping set contains the mapping relationship between each first gap and the corresponding preset number of samplings;

[0106] It should be noted that the first gap is the gap between the first real probability distribution and the first quantum probability distribution, and the first gap is determined by comparing the sampling probability of each sampling result in the first quantum probability distribution with the real probability in the corresponding first real probability distribution. The first quantum probability distribution is determined by measuring the quantum superposition state after the quantum Fourier transform of the verification signal for a preset number of samplings. The preset number of samplings can be determined based on actual conditions. The second mapping relationship can be considered as the mapping relationship between the gap, the number of samplings and the output quantity. The relative entropy between the first real probability distribution and the first quantum probability distribution can be calculated to obtain the first gap; the relative entropy can be the Kullback-Leibler divergence (relative entropy). For example, for any first quantum probability distribution, the Kullback-Leibler divergence between the first quantum probability distribution and the first real probability distribution is calculated to obtain the first gap corresponding to the first quantum probability distribution.

[0107] Exemplarily, the second mapping relationship can be determined according to each first gap, a preset sampling number corresponding to the first quantum probability distribution corresponding to each first gap, and a target output number. The target output number is different, and the mapping relationship between each first gap and the corresponding preset sampling number is not necessarily the same.

[0108] In step S14, the first mapping relationship is determined according to the second mapping relationship and the first output number of different quantum superposition states output by the quantum Fourier transform of the acquired to-be-analyzed signal.

[0109] It should be noted that the number of quantum superposition states output by the quantum system of quantum bits of different bit lengths when performing quantum Fourier transform on the signal is different, and the number of quantum superposition states output also affects the sampling number. Therefore, after the second mapping relationship is determined, the first output number can be determined according to the first bit length of the quantum bit of the quantum system corresponding to the to-be-analyzed signal, and then the second mapping relationship is adjusted according to the first output number to determine the first mapping relationship.

[0110] Exemplarily, the first bit length of the quantum bit of the quantum system corresponding to the to-be-analyzed signal is acquired, the first output number matching the first bit length is determined in the second mapping relationship, the target output number in the second mapping relationship is adjusted according to the first output number, and the first mapping relationship is obtained.

[0111] The application adjusts the second mapping relationship to determine the first mapping relationship through the bit length of the quantum bit of the quantum system, so that the sampling number can be more accurately determined, so as to improve the accuracy of the target quantum probability distribution.

[0112] In a feasible embodiment, step S13 further comprises steps S131-S132:

[0113] In step S131, when the target output number in the second mapping relationship is different from the first output number, the target output number in the second mapping relationship is modified to the first output number to obtain the first mapping relationship.

[0114] In step S132, when the target output number in the second mapping relationship is the same as the first output number, the second mapping relationship is taken as the first mapping relationship.

[0115] It should be noted that when determining the second mapping relationship, quantum Fourier transform can be performed on any quantum system to determine the second mapping relationship. Since the number of quantum bits corresponding to different quantum systems can be different, the number of quantum bits can affect the number of different quantum superposition states output after the signal is subjected to quantum Fourier transform, and the number of quantum superposition states output can also affect the sampling frequency, for example, when the number of quantum superposition states is large, even if the same preset tolerance error is required, the target sampling frequency can be more.

[0116] Therefore, when the target sampling frequency corresponding to the signal to be analyzed needs to be determined, the first number of quantum bits of the quantum system corresponding to the signal to be analyzed needs to be determined, and then the first output number corresponding to the output of different quantum superposition states is determined, so that the first mapping relationship can be adjusted based on the first output number to determine the second mapping relationship.

[0117] For example, it is determined whether the target output number in the second mapping relationship is the same as the first output number. If the target output number in the second mapping relationship is different from the first output number, the target output number in the second mapping relationship is modified to the first output number to obtain the first mapping relationship. If the target output number in the second mapping relationship is the same as the first output number, the second mapping relationship is taken as the first mapping relationship.

[0118] In other embodiments, it can also be determined whether the target number of quantum bits corresponding to the second mapping relationship is the same as the first number of quantum bits of the quantum system corresponding to the signal to be analyzed. If the target number is the same as the first number, the second mapping relationship is taken as the first mapping relationship. If the target number is different from the first number, the target number of quantum bits corresponding to the second mapping relationship is adjusted to the first number. Thus, the accuracy of the target sampling frequency can be improved.

[0119] In step S20, a target sampling frequency matching a preset tolerance error is found in the first mapping relationship. The target sampling frequency is inversely proportional to the preset tolerance error, and the preset tolerance error represents the difference between the quantum probability distribution and the real probability distribution of the same signal.

[0120] It should be noted that the target sampling frequency is the number of times of measuring each quantum superposition state of the signal to be analyzed after quantum Fourier transform. The smaller the preset tolerance error, the more the target sampling frequency. It can be understood that the smaller the difference between the target quantum probability distribution and the real probability distribution corresponding to the signal to be analyzed. Therefore, when the preset tolerance error is smaller, the target probability distribution obtained by measurement is closer to the real probability distribution of the signal to be analyzed.

[0121] The first mapping relationship can be represented as a table or a formula. For example, the target sampling number matching the preset tolerance error can be found in the first mapping relationship, or the target sampling number can be calculated according to the preset first mapping relationship and the preset tolerance error.

[0122] In step S30, the quantum superposition state is measured for the target sampling number of times, and a measurement result of the target sampling number of times is obtained.

[0123] It should be noted that the quantum superposition state of the signal to be analyzed in the frequency domain can be measured for the target sampling number of times, and a measurement result of each sampling is obtained. The measurement result is a corresponding base vector of the quantum superposition state. The base vector of the quantum superposition state is the basis for describing and calculating the state of a quantum system in quantum mechanics.

[0124] For example, the base vector of the quantum superposition state of the signal to be analyzed in the frequency domain is measured for the target sampling number of times, and a measurement result of the target sampling number of times is obtained.

[0125] In step S40, the target quantum probability distribution of the signal to be analyzed is determined according to the measurement results.

[0126] 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 can be measured, and the base vectors corresponding to different quantum superposition states are measured with different probabilities. The probability is reflected in the target quantum probability distribution. The present embodiment determines the probability of each different measurement result being measured by the probability of each measurement result appearing in all measurement results, 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 can be measured, or different measurement results can be measured. The first measurement result refers to a measurement result of the same type, and the measurement result of the same type refers to a measurement result that is the same in each measurement result, or a measurement result that is different from other measurement results in all measurement results.

[0127] For example, the probability of each different 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.

[0128] Since the embodiment of the present application can measure the target sampling number, the target quantum probability distribution of the to-be-analyzed signal after quantum Fourier transform can be restored, and the target sampling number is determined by the first mapping relationship and the preset tolerance error, and the preset tolerance error represents the gap between the quantum probability distribution and the real probability distribution of the same signal, so by the first mapping relationship and the preset tolerance error, the sampling number of all quantum superposition states of the to-be-analyzed signal in the frequency domain can be measured, so that the gap between the target quantum probability distribution obtained by statistics and the real probability distribution does 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 real probability distribution, thereby improving the accuracy of the target quantum probability distribution, and further improving the accuracy of quantum Fourier transform in frequency spectrum analysis.

[0129] Further, in a feasible embodiment, step S12 further comprises step S121:

[0130] Step S121, in the case where the number of different quantum superposition states of the verification signal is verified to be the target output number, the expectation of each first gap when each preset sampling number satisfies the preset infinite condition is calculated to obtain a second mapping relationship;

[0131] The preset infinite condition indicates that the preset sampling number tends to infinity.

[0132] It should be noted that the first gap can be obtained by calculating the KL divergence between the first real probability distribution and the first quantum probability distribution. The KL divergence can calculate the gap between the first quantum probability distribution and the first real probability distribution. The calculated KL divergence can be used as the first gap. The KL divergence between any first quantum probability distribution and the first real probability distribution can be calculated, 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 infinite value, it is determined that the preset sampling number satisfies the preset infinite condition, and the preset infinite value can be set based on actual conditions. Each preset sampling number satisfies the preset infinite condition, and each preset sampling number is different.

[0133] For example, the first real probability distribution can be represented as {p k} k=1,...,N The first quantum probability distribution corresponding to M times of sampling of any quantum Fourier transform of the verification signal can be represented as {q k} k=1,...,NThe KL divergence can be used as a measure of the first difference 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:

[0134] Among them, D KL [Q||P] represents the first gap. k is the subscript, and N is the target number of quantum superposition states output. p k Let q be the k-th probability in the first true probability distribution. k Let p1, p2, ..., p be the k-th probability in the first quantum probability distribution. N The sum of is 1, so the following equation can exist:

[0135] It is known that the quantum Fourier transform of the verification signal is performed on the quantum system and the sample is repeated M times, where M is the preset number of samples. Let m1, ..., m be the number of the two groups of 1, ..., m. N Let m1, ..., m be natural numbers between 0 and M. N The sum is M. For p N m N power, m N For the sampling result h N Number of times it appears.

[0136] Let m k For the sampling result h k The number of occurrences (k = 1, ..., N), where k is the index and k is an integer, and the sampling result h k m appears k The probability of this is:

[0137] Where ! represents factorial, for example M! represents the factorial of M, m N ! represents m N The factorial of q, the first quantum probability distribution can also be expressed as {q k =m k / M} k=1,...,N The formula for calculating the KL divergence between the first quantum probability distribution and the first true probability distribution can also be expressed as:

[0138] For better understanding the embodiment, refer to Fig. 2, which is a schematic diagram of the trend of KL divergence with the sampling number. In the coordinate diagram, the vertical axis 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 KL divergence between the quantum probability distribution determined by the quantum Fourier transform of the same signal and the real probability distribution. As can be seen from Fig. 2, the more the sampling number, the closer the KL divergence corresponding to the actual measurement result and the KL divergence corresponding to the theoretical result to 0, and the less the sampling number, the greater the KL divergence.

[0139] And for the same signal, the more the sampling number, the more complete the quantum probability distribution, for example, refer to Fig. 3 and Fig. 4, which are schematic diagrams of different quantum probability distributions corresponding to the same signal, respectively. Fig. 4 is a schematic diagram of the quantum probability distribution corresponding to the sampling number of 128 times, the vertical axis is probability, and the horizontal axis is the sampling result. Fig. 4 is a schematic diagram of the quantum probability distribution corresponding to the sampling number of 32768 times. By comparing Fig. 3 and Fig. 4, it is found that the quantum probability distribution shown in Fig. 4 is more complete than the quantum probability distribution shown in Fig. 3.

[0140] It should be noted that the second mapping relationship can also be used to describe the mapping relationship between the number of quantum bits, the tolerable error and the sampling number. The number of quantum bits determines the output quantity of different quantum superposition states output after the quantum Fourier transform on the quantum system. The tolerable error represents the gap that can be tolerated between the quantum probability distribution and the real probability distribution of the same signal. The sampling number is the number of measurements on the quantum superposition state obtained after the quantum Fourier transform.

[0141] For example, the formula for calculating the expectation of the KL divergence corresponding to each first quantum probability distribution is:

[0142] wherein, is the expectation of the KL divergence, that is, the expectation of the first gap, represents m1, …, m N The value of m1, …, m N is a natural number between 0 and M, the sum of m1, …, m

[0143] When the preset sampling number M→∞, the mathematical expectation of the KL divergence will approach the real divergence, that is, the first gap will approach the real gap. According to the law of large numbers, it can be considered that all the frequencies q k = m k / M are very close to the real probability p k , so we get:

[0144] Therefore, the expectation of each KL divergence can be expressed as:

[0145] Record The above formula is transformed as:

[0146] Based on the above expression formula of the KL divergence, when M times (sufficiently large), the average of the KL divergence is about That is, the KL divergence is 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 the KL divergence, the smaller the gap between the quantum probability distribution and the real probability distribution. Denote the first gap as ε, then Since N is the output quantity corresponding to different quantum superposition states after quantum Fourier transform, and N can be determined based on the number n of quantum bits of the quantum system, N = 2 n , and then the second mapping relationship can be obtained as:

[0147] Among them, 2 n can be represented as the output quantity, since the tolerance error is the gap between the real probability distribution and the quantum probability distribution of the same signal, ε can also be represented as the tolerance error, and M can represent the sampling number that needs to be measured. According to the second mapping relationship and the first number of quantum bits of the quantum system corresponding to the signal to be analyzed, the first mapping relationship can be determined, for example, when the first number of quantum bits of the quantum system corresponding to the signal to be analyzed is 9, the first mapping relationship is:

[0148] Among them, 2 9 is the first output quantity of different quantum superposition states output by the quantum system corresponding to the signal to be analyzed after the quantum Fourier transform on the signal to be analyzed. The above is only one example, and the first number of quantum bits corresponding to the signal to be analyzed can also be other natural numbers, etc., and the present embodiment does not limit this.

[0149] And the larger the number n of qubit bits is, the smaller the KL divergence is, and the number n of qubit bits is proportional to the KL divergence. Further referring to FIG. 5, FIG. 5 is a diagram of the time complexity of the fast Fourier transform and the time complexity of the quantum Fourier transform. In FIG. 5, the vertical axis represents the time complexity, and the horizontal axis represents the number of physical bits. For the fast Fourier transform FFT, the number of physical bits is the number of storage units used for storing and processing data in a classical computer, and for the quantum Fourier transform QFT, the number of physical bits is the number of qubit bits corresponding to the quantum computer. As can be seen from FIG. 5, 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 small value. Therefore, it can be shown that when processing large data, the time complexity of the quantum Fourier transform is smaller than that of the fast Fourier transform, and the quantum Fourier transform can provide faster and more accurate frequency spectrum analysis.

[0150] The second mapping relationship for determining the number of samplings is provided in the embodiment, so that when the quantum Fourier transform is performed on the signal, the corresponding number of samplings can be determined to determine the quantum probability distribution, thereby improving the accuracy of the quantum probability distribution. Since the quantum Fourier transform has better efficiency than the traditional Fourier transform, the corresponding number of samplings is determined in the embodiment, so that the frequency spectrum analysis can be performed quickly and accurately, and the efficiency of the frequency spectrum analysis is improved.

[0151] The application also provides a signal frequency spectrum analysis device, which will be described with reference to FIG. 6. The signal frequency spectrum analysis device comprises:

[0152] The acquisition module 10 is configured to acquire a quantum superposition state obtained by performing the quantum Fourier transform on a signal to be analyzed, acquire a first mapping relationship, and acquire a preset tolerance error.

[0153] The number determination module 20 is configured to find a target number of samplings that matches the preset tolerance error in the first mapping relationship. The target number of samplings is inversely proportional to the preset tolerance error, and the preset tolerance error represents the difference between the quantum probability distribution and the true probability distribution of the same signal.

[0154] The measurement module 30 is configured to perform measurement on the quantum superposition state for the target number of samplings to obtain measurement results with the target number of samplings.

[0155] The statistical module 40 is configured to determine a target quantum probability distribution of the signal to be analyzed according to the measurement results.

[0156] The signal spectrum analysis device provided in the application adopts the signal spectrum analysis method in the above embodiment, and aims to solve the technical problem of low accuracy of quantum Fourier transform in spectrum analysis. Compared with the prior art, the signal spectrum analysis method provided in the embodiment of the application has the same beneficial effects as the signal spectrum analysis method provided in the above embodiment, and other technical features in the signal spectrum analysis device are the same as the features disclosed in the above embodiment method, which will not be repeated here. The electronic device provided in the embodiment of the application can be a playing device, and the electronic device comprises at least one processor, and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the signal spectrum analysis method in the above embodiment.

[0157] Reference is made below to FIG. 7, which shows a structural schematic diagram of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure can include, but is not limited to, quantum computers, quantum memories, etc. The electronic device shown in FIG. 7 is merely an example, and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.

[0158] As shown in FIG. 7, the electronic device can include a processing device 1001 (such as a central processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or loaded from a storage device 1003 to a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for operation of the electronic device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device can 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 shown systems. More or fewer systems can be alternatively implemented or possessed.

[0159] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by 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 methods of the embodiments of the present disclosure are executed.

[0160] The electronic device provided in the present application adopts the signal spectrum analysis method in the above embodiment one, aiming at solving the technical problem of low accuracy of quantum Fourier transform in spectrum analysis. Compared with the prior art, the product flow data distribution provided in the embodiment of the present application has the same beneficial effects as the signal spectrum analysis method provided in the above embodiment, and other technical features in the signal spectrum analysis device are the same as the features disclosed in the above embodiment method, which will not be repeated here. It should be understood that the parts of the present disclosure can be realized by hardware, software, firmware or their combination. In the description of the above embodiments, the specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner. The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range 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 should be subject to the protection scope of the claims. The embodiment provides a computer readable storage medium having computer readable program instructions stored thereon, the computer readable program instructions being used to execute the signal spectrum analysis method in the above embodiment one. The computer readable storage medium provided in the embodiment of the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor device, device or instrument, or any combination of the above. More specific examples of computer readable storage media can include, but are not limited to: an electric connection with one or more conductive 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, read-only memory) or a 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 the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution device, device or instrument. The program code contained on the computer readable storage medium can be transmitted by any appropriate medium, including but not limited to: electric wire, optical cable, RF (Radio Frequency, radio frequency) and the like, or any suitable combination of the above. The above computer readable storage medium can be contained in the electronic device; or it can exist separately without being assembled into the electronic device.The computer readable storage medium described above carries one or more programs, when the one or more programs are executed by the electronic device, cause the electronic device to: obtain a quantum superposition state of a signal to be analyzed after the signal to be analyzed is subjected to quantum Fourier transform, obtain a first mapping relationship and a preset tolerance error; find a target sampling number matching the preset tolerance error in the first mapping relationship, the target sampling number being inversely proportional to the preset tolerance error, and the preset tolerance error representing a gap between a quantum probability distribution and a real probability distribution of the same signal; perform measurement on the quantum superposition state for the target sampling number of times to obtain measurement results in a quantity of the target sampling number; and in all the measurement results, statistics of probabilities of each first measurement result appearing in all the measurement results is obtained to obtain a target quantum probability distribution of the signal to be analyzed in a frequency domain, wherein the first measurement result is a measurement result of the same type.

[0161] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0162] The flow and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flow and block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based device, or a combination of dedicated hardware-based devices and computer instructions.

[0163] The modules described in the embodiments of the present disclosure can be implemented in the form of software, or can be implemented in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself. The computer readable storage medium provided by the present application stores computer readable program instructions for executing the above signal spectrum analysis method, and aims to solve the technical problem of low accuracy of quantum Fourier transform in spectrum analysis. Compared with the prior art, the computer readable storage medium provided by the embodiments of the present application has the same beneficial effects as the signal spectrum analysis method provided by the above embodiments, and will not be described here.

[0164] The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the signal spectrum analysis method described above. The computer program product provided by the present application aims to solve the technical problem of low accuracy of quantum Fourier transform in spectrum analysis. Compared with the prior art, the computer program product provided by the embodiments of the present application has the same beneficial effects as the signal spectrum analysis method provided by the above embodiments, and will not be described here. The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation obtained by using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A method of signal spectrum analysis, characterized by, The method comprises: obtaining a quantum superposition state of a signal to be analyzed after quantum Fourier transform, obtaining a first mapping relationship and a preset tolerance error; finding a target sampling number matching the preset tolerance error in the first mapping relationship, the target sampling number being inversely proportional to the preset tolerance error, and the preset tolerance error representing a gap between a quantum probability distribution and a true probability distribution of the same signal; measuring the quantum superposition state for the target sampling number to obtain measurement results in a number of the target sampling number; determining a target quantum probability distribution of the signal to be analyzed according to each measurement result.

2. The method of claim 1, wherein, The step of obtaining the first mapping relationship comprises: 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 quantum Fourier transform of the verification signal, the target output number being a number of different quantum superposition states; comparing a first gap between each first quantum probability distribution and the first true probability distribution; determining a second mapping relationship corresponding to the target output number according to the target output number, each first gap, and a preset sampling number corresponding to each first quantum probability distribution; determining the first mapping relationship according to the second mapping relationship and a first output number of different quantum superposition states output after quantum Fourier transform of the signal to be analyzed; wherein the second mapping relationship comprises a mapping set corresponding to the target output number, and the mapping set comprises a mapping relationship between each first gap and a corresponding preset sampling number.

3. The method of claim 2, wherein, The step of obtaining the first true probability distribution of the verification signal comprises: performing fast Fourier transform on the verification signal to obtain the first true probability distribution of the verification signal in the frequency domain; or performing discrete Fourier transform on the verification signal to obtain the first true probability distribution of the verification signal in the frequency domain.

4. The method of claim 2, wherein, The step of obtaining a plurality of different first quantum probability distributions corresponding to the verification signal comprises: performing quantum Fourier transform on the verification signal, performing preset sampling number sampling on all quantum superposition states obtained after quantum Fourier transform of the verification signal, obtaining sampling results in a number of the preset sampling number, and counting a cumulative number of times of quantum Fourier transform on the verification signal; determining a probability of each first sampling result in all sampling results, to obtain the first quantum probability distribution of the verification signal in the frequency domain, wherein the first sampling result is a sampling result of the same type; if the cumulative number of times is less than a preset transform number, updating the preset sampling number and returning to the step of performing quantum Fourier transform on the verification signal, until the cumulative number of times is greater than or equal to the preset transform number, and stopping quantum Fourier transform on the verification signal; wherein the preset sampling number corresponding to each first quantum probability distribution is different.

5. The method of claim 2, wherein, The step of determining the second mapping relationship corresponding to the target output quantity according to the target output quantity, each first gap, and a preset sampling number corresponding to each first quantum probability distribution comprises: In a case where the number of different quantum superposition states of the verification signal is a target output quantity, an expectation of each first gap is calculated when each preset sampling number satisfies a preset infinite condition, to obtain a second mapping relationship; The preset infinite condition indicates that the preset sampling number tends to infinity.

6. The method of claim 2, wherein, The step of determining the first mapping relationship according to the second mapping relationship and a first output quantity of different quantum superposition states output by the quantum Fourier transform of the to-be-analyzed signal comprises: In a case where 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; In a case where the target output quantity in the second mapping relationship is the same as the first output quantity, the second mapping relationship is taken as the first mapping relationship.

7. The method of claim 2, wherein, The step of obtaining the target output quantity of the verification signal output after the quantum Fourier transform further comprises: obtaining a preset second mapping relationship and a target bit number of a quantum bit of a quantum system in which the verification signal is subjected to the quantum Fourier transform; determining a target output quantity matching the target bit number in the preset second mapping relationship, the preset second mapping relationship being a mapping relationship between a bit number and an output quantity.

8. A signal spectrum analysis apparatus, characterized by comprising: The device comprises: an obtaining module configured to obtain quantum superposition states obtained by the quantum Fourier transform of a to-be-analyzed signal, obtain a first mapping relationship, and obtain a preset tolerance error; a number determining module configured to find a target sampling number matching the preset tolerance error in the first mapping relationship, the target sampling number being inversely proportional to the preset tolerance error, and the preset tolerance error representing a gap between a quantum probability distribution and a true probability distribution of the same signal; a measuring module configured to measure the quantum superposition states for the target sampling number to obtain measurement results with a number of the target sampling number; a statistical module configured to determine a target quantum probability distribution of the to-be-analyzed signal according to each measurement result.

9. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the signal spectrum analysis method in any one of claims 1 to 7.

10. A readable storage medium, characterized by, The readable storage medium is a computer readable storage medium, and the computer readable storage medium stores a program for implementing a signal spectrum analysis method, and the program for implementing the signal spectrum analysis method is executed by a processor to implement the steps of the signal spectrum analysis method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for eliminating quantum noise, electronic equipment and medium

    CN112990472A

  • Method and device for eliminating quantum noise, electronic equipment and medium

    CN113065659A

  • Method and device for eliminating quantum noise, electronic equipment and medium

    CN114429218A

  • Method and device for eliminating quantum noise, electronic equipment and medium

    CN114492823A

  • Electric power detection system and method based on combination of quantum computing and artificial intelligence

    CN117713385A