Hybrid neural network training method based on quantum correlation

By introducing quantum total correlation data into a hybrid neural network, constructing a target loss function, and optimizing the quantum state structure, the problems of information redundancy and feature redundancy in quantum correlation networks are solved, resulting in a more stable training process and better generalization performance.

CN121503532APending Publication Date: 2026-02-10中电信量子信息科技集团有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511638400.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing quantum-correlation-based hybrid neural networks suffer from information redundancy and feature redundancy, leading to poor model generalization, difficulty in parameter tuning, and unstable training. Furthermore, the weak structural control of the quantum part results in resource waste and overfitting problems.

Method used

By introducing quantum total correlation data, a target loss function is constructed. Combining prediction results and sample labels, the quantum state structure is optimized, invalid correlations are compressed, the effectiveness of gradient propagation is improved, and the training convergence and generalization ability of the hybrid neural network are enhanced.

Benefits of technology

Effectively constraining redundant correlations among quantum state data avoids resource waste and overfitting, improves the training stability and generalization ability of hybrid neural networks, and enhances the training convergence and generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503532A_ABST
    Figure CN121503532A_ABST
Patent Text Reader

Abstract

The invention discloses a hybrid neural network training method based on quantum correlation. The method comprises the following steps: performing feature extraction processing and quantum state coding processing on an obtained input data sample, and determining a quantum state data sample feature; inputting the quantum state data sample features into a target parameterized quantum circuit, and outputting quantum associated data and quantum feature data corresponding to the quantum state data sample features; determining first quantum total correlation data according to the quantum correlation data; inputting the quantum feature data into the target processing network, and determining a prediction result of the input data sample; determining a target loss function according to the first quantum total correlation data and a prediction result and a sample label of the input data sample; and training the hybrid neural network according to the target loss function. Thus, by introducing the first quantum total correlation data as the regular term of the target loss function, the redundancy correlation between the quantum state data can be constrained, and the training process is more stable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to quantum machine learning, and particularly to a hybrid neural network training method based on quantum correlation and a data processing method based on a hybrid neural network based on quantum correlation. Background Technology

[0002] Among related technologies, hybrid quantum-classical neural networks (HQNNs) based on quantum correlations can leverage properties such as quantum superposition and entanglement to improve data processing efficiency and model performance. However, the information redundancy and feature redundancy of multiple qubits in HQNNs lead to resource waste, which may cause problems such as poor generalization, difficulty in parameter tuning, and unstable training. Summary of the Invention

[0003] This application provides a hybrid neural network training method based on quantum correlation.

[0004] This application provides a hybrid neural network training method based on quantum correlation, characterized in that the method includes: The acquired input data samples are subjected to feature extraction and quantum state encoding to determine the characteristics of the quantum state data samples. The quantum state data sample features are input into the target parameterized quantum circuit so that the target parameterized quantum circuit outputs quantum correlation data and quantum feature data corresponding to the quantum state data sample features. Based on the quantum correlation data, a first total quantum correlation data is determined, wherein the quantum correlation data includes multiple qubits, and the first total quantum correlation data is used to indicate the degree of correlation between the qubits; The quantum feature data is input into the target processing network so that the target processing network performs prediction processing based on the quantum feature data to determine the prediction result of the input data sample; Based on the first quantum total correlation data, and the prediction results and sample labels of the input data samples, the target loss function is determined; The hybrid neural network is trained based on the target loss function.

[0005] Thus, by introducing the first quantum total correlation data, the prediction results and sample labels corresponding to the input data samples can be combined to jointly construct the target loss function, and then the hybrid neural network can be trained based on the target loss function. Based on the first quantum total correlation data, redundant correlations between quantum state data can be constrained. By compressing invalid correlations, the quantum state features can be refined, avoiding resource waste and overfitting. Furthermore, by optimizing the quantum state structure, the effectiveness of gradient propagation can be enhanced, thereby improving the convergence and generalization ability of the hybrid neural network training to a certain extent, making the training process more stable.

[0006] In some implementations, the step of performing feature extraction and quantum state encoding processing on the acquired input data samples to determine the characteristics of the quantum state data samples includes: The input data samples are fed into the target processing network to determine the basic sample features; The basic sample features are subjected to quantum state encoding processing to determine the quantum state data sample features.

[0007] Input data samples are fed into the target processing network to determine basic sample features. These basic sample features are then subjected to quantum state encoding to determine quantum state data sample features. In this way, feature extraction processing of the input data samples through the target processing network improves the quality and efficiency of subsequent quantum state encoding, enabling the obtained quantum state data sample features to provide accurate data input for subsequent target parameterized quantum circuits.

[0008] In some embodiments, the target parameterized quantum circuit includes a feature mapping layer and a preset entanglement topology layer; The feature mapping layer is configured to apply at least one parameterized rotation gate to each qubit in the quantum state data sample features to map the quantum state data sample features to quantum feature data; The preset entanglement topology layer is configured to establish the correlation of the qubits in the quantum state data sample features and determine the quantum correlation data.

[0009] The target parameterized quantum circuit comprises a feature mapping layer and a preset entanglement topology layer. The feature mapping layer is configured to apply at least one parameterized rotation gate to each qubit in the quantum state data sample features to map the quantum state data sample features to quantum feature data. The preset entanglement topology is configured to establish correlations between the qubits in the quantum state data sample features, determining quantum correlation data. Thus, the target parameterized quantum circuit, based on the feature mapping layer and the preset entanglement topology layer, can improve the accuracy and reliability of quantum data processing, providing a reliable basis for subsequent loss function construction.

[0010] In some implementations, the preset entangled topology layer includes multiple sub-topology layers, each of the preset entangled topologies corresponding to at least one input data type; The preset entanglement topology layer is configured to establish the correlation of the qubits in the quantum state data sample features according to the sub-topology layer corresponding to the data type of the input data sample, and determine the quantum correlation data.

[0011] Thus, the preset entanglement topology layer comprises multiple sub-topology layers, each corresponding to at least one input data type. The preset entanglement topology layer is configured to establish correlations between qubits in the features of quantum state data samples based on the sub-topology layers corresponding to the data types of the input data samples, thereby determining quantum correlation data. In this way, by matching data types and sub-topologies, the accuracy and effectiveness of quantum correlation data can be improved, and the multi-scenario adaptability of the hybrid neural network can be enhanced.

[0012] In some implementations, determining the first total quantum correlation data based on the quantum correlation data includes: Based on the quantum correlation data, determine the overall entropy corresponding to the quantum correlation data and the marginal entropy corresponding to each of the quantum bits; The first quantum total correlation data is determined based on the overall entropy and each of the marginal entropies.

[0013] Thus, based on the quantum correlation data, the overall entropy corresponding to the quantum correlation data and the marginal entropy corresponding to each qubit are determined; based on the overall entropy and each marginal entropy, the first quantum total correlation data is determined. Thus, based on von Neumann... The calculation of von Neumann entropy allows the obtained overall entropy and marginal entropy to be unaffected by the correlation strength and data type of quantum correlation data, thereby obtaining accurate first quantum total correlation data. This enhances the adaptability of hybrid neural network models to different input data and improves the stability and accuracy of model training.

[0014] In some implementations, determining the overall entropy corresponding to the quantum correlation data and the marginal entropy corresponding to each of the quantum bits based on the quantum correlation data includes: Based on the quantum correlation data, construct a density matrix corresponding to the target quantum data; Estimate the overall entropy based on the density matrix; The marginal entropy is estimated based on the quantum correlation data and the density matrix.

