A data processing method, apparatus, device, and computer program product

By using random measurement basis and quantum state feature-enhanced measurement basis in the quantum artificial intelligence model, feature fluctuation and information entropy data are extracted, and the dropout probability is dynamically adjusted. This solves the problems of high computational cost and insufficient robustness in the quantum artificial intelligence model, and improves the efficiency of dropout and the generalization ability of the model.

CN122174909APending Publication Date: 2026-06-09CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
Filing Date
2026-02-10
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In quantum artificial intelligence models, existing dropout methods require processing the complete representation of quantum states, resulting in high computational cost, poor efficiency, and insufficient robustness and generalization ability in the presence of noise or uncertainty.

Method used

We employ random measurement basis and quantum state feature-enhanced measurement basis to measure quantum circuits, extract feature fluctuation data and information entropy data, and determine whether to perform dropout based on these data. We dynamically adjust the dropout probability to reduce computational load and improve the robustness and generalization ability of the model.

Benefits of technology

By reducing the processing of complete quantum states, the computational cost is reduced, and by dynamically adjusting the dropout probability, the efficiency of dropout and the robustness and generalization ability of the model are improved, especially in noisy environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174909A_ABST
    Figure CN122174909A_ABST
Patent Text Reader

Abstract

This application provides a data processing method, apparatus, device, and computer program product. The method includes: measuring the quantum circuits in a quantum neural network model to be trained based on a first measurement basis and a second measurement basis, and obtaining measurement results; the first measurement basis is a random measurement basis; the second measurement basis is a quantum state feature enhancement measurement basis; extracting multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results; determining whether to perform dropout on multiple features based on the multiple feature fluctuation data and multiple feature information entropy data, and obtaining multiple judgment results corresponding to multiple features; training the quantum neural network model to be trained based on the multiple judgment results, and obtaining a trained quantum neural network model; the trained quantum neural network model is used at least for processing quantum data. This improves dropout efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, device, and computer program product. Background Technology

[0002] Random dropout is a common regularization technique in the field of artificial intelligence. It mainly prevents overfitting in neural networks by randomly discarding or disabling a portion of neurons. Multi-sample dropout can be used for faster training of deep neural networks. However, when applying dropout to quantum artificial intelligence models, it is necessary to process the complete representation of quantum states. When the number of qubits is large, it requires a large amount of computation and is inefficient. Summary of the Invention

[0003] This application provides a data processing method, apparatus, device, and computer program product that can improve dropout efficiency.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a data processing method, the method comprising: The quantum circuits in the quantum neural network model to be trained are measured according to the first measurement basis and the second measurement basis to obtain the measurement results; the first measurement basis is a random measurement basis; the second measurement basis is a quantum state feature enhancement measurement basis; Extract multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results; Based on the multiple feature fluctuation data and the multiple feature information entropy data, determine whether to perform dropout on multiple features, and obtain multiple judgment results corresponding to the multiple features; The quantum neural network model to be trained is trained based on the multiple judgment results to obtain the trained quantum neural network model; the trained quantum neural network model is used at least for processing quantum data.

[0005] This application provides a data processing apparatus, including: The measurement unit is used to measure the quantum circuits in the quantum neural network model to be trained according to a first measurement basis and a second measurement basis, and to obtain the measurement results; the first measurement basis is a random measurement basis; the second measurement basis is a quantum state feature enhancement measurement basis; The extraction unit is used to extract multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results; The judgment unit is used to determine whether to dropout the multiple features based on the multiple feature fluctuation data and the multiple feature information entropy data, and to obtain multiple judgment results corresponding to the multiple features; A training unit is used to train the quantum neural network model to be trained based on the multiple judgment results to obtain a trained quantum neural network model; the trained quantum neural network model is used at least for processing quantum data.

[0006] This application provides an electronic device, the electronic device comprising: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method provided in the embodiments of this application.

[0007] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the data processing method provided in this application.

[0008] The embodiments of this application have the following beneficial effects: By measuring quantum circuits using random measurement bases and quantum state feature-enhanced measurement bases, measurement results can be obtained without processing the fully represented quantum state, thus reducing the overall computational load. Multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features can be extracted from the measurement results. Based on the multiple feature fluctuation data and multiple feature information entropy data, it can be determined whether to dropout multiple features. The determination result can be used to directly determine whether to dropout features, thereby improving the efficiency of dropout. Attached Figure Description

[0009] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application; Figure 2 A flowchart illustrating an exemplary dynamic Dropout method based on quantum state-enhanced classical shadowing provided for embodiments of this application; Figure 3 A schematic flowchart illustrating an exemplary measurement method provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0010] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0011] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0012] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first," "second," etc., used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first," "second," etc., may be interchanged in a specific order or sequence where permissible, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0013] Classical shadowing is a method in quantum computing for obtaining quantum state information. It mainly uses a series of randomized measurements to approximately reconstruct certain properties or expected values ​​of the quantum state, thereby reducing the demand for computing resources. Dropout is a regularization technique commonly used in artificial intelligence. It mainly prevents overfitting in neural networks by randomly dropping or disabling a portion of neurons.