[0015] Thus, based on the quantum correlation data, a density matrix corresponding to the quantum correlation data is constructed; based on the density matrix, the overall entropy is estimated; and based on the quantum correlation data and the density matrix, the marginal entropy is estimated. In this way, by obtaining the overall entropy and marginal entropy through von Neumann entropy estimation based on the quantum correlation data, an accurate data foundation can be provided for the calculation of the first quantum total correlation data, enhancing the stability and reliability of the hybrid neural network model under different task scenarios.

[0016] In some implementations, determining the target loss function based on the first quantum total correlation data, the prediction results, and the sample labels of the input data samples includes: The target loss function is determined based on the first quantum total correlation data, the prediction results of the input data samples, the sample labels, and the quantum total correlation weight parameters.

[0017] Thus, based on the first quantum total correlation data, the prediction results of the input data samples, the sample labels, and the quantum total correlation weight parameters, the target loss function is determined. In this way, by adjusting the quantum total correlation weight parameters, the target loss function can be flexibly adjusted according to task requirements, achieving dual-objective synergistic optimization, avoiding optimization imbalance, and thereby improving the stability of hybrid neural network training to a certain extent and reducing the difficulty of parameter tuning.

[0018] In some implementations, determining the target loss function based on the first quantum total correlation data, the prediction result of the input data sample, the sample label, and the quantum total correlation weight parameter includes: Based on the change magnitude of the first quantum total correlation data and the second quantum total correlation data from the previous training round, the total correlation weight parameter is updated, wherein the updated total correlation weight parameter is used to determine the target loss function for the next training round.

[0019] Thus, based on the changes in the first quantum total correlation data and the second quantum total correlation data from the previous training round, the total correlation weight parameters are updated. These updated total correlation weight parameters are used to determine the target loss function for the next training round. In this way, by adjusting and updating the total correlation weight parameters according to the changes in the first quantum total correlation data and the second quantum total correlation data from the previous training round, the proportion of quantum total correlation data as a constraint term and task error in the target loss function can adaptively change with the training process. This prevents excessive constraints from causing a decrease in the generalization ability of the hybrid neural network model, achieving dual-objective collaborative optimization, and thereby improving the stability of hybrid neural network training to a certain extent and reducing the difficulty of parameter tuning.

[0020] In some implementations, updating the total correlation weight parameter based on the change magnitude of the first quantum total correlation data and the second quantum total correlation data from the previous training round includes: If the change magnitude exceeds a preset threshold, the total relevance weight parameter is increased; If the change is less than or equal to the preset threshold, the total relevance weight parameter is reduced.

[0021] Thus, if the change exceeds a preset threshold, the total relevance weight parameter is increased; if the change is less than or equal to the preset threshold, the total relevance weight parameter is decreased. In this way, through targeted weight adjustments, the constraints can be highly matched with the quantum state requirements, thereby improving the adjustment capability and generalization performance of the hybrid neural network model at different training stages to a certain extent.

[0022] In some implementations, training the hybrid neural network according to the target loss function includes: Based on the target loss function, determine the first gradient of the parameters related to the target parameterized quantum circuit and the second gradient of the parameters related to the target processing network; Based on a preset optimizer, the relevant parameters of the target parameterized quantum circuit are updated according to the first gradient, and the relevant parameters of the target processing network are updated according to the second gradient. The updated target parameterized quantum circuit is used to determine the quantum correlation data and quantum feature data for the next training round, and the target processing network is used to determine the prediction result for the next training round.

[0023] Thus, based on the target loss function, the first gradient of the parameters related to the target parameterized quantum circuit and the second gradient of the parameters related to the target processing network are determined. Based on a preset optimizer, the parameters of the target parameterized quantum circuit are updated according to the first gradient, and the parameters of the target processing network are updated according to the second gradient. The updated target parameterized quantum circuit is used to determine the quantum correlation data and quantum feature data for the next training round, and the target processing network is used to determine the prediction result for the next training round. In this way, by calculating the first and second gradients based on the target loss function, a hybrid optimization strategy can be used to update the hybrid neural network model based on the preset optimizer. This allows for updating the parameters of the target parameterized quantum circuit according to the first gradient and the parameters of the target processing network according to the second gradient. The updated target parameterized quantum circuit is used to determine the quantum correlation data and quantum feature data for the next training round, and the target processing network is used to determine the prediction result for the next training round. This ensures continuous optimization of the hybrid neural network model's performance and achieves end-to-end collaborative training.

[0024] This application provides a data processing method based on a hybrid neural network with quantum correlation. The hybrid neural network is trained using the above-described training method. The hybrid neural network includes a pre-constructed target parameterized quantum circuit and a target processing network. The method includes: The input data is subjected to feature extraction and quantum state encoding to determine the quantum state data characteristics; The quantum state data features are input into the target parameterized quantum circuit so that the target parameterized quantum circuit outputs quantum feature data corresponding to the quantum state data features. The quantum feature data is input into the target processing network so that the target processing network performs prediction processing based on the quantum feature data and determines the prediction result of the input data.

[0025] Thus, the input data undergoes feature extraction and quantum state encoding to determine quantum state data features. These features are then input to a target parameterized quantum circuit, which outputs corresponding quantum feature data. The quantum feature data is then input to a target processing network, which performs prediction processing to determine the prediction result for the input data. In this way, the inference process of the quantum correlation-based hybrid neural network data processing method in this embodiment is fully compatible with the encoding method and module parameters during the training phase, avoiding quantum feature distortion caused by format differences. Simultaneously, quantum redundancy is suppressed during training through quantum total correlation regularization, ensuring high discriminative power in the quantum feature data output by the parameterized quantum circuit. This guarantees the reliability and generalization ability of the target processing network's prediction results, thereby improving inference efficiency to a certain extent.

[0026] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description

[0027] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein: Figure 1 This is one of the flowcharts illustrating a quantum-correlation-based hybrid neural network training method according to certain embodiments of this application; Figure 2 This is a second schematic flowchart of a quantum-correlation-based hybrid neural network training method according to certain embodiments of this application; Figure 3 This is one of the schematic diagrams of a quantum-correlation-based hybrid neural network training process in certain embodiments of this application; Figure 4 This is a schematic diagram of a quantum rotating gate according to certain embodiments of this application; Figure 5 This is a schematic diagram of a preset sub-topology structure for certain embodiments of this application; Figure 6 This is the third flowchart illustrating a quantum-correlation-based hybrid neural network training method according to certain embodiments of this application; Figure 7 This is the fourth flowchart illustrating a quantum-correlation-based hybrid neural network training method according to certain embodiments of this application; Figure 8 This is the fifth flowchart illustrating a quantum-correlation-based hybrid neural network training method according to certain embodiments of this application; Figure 9 This is a second schematic diagram of a quantum-correlation-based hybrid neural network training process according to certain embodiments of this application; Figure 10 This is a schematic diagram of quantum encoding and loss calculation logic for certain embodiments of this application; Figure 11 This is the sixth flowchart illustrating a quantum-correlation-based hybrid neural network training method according to certain embodiments of this application. Detailed Implementation

[0028] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting the embodiments of this application.

[0029] In related technologies, hybrid neural networks based on quantum correlations, namely hybrid quantum-classical neural networks, include classical data networks and quantum components. Classical neural networks, such as convolutional neural networks and recurrent neural networks, can be used to extract primary features of data and perform classification or regression tasks. The quantum component is responsible for nonlinear feature mapping and high-dimensional expression enhancement to be suitable for a variety of complex tasks.

[0030] However, the structural control of quantum states is relatively weak, especially in terms of controlling the correlation and redundancy between qubits. HQNN, a related technology, focuses only on optimizing the accuracy of task output, lacking a modeling and constraint mechanism for the internal correlation structure of quantum states. This results in the inability to effectively identify and compress repetitive information, redundant features, and excessively entangled structures between different qubits, leading to multiple qubits carrying repetitive or invalid information during training, resulting in the ineffective consumption of quantum learning resources.

[0031] Furthermore, while the high-dimensional representation of parameterized quantum circuits in the quantum part increases the complexity of the model, it is prone to overfitting due to the overload of redundant information under unconstrained training. This may result in excellent performance on the training set but large fluctuations in performance on the test set. It may also lead to insufficient stability of the model in complex tasks, increased difficulty in parameter tuning, and even rapid decay of the quantum circuit gradient in the parameter space, thus causing training stagnation.

[0032] Based on the above issues, please refer to Figure 1 This application provides a method for training a hybrid neural network based on quantum correlation. The hybrid neural network includes a pre-constructed target parameterized quantum circuit and a target processing network. The method includes: 01: Perform feature extraction and quantum state encoding on the acquired input data samples to determine the characteristics of the quantum state data samples; 02: Input the quantum state data sample characteristics into the target parameterized quantum circuit so that the target parameterized quantum circuit outputs quantum correlation data and quantum feature data corresponding to the quantum state data sample characteristics; 03: Based on the quantum correlation data, determine the first total quantum correlation data, where the quantum correlation data includes multiple qubits, and the first total quantum correlation data is used to indicate the degree of correlation between qubits; 04: Input the quantum feature data into the target processing network so that the target processing network can perform prediction processing based on the quantum feature data and determine the prediction result of the input data sample; 05: Determine the target loss function based on the first quantum total correlation data, the prediction results of the input data samples, and the sample labels; 06: Train a hybrid neural network based on the target loss function.

[0033] This application provides a hybrid neural network training device based on quantum correlation. The hybrid neural network training method based on quantum correlation of this application can be implemented by the hybrid neural network training device based on quantum correlation of this application. Specifically, the hybrid neural network training device based on quantum correlation includes a data preprocessing module, a quantum module, a prediction module, and a training module. The data preprocessing module is used to perform feature extraction and quantum state encoding processing on the acquired input data samples to determine the quantum state data sample features. The quantum module is used to input the quantum state data sample features into a target parameterized quantum circuit, so that the target parameterized quantum circuit outputs quantum correlation data and quantum feature data corresponding to the quantum state data sample features. The training module is used to determine a first total quantum correlation data based on the quantum correlation data, wherein the quantum correlation data includes multiple qubits, and the first total quantum correlation data is used to indicate the correlation degree between qubits. The prediction module is used to input the quantum feature data into a target processing network, so that the target processing network performs prediction processing based on the quantum feature data to determine the prediction result of the input data sample. The training module is also used to determine a target loss function based on the first total quantum correlation data, the prediction result of the input data sample, and the sample label. The training module is also used to train a hybrid neural network based on the target loss function.

[0034] This application also provides an electronic device, which includes a memory and a processor. The quantum correlation-based hybrid neural network training method of this application can be implemented by the electronic device of this application. Specifically, the memory stores a computer program, and the processor is used to perform feature extraction and quantum state encoding processing on the acquired input data samples to determine the quantum state data sample features. The processor is also used to input the quantum state data sample features to a target parameterized quantum circuit, so that the target parameterized quantum circuit outputs quantum correlation data and quantum feature data corresponding to the quantum state data sample features. The processor is also used to determine a first total quantum correlation data based on the quantum correlation data, wherein the quantum correlation data includes multiple qubits, and the first total quantum correlation data is used to indicate the correlation degree between qubits. The processor is also used to input quantum feature data into a target processing network, so that the target processing network performs prediction processing based on the quantum feature data to determine the prediction result of the input data sample. The processor is also used to determine a target loss function based on the first total quantum correlation data, the prediction result of the input data sample, and the sample label. The processor is also used to train a hybrid neural network based on the target loss function.

[0035] Specifically, the quantum-correlation-based hybrid neural network includes a target processing network at the classical level and a pre-built target parameterized quantum circuit (PQC) at the quantum level.

[0036] Among them, target processing networks, such as convolutional neural networks and recurrent neural networks, are used to directly process input data. By extracting the basic features of the input data, they can provide data inputs for the subsequent quantum part that are adapted to the number of qubits. They are also used to perform predictive processing on the quantum feature data output by PQC in order to obtain the prediction results corresponding to the input data.

[0037] PQC is a quantum circuit with adjustable parameters that can receive quantum state data and complete quantum state evolution through quantum gate operations to achieve quantum-level feature processing and correlation measurement.

[0038] The input data samples are the original data to be trained on the HQNN model, which can cover other types of data such as images, time series, and structured data.

[0039] In the training process of the hybrid neural network based on quantum correlation in this application embodiment, feature extraction and quantum state encoding of the acquired input data samples constitute the preprocessing stage of the input data samples. First, feature extraction is performed on the input data samples based on the target processing network to obtain basic sample features that facilitate subsequent quantum encoding processing; then, quantum state encoding is performed on the basic sample features to encode them into quantum state data sample features suitable for quantum processing, thereby realizing the cross-domain conversion from classical information to quantum information.

[0040] Subsequently, based on PQC, the characteristics of quantum state data samples can be processed at the quantum level. By locally manipulating individual qubits in the characteristics of quantum state data samples and establishing correlations between qubits, quantum correlation data and quantum feature data corresponding to the characteristics of quantum state data samples can be output.

[0041] Among them, quantum correlation data contains multiple qubits and can be used to characterize the correlation between qubits; quantum feature data is a high-dimensional quantum feature formed by quantum evolution of quantum state data sample features. It retains the discrimination information of the input data sample and has a stronger nonlinear expression capability, which can be used to input into the target processing network to complete the final prediction.

[0042] Based on the quantum correlation data output by PQC, the degree of correlation between multiple qubits in the quantum correlation data can be calculated to obtain the first quantum total correlation data, namely quantum total correlation (QTC). QTC is used to measure whether there are redundancies and entanglements in quantum state information that affect the HQNN model, thus providing a data foundation for the subsequent construction of the target loss function.

[0043] Meanwhile, the quantum feature data output by PQC can be input into the target processing network to predict the quantum feature data at the classical level, and output the prediction results corresponding to the input data samples, realizing the reverse cross-domain conversion from quantum features to classical prediction, and providing a data foundation for the subsequent construction of the target loss function.

[0044] Understandably, the prediction result is the result obtained by the target processing network after parsing the quantum feature data output by PQC, and it matches the task requirements. It can be presented in different forms depending on the task type. For example, in classification tasks, it is a category label or category probability distribution; in regression tasks, it is a continuous value, all of which correspond to the task requirements of the input data.