[0014] In related technologies, computers create multiple dropout samples in a small batch, starting from the dropout layer in a deep neural network and ending at the loss function layer. In the dropout layer, the computer applies multiple random masks to corresponding samples among the multiple dropout samples; in the fully connected layer, a shared parameter is applied to all the multiple dropout samples. Finally, after the loss function layer in the deep neural network, the computer calculates the final loss value by averaging the loss values ​​of the corresponding samples among the multiple dropout samples. However, this method has drawbacks: using a simple superposition method for multi-sample dropout fails to achieve ideal results when noise or other uncertainties exist, resulting in poor robustness; when performing specific dropouts, the decision to dropout is made by applying random masks without dynamic adjustment based on the current learning characteristics of the neural network, ultimately leading to poor generalization ability; when applying this dropout method to quantum artificial intelligence models, it requires processing the complete representation of quantum states, which demands a large amount of computation when the number of qubits is large, resulting in poor efficiency.

[0015] In related technologies, a weakly supervised action detection method based on an adaptive temporal dropout mechanism extracts features from the video to be detected; fuses RGB features and optical flow features and maps them to an action feature space; maps the action feature sequence to a classification space to obtain a class activation sequence; performs post-processing on the class activation sequence to obtain candidate action instances; when training the classification network, an adaptive temporal dropout module selects and removes significant parts from the action feature sequence to obtain the corresponding class activation sequence, and uses a loss function based on multi-instance learning for optimization training. Compared with existing technologies, this invention solves the "local dominance" problem in weakly supervised action detection in an end-to-end, data-driven manner, and has the advantages of simple process, high recognition accuracy, and wide applicability. However, its disadvantages are that the dropout is performed in a data-driven, online manner. Although it has adaptive characteristics, it does not handle uncertainties when the data is noisy; when this dropout method applies a quantum artificial intelligence model, it also needs to process the complete quantum state representation. As the number of qubits increases, the corresponding computational load increases exponentially, resulting in poor efficiency.

[0016] This application provides a data processing method. Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this application; as shown below. Figure 1 As shown, the method includes: S101. Measure the quantum circuits in the quantum neural network model to be trained according to the first and second measurement bases to obtain the measurement results.

[0017] The first measurement basis is a random measurement basis; the second measurement basis is a quantum state characteristic-enhanced measurement basis.

[0018] It should be noted that the quantum neural network model can also be understood as a quantum artificial intelligence model, and this is not a limitation here. The quantum circuit can include arbitrary quantum operations or quantum logic gates, as well as the number of qubits; its specific configuration can be determined according to the actual situation and is not limited here. The first measurement basis is a set of random measurement bases; the second measurement basis is a quantum state-added measurement basis, which at least includes a fidelity measurement basis or an entangled state measurement basis, and can also be understood as a fidelity measurement basis set or an entangled state measurement basis set. Measurements are performed on the quantum circuit in the quantum neural network model to be trained based on the first and second measurement bases to obtain the measurement results. This can be understood as measuring the quantum circuit based on the first and second measurement bases and collecting all the measurement results.

[0019] S102. Extract multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results.

[0020] It should be noted that feature fluctuation data can be understood as the coefficient of variation (CV), and feature information entropy data can be understood as the information entropy value (H). Feature fluctuation data reflects the degree of fluctuation of a feature, while feature information entropy data represents the uncertainty of a feature. Extracting multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results can be understood as forming quantum state-enhanced classical shadowing data based on the measurement results, and extracting multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the quantum state-enhanced classical shadowing data; or it can be understood as extracting the feature fluctuation data and feature information entropy data corresponding to each feature separately from the measurement results.

[0021] S103. Based on multiple feature fluctuation data and multiple feature information entropy data, determine whether to dropout multiple features and obtain multiple judgment results corresponding to multiple features.

[0022] It should be noted that determining whether to dropout multiple features based on multiple feature fluctuation data and multiple feature information entropy data yields multiple judgment results for each feature. This can be understood as determining whether to dropout each feature separately based on its corresponding feature fluctuation data and feature information entropy data, resulting in a judgment result for each feature. The judgment result includes at least one option: dropout is performed on a specific feature, or no dropout is performed on a specific feature.

[0023] S104. Train the quantum neural network model to be trained based on multiple judgment results to obtain the trained quantum neural network model; the trained quantum neural network model is used at least for processing quantum data.

[0024] It should be noted that training the quantum neural network model to be trained based on multiple judgment results to obtain the trained quantum neural network model can be understood as determining whether to dropout a certain feature during the training of the quantum neural network model based on the judgment result corresponding to each feature. The trained quantum neural network model can be used to process quantum data at least; that is, the trained quantum neural network model can be applied to the quantum domain and at least used to process quantum data.