[0045] Based on the prediction results obtained from quantum feature data, and the sample labels corresponding to the input data samples, a task loss function for the HQNN model can be constructed to measure the difference between the predicted probability distribution and the true label distribution. The task loss function focuses only on the output accuracy of the HQNN model for the final task, without considering the internal state of the quantum part.

[0046] By introducing QTC as a regularization term, the target loss function can be constructed together with the prediction results and sample labels corresponding to the input data samples, so as to train HQNN based on the target loss function.

[0047] Therefore, based on the task loss, invalid correlations can be actively compressed through QTC regularization to make the quantum state features more refined. Furthermore, the effectiveness of gradient propagation can be enhanced by optimizing the quantum state structure through QTC, avoiding resource waste and overfitting, and improving the training convergence and generalization ability of HQNN.

[0048] In summary, in this embodiment, by introducing the first quantum total correlation data, a target loss function can be jointly constructed by combining the prediction results and sample labels corresponding to the input data samples, and then the hybrid neural network can be trained based on the target loss function. Based on the first quantum total correlation data, redundant correlations between quantum state data can be constrained. By compressing invalid correlations, quantum state features can be refined, avoiding resource waste and overfitting. Furthermore, by optimizing the quantum state structure, the effectiveness of gradient propagation can be enhanced, thereby improving the convergence and generalization ability of the hybrid neural network training to a certain extent, making the training process more stable.

[0049] Please see Figure 2 In some implementations, step 01 (performing feature extraction and quantum state encoding on the acquired input data samples to determine the characteristics of the quantum state data samples) includes: 011: Input the input data samples into the target processing network to determine the basic sample features; 012: Perform quantum state encoding on the basic sample features to determine the quantum state data sample features.

[0050] In some implementations, the quantum module is also used to input input data samples into the target processing network to determine basic sample characteristics. The quantum module is also used to perform quantum state encoding processing on the basic sample characteristics to determine quantum state data sample characteristics.

[0051] In some implementations, the processor is further configured to input input data samples into a target processing network to determine basic sample features. The processor is also configured to perform quantum state encoding processing on the basic sample features to determine quantum state data sample features.

[0052] Specifically, the basic sample features are the feature vectors generated after the input data samples have undergone feature extraction processing by the target processing network.

[0053] Input data samples are fed into the target processing network. Noise and redundant information in the input data samples can be removed through feature extraction, while retaining information with high discriminative power, such as edge texture of images and trend features of sequences, so as to output basic sample features that are suitable for subsequent quantum state encoding requirements.

[0054] Next, by performing quantum state encoding on the basic sample features, an appropriate quantum state encoding method, such as angle encoding or amplitude encoding, can be selected based on the dimension of the basic sample features and the number of qubits of the target parameterized quantum circuit, and the quantum state data sample features can be finally determined.

[0055] In one example, the input data sample is... Taking an image classification dataset as an example, the data preprocessing steps are as follows: Understandably, for the purpose of explaining the implementation methods provided in this application, the input sample data will be described using images as an example. Cases where the input data samples are time series, structured data, or other types of data will not be described in detail.

[0056] First, such as Figure 3 The hybrid neural network training process shown applies to the dataset. Image samples are normalized by scaling pixel values ​​to [0,1] or [-1,1] to reduce the impact of input scale differences on model training and to adapt image samples to quantum encoding requirements. Then, the normalized image is input into the target processing network, such as a convolutional neural network containing three convolutional and pooling layers. Low-dimensional primary features are extracted using classic convolutional layers like Conv1 and Conv2 to preserve the image's discriminative features, and a low-dimensional feature vector of length 8 is output as input for subsequent quantum state encoding processing. ; Then, the extracted feature vectors are processed by quantum state encoding. By inputting the feature vectors into the quantum fully connected layer, nonlinear feature mapping and high-dimensional correlation capture can be achieved.

[0057] Based on angle encoding, it can be determined according to the mapping function. Each feature Mapped to rotation angle And apply it to the rotation gate of the corresponding qubit, such as Figure 4 shown or This allows the feature of that dimension to be injected into the corresponding qubit, forming an 8-bit initial quantum state, thus realizing the conversion from classical data vector to initial quantum state.

[0058] Furthermore, if based on amplitude coding, the entire feature vector can be... Mapped to a A dimensional vector, after normalization, is directly loaded as an amplitude state to form... quantum representation Thus, the input data samples are fed into the target processing network to determine the basic sample features; the basic sample features are then subjected to quantum state encoding to determine the quantum state data sample features. In this way, feature extraction processing of the input data samples through the target processing network improves the quality and efficiency of subsequent quantum state encoding, enabling the obtained quantum state data sample features to provide accurate data input for subsequent target parameterized quantum circuits.

[0059] In some implementations, the target parameterized quantum circuit includes a feature mapping layer and a preset entangled topology layer; The feature mapping layer is configured to apply at least one parameterized rotation gate to each qubit in the quantum state data sample features to map the quantum state data sample features to quantum features; The preset entangled topology layer is configured to establish the correlation of qubits in the characteristics of quantum state data samples and determine quantum correlation data.

[0060] Specifically, the target parameterized quantum circuit includes a feature mapping layer and a preset entanglement topology layer.

[0061] The feature mapping layer contains multiple parameterized quantum gates. By applying at least one parameterized rotation gate to each qubit in the quantum state data sample features, the local quantum states in the quantum state data sample features can be manipulated, and the individual differences between features can be captured. In this way, the quantum state data sample features are mapped into structured quantum feature data, laying the foundation for the high-dimensional and nonlinear data input of the subsequent target processing network prediction results.

[0062] The pre-defined entangled topology layer includes multiple sub-topology layers. Based on the sub-topology, the interaction between qubits can be captured by establishing correlations between different qubits in the quantum state data sample characteristics, thereby generating quantum correlation data and providing a foundation for subsequent calculation of the first quantum total correlation data.

[0063] In one example, after the 8-bit quantum state generated by angle encoding is input into the target parameterized quantum circuit, it can first enter the feature mapping layer. For each of the 8 qubits in the quantum state, at least one parameterized rotation gate can be applied, such as applying a parameterized rotation gate sequentially to each qubit. Figure 4 shown or Through the parameters in the revolving door By manipulating the quantum state, key information such as the edge and texture features of an image can be transformed into structured quantum features. For example, different qubits carry different dimensions of discriminative information to initially generate quantum feature data.

[0064] Subsequently, the quantum state processed by the feature mapping layer enters the preset entangled topology structure. Depending on the type of input data sample, such as image data, it can be adapted to Brick Wall structure, Star Connection structure, and Lambda structure. The CNOT gate in the Brick Wall structure can be selected to establish a structured connection between qubits. By repeatedly stacking three layers of structure, a stable and quantizable correlation relationship is formed between qubits, and finally, quantum correlation data reflecting the correlation is generated.

[0065] Thus, the target parameterized quantum circuit includes a feature mapping layer and a preset entanglement topology layer. The feature mapping layer is configured to apply at least one parameterized rotation gate to each qubit in the quantum state data sample features to map the quantum state data sample features to quantum feature data. The preset entanglement topology is configured to establish the correlation between the qubits in the quantum state data sample features and determine the quantum correlation data. In this way, the target parameterized quantum circuit, based on the feature mapping layer and the preset entanglement topology layer, can improve the accuracy and reliability of quantum data processing and provide a reliable basis for the subsequent construction of the loss function.