[0025] The solution in this application embodiment measures the quantum circuit using a random measurement basis and a quantum state feature-enhanced measurement basis, thereby obtaining the measurement results without processing the fully represented quantum state, which reduces the overall computational load. Multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features are extracted from the measurement results. Based on these data, it is determined whether to dropout multiple features, thus directly determining whether to dropout features based on the judgment result, thereby improving the efficiency of dropout.

[0026] In this embodiment of the application, the process of determining whether to dropout multiple features based on multiple feature fluctuation data and multiple feature information entropy data to obtain multiple judgment results corresponding to multiple features specifically includes: determining multiple score data corresponding to multiple features based on multiple feature fluctuation data and multiple feature information entropy data; determining multiple dropout probability data corresponding to multiple features based on multiple score data; and determining multiple judgment results based on multiple dropout data.

[0027] It should be noted that the scoring data can be understood as importance scoring data. Determining multiple scoring data corresponding to multiple features based on multiple feature fluctuation data and multiple feature information entropy data can be understood as determining the scoring data corresponding to each feature based on the feature fluctuation data and feature information entropy data corresponding to each feature. It can also be illustrated as determining the importance score corresponding to each feature based on the coefficient of variation and information entropy value corresponding to each feature.

[0028] In this embodiment of the application, the process of determining multiple scoring data corresponding to multiple features based on multiple feature fluctuation data and multiple feature information entropy data specifically includes: obtaining a weighting factor; the weighting factor being an importance factor for adjusting the multiple feature fluctuation data and multiple feature information entropy data; and determining multiple scoring data based on the weighting factor, multiple feature fluctuation data, and multiple feature information entropy data.

[0029] It should be noted that the weighting factor is a factor that adjusts the importance of multiple feature fluctuation data and multiple feature information entropy data. It can be understood as the weighting factor used to adjust the relative importance between the coefficient of variation and information entropy. In practical applications, the weighting factor is a factor between 0 and 1, and can be denoted as: ,when When the score is close to 1, the importance score is... It is mainly determined by the coefficient of variation, and when Importance score when close to 0 Primarily determined by information entropy. The final importance score. The higher the value of feature i, the more important it is; therefore, it exhibits both higher variability and contains more information. Determining multiple score data based on weighting factors, multiple feature fluctuation data, and multiple feature information entropy data can be understood as determining the score data corresponding to each feature based on the weighting factors, the feature fluctuation data corresponding to each feature, and the feature information entropy data. Alternatively, it can be done through... To indicate, among which, As a weighting factor; The coefficient of variation corresponding to feature i; The information entropy value corresponding to feature i; The importance score is given to feature i.

[0030] It should be noted that the dropout probability data is used to dynamically adjust whether to ultimately dropout. In practical applications, the dropout probability data can be denoted as P.

[0031] In this embodiment of the application, the process of determining multiple dropout probability data corresponding to multiple features based on multiple score data specifically includes: obtaining a regulation factor; the regulation factor is a factor that controls the relationship between multiple score data and multiple dropout probability data; and determining multiple dropout probability data based on the regulation factor and multiple score data.

[0032] It should be noted that the adjustment factor is a factor that controls the relationship between multiple rating data and multiple dropout probability data. It can be understood as the adjustment factor being used to control the relationship between importance scores and dropout probabilities. In practical applications, the adjustment factor can be denoted as... Larger Will dropout probability Faster descent, smaller Conversely, dropout probability. The lower the value, the more important feature i is, and therefore it will not be easily dropped out during training; conversely, the dropout probability increases. A higher value indicates a lower importance for feature i, making it more susceptible to dropout during training. Determining multiple dropout probability data based on the adjustment factor and multiple score data can be understood as determining the corresponding dropout probability data based on the adjustment factor and the score data corresponding to each feature. Alternatively, it can be achieved through... To represent; among which, Let i be the dropout probability corresponding to feature i. As a regulating factor, The importance score is given to feature i.

[0033] It should be noted that determining multiple judgment results based on multiple dropout probability data can be understood as dropout probability... The lower the value, the more important feature i is, and therefore it will not be easily dropped out during training; conversely, the dropout probability increases. The higher the value, the lower the importance of feature i, and therefore the easier it is to dropout during training; that is, the dropout probability. The lower the value, the less likely feature i will be to be dropped out; the lower the dropout probability. The higher the value, the easier it is to dropout feature i.

[0034] It should be noted that the weighting factors can be adjusted according to the specific needs of the task. and regulatory factors The specific amount will be determined based on the actual situation, and no limit will be set here.

[0035] The scheme in this application uses the coefficient of variation (CV), information entropy (H), importance score (S), and final dropout probability (P) as indicators to evaluate feature importance and dynamically adjust the feature dropout probability in the neural network accordingly. Using these indicators for dropout can effectively reduce overfitting and improve the model's generalization ability. In specific applications, the weight factors can be adjusted according to the needs of the specific task. and regulatory factors To obtain the best model performance.