[0066] In some implementations, the preset entangled topology layer includes multiple sub-topology layers, each preset entangled topology corresponding to at least one input data type; The preset entanglement topology layer is configured to establish the correlation of qubits in the characteristics of quantum state data samples based on the sub-topology layer corresponding to the data type of the input data sample, and to determine the quantum correlation data.

[0067] Specifically, the pre-defined entangled topology layer includes multiple sub-topology layers, for example... Figure 5 The four preset entanglement topologies shown are: (a) The Brick Wall structure uses an interleaved connection method to construct the CNOT gate array between qubit pairs. The layers are alternately connected to form a "brick wall" arrangement, which helps to achieve a uniform entanglement distribution. (b) The Lambda structure can form a CNOT arrangement similar to the letter "A", which is suitable for achieving high-order dense entanglement; (c) The Chain structure can form a linear structure by sequentially connecting adjacent bits, which is convenient for constructing shallow circuits and improving the stability of information propagation; (d) The Star Connection structure can select one qubit as the center and establish CNOT connections with all other qubits to form a "star" structure, which is suitable for centralized or broadcast information processing.

[0068] Each sub-topology layer possesses independent quantum gate connection logic. Depending on the data type of the input data sample, one or more sub-topology layers can be dynamically selected and combined according to task requirements to improve the accuracy of quantum correlation data. This allows the quantum correlation data to accurately capture the essential correlation patterns of different data, thereby enhancing the multi-scenario adaptability of the HQNN model. For example, image datasets have information distributed in a two-dimensional spatial pattern, requiring the capture of local and global spatial correlations. A Brick Wall structure can be used, establishing spatially uniform entanglement of qubits through interleaved grouping of CNOT gates to meet the two-dimensional spatial correlation requirements of image data.

[0069] In addition, the time series data sublayer can adopt a chain structure, which establishes linear correlation through CNOT gates of adjacent bits, adapts to the sequential dependency correlation requirements of time series data, and ensures stable propagation of information along the time sequence.

[0070] Thus, the preset entanglement topology layer comprises multiple sub-topology layers, each corresponding to at least one input data type. The preset entanglement topology layer is configured to establish correlations between qubits in the features of quantum state data samples based on the sub-topology layers corresponding to the data types of the input data samples, thereby determining quantum correlation data. In this way, by matching data types and sub-topologies, the accuracy and effectiveness of quantum correlation data can be improved, and the multi-scenario adaptability of the hybrid neural network can be enhanced.

[0071] Please see Figure 6 In some implementations, step 03 (determining the first total quantum correlation data based on the quantum correlation data) includes: 031: Based on the quantum correlation data, determine the overall entropy corresponding to the quantum correlation data, and the marginal entropy corresponding to each quantum bit; 032: Determine the first quantum total correlation data based on the overall entropy and each marginal entropy.

[0072] In some implementations, the training module is further configured to determine the overall entropy corresponding to the quantum correlation data and the marginal entropy corresponding to each qubit based on the quantum correlation data. The training module is also configured to determine the first total quantum correlation data based on the overall entropy and each marginal entropy.

[0073] In some implementations, the processor is further configured to determine, based on the quantum correlation data, the overall entropy corresponding to the quantum correlation data, and the marginal entropy corresponding to each qubit. The processor is also configured to determine first total quantum correlation data based on the overall entropy and each marginal entropy.

[0074] Specifically, overall entropy refers to the von Neumann entropy corresponding to quantum correlation data. It is used to quantify the degree of information disorder in the global system composed of multiple qubits in quantum correlation data, in order to measure the correlation basis of all qubits as a whole. The larger the overall entropy, the more dispersed the state distribution of the whole composed of multiple qubits and the higher the uncertainty; the smaller the value, the more concentrated the overall state and the stronger the determinism.

[0075] Understandably, each qubit in quantum correlated data corresponds to a dimension of a fundamental feature, and the initial state of each bit is infused with key information from the input sample data. Calculations based on von Neumann entropy allow the overall entropy to remain unaffected by the correlation strength or data type of the quantum correlated data, thereby enhancing the adaptability of HQNN to different input data.

[0076] Marginal entropy refers to the Von Neumann entropy corresponding to a single qubit, which is the independent information feature of a single qubit. Multiple marginal entropies together constitute the local information distribution of quantum correlated data, forming an information complementary relationship with the overall entropy.

[0077] Based on the overall entropy and each marginal entropy, the degree of additional information coupling caused by correlation (including classical correlation and quantum entanglement) of multiple qubits can be quantified by obtaining the difference between the sum of all marginal entropies and the overall entropy. This allows for the accurate acquisition of the first total quantum correlation data, which in turn enables precise perception of the redundancy of the quantum state. This allows the target loss function to more reasonably balance quantum structure constraints and task performance.

[0078] In one example, such as Figure 3 In the hybrid neural network training process shown, the quantum correlation data output by the quantum fully connected layer can be used to calculate the first quantum total correlation data through the overall entropy and marginal entropy. Specifically, the first quantum total correlation data... It can be obtained through the following formula:

[0079] in, The overall entropy; The sum of marginal entropies represents the sum of the independent disorder of all individual qubits; Let be the matrix density.

[0080] The larger the difference, that is The larger the value, the stronger the global correlation between qubits, which means there may be excessive entanglement or redundancy. The smaller the difference, that is The smaller the value, the weaker the connection can be, meaning there may be information fragmentation.

[0081] Thus, based on the quantum correlation data, the overall entropy corresponding to the quantum correlation data and the marginal entropy corresponding to each qubit are determined; based on the overall entropy and each marginal entropy, the first total quantum correlation data is determined. In this way, by estimating the overall and marginal entropies of the quantum correlation data, the obtained overall and marginal entropies are unaffected by the correlation strength and data type of the quantum correlation data, thereby obtaining accurate first total quantum correlation data. This enhances the adaptability of the hybrid neural network model to different input data and improves the stability and accuracy of model training.

[0082] In some implementations, step 031 (determining the overall entropy corresponding to the quantum correlation data and the marginal entropy corresponding to each qubit based on the quantum correlation data) includes: 0311: Construct a density matrix corresponding to the quantum correlation data based on the quantum correlation data; 0312: Estimate the overall entropy based on the density matrix; 0313: Estimate marginal entropy based on the overall entropy and density matrix.

[0083] In some implementations, the training module is further configured to construct a density matrix corresponding to the target quantum data based on the quantum correlation data. The training module is also configured to estimate the overall entropy based on the density matrix. Furthermore, the training module is configured to estimate the marginal entropy based on the quantum correlation data and the density matrix.

[0084] In some implementations, the processor is further configured to construct a density matrix corresponding to the target quantum data based on the quantum correlation data. The processor is also configured to estimate the overall entropy based on the density matrix. The processor is further configured to estimate the marginal entropy based on the quantum correlation data and the density matrix.

[0085] Specifically, by obtaining the density matrix corresponding to the quantum correlation data, the overall entropy can be estimated using the Von Neumann entropy formula based on the density matrix. Furthermore, by performing a skew operation on the density matrix to obtain the local density matrix of each qubit, the marginal estimate can be achieved using the Von Neumann entropy formula based on the local density matrix. This lays the foundation for obtaining accurate first quantum total correlation data. By establishing a standardized entropy calculation process, the stability and reliability of the HQNN model under different task scenarios can be enhanced.