[0036] In this embodiment of the application, the process of extracting multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results specifically includes: extracting multiple numerical data and multiple probability data corresponding to multiple features from the measurement results; determining multiple feature fluctuation data based on the multiple numerical data; and determining multiple feature information entropy data based on the multiple probability data.

[0037] It's important to note that characteristic fluctuation data (coefficient of variation) is a dimensionless statistic used to measure the dispersion of data; characteristic information entropy data (information entropy) is used to measure the uncertainty or information content of a random variable. Higher information entropy indicates greater uncertainty in the random variable. Numerical data must include at least the mean and standard deviation data corresponding to the feature; the mean can be illustrated as the mean of feature i, i.e., the arithmetic mean of the observed values; the standard deviation can be illustrated as the square root of the average of the squares of the deviations of the observed values ​​of feature i from its mean. Determining multiple characteristic fluctuation data based on multiple numerical data can be understood as determining the characteristic fluctuation data corresponding to each feature based on the numerical data (including mean and standard deviation data) corresponding to each feature. Alternatively, it can be illustrated as determining the coefficient of variation of feature i based on its mean and standard deviation. To indicate, among which, Let be the coefficient of variation of feature i; The standard deviation of feature i; Let be the mean of feature i.

[0038] It should be noted that probability data can be illustrated as the probability that feature i takes the value k, that is, the probability that feature i will take a specific value k among all possible values. The specific value of k can be determined according to the actual situation and is not limited here. Determining multiple feature information entropy data based on multiple probability data can be understood as determining the feature information entropy data corresponding to each feature based on the probability data corresponding to each feature. It can also be illustrated as determining the information entropy of feature i based on the probability that feature i takes the value k; it can also be done through... To indicate, among which, The information entropy of feature i; Let k be the probability that feature i takes the value k. Calculate using the natural logarithm or the base-2 logarithm. Information entropy The higher the value, the greater the uncertainty of feature i, and the more information the feature may contain.

[0039] The solution in this application defines the coefficient of variation, information entropy, and importance score to evaluate the importance of features. Based on the importance of features, the dropout probability can be evaluated more accurately, thereby more effectively reducing overfitting and improving the generalization ability of the model.

[0040] In this embodiment of the application, before measuring the quantum circuit in the quantum neural network model to be trained according to the first measurement basis and the second measurement basis, the method further includes: obtaining the number of qubits according to the quantum circuit; and determining the second measurement basis as a fidelity measurement basis or an entangled state measurement basis based on the number of qubits.

[0041] It should be noted that the number of qubits includes at least two cases: single qubits and multiple qubits (more than one qubit). Fidelity is a measure of the similarity between quantum states, and it usually involves two quantum states. and The square of the modulus of the inner product; a fidelity measurement basis is a set of measurement bases designed to maximize or minimize the fidelity between quantum states. For different quantum states, appropriate measurement bases are selected, and statistical analysis is performed on the measurement results to estimate the fidelity F. Entangled states are a non-classical correlation between quantum states that cannot be decomposed through local operations and classical communication. Entangled state measurement basis sets are a set of measurement bases designed to detect and quantify the entanglement between quantum states.

[0042] In this embodiment of the application, the process of determining whether the second measurement basis is a fidelity measurement basis or an entangled state measurement basis based on the number of qubits specifically includes: determining the second measurement basis as a fidelity measurement basis when the number of qubits is a first value; and determining the second measurement basis as an entangled state measurement basis when the number of qubits is greater than the first value.

[0043] It should be noted that the first value can be 1. When the number of qubits is the first value, the second measurement basis is determined to be the fidelity measurement basis; when the number of qubits is greater than the first value, the second measurement basis is determined to be the entangled state measurement basis. This can be understood as follows: when the number of qubits is 1 (single qubit), the second measurement basis is determined to be the fidelity measurement basis; when the number of qubits is greater than 1 (multiple qubits), the second measurement basis is determined to be the entangled state measurement basis.

[0044] The solution in this application adds a fidelity measurement basis set and an entangled state test basis set to the original random measurement basis set. By selecting an appropriate measurement basis set, the key features of the quantum state can be extracted more effectively, thereby improving the dropout effect and ultimately enhancing the robustness of the model.

[0045] To facilitate understanding, examples of the above schemes are provided here. This application proposes a dropout method based on classical shadowing. Leveraging the characteristics of classical shadowing, it can approximate quantum state information with a small number of random measurements, reducing overall computation and thus providing a solid data foundation. Simultaneously, a quantum-state-enhanced classical shadowing method is proposed based on the classical shadowing method, achieving better performance in feature extraction. Addressing the trade-off between robustness and generalization ability of the final model, a novel importance evaluation method is designed, combining randomness and adaptability. This method evaluates and calculates the results of multiple random classical shadowing measurements, dynamically adjusting the dropout probability based on each result, ultimately demonstrating better generalization ability and good performance even in noisy environments.

[0046] Figure 2 A schematic flowchart illustrating an exemplary dynamic Dropout method based on quantum state-enhanced classical shadowing provided in this application embodiment; as shown Figure 2 As shown, the specific steps are as follows: 1. Initialization model quantum circuit and classical shadowing method.

[0047] 2. Add feature-enhanced measurement basis sets to the classical shadowing method based on the model quantum circuit.

[0048] 3. Obtain quantum state-enhanced classical shadow data and extract features.

[0049] 4. Calculate the coefficient of variation and information entropy based on the features to assess the importance of the features.

[0050] 5. Calculate the dropout probability based on feature importance assessment.

[0051] 6. Determine whether to dropout based on the corresponding probability.

[0052] 7. Dynamically adjust dropout probability based on weighting factors and adjustment factors.

[0053] The solution in this application embodiment enables the use of dropout to "discard" or "deactivate" certain features of a quantum artificial intelligence model during training, thereby preventing overfitting. This method assesses the importance of measurements of quantum-enhanced classical shadows and dynamically adjusts the dropout probability based on the assessment results, making the entire dropout process more efficient and resulting in a more robust model after dropout.

[0054] Here is the Figure 2 The steps will be explained in detail.

[0055] 1. Initialization Model: Quantum Circuits and Classical Shadowing Methods: It should be noted that quantum circuits can contain arbitrary quantum operations or quantum logic gates; classical shadowing selects a set of random measurement bases for random measurement of quantum states to obtain enough data to construct a classical shadow of the quantum state.

[0056] 2. Add feature-enhanced measurement basis sets to the classical shadowing method based on the model quantum circuit: that is, use quantum states to enhance the classical shadowing method, and select either the fidelity measurement basis set or the entangled state measurement basis set according to the number of qubits and quantum logic gates of the quantum circuit.

[0057] 3. Obtain quantum state-enhanced classical shadow data and extract features: Based on the known random measurement basis and the newly added quantum state feature-enhanced measurement basis set, measure the quantum circuit and collect all measurement results to form quantum state-enhanced classical shadow data. Then, extract feature data from it, such as expected value and correlation index.

[0058] 4. Calculate the coefficient of variation and information entropy based on the features to assess feature importance: Perform statistical analysis on the extracted feature data to calculate the coefficient of variation (CV) and information entropy (H). CV reflects the degree of fluctuation of the feature, and H represents the uncertainty of the feature. By combining the coefficient of variation and information entropy, the importance score S of each feature is obtained.

[0059] 5. Calculate dropout probability based on feature importance assessment: Determine the dropout probability P for each feature based on its importance score. Typically, the P value is inversely proportional to the importance of the corresponding feature; the higher the importance of the feature, the lower the dropout probability.

[0060] 6. Determine whether to dropout based on the corresponding probability: In each training iteration of the model, randomly decide whether to dropout a certain feature based on the dropout probability P value. If dropout is determined, the quantum logic gate or qubit corresponding to that feature will not participate in training for the time being.

[0061] 7. Dynamically adjust dropout probability based on weight factors and adjustment factors: During model training, the dropout probability is dynamically adjusted based on weight factors and adjustment factors.

[0062] Quantum state-enhanced classical shadowing method (corresponding) Figure 2 Steps 2-3 in the process.

[0063] The classical shadowing method is a method for estimating quantum state information. It mainly measures the current quantum state by randomly selecting a set of measurement bases, and then approximately reconstructs some properties or expected values ​​of the quantum state through the measurement results, so as to avoid processing the entire quantum state and reduce the overall computational load. Figure 3The following is a flowchart illustrating an exemplary measurement method provided in an embodiment of this application, such as... Figure 3 As shown, the steps are as follows: 1. Prepare the quantum state.

[0064] 2. Initialize the random measurement base.

[0065] 3. Select feature-enhanced measurement basis sets based on quantum circuits.

[0066] 4. Use a measurement base for measurement.

[0067] It should be noted that, based on the original classical shading method, this application's embodiments introduce the concept of feature enhancement during the stage of randomly initializing the measurement basis set. In addition to the initial random measurement basis, a specific measurement basis set is added, such as... Figure 3 As shown, steps 1-2-4 are the original classical shadowing method, and step 3 is the newly added feature enhancement measurement basis set, which is based on the number of bits and quantum state information, and finally adds a fidelity measurement basis set or an entangled state measurement basis set.

[0068] (1) Fidelity measurement basis set.

[0069] Fidelity is a measure of the similarity between quantum states, and it usually requires two quantum states. and The square of the inner product: A fidelity measurement basis set is a set of measurement bases designed to maximize or minimize the fidelity between quantum states. For different quantum states, appropriate measurement bases are selected, and statistical analysis is performed on the measurement results to estimate the fidelity F. For example, a single-qubit state... and One of the quantum states can be transformed using H-quantum logic gates, then Z-basis measurements can be performed, and finally the fidelity F value can be calculated from the measurement results. If it is known... and ,in Then H quantum logic gates can be used for conversion. After conversion At this point, the fidelity is calculated. .