[0086] Thus, based on the quantum correlation data, a density matrix corresponding to the quantum correlation data is constructed; based on the density matrix, the overall entropy is estimated; and based on the quantum correlation data and the density matrix, the marginal entropy is estimated. In this way, by estimating the overall entropy and marginal entropy based on the quantum correlation data, an accurate data foundation can be provided for the calculation of the first quantum total correlation data, enhancing the stability and reliability of the hybrid neural network model during training in different task scenarios.

[0087] Please see Figure 7 In some implementations, step 05 (determining the target loss function based on the first quantum total correlation data, the prediction results of the input data samples, and the sample labels) includes: 051: Determine the target loss function based on the first quantum total correlation data, the prediction results of the input data samples, the sample labels, and the quantum total correlation weight parameters.

[0088] In some implementations, the training module is also used to determine a target loss function based on the first quantum total correlation data, the prediction results of the input data samples, the sample labels, and the quantum total correlation weight parameters.

[0089] In some implementations, the processor is also configured to determine a target loss function based on the first quantum total correlation data, the prediction results of the input data samples, the sample labels, and the quantum total correlation weight parameters.

[0090] Specifically, the quantum total correlation weight parameter is a configurable parameter that adjusts the proportion of the first quantum total correlation data in the target loss function, and is used to balance the synergistic optimization of quantum state structure optimization and task objective achievement.

[0091] In one example, such as Figure 3 In the hybrid neural network training process shown, in the classification task, based on the prediction results and sample labels of the input data samples, the task loss function for achieving the task objective can be calculated using the cross-entropy formula. By combining the first quantum total correlation data obtained from quantum correlation calculation and the task loss function obtained from cross-entropy calculation, the joint loss can be obtained. Then, the HQNN model is updated through gradient calculation. The process of obtaining the joint loss, i.e., the target loss function, is as follows:

[0092] in, The target loss function; The task loss function; The total quantum correlation weight parameter; This is the first quantum total correlation data (QTC).

[0093] Understandably, The larger the value, the more the objective loss function focuses on controlling quantum state redundancy through QTC constraints; The smaller the value, the more the objective loss function focuses on optimizing prediction performance through the task error loss function. Compared to a single task loss function, or a task loss function with fixed weights and QTC, adjusting the quantum total relevance weight parameter allows the objective loss function to flexibly adjust its emphasis according to task requirements, such as emphasizing task performance or quantum state structure. This achieves dual-objective collaborative optimization, avoids optimization imbalance, and thus improves the stability of HQNN training to a certain extent, reducing the difficulty of parameter tuning.

[0094] Thus, based on the first quantum total correlation data, the prediction results of the input data samples, the sample labels, and the quantum total correlation weight parameters, the target loss function is determined. In this way, by adjusting the quantum total correlation weight parameters, the target loss function can be flexibly adjusted according to task requirements, achieving dual-objective synergistic optimization, avoiding optimization imbalance, and thereby improving the stability of hybrid neural network training to a certain extent and reducing the difficulty of parameter tuning.

[0095] In some implementations, step 051 (determining the target loss function based on the first quantum total correlation data, the prediction results of the input data samples, the sample labels, and the quantum total correlation weight parameters) includes: 0511: Based on the change magnitude of the first quantum total correlation data and the second quantum total correlation data from the previous training round, update the total correlation weight parameters. The updated total correlation weight parameters are used to determine the target loss function for the next training round.

[0096] In some implementations, the training module is further configured to update the total correlation weight parameter based on the change magnitude of the first quantum total correlation data and the second quantum total correlation data from the previous training round, wherein the updated total correlation weight parameter is used to determine the target loss function for the next training round.

[0097] In some implementations, the processor is further configured to update the total correlation weight parameter based on the magnitude of change of the first quantum total correlation data and the second quantum total correlation data of the previous training round, wherein the updated total correlation weight parameter is used to determine the target loss function for the next training round.

[0098] Specifically, the second quantum total correlation data is the QTC acquired in the previous training round. The magnitude of change refers to the degree of difference between the QTC acquired in this training (the first quantum total correlation data) and the QTC in the previous training round. It can be used to quantify the rate of change of quantum state redundancy correlation, so as to characterize the effect of the current training on the adjustment of quantum state redundancy. For example, a large magnitude of change can be considered as a drastic adjustment of quantum state redundancy; a small magnitude of change can be considered as quantum state redundancy has tended to stabilize.

[0099] Based on the changes in the total correlation data of the first quantum and the total correlation data of the second quantum in the previous training round, the total correlation weight parameters can be adjusted and updated so that the proportion of QTC as a constraint term and task error in the objective loss function can adapt to the training process. This prevents excessive constraints from causing a decrease in the generalization ability of the HQNN model, achieves dual-objective collaborative optimization, and thus improves the stability of hybrid neural network training to a certain extent and reduces the difficulty of parameter tuning.

[0100] The updated total relevance weights are used to determine the target loss function for the next training round, enabling adaptive weight transfer between rounds until training converges.

[0101] Thus, based on the changes in the first quantum total correlation data and the second quantum total correlation data from the previous training round, the total correlation weight parameters are updated. These updated total correlation weight parameters are used to determine the target loss function for the next training round. In this way, by adjusting and updating the total correlation weight parameters according to the changes in the first quantum total correlation data and the second quantum total correlation data from the previous training round, the proportion of quantum total correlation data as a constraint term and task error in the target loss function can adaptively change with the training process. This prevents excessive constraints from causing a decrease in the generalization ability of the hybrid neural network model, achieving dual-objective collaborative optimization, and thereby improving the stability of hybrid neural network training to a certain extent and reducing the difficulty of parameter tuning.

[0102] In some implementations, step 0511 (updating the total correlation weight parameter based on the change magnitude of the first quantum total correlation data and the second quantum total correlation data from the previous training round) includes: 05111: If the change exceeds the preset threshold, increase the total relevance weight parameter; 05112: If the change is less than or equal to the preset threshold, reduce the total correlation weight parameter.

[0103] In some implementations, the training module is further configured to increase the total relevance weight parameter if the change magnitude is greater than a preset threshold. The training module is also configured to decrease the total relevance weight parameter if the change magnitude is less than or equal to the preset threshold.

[0104] In some implementations, the processor is further configured to increase the total relevance weight parameter if the change magnitude is greater than a preset threshold. The processor is also configured to decrease the total relevance weight parameter if the change magnitude is less than or equal to the preset threshold.

[0105] Specifically, the preset threshold is a quantitative standard used to determine whether the change in the total correlation data of the first quantum is drastic.

[0106] If the change exceeds the preset threshold, it can be considered that the quantum state redundancy adjustment is drastic. It is necessary to increase the total correlation weight parameter, strengthen the proportion of QTC constraint terms, guide the HQNN model to prioritize stabilizing the quantum state structure, and suppress redundancy diffusion.

[0107] If the change is less than or equal to the preset threshold, it can be considered that the quantum state redundancy has become stable. By reducing the total correlation weight parameter, weakening the proportion of QTC constraint terms, reducing the interference of constraints on quantum feature expression, the model can focus more on optimizing task error (such as classification cross-entropy) and improve prediction performance.

[0108] In one example, the updated total relevance weight parameter It can be expressed by the following formula:

[0109] in, , For the first quantum total correlation data The second quantum total correlation data from the previous training round The range of change; This is the target loss function value from the previous training round; This is the target loss function value for this training. and To control Adjust the hyperparameter of the amplitude, such as 0.05, 1.05, etc.; These are the total relevance weight parameters obtained from the previous training round.

[0110] By adjusting the weights in a targeted manner, the QTC constraint terms can be closely matched with the quantum state requirements. This strengthens the constraints when changes are drastic, quickly suppresses redundancy diffusion, and weakens the constraints when changes are stable, thereby releasing the quantum feature expression space. This allows the regularization strength to dynamically coordinate with the quantum state evolution trend, avoiding optimization bias and thus improving the adjustment ability and generalization performance of the HQNN model at different training stages to a certain extent.

[0111] Thus, if the change exceeds a preset threshold, the total relevance weight parameter is increased; if the change is less than or equal to the preset threshold, the total relevance weight parameter is decreased. In this way, through targeted weight adjustments, the constraints can be highly matched with the quantum state requirements, thereby improving the adjustment capability and generalization performance of the hybrid neural network model at different training stages to a certain extent.

[0112] Please see Figure 8 In some implementations, step 06 (training a hybrid neural network based on the target loss function) includes: 061: Based on the target loss function, determine the first gradient of the parameters related to the target parameterized quantum circuit and the second gradient of the parameters related to the target processing network; 062: Based on the preset optimizer, update the relevant parameters of the target parameterized quantum circuit according to the first gradient, and update the relevant parameters of the target processing network according to the second gradient. The updated target parameterized quantum circuit is used to determine the quantum correlation data and quantum feature data of the next training round, and the target processing network is used to determine the prediction result of the next training round.

[0113] In some implementations, the training module is further configured to determine a first gradient of the parameters related to the target parameterized quantum circuit and a second gradient of the parameters related to the target processing network based on the target loss function. The training module is also configured to update the parameters related to the target parameterized quantum circuit based on the first gradient and the parameters related to the target processing network based on the second gradient, using a preset optimizer. The updated parameters of the target parameterized quantum circuit are used to determine the quantum correlation data and quantum feature data for the next training round, and the target processing network is used to determine the prediction results for the next training round.

[0114] In some implementations, the processor is further configured to determine a first gradient of the parameters related to the target parameterized quantum circuit and a second gradient of the parameters related to the target processing network based on the target loss function. The processor is also configured to update the parameters related to the target parameterized quantum circuit based on the first gradient and the second gradient, using a preset optimizer. The updated parameters of the target parameterized quantum circuit are used to determine the quantum correlation data and quantum feature data for the next training round, and the target processing network is used to determine the prediction result for the next training round.

[0115] Specifically, the first gradient refers to the partial derivative of the target loss function with respect to the relevant parameters of the target parameterized quantum circuit, which is used to quantify the degree of influence of changes in PQC parameters on the loss value.

[0116] The second gradient refers to the partial derivative of the target loss function with respect to the relevant parameters of the target processing network, which is used to quantify the degree of influence of parameter changes in the target processing network on the loss value.

[0117] Based on a preset optimizer, a hybrid optimization strategy is adopted to update the HQNN model. According to the first gradient, the relevant parameters of the target parameterized quantum circuit are updated; according to the second gradient, the relevant parameters of the target processing network are updated. The updated target parameterized quantum circuit is used to determine the quantum correlation data and quantum feature data of the next training round, and the target processing network is used to determine the prediction results of the next training round, so as to ensure the continuous optimization of the HQNN model performance and realize end-to-end collaborative training.

[0118] Furthermore, the training process supports mechanisms such as early stopping and learning rate annealing, which can avoid overfitting and improve convergence efficiency. After training is complete, the model performance can be evaluated using an independent test set, outputting key metrics such as accuracy, precision, and recall to verify the model's effectiveness and stability.

[0119] The following is Figure 9 The diagram illustrating the training process of a hybrid neural network based on quantum correlation is provided below for explanation: First, quantum state loading is achieved based on classical feature extraction (feature extraction processing) and angle encoding (quantum state encoding processing) to obtain the quantum state data sample features corresponding to the input data sample; Then, based on the data type of the input data sample, at least one entanglement structure is selected to build a parameterized quantum circuit (target parameterized quantum circuit). Next, the quantum state data sample features are input into the target parameterized quantum circuit (PQC) to obtain the quantum total correlation (first quantum total correlation data, i.e., QTC) to constrain quantum redundancy; Then, based on the redundancy evolution trend of QTC, that is, based on the change magnitude of the first quantum total correlation data and the second quantum total correlation data of the previous training round, the constraint strength (quantum total correlation weight parameter) is adaptively adjusted. Next, the target loss function, which includes the task loss function and QTC, can be obtained simultaneously to train and optimize the parameters of the joint classical network and PQC based on the target loss function; like Figure 10 The schematic diagram of quantum encoding and loss calculation logic shown illustrates the measurement of evolved quantum correlation data to obtain a probability distribution; simultaneously, it calculates the overall entropy and marginal entropy, through... Quantizing quantum redundancy is ultimately based on the joint loss function. By adaptively updating the quantum total relevance weight parameters and dynamically adjusting QTC, the dual-task objective is achieved, and the training of HQNN is completed.

[0120] Finally, the performance of the optimized hybrid network can be evaluated to verify the effectiveness and generality of the trained HQNN.

[0121] Thus, based on the target loss function, the first gradient of the parameters related to the target parameterized quantum circuit and the second gradient of the parameters related to the target processing network are determined. Based on a preset optimizer, the parameters of the target parameterized quantum circuit are updated according to the first gradient, and the parameters of the target processing network are updated according to the second gradient. The updated target parameterized quantum circuit is used to determine the quantum correlation data and quantum feature data for the next training round, and the target processing network is used to determine the prediction result for the next training round. In this way, by calculating the first and second gradients based on the target loss function, a hybrid optimization strategy can be used to update the hybrid neural network model based on the preset optimizer. This allows for updating the parameters of the target parameterized quantum circuit according to the first gradient and the parameters of the target processing network according to the second gradient. The updated target parameterized quantum circuit is used to determine the quantum correlation data and quantum feature data for the next training round, and the target processing network is used to determine the prediction result for the next training round. This ensures continuous optimization of the hybrid neural network model's performance and achieves end-to-end collaborative training.

[0122] Please see Figure 11 This application provides a data processing method based on a hybrid neural network with quantum correlation. The hybrid neural network is trained using any one of the training methods of claims 1-10. The hybrid neural network includes a pre-constructed target parameterized quantum circuit and a target processing network. The method includes: 07: Perform feature extraction and quantum state encoding on the input data to determine the characteristics of the quantum state data; 08: Input the quantum state data characteristics into the target parameterized quantum circuit so that the target parameterized quantum circuit outputs quantum characteristic data corresponding to the quantum state data characteristics; 09: Input the quantum feature data into the target processing network so that the target processing network can perform prediction processing based on the quantum feature data and determine the prediction result of the input data.

[0123] In some implementations, the data preprocessing module is further used to perform feature extraction and quantum state encoding on the input data to determine quantum state data features. The quantum module is also used to input the quantum state data features into a target parameterized quantum circuit, so that the target parameterized quantum circuit outputs quantum feature data corresponding to the quantum state data features. The prediction module is further used to input the quantum feature data into a target processing network, so that the target processing network performs prediction processing based on the quantum feature data to determine the prediction result of the input data.