[0070] (2) Entangled state measurement basis set.

[0071] Entangled states are non-classical correlations between quantum states that cannot be decomposed through local operations or classical communication. Entangled state measurement basis sets are a set of measurement bases designed to detect and quantize the degree of entanglement between quantum states, for a two-qubit quantum state. If it can be converted into the tensor product of two single-qubit quantum states, that is... ,So That is, they must be separable and non-entangled; otherwise, the two bits would be in an entangled state.

[0072] Therefore, this measurement basis set is only applicable to multi-qubit (1 or more qubits) cases. Depending on the number of qubits, different quantum logic gates are used for entanglement detection. For example, for two qubits, entanglement can be detected using CNOT gates and Z-basis measurements, while for multi-qubits, multiple CNOT gates or more complex gate sequences are required.

[0073] In summary, the quantum state-enhanced classical shadowing method, based on the traditional classical shadowing method, adds a fidelity measurement basis set and an entanglement measurement basis set as feature enhancement measurement basis sets, which are used to detect and quantify the fidelity and entanglement between quantum states. By selecting appropriate measurement basis sets, key features of quantum states can be effectively extracted, thereby improving the dropout effect and ultimately enhancing the robustness and generalization ability of the model.

[0074] Design of importance assessment methods (corresponding) Figure 2 Steps 4-5 in the process.

[0075] In the fields of quantum artificial intelligence and classical artificial intelligence, it is crucial to understand which features contribute most to the model's output. Feature importance assessment can help to better understand the dataset and guide how to optimize the model.

[0076] This application designs a corresponding importance evaluation method for the output of the optimized classical shading method, which mainly includes the coefficient of variation (CV), information entropy (H), importance score (S), and final dropout probability (P).

[0077] (1) Coefficient of variation.

[0078] The coefficient of variation (CV) is a dimensionless statistic used to measure the dispersion of data. It is calculated by dividing the standard deviation of the data by its mean and is typically used to standardize the variability of data at different scales or units. For feature i, its coefficient of variation... The calculation method can be achieved through To indicate, among which, It is the standard deviation of the feature, which is the square root of the mean of the squares of the deviations of the observed values ​​of feature i from its mean. This is the mean of feature i, that is, the arithmetic mean of its observed values. Coefficient of variation The larger the value, the greater the fluctuation of feature i, and the more dispersed it is relative to its mean. Therefore, this feature contains more information or changes.

[0079] (2) Information entropy.

[0080] Information entropy H is a fundamental concept in information theory, used to measure the uncertainty or information content of a random variable. The higher the information entropy, the greater the uncertainty of the random variable. For feature i, its information entropy... The calculation method can be used To indicate, among which, It represents the probability that feature i takes the value k, that is, the probability that feature i will take a specific value k among all possible values. Calculate using the natural logarithm or the base-2 logarithm. Information entropy The higher the value, the greater the uncertainty of feature i, and the more information the feature may contain.

[0081] (3) Importance score.

[0082] The importance score S is a comprehensive metric used to measure the importance of a feature. It combines the coefficient of variation (CV) and information entropy (H) to assess the feature's information content and variability. For feature i, its importance score... The calculation method can be achieved through To indicate, among which, A weighted silver value between 0 and 1 is used to adjust the coefficient of variation. and information entropy The relative importance, when When the score is close to 1, the importance score is... It is mainly determined by the coefficient of variation, and when Importance score when close to 0 Primarily determined by information entropy. The final importance score. The higher the value, the more important feature i is, thus it has both high variability and contains more information.

[0083] (4) Dropout probability.

[0084] The dropout probability P is used to dynamically adjust whether to dropout. It is based on the importance score S of the aforementioned features, retaining more important features while reducing the weights of relatively unimportant features, thereby preventing overfitting. For feature i, its dropout probability... The calculation method can be achieved through To represent; among which, This is the importance score corresponding to feature i. It is a moderating factor used to control importance scores. With inactivation probability The relationship between them is relatively large. Will dropout probability Faster descent, smaller Conversely, dropout probability. The lower the value, the more important feature i is, and therefore it will not be easily dropped out during training; conversely, the dropout probability increases. The higher the value, the lower the importance of feature i, and therefore the easier it is to dropout during training.

[0085] In summary, the coefficient of variation (CV), information entropy (H), importance score (S), and final dropout probability (P) are all metrics used to evaluate feature importance and dynamically adjust the feature dropout probability in the neural network accordingly. Using these metrics for dropout can effectively reduce overfitting and improve the model's generalization ability. In practical applications, the weight factors can be adjusted according to the needs of the specific task. and regulatory factors To obtain the best model performance.