[0124] In some embodiments, the processor is further configured to perform feature extraction and quantum state encoding on the input data to determine quantum state data features. The processor is also configured to input the quantum state data features into a target parameterized quantum circuit, so that the target parameterized quantum circuit outputs quantum feature data corresponding to the quantum state data features. The processor is further configured to input the quantum feature data into a target processing network, so that the target processing network performs prediction processing based on the quantum feature data to determine the prediction result of the input data.

[0125] Specifically, quantum-correlation-based hybrid neural networks include classical-level target processing networks and quantum-level PQC.

[0126] Among them, target processing networks, such as convolutional neural networks and recurrent neural networks, are used to directly process input data. By extracting the basic features of the input data, they can provide data inputs for the subsequent quantum part that are adapted to the number of qubits. They are also used to perform predictive processing on the quantum feature data output by PQC in order to obtain the prediction results corresponding to the input data.

[0127] PQC is a quantum circuit with adjustable parameters that can receive quantum state data and complete quantum state evolution through quantum gate operations to achieve quantum-level feature processing and correlation measurement, and output quantum feature data.

[0128] Thus, the input data undergoes feature extraction and quantum state encoding to determine quantum state data features. These features are then input to a target parameterized quantum circuit, which outputs corresponding quantum feature data. The quantum feature data is then input to a target processing network, which performs prediction processing to determine the prediction result for the input data. In this way, the inference process of the quantum correlation-based hybrid neural network data processing method in this embodiment is fully compatible with the encoding method and module parameters during the training phase, avoiding quantum feature distortion caused by format differences. Simultaneously, quantum redundancy is suppressed during training through quantum total correlation regularization, ensuring high discriminative power in the quantum feature data output by the parameterized quantum circuit. This guarantees the reliability and generalization ability of the target processing network's prediction results, thereby improving inference efficiency to a certain extent.

[0129] This application also provides a computer-readable storage medium storing a computer program thereon. When executed by a computer program processor, the program implements the steps of the above-described quantum-correlation-based hybrid neural network training method and quantum-correlation-based hybrid neural network data processing method.

[0130] It is understood that a computer program includes computer program code. Computer program code can be in the form of source code, object code, executable files, or some intermediate form. Computer-readable storage media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc.

[0131] In this specification, the terms "specifically," "furthermore," "particularly," "understandably," etc., refer to specific features, structures, materials, or characteristics described in connection with embodiments or examples that are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0132] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of executable request code comprising one or more steps for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0133] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A hybrid neural network training method based on quantum correlation, characterized in that, The hybrid neural network includes a pre-constructed target parameterized quantum circuit and a target processing network, and the method includes: The acquired input data samples are subjected to feature extraction and quantum state encoding to determine the characteristics of the quantum state data samples. The quantum state data sample features are input into the target parameterized quantum circuit so that the target parameterized quantum circuit outputs quantum correlation data and quantum feature data corresponding to the quantum state data sample features. Based on the quantum correlation data, a first total quantum correlation data is determined, wherein the quantum correlation data includes multiple qubits, and the first total quantum correlation data is used to indicate the degree of correlation between the qubits; The quantum feature data is input into the target processing network so that the target processing network performs prediction processing based on the quantum feature data to determine the prediction result of the input data sample; Based on the first quantum total correlation data, and the prediction results and sample labels of the input data samples, the target loss function is determined; The hybrid neural network is trained based on the target loss function.

2. The method according to claim 1, characterized in that, The process of performing feature extraction and quantum state encoding on the acquired input data samples to determine the characteristics of the quantum state data samples includes: The input data samples are fed into the target processing network to determine the basic sample features; The basic sample features are subjected to quantum state encoding processing to determine the quantum state data sample features.

3. The method according to claim 1, characterized in that, The target parameterized quantum circuit includes a feature mapping layer and a preset entangled topology layer; The feature mapping layer is configured to apply at least one parameterized rotation gate to each qubit in the quantum state data sample features to map the quantum state data sample features to quantum feature data; The preset entanglement topology layer is configured to establish the correlation of the qubits in the quantum state data sample features and determine the quantum correlation data.

4. The method according to claim 3, characterized in that, The preset entangled topology layer includes multiple sub-topology layers, and each preset entangled topology corresponds to at least one input data type. The preset entanglement topology layer is configured to establish the correlation of the qubits in the quantum state data sample features according to the sub-topology layer corresponding to the data type of the input data sample, and determine the quantum correlation data.

5. The method according to claim 1, characterized in that, The step of determining the first total quantum correlation data based on the quantum correlation data includes: Based on the quantum correlation data, determine the overall entropy corresponding to the quantum correlation data and the marginal entropy corresponding to each of the quantum bits; The first quantum total correlation data is determined based on the overall entropy and each of the marginal entropies.

6. The method according to claim 5, characterized in that, The step of determining the overall entropy corresponding to the quantum correlation data and the marginal entropy corresponding to each quantum bit based on the quantum correlation data includes: Based on the quantum correlation data, construct a density matrix corresponding to the target quantum data; Estimate the overall entropy based on the density matrix; The marginal entropy is estimated based on the quantum correlation data and the density matrix.

7. The method according to claim 1, characterized in that, The step of determining the target loss function based on the first quantum total correlation data, the prediction results and sample labels of the input data samples, includes: The target loss function is determined based on the first quantum total correlation data, the prediction results of the input data samples, the sample labels, and the quantum total correlation weight parameters.

8. The method according to claim 7, characterized in that, The step of determining the target loss function based on the first quantum total correlation data, the prediction result of the input data sample, the sample label, and the quantum total correlation weight parameter includes: Based on the change magnitude of the first quantum total correlation data and the second quantum total correlation data from the previous training round, the total correlation weight parameter is updated, wherein the updated total correlation weight parameter is used to determine the target loss function for the next training round.

9. The method according to claim 8, characterized in that, The step of updating the total correlation weight parameter based on the change magnitude of the first quantum total correlation data and the second quantum total correlation data from the previous training round includes: If the change magnitude exceeds a preset threshold, the total relevance weight parameter is increased; If the change is less than or equal to the preset threshold, the total relevance weight parameter is reduced.

10. The method according to claim 1, characterized in that, Training the hybrid neural network according to the target loss function includes: Based on the target loss function, determine the first gradient of the parameters related to the target parameterized quantum circuit and the second gradient of the parameters related to the target processing network; Based on a preset optimizer, the relevant parameters of the target parameterized quantum circuit are updated according to the first gradient, and the relevant parameters of the target processing network are updated according to the second gradient. The updated target parameterized quantum circuit is used to determine the quantum correlation data and quantum feature data for the next training round, and the target processing network is used to determine the prediction result for the next training round.

11. A data processing method based on a hybrid neural network with quantum correlation, characterized in that, The hybrid neural network is trained using the training method described in any one of claims 1-10, wherein the hybrid neural network includes a pre-constructed target parameterized quantum circuit and a target processing network, and the method includes: The input data is subjected to feature extraction and quantum state encoding to determine the quantum state data characteristics; The quantum state data features are input into the target parameterized quantum circuit so that the target parameterized quantum circuit outputs quantum feature data corresponding to the quantum state data features. The quantum feature data is input into the target processing network so that the target processing network performs prediction processing based on the quantum feature data and determines the prediction result of the input data.

Citation Information

Patent Citations

  • Image classification method of hybrid quantum neural network model based on PQC

    CN119580278A

  • Quantum network redundancy control training and image classification method and system based on mutual information mechanism

    CN120599346A