[0086] The solution in this application uses a quantum state-enhanced classical shadowing method, employing random measurement basis sets and feature-enhanced measurement basis sets to process quantum state information. This allows for better extraction of quantum state features and further reduces overfitting. Therefore, it performs better and exhibits greater robustness when data contains noise or other unstable factors. Simultaneously, classical shadowing avoids processing complete quantum state information, resulting in lower computational cost and higher efficiency. Furthermore, the importance assessment method is used to implement dynamic dropout, allowing for flexible adjustment of the dropout probability distribution and improved generalization.

[0087] This application provides a data processing apparatus. Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application; as shown below. Figure 4 As shown, the data processing device 400 includes: The measurement unit 401 is used to measure the quantum circuits in the quantum neural network model to be trained according to a first measurement basis and a second measurement basis, and to obtain the measurement results; the first measurement basis is a random measurement basis; the second measurement basis is a quantum state feature enhancement measurement basis. Extraction unit 402 is used to extract multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results; The judgment unit 403 is used to determine whether to dropout multiple features based on the multiple feature fluctuation data and the multiple feature information entropy data, and to obtain multiple judgment results corresponding to the multiple features; The training unit 404 is used to train the quantum neural network model to be trained based on the multiple judgment results to obtain the trained quantum neural network model; the trained quantum neural network model is used at least for processing quantum data.

[0088] In some embodiments, the judgment unit 403 is further configured to determine multiple score data corresponding to multiple features based on the multiple feature fluctuation data and the multiple feature information entropy data; determine multiple dropout probability data corresponding to the multiple features based on the multiple score data; and determine multiple judgment results based on the multiple dropout probability data.

[0089] In some embodiments, the determination unit 403 is further configured to obtain a weighting factor; the weighting factor is an importance factor for adjusting the plurality of feature fluctuation data and the plurality of feature information entropy data; and to determine the plurality of scoring data based on the weighting factor, the plurality of feature fluctuation data and the plurality of feature information entropy data.

[0090] In some embodiments, the determination unit 403 is further configured to obtain an adjustment factor; the adjustment factor is a factor that controls the relationship between the plurality of rating data and the plurality of dropout probability data; and to determine the plurality of dropout probability data based on the adjustment factor and the plurality of rating data.

[0091] In some embodiments, the extraction unit 402 is further configured to extract multiple numerical data and multiple probability data corresponding to multiple features from the measurement results; determine the multiple feature fluctuation data based on the multiple numerical data; and determine the multiple feature information entropy data based on the multiple probability data.

[0092] In some embodiments, before measuring the quantum circuits in the quantum neural network model to be trained according to the first measurement basis and the second measurement basis, the data processing device 400 further includes a determining unit for obtaining the number of qubits according to the quantum circuits; and determining the second measurement basis as a fidelity measurement basis or an entangled state measurement basis based on the number of qubits.

[0093] In some embodiments, the determining unit is further configured to determine the second measurement basis as the fidelity measurement basis when the number of qubits is a first value; and to determine the second measurement basis as the entangled state measurement basis when the number of qubits is greater than the first value.

[0094] This application also provides an electronic device. Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; as shown below. Figure 5 As shown, the electronic device 500 includes a processor 501 and a memory 503. Optionally, the electronic device 500 may also include a communication bus 502.

[0095] In specific embodiments, the processor 501 described above can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), CPU, controller, microcontroller, and microprocessor. It is understood that for different devices, the electronic device used to implement the above processor function can also be other types, and this embodiment does not specifically limit it.

[0096] In this embodiment, the communication bus 502 is used to establish a connection and communication between the processor 501 and the memory 503; when the processor 501 executes the running program stored in the memory 503, it implements the following data processing method: Measurements are performed on the quantum circuits in the quantum neural network model to be trained based on a first measurement basis and a second measurement basis to obtain measurement results; the first measurement basis is a random measurement basis; the second measurement basis is a quantum state feature enhancement measurement basis; multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features are extracted from the measurement results; it is determined whether to perform dropout on multiple features based on the multiple feature fluctuation data and the multiple feature information entropy data to obtain multiple judgment results corresponding to the multiple features; the quantum neural network model to be trained is trained based on the multiple judgment results to obtain a trained quantum neural network model; the trained quantum neural network model is at least used for processing quantum data.

[0097] Furthermore, the processor 501 is also configured to determine multiple scoring data corresponding to multiple features based on the multiple feature fluctuation data and the multiple feature information entropy data; determine multiple dropout probability data corresponding to the multiple features based on the multiple scoring data; and determine multiple judgment results based on the multiple dropout probability data.

[0098] Furthermore, the processor 501 is also used to obtain a weighting factor; the weighting factor is an importance factor for adjusting the plurality of feature fluctuation data and the plurality of feature information entropy data; and to determine the plurality of scoring data based on the weighting factor, the plurality of feature fluctuation data and the plurality of feature information entropy data.

[0099] Furthermore, the processor 501 is also used to obtain an adjustment factor; the adjustment factor is a factor that controls the relationship between the plurality of rating data and the plurality of dropout probability data; and to determine the plurality of dropout probability data based on the adjustment factor and the plurality of rating data.

[0100] Furthermore, the processor 501 is also configured to extract multiple numerical data and multiple probability data corresponding to multiple features from the measurement results; determine the multiple feature fluctuation data based on the multiple numerical data; and determine the multiple feature information entropy data based on the multiple probability data.

[0101] Furthermore, before measuring the quantum circuit in the quantum neural network model to be trained according to the first and second measurement bases, the processor 501 is also used to obtain the number of qubits according to the quantum circuit; and to determine the second measurement base as a fidelity measurement base or an entangled state measurement base based on the number of qubits.

[0102] Furthermore, the processor 501 is also configured to determine the second measurement basis as the fidelity measurement basis when the number of qubits is a first value; and to determine the second measurement basis as the entangled state measurement basis when the number of qubits is greater than the first value.

[0103] This application provides a storage medium storing a computer program thereon. The computer-readable storage medium stores one or more programs, which can be executed by one or more processors. The computer program implements the data processing method described above.

[0104] Based on the above embodiments, this application provides a computer program product, including a computer program that can be executed by one or more processors, and the computer program implements the data processing method described above.

[0105] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0106] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause an image display device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.

[0107] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A data processing method, characterized in that, The method includes: The quantum circuits in the quantum neural network model to be trained are measured according to the first measurement basis and the second measurement basis to obtain the measurement results; the first measurement basis is a random measurement basis; the second measurement basis is a quantum state feature enhancement measurement basis; Extract multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results; Based on the multiple feature fluctuation data and the multiple feature information entropy data, determine whether to perform random dropout on multiple features, and obtain multiple judgment results corresponding to the multiple features; The quantum neural network model to be trained is trained based on the multiple judgment results to obtain the trained quantum neural network model; the trained quantum neural network model is used at least for processing quantum data.

2. The method according to claim 1, characterized in that, The step of determining whether to dropout multiple features based on the multiple feature fluctuation data and the multiple feature information entropy data, and obtaining multiple determination results corresponding to the multiple features, includes: Based on the multiple feature fluctuation data and the multiple feature information entropy data, determine multiple score data corresponding to multiple features; Based on the multiple scoring data, determine multiple dropout probability data corresponding to the multiple features; The multiple judgment results are determined based on the multiple dropout probability data.

3. The method according to claim 2, characterized in that, The process of determining multiple scoring data corresponding to multiple features based on the multiple feature fluctuation data and the multiple feature information entropy data includes: Obtain weighting factors; the weighting factors are importance factors that adjust the relationship between the multiple feature fluctuation data and the multiple feature information entropy data. The multiple scoring data are determined based on the weighting factors, the multiple feature fluctuation data, and the multiple feature information entropy data.

4. The method according to claim 2, characterized in that, The step of determining multiple dropout probability data corresponding to the multiple features based on the multiple scoring data includes: Obtain the adjustment factor; the adjustment factor is a factor that controls the relationship between the plurality of scoring data and the plurality of dropout probability data; The plurality of dropout probability data are determined based on the adjustment factor and the plurality of score data.

5. The method according to claim 1, characterized in that, The extraction of multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results includes: Extract multiple numerical data and multiple probability data corresponding to multiple features from the measurement results; The plurality of feature fluctuation data are determined based on the plurality of numerical data; and the plurality of feature information entropy data are determined based on the plurality of probability data.

6. The method according to claim 1, characterized in that, Before measuring the quantum circuits in the quantum neural network model to be trained according to the first and second measurement bases, the method further includes: The number of qubits is obtained according to the quantum circuit described; Based on the number of qubits, the second measurement basis is determined to be either a fidelity measurement basis or an entangled state measurement basis.

7. The method according to claim 6, characterized in that, The step of determining whether the second measurement basis is a fidelity measurement basis or an entangled state measurement basis based on the number of qubits includes: When the number of qubits is a first value, the second measurement basis is determined as the fidelity measurement basis; If the number of qubits is greater than the first value, the second measurement basis is determined to be the entangled state measurement basis.

8. A data processing apparatus, characterized in that, The device includes: The measurement unit is used to measure the quantum circuits in the quantum neural network model to be trained according to a first measurement basis and a second measurement basis, and to obtain the measurement results; the first measurement basis is a random measurement basis; the second measurement basis is a quantum state feature enhancement measurement basis; The extraction unit is used to extract multiple feature fluctuation data and multiple feature information entropy data corresponding to multiple features from the measurement results; The judgment unit is used to determine whether to perform random dropout on multiple features based on the multiple feature fluctuation data and the multiple feature information entropy data, and to obtain multiple judgment results corresponding to the multiple features; A training unit is used to train the quantum neural network model to be trained based on the multiple judgment results to obtain a trained quantum neural network model; the trained quantum neural network model is used at least for processing quantum data.

9. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method according to any one of claims 1 to 7.

10. A computer program product comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by a processor, they implement the method described in any one of claims 1 to 7.