Quantum-classical hybrid network for data classification and task processing method

By constructing a parameterized quantum circuit based on a preset data reloading strategy and feature importance scoring, the problem of feature importance not being considered in existing technologies is solved. This enables biased processing and efficient utilization of key information, thereby improving the accuracy and efficiency of data classification.

CN120598069BActive Publication Date: 2025-12-05中电信量子信息科技集团有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511095767.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-12-05
Estimated Expiration
2045-08-06

AI Technical Summary

Technical Problem

Existing parameterized quantum circuits fail to effectively consider the different importance or correlation of input features in data classification tasks, resulting in poor feature capture efficiency and difficulty in effectively extracting key information, thus limiting the performance of quantum-classical hybrid networks in complex data classification tasks.

Method used

The data preprocessing module generates numerical feature vectors, and the quantum circuit construction module constructs target parameterized quantum circuits based on a preset data reloading strategy and feature importance scoring. Combined with the quantum measurement module and the classical network module, it achieves biased processing and efficient utilization of key information.

Benefits of technology

It improves the accuracy and efficiency of complex data classification tasks, enhances the efficiency of quantum-classical hybrid networks in utilizing key information, and improves the ability to capture deep nonlinear patterns in data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120598069B_ABST
    Figure CN120598069B_ABST
Patent Text Reader

Abstract

The application discloses a quantum-classical hybrid network for data classification. The hybrid network comprises a data preprocessing module, a quantum circuit construction module, a quantum measurement module and a classical network module. The data preprocessing module can determine a numerical feature vector according to an input data classification task. The quantum circuit construction module can perform data reloading processing on the numerical feature vector according to a preset data reloading strategy and a preset feature importance score, construct a target parameterized quantum circuit, the preset data reloading strategy refers to a quantum gate parameterized control mechanism for data reloading processing on the numerical feature vector, and the preset feature importance score refers to a score for measuring the importance of input features to the data classification task. The quantum measurement module can determine a basis state probability distribution vector according to the target parameterized quantum circuit. The classical network module can determine a data classification result according to the basis state probability distribution vector. In this way, the processing accuracy of the classification task can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of quantum computing, and more specifically, to quantum-classical hybrid networks and task processing methods for data classification. Background Technology

[0002] In the noisy, medium-scale quantum era, it is possible to use quantum-classical hybrid networks to process data classification tasks. That is, parameterized quantum circuits are used to extract features and learn representations for data classification tasks, and they work in conjunction with classical neural networks to complete the data classification task. However, existing parameterized quantum circuit designs do not consider the different importance or correlation of input features, lack the ability to dynamically adjust the circuit parameterization strategy according to data characteristics, and have poor feature capture efficiency. Summary of the Invention

[0003] This application provides a quantum-classical hybrid network and task processing method for data classification.

[0004] This application provides a quantum-classical hybrid network for data classification, the quantum-classical hybrid network including a data preprocessing module, a quantum circuit construction module, a quantum measurement module and a classical network module;

[0005] The data preprocessing module is configured to determine numerical feature vectors based on the input data classification task;

[0006] The quantum circuit construction module is configured to perform data reloading processing on the numerical feature vector according to a preset data reloading strategy and a preset feature importance score, and construct a target parameterized quantum circuit. The preset data reloading strategy is used to indicate the quantum gate parameterization control mechanism for performing data reloading processing on the numerical feature vector, and the preset feature importance score is used to indicate the score that measures the importance of the input features to the data classification task.

[0007] The quantum measurement module is configured to determine the basis state probability distribution vector based on the target parameterized quantum circuit;

[0008] The classic network module is configured to determine the data classification result based on the basis vector probability distribution vector.

[0009] Thus, the quantum-classical hybrid network comprises a data preprocessing module, a quantum circuit construction module, a quantum measurement module, and a classical network module. The data preprocessing module is configured to determine numerical feature vectors based on the input data classification task. The quantum circuit construction module is configured to reload the numerical feature vectors according to a preset data reloading strategy and a preset feature importance score, constructing a target parameterized quantum circuit. The preset data reloading strategy indicates the parameterized control mechanism of the quantum gates for reloading the numerical feature vectors, and the preset feature importance score indicates the score that measures the importance of the input features to the data classification task. The quantum measurement module is configured to determine the basis state probability distribution vector based on the target parameterized quantum circuit. The classical network module is configured to determine the data classification result based on the basis state probability distribution vector. In this way, by constructing the target parameterized quantum circuit through the quantum circuit construction module based on the preset data reloading strategy and the preset feature importance score, the superposition and entanglement properties of quantum computing can be utilized to enhance the capture of deep nonlinear patterns in the data, helping to improve the accuracy of complex data classification tasks. Furthermore, the quantum circuit construction module constructs a target parameterized quantum circuit based on a preset data reloading strategy and a preset feature importance score, enabling important features to effectively influence the quantum state, achieving biased processing of key information, and improving the utilization efficiency of key information in the quantum-classical hybrid network.

[0010] In some implementations, the data preprocessing module is configured to:

[0011] Based on the first preset encoding algorithm, the non-numerical feature information in the data classification task is mapped to generate the first numerical feature information;

[0012] Based on a preset feature scaling algorithm, the second numerical feature information and the first numerical feature information in the data classification task are processed to determine the numerical feature vector.

[0013] Thus, the data preprocessing module can map the non-numerical feature information in the data classification task based on the first preset encoding algorithm to generate the first numerical feature information. It can also process the second and first numerical feature information in the data classification task based on the preset feature scaling algorithm to determine the numerical feature vector. This ensures that the final numerical feature vector meets the numerical range requirements of quantum state encoding, providing suitable input for quantum state encoding in the subsequent quantum circuit construction module.

[0014] In some embodiments, the quantum circuit building block includes a feature input encoding layer, which is configured to:

[0015] Based on the first preset mapping function, the numerical feature vector is mapped to determine the quantum rotation angle corresponding to the numerical feature vector.

[0016] Based on the first preset quantum gate, quantum state encoding is performed according to the quantum rotation angle and the numerical feature vector to determine the initial quantum state.

[0017] Thus, the quantum circuit construction module includes a feature input encoding layer. This layer can map numerical feature vectors based on a first preset mapping function to determine the corresponding quantum rotation angle. Then, based on a first preset quantum gate, it can encode the quantum state according to the quantum rotation angle and the numerical feature vector to determine the initial quantum state. In this way, by converting the numerical feature vector into a quantum rotation angle through the first preset mapping function and then using the first preset quantum gate for quantum state encoding, the mapping from classical data to a quantum state is completed, laying the foundation for subsequent data processing.

[0018] In some embodiments, the quantum circuit building module includes a first feature mapping layer, which is configured to:

[0019] Based on a preset parameterized single-bit quantum gate and a preset entanglement gate, the initial quantum state is subjected to deep mapping processing to determine the first target quantum state.

[0020] Thus, the quantum circuit construction module includes a first feature mapping layer. This first feature mapping layer can perform deep mapping processing on the initial quantum state based on preset parameterized single-qubit quantum gates and preset entanglement gates to determine the first target quantum state. In this way, by performing deep mapping processing on the initial quantum state through preset parameterized single-qubit quantum gates and preset entanglement gates, the superposition and entanglement characteristics of the quantum state can be further enriched, enabling the obtained first target quantum state to more fully capture and characterize the complex nonlinear relationships in the data, thereby improving the ability of the quantum-classical hybrid network to express data features.

[0021] In some implementations, the quantum circuit building block includes a data reloading layer, which is configured to:

[0022] Based on the second preset mapping function, according to the preset feature importance score, the third numerical feature information in the initial quantum state is reused to determine the quantum gate application probability corresponding to the third numerical feature information;

[0023] Based on the quantum gate application probability, the first target quantum state is subjected to bias processing according to the second preset quantum gate to determine the intermediate quantum state.

[0024] Thus, the quantum circuit construction module includes a data reloading layer. This layer, based on a second preset mapping function and a preset feature importance score, reuses the third numerical feature information from the initial quantum state to determine the quantum gate application probability corresponding to that third numerical feature information. Based on the quantum gate application probability, it then applies a biased processing to the first target quantum state according to the second preset quantum gate to determine the intermediate quantum state. In this way, by reusing the third numerical feature information from the initial quantum state through the second preset mapping function and the preset feature importance score to determine the quantum gate application probability, highly important features are more likely to influence the quantum state through the second preset quantum gate. This achieves biased processing of key features, enabling the quantum-classical hybrid network to efficiently utilize information important for data classification tasks.

[0025] In some embodiments, the quantum circuit building block includes a second feature mapping layer, which is configured to:

[0026] Based on a preset parameterized single-bit quantum gate and a preset entanglement gate, a deep mapping process is performed on the initial quantum state and the intermediate quantum state to determine the second target quantum state.

[0027] Thus, the quantum circuit construction module includes a second feature mapping layer. This second feature mapping layer can perform deep mapping processing on the initial quantum state and intermediate quantum state based on preset parameterized single-qubit quantum gates and preset entanglement gates to determine the second target quantum state. In this way, by performing deep mapping on the initial quantum state and the intermediate quantum state processed by the data reloading layer through preset parameterized single-qubit quantum gates and preset entanglement gates, it is possible to further mine and integrate complex feature relationships in the data based on the existing quantum state, thereby enhancing the quantum state's ability to capture deep nonlinear features of the data.

[0028] In some implementations, the quantum circuit building block is configured to:

[0029] Based on the second target quantum state, construct the target parameterized quantum circuit.

[0030] In this way, the quantum circuit construction module can construct a target parameterized quantum circuit based on the second target quantum state. Thus, by integrating the second target quantum state obtained through processing at each layer, the constructed target parameterized quantum circuit can systematically reflect a tendency towards important features, ensuring that these important features continue to play a crucial role throughout the entire quantum computing process, thereby improving the efficiency of the quantum circuit in processing key information.

[0031] In some embodiments, the quantum-classical hybrid network further includes a training and evaluation module, which includes a training submodule and an evaluation submodule.

[0032] The training submodule is configured to iteratively train the quantum-classical hybrid network based on a preset training dataset;

[0033] The evaluation submodule is configured to evaluate the trained quantum-classical hybrid network based on a preset test dataset.

[0034] Thus, the quantum-classical hybrid network also includes a training and evaluation module, which comprises a training submodule and an evaluation submodule. The training submodule iteratively trains the quantum-classical hybrid network using a pre-defined training dataset. The evaluation submodule evaluates the trained quantum-classical hybrid network using a pre-defined test dataset. In this way, the training submodule, through iterative training on the pre-defined training dataset, can improve the adaptability of the quantum-classical hybrid network to data classification tasks by updating the quantum circuit parameters and classical network parameters. The evaluation submodule, by evaluating the trained model on the test dataset, can verify the performance of the quantum-classical hybrid network on data not used in the training.

[0035] In some implementations, the training submodule is configured as follows:

[0036] Based on the first preset propagation algorithm, the output result of the quantum-classical hybrid network is determined according to the training data in the training dataset;

[0037] Based on a preset loss function, the difference between the output result and the label data in the training dataset is determined according to the output result and the label data. The preset loss function is determined based on a second preset propagation algorithm.

[0038] If the difference value is less than a preset difference value threshold, the training of the quantum-classical hybrid network is considered complete.

[0039] In this way, the training submodule can determine the output of the quantum-classical hybrid network based on the training data in the training dataset using the first preset propagation algorithm. Then, based on a preset loss function determined by the second preset propagation algorithm, it determines the difference between the output and the labeled data in the training dataset. Finally, if the difference is less than a preset threshold, the quantum-classical hybrid network training is considered complete. This allows for targeted adjustment of the parameters of the quantum circuit and the classical network, gradually reducing prediction errors and improving the quantum-classical hybrid network's ability to fit the training data.

[0040] This application provides a task processing method based on the aforementioned quantum-classical hybrid network for data classification, the method comprising:

[0041] Based on the input data classification task, determine the numerical feature vector;

[0042] According to a preset data reloading strategy and a preset feature importance score, the numerical feature vector is subjected to data reloading processing to construct a target parameterized quantum circuit. The preset data reloading strategy is used to indicate the quantum gate parameterization control mechanism for data reloading processing of the numerical feature vector, and the preset feature importance score is used to indicate the score that measures the importance of the input features to the data classification task.

[0043] Based on the target parameterized quantum circuit, determine the basis state probability distribution vector;

[0044] The data classification result is determined based on the basis vector probability distribution.

[0045] Thus, based on the input data classification task, numerical feature vectors are determined. Next, according to a preset data reloading strategy and a preset feature importance score, the numerical feature vectors are reloaded to construct a target parameterized quantum circuit. The preset data reloading strategy instructs the parameterized control mechanism of the quantum gates for reloading the numerical feature vectors, and the preset feature importance score indicates the score that measures the importance of the input features to the data classification task. Then, based on the target parameterized quantum circuit, the basis state probability distribution vector is determined. Finally, based on the basis state probability distribution vector, the data classification result is determined. In this way, by constructing a target parameterized quantum circuit based on a preset data reloading strategy and a preset feature importance score using the quantum circuit construction module, the superposition and entanglement properties of quantum computing can be utilized to enhance the capture of deep nonlinear patterns in the data, helping to improve the accuracy of complex data classification tasks. Furthermore, the quantum circuit construction module, based on the preset data reloading strategy and a preset feature importance score, enables important features to effectively influence the quantum state, achieving biased processing of key information and improving the utilization efficiency of key information in quantum-classical hybrid networks.

[0046] In some implementations, the step of reloading the numerical feature vector according to a preset data reloading strategy and a preset feature importance score to construct the target parameterized quantum circuit includes:

[0047] Based on the first preset mapping function, the numerical feature vector is mapped to determine the quantum rotation angle corresponding to the numerical feature vector.

[0048] Based on the first preset quantum gate, quantum state encoding is performed according to the quantum rotation angle and the numerical feature vector to determine the initial quantum state.

[0049] Thus, based on the first preset mapping function, the numerical feature vector is mapped to determine the corresponding quantum rotation angle. Next, based on the first preset quantum gate, quantum state encoding is performed according to the quantum rotation angle and the numerical feature vector to determine the initial quantum state. In this way, by converting the numerical feature vector into a quantum rotation angle through the first preset mapping function and then using the first preset quantum gate for quantum state encoding, the mapping from classical data to quantum state is completed, laying the foundation for subsequent data processing.

[0050] In some implementations, the step of reloading the numerical feature vector according to a preset data reloading strategy and a preset feature importance score to construct the target parameterized quantum circuit includes:

[0051] Based on a preset parameterized single-bit quantum gate and a preset entanglement gate, the initial quantum state is subjected to deep mapping processing to determine the first target quantum state.

[0052] Thus, based on preset parameterized single-qubit quantum gates and preset entanglement gates, a deep mapping process is performed on the initial quantum state to determine the first target quantum state. This deep mapping process of the initial quantum state through preset parameterized single-qubit quantum gates and preset entanglement gates further enriches the superposition and entanglement characteristics of the quantum state, enabling the obtained first target quantum state to more fully capture and characterize the complex nonlinear relationships in the data, thereby enhancing the expressive power of the quantum-classical hybrid network for data features.

[0053] In some implementations, the step of reloading the numerical feature vector according to a preset data reloading strategy and a preset feature importance score to construct the target parameterized quantum circuit includes:

[0054] Based on the second preset mapping function, according to the preset feature importance score, the third numerical feature information in the initial quantum state is reused to determine the quantum gate application probability corresponding to the third numerical feature information;

[0055] Based on the quantum gate application probability, the first target quantum state is subjected to bias processing according to the second preset quantum gate to determine the intermediate quantum state.

[0056] Thus, based on the second preset mapping function and according to the preset feature importance score, the third numerical feature information in the initial quantum state is reused to determine the quantum gate application probability corresponding to the third numerical feature information. Next, based on the quantum gate application probability, the first target quantum state is biased according to the second preset quantum gate to determine the intermediate quantum state. In this way, by using the preset mapping function and determining the quantum gate application probability according to the preset feature importance score, highly important features are more likely to influence the quantum state through the second preset quantum gate, thereby achieving biased processing of key features and enabling the quantum-classical hybrid network to efficiently utilize information important to the data classification task.

[0057] In some implementations, the step of reloading the numerical feature vector according to a preset data reloading strategy and a preset feature importance score to construct the target parameterized quantum circuit includes:

[0058] Based on a preset parameterized single-bit quantum gate and a preset entanglement gate, a deep mapping process is performed on the initial quantum state and the intermediate quantum state to determine the second target quantum state;

[0059] Based on the second target quantum state, construct the target parameterized quantum circuit.

[0060] Thus, based on preset parameterized single-qubit quantum gates and preset entanglement gates, a deep mapping process is performed on the initial quantum state and the intermediate quantum state to determine the second target quantum state. Then, based on the second target quantum state, the target parameterized quantum circuit is constructed. In this way, by using preset parameterized single-qubit quantum gates and preset entanglement gates to perform a deep mapping on the initial quantum state and the intermediate quantum state after data reloading, it is possible to further mine and integrate complex feature relationships in the data based on the existing quantum state, enhancing the quantum state's ability to capture deep nonlinear features of the data.

[0061] 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

[0062] 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:

[0063] Figure 1 This is one of the structural schematic diagrams of the quantum-classical hybrid network according to an embodiment of this application;

[0064] Figure 2 This is the second schematic diagram of the structure of the quantum-classical hybrid network according to the embodiments of this application;

[0065] Figure 3 This is a schematic diagram of the quantum circuit of the feature input coding layer in an embodiment of this application;

[0066] Figure 4 This is the third schematic diagram of the structure of the quantum-classical hybrid network according to the embodiments of this application;

[0067] Figure 5 This is the fourth schematic diagram of the structure of the quantum-classical hybrid network according to the embodiments of this application;

[0068] Figure 6 This is a schematic diagram of the data reloading layer structure according to an embodiment of this application;

[0069] Figure 7 This is the fifth schematic diagram of the structure of the quantum-classical hybrid network according to the embodiments of this application;

[0070] Figure 8 This is a schematic diagram of the quantum circuit construction module according to an embodiment of this application;

[0071] Figure 9 This is the sixth schematic diagram of the structure of the quantum-classical hybrid network according to the embodiments of this application;

[0072] Figure 10 This is the seventh schematic diagram of the structure of the quantum-classical hybrid network according to the embodiments of this application;

[0073] Figure 11 This is one of the flowcharts illustrating the task processing method of this application.

[0074] Figure 12 This is a second flowchart illustrating the task processing method according to an embodiment of this application;

[0075] Figure 13 This is the third flowchart illustrating the task processing method of the embodiments of this application;

[0076] Figure 14 This is a schematic diagram of the quantum circuit of the feature mapping layer in an embodiment of this application;

[0077] Figure 15 This is a schematic diagram of the quantum circuit of a single-qubit unitary gate G according to an embodiment of this application;

[0078] Figure 16 This is the fourth flowchart illustrating the task processing method of the embodiments of this application;

[0079] Figure 17 This is the fifth flowchart illustrating the task processing method of the embodiments of this application. Detailed Implementation

[0080] 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.

[0081] In the era of Noisy Intermediate-Scale Quantum (NISQ), although quantum computing devices possess a certain number of qubits, they are still significantly affected by noise and errors, making it difficult to achieve large-scale, noise-free quantum computing. At this juncture, Quantum-Classical Hybrid Networks (QCHNs), with their combination of the advantages of quantum computing and the maturity of classical computing, have become an important choice for handling data classification tasks. By leveraging the properties of quantum superposition and entanglement through parameterized quantum circuits (PQCs) for efficient feature extraction and representation learning, and combining this with the powerful decision-making capabilities of classical neural networks to collaboratively complete the classification task, the potential of quantum computing can be maximized within the current hardware limitations of NISQ devices.

[0082] However, existing parameterized quantum circuits often employ a relatively uniform modular structure, lacking consideration for the importance or correlation of different features in the input data. For example, in image recognition, edge features may be more critical than background features; in financial risk assessment, the predictive value of certain financial indicators is far higher than other auxiliary information, but existing designs indiscriminately incorporate these features into the circuit processing flow. This "one-size-fits-all" approach prevents parameterized quantum circuits from dynamically adjusting their parameterization strategies based on data characteristics—they cannot perform deeper quantum state transformations and entanglement interactions on highly important features, nor can they reduce the ineffective computational consumption on less important features. This results in poor feature capture efficiency, making it difficult to effectively extract key information in classification tasks, thus limiting the performance of quantum-classical hybrid networks in complex data classification tasks.

[0083] Based on the above issues, please refer to Figure 1 This application provides a quantum-classical hybrid network 1000 for data classification, which includes a data preprocessing module 100, a quantum circuit construction module 200, a quantum measurement module 300, and a classical network module 400.

[0084] The data preprocessing module 100 is configured to determine numerical feature vectors based on the input data classification task;

[0085] The quantum circuit construction module 200 is configured to perform data reloading processing on the numerical feature vector according to a preset data reloading strategy and a preset feature importance score, and construct a target parameterized quantum circuit. The preset data reloading strategy is used to indicate the quantum gate parameterization control mechanism for performing data reloading processing on the numerical feature vector, and the preset feature importance score is used to indicate the score that measures the importance of the input features to the data classification task.

[0086] The quantum measurement module 300 is configured to determine the basis state probability distribution vector based on the target parameterized quantum circuit;

[0087] The classic network module 400 is configured to determine the data classification result based on the basis vector state probability distribution vector.

[0088] Specifically, data classification refers to the task of dividing data into predefined categories based on its characteristics or attributes. For example, in diamond quality classification, diamonds are divided into high-quality and average-quality categories based on characteristics such as carat weight, color, and cut.

[0089] The Quantum-Classical Hybrid Network 1000 refers to a hybrid architecture that combines the advantages of quantum and classical computing. It uses parameterized quantum circuits for feature extraction and representation learning, while collaborating with classical neural networks to complete tasks, making it particularly suitable for the era of noisy, medium-scale quantum computers. The Quantum-Classical Hybrid Network 1000 utilizes the superposition and entanglement properties of qubits to process complex data, while relying on the mature decision-making capabilities of classical computing to achieve the final classification.

[0090] The data preprocessing module 100 refers to the functional module responsible for converting the raw input data into numerical feature vectors suitable for quantum processing.

[0091] The quantum circuit construction module 200 refers to the module that constructs a target parameterized quantum circuit based on a preset feature importance score and numerical feature vector. Its structure includes a feature input encoding layer 210, a feature mapping layer, and a data reloading layer 230. The biased processing of important features is achieved through the feature bias design of the data reloading layer 230.

[0092] The quantum measurement module 300 refers to the module that measures the final quantum state after the parameterized quantum circuit has been executed. The measurement result is the probability distribution vector of the basis state, which carries the advanced quantum features extracted by the quantum circuit and serves as a bridge connecting the quantum part and the classical part.

[0093] The classical network module 400 refers to the module that receives the probability distribution vector output by the quantum measurement module 300 and makes the final classification decision. It can use classical models such as fully connected networks and convolutional networks. It is responsible for mapping quantum features to the category label space and learning nonlinear combinations between quantum features to improve classification performance.

[0094] The numerical feature vector refers to the standardized numerical vector X generated by the data preprocessing module 100 that is suitable for quantum processing. It is the result of the original data after non-numerical feature encoding and numerical feature scaling.

[0095] Preset data reloading strategy refers to an enhanced quantum state parameterization strategy that allows the same eigenvalue from a numerical eigenvector to be reused as a parameter in multiple different parameterized gates of a parameterized quantum circuit. Essentially, the preset data reloading strategy is a differential quantum state encoding and reinforcement mechanism based on feature importance. By reusing important feature information and combining it with probabilistic gate selection, it enables quantum circuits to more efficiently focus on key features, enhancing the representation and generalization capabilities of quantum-classical hybrid networks for complex data patterns.

[0096] The preset feature importance score refers to the score used to measure the importance of input features to the classification task. It can be obtained through domain knowledge evaluation and is the basis for the probabilistic selection of quantum gates in the data reloading layer 230. High-importance features correspond to a higher probability of applying the rotating gate.

[0097] Data reloading refers to the operation of repeatedly using the same eigenvalue in the numerical eigenvector as a parameter in multiple different parameterized quantum gates of the target parameterized quantum circuit during the construction of the target parameterized quantum circuit.

[0098] The target parameterized quantum circuit refers to the core quantum structure built by the quantum circuit construction module 200, which dynamically changes the circuit behavior by adjusting the internal quantum gate parameters.

[0099] The basis state probability distribution vector refers to the output of the quantum measurement module 300, which is the classical numerical vector after the quantum state collapses.

[0100] The data classification result refers to the output of the classic network module 400, that is, the determination result of the category to which the input data belongs.

[0101] The data preprocessing module 100 transforms the raw data in the data classification task according to the input classification task and determines the numerical feature vector.

[0102] Next, the quantum circuit construction module 200 constructs the target parameterized quantum circuit based on the preset feature importance score and numerical feature vector.

[0103] Then, the quantum measurement module 300 measures the final quantum state of the target parameterized quantum circuit to obtain the basis state probability distribution vector, which includes high-level feature information extracted from the target parameterized quantum circuit.

[0104] Finally, the classical network module 400 inputs the basis state probability distribution vector into the classical neural network, and outputs the data classification result by learning the nonlinear combination between quantum features.

[0105] In this way, through the collaborative processing of quantum computing and classical computing, efficient classification of complex data can be achieved, which is suitable for classification tasks with high dimensionality and small sample size.

[0106] In summary, the quantum-classical hybrid network for data classification provided in this application includes a data preprocessing module, a quantum circuit construction module, a quantum measurement module, and a classical network module. The data preprocessing module is configured to determine numerical feature vectors based on the input data classification task. The quantum circuit construction module is configured to reload the numerical feature vectors according to a preset data reloading strategy and a preset feature importance score, constructing a target parameterized quantum circuit. The preset data reloading strategy indicates the quantum gate parameterization control mechanism for reloading the numerical feature vectors, and the preset feature importance score indicates the score that measures the importance of the input features to the data classification task. The quantum measurement module is configured to determine the basis state probability distribution vector based on the target parameterized quantum circuit. The classical network module is configured to determine the data classification result based on the basis state probability distribution vector. Thus, by constructing a target parameterized quantum circuit based on a preset data reloading strategy and a preset feature importance score using the quantum circuit construction module, the superposition and entanglement characteristics of quantum computing can be utilized to enhance the capture of deep nonlinear patterns in the data, helping to improve the accuracy of complex data classification tasks. Furthermore, the quantum circuit construction module constructs a target parameterized quantum circuit based on a preset data reloading strategy and a preset feature importance score, enabling important features to effectively influence the quantum state, achieving biased processing of key information, and improving the utilization efficiency of key information in the quantum-classical hybrid network.

[0107] In some implementations, the data preprocessing module 100 is configured to:

[0108] Based on the first preset encoding algorithm, the non-numerical feature information in the data classification task is mapped to generate the first numerical feature information;

[0109] Based on a preset feature scaling algorithm, the second and first numerical feature information in the data classification task are processed to determine the numerical feature vector.

[0110] Specifically, the first preset encoding algorithm refers to a specific encoding method used to convert non-numerical features into numerical forms, including techniques such as one-hot encoding, ordinal encoding, and feature embedding. For example, in the diamond quality classification example, the conversion of non-numerical features such as color and cut grade all rely on such algorithms.

[0111] Non-numerical feature information refers to feature attributes that cannot be directly represented in numerical form in data classification tasks. That is, the original data of data classification tasks does not have descriptive features in quantitative numerical form, such as qualitative descriptive information of diamond data such as color (D to J grade), cut grade (Ideal, Premium, etc.), and clarity (I1, SI2, etc.).

[0112] Mapping non-numerical feature information in data classification tasks refers to the process of converting non-numerical feature information into numerical form through a first preset encoding algorithm. By establishing a mapping relationship between non-numerical categories and numerical values, the non-numerical feature information can be processed by quantum circuits. For example, mapping the diamond color grade DJ to an integer from 0 to 6, or converting clarity classification into discrete values ​​from 1 to 9 through ordinal encoding.

[0113] The first numerical feature information refers to the numerical result obtained after the first preset encoding algorithm encodes the non-numerical feature information, which is the numerical representation of the original non-numerical feature.

[0114] Preset feature scaling algorithms refer to processing methods that standardize or normalize numerical features (including first and second numerical feature information) to eliminate dimensional differences and ensure that the numerical range meets the requirements of quantum state encoding. Techniques include Z-score standardization, minimum-maximum normalization, etc.

[0115] The second type of numerical feature information refers to the feature attributes in data classification tasks that are originally in numerical form and can be directly quantified without additional encoding, but require subsequent scaling processing. For example, the carat value and depth in diamond data are feature attributes that are directly represented by numerical values.

[0116] Processing the second and first numerical feature information in a data classification task refers to eliminating the differences in the dimensions and numerical ranges of the two types of features by using a preset feature scaling algorithm (such as Z-score normalization, min-max normalization, etc.) to make them conform to the numerical requirements of quantum state encoding, and finally generating a numerical feature vector that conforms to the requirements of quantum state encoding.

[0117] It should be noted that, unless otherwise specified, the feature information mentioned below refers to all feature information in the numerical feature vector, including the content obtained after processing the first and second numerical feature information.

[0118] First, for non-numerical feature information that cannot be directly quantified in the data classification task, a first preset encoding algorithm is used for mapping processing to generate first numerical feature information.

[0119] Next, for the second numerical feature information, which is originally in numerical form, and the first numerical feature information obtained after the first step of transformation, a preset feature scaling algorithm is used to eliminate dimensional differences, and the numerical feature vector X=[ , ,…, ].

[0120] Thus, the data preprocessing module can map the non-numerical feature information in the data classification task based on the first preset encoding algorithm to generate the first numerical feature information. It can also process the second and first numerical feature information in the data classification task based on the preset feature scaling algorithm to determine the numerical feature vector. This ensures that the final numerical feature vector meets the numerical range requirements of quantum state encoding, providing suitable input for quantum state encoding in the subsequent quantum circuit construction module.

[0121] Please see Figure 2 In some embodiments, the quantum circuit building module 200 includes a feature input encoding layer 210, which is configured to:

[0122] Based on the first preset mapping function, the numerical feature vector is mapped to determine the quantum rotation angle corresponding to the numerical feature vector.

[0123] Based on the first preset quantum gate, the quantum state is encoded according to the quantum rotation angle and numerical eigenvector to determine the initial quantum state.

[0124] Specifically, the first preset mapping function refers to a function that converts the eigenvalues ​​in the numerical eigenvector into quantum rotation gate parameters (angles), capable of mapping the preprocessed eigenvalues ​​to quantum gate rotation angles. .

[0125] Mapping a numerical feature vector refers to the process of transforming each feature value in the numerical feature vector through a first preset mapping function. This process can transform classical numerical features into angle parameters that are compatible with quantum rotating gate operations, that is, it enables classical data to be "translated" into quantum operation parameters that can be processed by quantum circuits.

[0126] The quantum rotation angle refers to the angle value θi obtained after mapping the numerical feature vector through a first preset mapping function. It is the rotation parameter of a quantum rotation gate (such as the RX gate, RZ gate, etc.) and can be used to control the state evolution of a qubit. The quantum rotation angle directly determines the rotation amplitude of the quantum gate (such as the RX gate, RZ gate) and is the carrier for injecting classical feature information into the quantum state.

[0127] The first predefined quantum gate refers to the specific quantum gate used to encode the feature information corresponding to the quantum rotation angle into a quantum state. It is mainly a parameterized rotation quantum gate, including the RX gate and the RZ gate. The first predefined quantum gate can perform rotation operations on the qubit based on the quantum rotation angle θi, thereby encoding classical feature information into the quantum state.

[0128] Quantum state encoding refers to the process of converting classical data "numerical feature vectors" into quantum states through the rotation operation of a first preset quantum gate. It is the core mapping step from classical data to quantum states.

[0129] The initial quantum state refers to the quantum state obtained after quantum state encoding. It is the output of the feature input encoding layer 210 in the construction of the quantum circuit and serves as the initial quantum state for subsequent quantum processing (such as the feature mapping layer and the data reloading layer 230). The initial quantum state carries the quantized information of classical features after encoding and is the starting point for the quantum circuit to perform subsequent deep feature mapping and bias processing.

[0130] Please see Figure 3 , Figure 3 This is a schematic diagram of the quantum circuit for the feature input coding layer 210. Let the numerical feature vector X = [ , ,…, ], q1 and q7 are used to indicate the qubits of the operation, Rx and Rz are the first preset quantum gates, and θ is the quantum rotation angle.

[0131] The numerical feature vector X output by the data preprocessing module 100 is [ , ,…, After the feature input encoding layer 210 is input, the feature input encoding layer 210 passes through the first preset mapping function. For the numerical eigenvector X=[ , ,…, Each eigenvalue in ] Perform element-wise mapping to determine the quantum rotation angle corresponding to the numerical eigenvector. , , ..., ].

[0132] Next, the feature input encoding layer 210 uses the first preset quantum gate to obtain the quantum rotation angle as described above. By manipulating qubits, quantum state encoding is achieved, so that each feature information corresponds to an independent qubit operation, and finally a quantum superposition state containing all feature information is formed, that is, the initial quantum state.

[0133] Thus, the quantum circuit construction module includes a feature input encoding layer. This layer can map numerical feature vectors based on a first preset mapping function to determine the corresponding quantum rotation angle. Then, based on a first preset quantum gate, it can encode the quantum state according to the quantum rotation angle and the numerical feature vector to determine the initial quantum state. In this way, by converting the numerical feature vector into a quantum rotation angle through the first preset mapping function and then using the first preset quantum gate for quantum state encoding, the mapping from classical data to a quantum state is completed, laying the foundation for subsequent data processing.

[0134] Please see Figure 4 In some embodiments, the quantum circuit building module 200 includes a first feature mapping layer 220, which is configured to:

[0135] Based on a pre-parameterized single-bit quantum gate and a pre-parameterized entanglement gate, the initial quantum state is subjected to deep mapping processing to determine the first target quantum state.

[0136] Specifically, a pre-parameterized single-qubit quantum gate refers to a quantum gate that operates on a single qubit and whose parameters are trainable, used to make tunable changes to the state of a single qubit, such as the Hardmard gate (H gate) and the RX gate.

[0137] Pre-entanglement gates are quantum gates that act on two or more qubits to establish entanglement relationships between qubits, breaking the independence of the state of a single qubit and realizing the integration of feature information among multiple qubits through quantum entanglement, such as CZ gates and CNOT gates.

[0138] Deep mapping processing refers to the process of extracting more complex and deeper feature information by performing multi-dimensional, nonlinear quantum state transformations on the initial quantum state through a combination of pre-parameterized single-qubit quantum gates and pre-parameterized entanglement gates. Specifically, the parameterized single-qubit quantum gates introduce nonlinear transformations by finely controlling the state of a single qubit through adjustable parameters (such as dynamic adjustment of the rotation angle); the pre-parameterized entanglement gates establish correlations between qubits, enabling feature information to propagate and integrate in a multi-qubit system, thus overcoming the independence limitations of classical feature processing.

[0139] The first target quantum state refers to the quantum state obtained after the initial quantum state undergoes deep mapping processing by the first feature mapping layer 220, and is the output of the first feature mapping layer 220. Compared to the initial quantum state, the first target quantum state, after parameterized single-qubit gate manipulation and entanglement gate correlation, contains richer nonlinear features and multi-qubit correlation information. The first target quantum state provides input for the subsequent data reloading layer 230, enabling biased processing based on feature importance.

[0140] Thus, the quantum circuit construction module includes a first feature mapping layer. This first feature mapping layer can perform deep mapping processing on the initial quantum state based on preset parameterized single-qubit quantum gates and preset entanglement gates to determine the first target quantum state. In this way, by performing deep mapping processing on the initial quantum state through preset parameterized single-qubit quantum gates and preset entanglement gates, the superposition and entanglement characteristics of the quantum state can be further enriched, enabling the obtained first target quantum state to more fully capture and characterize the complex nonlinear relationships in the data, thereby improving the ability of the quantum-classical hybrid network to express data features.

[0141] Please refer to the following: Figure 5 In some implementations, the quantum circuit building block 200 includes a data reloading layer 230, which is configured to:

[0142] Based on the second preset mapping function, according to the preset feature importance score, the third numerical feature information in the initial quantum state is reused to determine the quantum gate application probability corresponding to the third numerical feature information;

[0143] Based on the quantum gate application probability, the first target quantum state is biased according to the second preset quantum gate to determine the intermediate quantum state.

[0144] Specifically, the data reloading layer 230 is a module that realizes differentiated mapping from classical data to quantum states based on feature importance. For each input feature (i.e., the third numerical feature information in the initial quantum state), based on the preset feature importance score, the encoded information of the feature (or its derived quantum rotation angle) is reused at multiple preset parameterized positions of the quantum circuit with a calculated explicit probability. By differentially selecting quantum gate operations (active rotation gate or unitary gate), the biased reinforcement of important features is realized, thereby enhancing the quantum state's ability to represent key features.

[0145] The second preset mapping function refers to the function used to convert feature importance scores into quantum gate application probabilities. In some implementations, the second preset mapping function is the Sigmoid function, i.e. .in, For the Sigmoid function, The preset feature importance score is used. w and b are preset parameters. w is used to adjust the steepness of the influence of the importance score on the probability (the value of w is in the range of w>0), and b is used to adjust the offset of the probability curve.

[0146] Preset feature importance scores refer to the quantitative values ​​of importance that are pre-assigned to the third numerical feature information in a numerical feature vector, which can be obtained through domain knowledge assessment. For example, the feature importance score for diamond clarity is set to 0.9, the feature importance score for diamond carat weight is set to 0.9, and the feature importance score for diamond color is set to 0.8. For example, based on expertise in diamond grading, the following example importance scores Si are assigned to various characteristics: Carat (Scarat=0.9): Pactive(carat)≈0.723; Color (Scolor=0.8): Pactive(color)≈0.668; Clarity (Sclarity=0.9): Pactive(clarity)≈0.723; Cut (Scut=0.8): Pactive(cut)≈0.668; Depth (Sdepth=0.5): Pactive(depth)≈0.448; Table (Stable=0.4): Pactive(table)≈0.382; Size (Ssize=0.2): Pactive(size)≈0.310.

[0147] The third numerical feature information refers to the numerical feature data actually carried in the initial quantum state that needs to be reused by the data reloading layer. The third numerical feature information is the object of biased processing by the data reloading layer 230 for specific features. The feature values ​​in the third numerical feature information are reused to at least two quantum gates in the data reloading layer, and the reuse position is determined according to the topology of the quantum circuit.

[0148] The quantum gate application probability refers to the probability of applying an active rotation gate (rather than a unitary gate) to the third numerical feature information, calculated by the second preset mapping function. Quantum gate application probability Importance score of preset features Positive correlation: Let feature importance scores be used. The higher the probability of quantum gate applications. The larger, The value range is 0-1.

[0149] The second preset quantum gate refers to two types of quantum gates used to process quantum states in the data reloading layer 230: active rotation gates and unitary gates. Among them, active rotation gates include... Door, Gates, etc., are used to inject feature information into the quantum state. Unitary gates refer to I gates, which do not change the quantum state and correspond to weak processing of low-importance features.

[0150] Biased processing refers to the process of differentially controlling the quantum state of features of different importance based on the probability of quantum gate application. That is, features of high importance are more likely to affect the quantum state through active rotation gates because of their higher probability of quantum gate application; features of low importance are more likely to be processed by unitary gates and have a weaker impact on the quantum state.

[0151] The intermediate quantum state refers to the quantum state obtained after the biased processing of the first target quantum state by the data reloading layer 230, and is the output of the data reloading layer 230. Compared with the quantum state before the biased processing, the influence of key features in the intermediate quantum state is significantly enhanced, providing a more targeted input for the subsequent deep processing of the second feature mapping layer 240.

[0152] Please see Figure 6 , Figure 6 This is a schematic diagram of the data reloading layer 230. Figure 6 It includes single-bit quantum gates Rx gate, I gate, and CNOT gate.

[0153] Thus, the quantum circuit construction module includes a data reloading layer. This layer, based on a second preset mapping function and a preset feature importance score, reuses the third numerical feature information from the initial quantum state to determine the quantum gate application probability corresponding to that third numerical feature information. Based on the quantum gate application probability, it then applies a biased processing to the first target quantum state according to the second preset quantum gate to determine the intermediate quantum state. In this way, by reusing the third numerical feature information from the initial quantum state through the second preset mapping function and the preset feature importance score to determine the quantum gate application probability, highly important features are more likely to influence the quantum state through the second preset quantum gate. This achieves biased processing of key features, enabling the quantum-classical hybrid network to efficiently utilize information important for data classification tasks.

[0154] Please refer to the following: Figure 7 In some embodiments, the quantum circuit building module 200 includes a second feature mapping layer 240, which is configured to:

[0155] Based on a preset parameterized single-bit quantum gate and a preset entanglement gate, a deep mapping process is performed on the initial quantum state and the intermediate quantum state to determine the second target quantum state.

[0156] Specifically, in the quantum circuit construction module 200, the preset parameterized single-qubit quantum gate and preset entanglement gate used in the second feature mapping layer 240 are completely consistent with the corresponding quantum gates in the first feature mapping layer 220. Specifically, the preset parameterized single-qubit quantum gates all adopt Hardmard gates and... The gate is used to perform nonlinear transformations on the state of a single qubit; the pre-entanglement gate also uses CZ gates and CNOT gates to establish entanglement relationships between adjacent qubits. In this way, the consistency of the parameterized quantum circuit architecture is maintained, while differentiated processing of feature information of different importance is achieved.

[0157] Deep mapping of the initial quantum state and intermediate quantum state refers to the process by which the second feature mapping layer 240 performs multi-dimensional, nonlinear quantum state transformation and information integration on the two types of input quantum states (initial quantum state and intermediate quantum state) through preset parameterized single-bit quantum gates and preset entanglement gates.

[0158] The second target quantum state refers to the quantum state obtained after the initial quantum state and intermediate quantum state have undergone deep mapping processing by the second feature mapping layer 240, and is the output of the second feature mapping layer 240. The second target quantum state integrates the original feature information (from the initial quantum state) and the key feature information enhanced by reloading (from the intermediate quantum state). Through the manipulation of parameterized single-qubit gates and the correlation of entanglement gates, it carries richer and more targeted quantum feature information. The second target quantum state provides the core input for the subsequent construction of target parameterized quantum circuits.

[0159] It should be noted that in practical applications, the data reloading layer 230 and the second feature mapping layer 240 are not limited to a single structure, but can be flexibly configured into a multi-level structure according to the complexity of the specific data classification task, the feature dimension, and the model performance requirements. Please refer to [link / reference]. Figure 8 , Figure 8 This is a schematic diagram of the quantum circuit construction module 200. By repeatedly using the aforementioned data reloading layer 230 and the second feature mapping layer 240, the feature information is continuously processed, enabling multiple probabilistic injections and reinforcements of important feature information, thus continuously deepening the cumulative influence of key features on the quantum state.

[0160] Thus, the quantum circuit construction module includes a second feature mapping layer. This second feature mapping layer can perform deep mapping processing on the initial quantum state and intermediate quantum state based on preset parameterized single-qubit quantum gates and preset entanglement gates to determine the second target quantum state. In this way, by performing deep mapping on the initial quantum state and the intermediate quantum state processed by the data reloading layer through preset parameterized single-qubit quantum gates and preset entanglement gates, it is possible to further mine and integrate complex feature relationships in the data based on the existing quantum state, thereby enhancing the quantum state's ability to capture deep nonlinear features of the data.

[0161] In some implementations, the quantum circuit building block 200 is configured to:

[0162] Construct a target parameterized quantum circuit based on the second target quantum state.

[0163] Specifically, the core layers of the quantum circuit construction module 200 (feature input encoding layer 210, first feature mapping layer 220, data reloading layer 230 and second feature mapping layer 240) process the input information in sequence to generate the second target quantum state. After that, the quantum circuit construction module 200 integrates the operation logic of these layers, the quantum gate configuration and the circuit topology corresponding to the finally generated second target quantum state into a complete parameterized quantum circuit, that is, the target parameterized quantum circuit.

[0164] After the target parameterized quantum circuit is constructed, the quantum measurement module 300 performs a measurement operation on the second target quantum state. That is, the quantum measurement module 300 observes the quantum state on the calculated basis vectors, collapsing the quantum state into a classical measurement result (calculating the probability distribution vector of the basis state). Subsequently, the basis state probability distribution vector output by the quantum measurement module 300 is directly input into the classical network module 400 as its core input feature to complete the final classification and obtain the data classification result. In some embodiments, the classical network module 400 uses classical neural network structures such as fully connected networks and convolutional networks to further process the input basis state probability distribution vector and finally output the data classification result.

[0165] In this way, the quantum circuit construction module can construct a target parameterized quantum circuit based on the second target quantum state. Thus, by integrating the second target quantum state obtained through processing at each layer, the constructed target parameterized quantum circuit can systematically reflect a tendency towards important features, ensuring that these important features continue to play a crucial role throughout the entire quantum computing process, thereby improving the efficiency of the quantum circuit in processing key information.

[0166] Please see Figure 9 and Figure 10 In some embodiments, the quantum-classical hybrid network 1000 further includes a training and evaluation module 500, which includes a training submodule 510 and an evaluation submodule 520.

[0167] Training submodule 510 is configured to iteratively train quantum-classical hybrid network 1000 based on a preset training dataset;

[0168] The evaluation submodule 520 is configured to evaluate the trained quantum-classical hybrid network 1000 based on a preset test dataset.

[0169] Specifically, the training and evaluation module 500 refers to the core functional module in the quantum-classical hybrid network responsible for model parameter optimization and performance verification. It optimizes network parameters through a systematic training process and independently evaluates and verifies the effectiveness and generalization ability of the model. The training and evaluation module 500 is a key component for achieving end-to-end hybrid training and performance verification, comprising two core parts: the training submodule 510 and the evaluation submodule 520. It should be noted that the complete training process of the training and evaluation module 500 is only executed during the initial model building or deployment preparation phase of the quantum-classical hybrid network. In this phase, the training submodule 510 performs full-process iterative training of the quantum-classical hybrid network 1000 based on a preset training dataset, including calculating the predicted output through forward propagation, measuring the error using a loss function, updating the quantum circuit parameters and classical network parameters through the backpropagation algorithm, and continuing to iterate until the quantum-classical hybrid network 1000 converges. The evaluation submodule 520, after the initial training is completed, immediately performs a comprehensive performance evaluation of the trained model based on a preset test dataset to verify whether the classification accuracy, precision, and other indicators meet the standards. After the quantum-classical hybrid network 1000 completes its initial training and passes evaluation, when it enters the actual industrial deployment or application stage, the training and evaluation module 500 usually does not repeat the complete training process. It only needs to call the pre-trained model parameters to perform inference and classification on the new data input in real time, or perform periodic performance re-checks through the evaluation submodule 520 when necessary to ensure the stability of the quantum-classical hybrid network 1000 in practical applications.

[0170] The training submodule 510 refers to the core unit in the training and evaluation module 500 responsible for optimizing the parameters of the quantum-classical hybrid network 1000. It can minimize the prediction error of the quantum-classical hybrid network 1000 by iteratively adjusting the trainable parameters of the quantum-classical hybrid network (including the parameterized quantum gate parameters of the quantum circuit and the weights of the classical network) based on a preset training dataset.

[0171] The preset training dataset refers to the labeled dataset used to train the submodule 510 to learn model parameters. It consists of preprocessed input features and corresponding real labels.

[0172] The evaluation submodule 520 refers to the core unit in the training evaluation module 500 responsible for model performance verification. It can objectively evaluate the generalization ability and actual performance of the model based on an independent preset test dataset after the quantum-classical hybrid network 1000 has been trained.

[0173] The preset test dataset refers to an independent labeled dataset used to evaluate the generalization ability of the 520 validation model in submodule. It does not overlap with the preset training dataset and is also composed of preprocessed input features and real labels.

[0174] Thus, the quantum-classical hybrid network also includes a training and evaluation module, which comprises a training submodule and an evaluation submodule. The training submodule iteratively trains the quantum-classical hybrid network using a pre-defined training dataset. The evaluation submodule evaluates the trained quantum-classical hybrid network using a pre-defined test dataset. In this way, the training submodule, through iterative training on the pre-defined training dataset, can improve the adaptability of the quantum-classical hybrid network to data classification tasks by updating the quantum circuit parameters and classical network parameters. The evaluation submodule, by evaluating the trained model on the test dataset, can verify the performance of the quantum-classical hybrid network on data not used in the training.

[0175] In some implementations, the training submodule 510 is configured as follows:

[0176] Based on the first preset propagation algorithm, the output of the quantum-classical hybrid network 1000 is determined according to the training data in the training dataset;

[0177] Based on a preset loss function, the difference between the output result and the label data in the training dataset is determined.

[0178] If the difference value is less than the preset difference value threshold, the training of the quantum-classical hybrid network 1000 is considered complete.

[0179] Specifically, the first pre-defined propagation algorithm refers to the forward propagation algorithm in the training process, which is the process of transferring training data from the input layer to the output layer and generating prediction results through the forward computation link of the quantum-classical hybrid network. Specifically, this first pre-defined propagation algorithm drives the training data to sequentially pass through the data preprocessing module 100, the quantum circuit construction module 200, the quantum measurement module 300, and the classical network module 400 to calculate the predicted output, enabling forward propagation from input features to model output and providing prediction results for subsequent loss calculations.

[0180] Training data refers to a single sample data in a pre-defined training dataset, including pre-processed numerical feature vectors.

[0181] The output result refers to the prediction result output by the classic network module 400 after the training data is processed by the first preset propagation algorithm (forward propagation).

[0182] The pre-defined loss function is a mathematical function used to quantify the difference between the model's output and the true labeled data; it is a core metric for measuring the model's prediction error. In some implementations, the pre-defined loss function can be the cross-entropy loss function, whose mathematical expression is: Where N is the number of samples input to the quantum-classical hybrid network 1000 during each training iteration. Let i be the true label of the i-th sample. This represents the probability distribution predicted by the quantum-classical hybrid network 1000. It should be noted that the design of the preset loss function must be compatible with the gradient calculation requirements of the second preset propagation algorithm to ensure that the preset loss function can be effectively utilized by the backpropagation algorithm to update the model parameters.

[0183] The second preset propagation algorithm refers to the backpropagation algorithm during training, which is the process of deriving the difference value (loss value) from the classical network module 400 to the quantum circuit module based on the preset loss function, and solving for the gradients of each trainable parameter (such as the parameterized quantum gate parameter ϕ in the quantum circuit and the weights of the classical network).

[0184] Label data refers to the real labeled data in the training dataset, serving as a benchmark for measuring the accuracy of model predictions.

[0185] The difference value refers to the loss value calculated using a preset loss function, which is the quantized difference between the output of the quantum-classical hybrid network 1000 and the labeled data. The magnitude of the difference value directly reflects the accuracy of the quantum-classical hybrid network 1000's predictions: the smaller the difference value, the closer the predicted results are to the true labels, and the better the performance of the quantum-classical hybrid network 1000; conversely, a larger difference value indicates that the quantum-classical hybrid network 1000 has a large error and needs further optimization.

[0186] In this way, the training submodule can determine the output of the quantum-classical hybrid network based on the training data in the training dataset using the first preset propagation algorithm. Then, based on a preset loss function determined by the second preset propagation algorithm, it determines the difference between the output and the labeled data in the training dataset. Finally, if the difference is less than a preset threshold, the quantum-classical hybrid network training is considered complete. This allows for targeted adjustment of the parameters of the quantum circuit and the classical network, gradually reducing prediction errors and improving the quantum-classical hybrid network's ability to fit the training data.

[0187] Please see Figure 11 This application provides a task processing method based on the aforementioned quantum-classical hybrid network 1000 for data classification. The method includes:

[0188] 01: Determine the numerical feature vector based on the input data classification task;

[0189] 02: Based on the preset data reloading strategy and preset feature importance score, the numerical feature vector is reloaded to construct the target parameterized quantum circuit;

[0190] 03: Determine the basis state probability distribution vector based on the target parameterized quantum circuit;

[0191] 04: Determine the data classification result based on the basis vector probability distribution vector.

[0192] This application also provides a server, including a memory and a processor. The method of this application can be implemented by the server of this application. Specifically, the memory stores a computer program, and the processor is used to determine numerical feature vectors based on the input data classification task, and to perform data reloading processing on the numerical feature vectors according to a preset data reloading strategy and a preset feature importance score to construct a target parameterized quantum circuit. The processor is also used to determine the basis state probability distribution vectors based on the target parameterized quantum circuit, and to determine the data classification result based on the basis state probability distribution vectors.

[0193] Specifically, the following uses the diamond quality classification task as an example to illustrate the task processing method provided in this application. First, based on the diamond quality classification task, features such as carat value, color, depth, and cut grade are extracted from the raw data and converted into numerical feature vectors after preprocessing.

[0194] Carat value (numerical feature) is standardized to a continuous value from 0.2 to 5.0. Color (non-numerical feature) is linearly mapped from DJ level to integers from 0 to 6 (D=0, J=6). That is, the color feature includes 7 levels from D to J, which are converted into integer values ​​from 0 to 6 using a linear mapping method, where D corresponds to the highest quality value of 0 and J corresponds to the lowest quality value of 6. Sharpness (non-numerical feature) is converted into discrete values ​​from 1 to 9 through ordinal encoding (FL=9, I1=1). That is, the sharpness feature includes 9 categories: I1, SI2, SI1, VS2, VS1, VVS2, VVS1, IF, and FL, which are converted into discrete values ​​from 1 to 9 through ordinal encoding. Cut grade features include five categories: Ideal, Premium, Very Good, Good, and Fair. After quality grading and reorganization, they are divided into two categories: Ideal and Premium are merged into the high-quality category (label 0), and the other three (Very Good, Good, Fair) are merged into the general quality category (label 1). Subsequently, the above values ​​need to be standardized based on a preset feature scaling algorithm to eliminate dimensional differences. The Z-score standardization method is used to normalize each feature dimension to make it conform to the numerical range requirements of quantum state encoding, thus determining the numerical feature vector. It should be noted that when classifying diamond quality, features such as depth, table, and size are also considered. For ease of explanation, the processing of these features by the data preprocessing module 100 will not be elaborated further.

[0195] Next, the quantum circuit construction module 200 constructs the target parameterized quantum circuit based on the importance scores of each feature (carat value = 0.9, color = 0.8, cut = 0.7) and the numerical feature vector obtained by the data preprocessing module 100.

[0196] Then, the quantum measurement module 300 executes the target parameterized quantum circuit, and the quantum measurement module 300 measures the final quantum state to obtain the probability distribution vector of the basis state (basis state probability distribution vector).

[0197] Finally, the basis state probability distribution vector is input into the classical network module 400, and the nonlinear combination of quantum features is learned to output the diamond quality classification result (such as "high quality" or "normal quality").

[0198] Thus, based on the input data classification task, numerical feature vectors are determined. Next, according to a preset data reloading strategy and a preset feature importance score, the numerical feature vectors are reloaded to construct a target parameterized quantum circuit. The preset data reloading strategy instructs the parameterized control mechanism of the quantum gates for reloading the numerical feature vectors, and the preset feature importance score indicates the score that measures the importance of the input features to the data classification task. Then, based on the target parameterized quantum circuit, the basis state probability distribution vector is determined. Finally, based on the basis state probability distribution vector, the data classification result is determined. In this way, by constructing a target parameterized quantum circuit based on a preset data reloading strategy and a preset feature importance score using the quantum circuit construction module, the superposition and entanglement properties of quantum computing can be utilized to enhance the capture of deep nonlinear patterns in the data, helping to improve the accuracy of complex data classification tasks. Furthermore, the quantum circuit construction module, based on the preset data reloading strategy and a preset feature importance score, enables important features to effectively influence the quantum state, achieving biased processing of key information and improving the utilization efficiency of key information in quantum-classical hybrid networks.

[0199] Please see Figure 12 In some implementations, step 02 (reloading the numerical feature vectors according to a preset data reloading strategy and a preset feature importance score to construct the target parameterized quantum circuit) includes:

[0200] 021: Based on the first preset mapping function, the numerical feature vector is mapped to determine the quantum rotation angle corresponding to the numerical feature vector;

[0201] 022: Based on the first preset quantum gate, quantum state encoding is performed according to the quantum rotation angle and numerical eigenvector to determine the initial quantum state.

[0202] In some embodiments, the processor is further configured to perform mapping processing on the numerical feature vector based on a first preset mapping function to determine the quantum rotation angle corresponding to the numerical feature vector, and to perform quantum state encoding based on the quantum rotation angle and the numerical feature vector according to a first preset quantum gate to determine the initial quantum state.

[0203] Specifically, let the preprocessed diamond numerical feature vector be X=[ , , ].in, This refers to the standardized carat value (e.g., 0.5 carats corresponds to a standardized value of 0.1). This is the color level mapping value (0 corresponds to level D). This is the resolution level mapping value (FL level corresponds to 9, which becomes 1 after normalization).

[0204] The first preset mapping function adopts This allows eigenvalues ​​to be mapped to the [0, π / 2] interval, adapting to the parameter range of quantum rotation gates. Continuing with the example above, ≈0.100 radians; =0 radians; =π / 2 radians.

[0205] The first preset quantum gate adopts The system uses three qubits, each initially in the state |0>, with an overall initial state of |000>. Based on the quantum rotation angles obtained above, an RX gate is applied to each qubit. Specifically, an RX gate is applied to the first qubit. ( )= ( Application of the second quantum bit ( )= ( Applications to the third quantum bit ( )= (π / 2). In this way, the original numerical feature information is injected into the quantum state, ultimately forming an initial quantum state containing carat value, color, and clarity information.

[0206] Thus, based on the first preset mapping function, the numerical feature vector is mapped to determine the corresponding quantum rotation angle. Next, based on the first preset quantum gate, quantum state encoding is performed according to the quantum rotation angle and the numerical feature vector to determine the initial quantum state. In this way, by converting the numerical feature vector into a quantum rotation angle through the first preset mapping function and then using the first preset quantum gate for quantum state encoding, the mapping from classical data to quantum state is completed, laying the foundation for subsequent data processing.

[0207] Please see Figure 13 In some implementations, step 02 (reloading the numerical feature vectors according to a preset data reloading strategy and a preset feature importance score to construct the target parameterized quantum circuit) includes:

[0208] 023: Based on the preset parameterized single-bit quantum gate and the preset entanglement gate, the initial quantum state is subjected to deep mapping processing to determine the first target quantum state.

[0209] In some implementations, the processor is also used to perform deep mapping processing on the initial quantum state based on a preset parameterized single-bit quantum gate and a preset entanglement gate to determine the first target quantum state.

[0210] Specifically, continuing the example above, each qubit in the initial quantum state is then subjected to a Hardmard gate (H) and an adjustable parameter. A single-qubit gate is constructed by cascading gates. Furthermore, CNOT gates are applied between adjacent qubit pairs (e.g., between the first and second qubits, and between the second and third qubits) to form an entangled structure with a fixed topology. Thus, the initial quantum state is processed by the first feature mapping layer 220 to determine the first target quantum state.

[0211] Please refer to the following: Figure 14 and Figure 15 , Figure 14 This is a schematic diagram of the quantum circuit for the feature mapping layer. Figure 15 This is a schematic diagram of a quantum circuit for a single-qubit unitary gate G. Among them, Figure 14 It includes a single-qubit unitary gate G, consisting of a Hardmard gate and adjustable parameters. Gate cascade configuration (e.g.) Figure 15 As shown in the figure, ϕ is a trainable parameter. Furthermore, Figure 13 It also includes CZ gates and CNOT gates to establish entanglement relationships between qubits.

[0212] Thus, based on preset parameterized single-qubit quantum gates and preset entanglement gates, a deep mapping process is performed on the initial quantum state to determine the first target quantum state. This deep mapping process of the initial quantum state through preset parameterized single-qubit quantum gates and preset entanglement gates further enriches the superposition and entanglement characteristics of the quantum state, enabling the obtained first target quantum state to more fully capture and characterize the complex nonlinear relationships in the data, thereby enhancing the expressive power of the quantum-classical hybrid network for data features.

[0213] Please see Figure 16 In some implementations, step 02 (reloading the numerical feature vectors according to a preset data reloading strategy and a preset feature importance score to construct the target parameterized quantum circuit) includes:

[0214] 024: Based on the second preset mapping function, and according to the preset feature importance score and the third numerical feature information in the initial quantum state, determine the quantum gate application probability corresponding to the third numerical feature information;

[0215] 025: Based on the application probability of quantum gates, the first target quantum state is subjected to bias processing according to the second preset quantum gate to determine the intermediate quantum state.

[0216] In some embodiments, the processor is further configured to determine the quantum gate application probability corresponding to the third numerical feature information based on a second preset mapping function, a preset feature importance score, and the third numerical feature information in the initial quantum state; and to determine an intermediate quantum state by performing biased processing on the first target quantum state according to the second preset quantum gate based on the quantum gate application probability.

[0217] Specifically, the preset feature importance scores for carat value, color, and sharpness are 0.9, 0.7, and 0.5, respectively. Based on the preset feature importance score for sharpness, the third qubit is processed. The third numerical feature information in the initial quantum state corresponds to the sharpness feature value, for example, a normalized value of 0.8.

[0218] First, the second preset mapping function is used. Determine the probability of applying the quantum gate. Here, w is set to 2 and b to 0. The value is 0.5, which is used in the calculation to obtain... ≈0.73. That is, the probability of applying the second preset quantum gate to the qubit corresponding to the clarity feature is 69%.

[0219] Next, the second preset quantum gate is the RZ gate, and the following operation is performed on the third qubit: the RZ gate is applied with a 73% probability, and it remains unchanged with a 27% probability. Finally, an intermediate quantum state is obtained.

[0220] Thus, based on the second preset mapping function, and according to the preset feature importance score and the third numerical feature information in the initial quantum state, the quantum gate application probability corresponding to the third numerical feature information is determined. Next, based on the quantum gate application probability, the first target quantum state is biased according to the second preset quantum gate to determine the intermediate quantum state. In this way, by using the preset mapping function and determining the quantum gate application probability based on the preset feature importance score, highly important features are more likely to influence the quantum state through the second preset quantum gate, thereby achieving biased processing of key features and enabling the quantum-classical hybrid network to efficiently utilize information important to the data classification task.

[0221] Please see Figure 17 In some implementations, step 02 (reloading the numerical feature vectors according to a preset data reloading strategy and a preset feature importance score to construct the target parameterized quantum circuit) includes:

[0222] 026: Based on the preset parameterized single-qubit quantum gate and the preset entanglement gate, perform deep mapping processing on the initial quantum state and the intermediate quantum state to determine the second target quantum state;

[0223] 027: Construct the target parameterized quantum circuit based on the second target quantum state.

[0224] In some implementations, the processor is further configured to perform deep mapping processing on the initial quantum state and intermediate quantum state based on preset parameterized single-qubit quantum gates and preset entanglement gates to determine a second target quantum state, and to construct a target parameterized quantum circuit based on the second target quantum state.

[0225] Specifically, the initial quantum state includes basic information such as carat value, color, and sharpness. The intermediate quantum state, after bias processing, enhances the expression of highly important features (such as sharpness).

[0226] First, based on the quantum circuit construction module 200, deep mapping processing is performed on the initial quantum state and the intermediate quantum state to determine the second target quantum state.

[0227] Next, based on the second target quantum state, a complete target parameterized quantum circuit is constructed.

[0228] Thus, based on preset parameterized single-qubit quantum gates and preset entanglement gates, a deep mapping process is performed on the initial quantum state and the intermediate quantum state to determine the second target quantum state. Then, based on the second target quantum state, a target parameterized quantum circuit is constructed. In this way, by using preset parameterized single-qubit quantum gates and preset entanglement gates to perform a deep mapping on the initial quantum state and the intermediate quantum state after data reloading, it is possible to further mine and integrate complex feature relationships in the data based on the existing quantum states, enhancing the quantum states' ability to capture deep nonlinear features of the data.

[0229] This application also provides a computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, it causes the one or more processors to perform the method of this application.

[0230] 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.

[0231] 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.

[0232] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions 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 depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.

[0233] 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 data classification apparatus based on a quantum-classical hybrid network, characterized by, The data classification device comprises a data preprocessing module, a quantum circuit construction module, a quantum measurement module and a classical network module. The data preprocessing module is configured to determine a numerical feature vector according to an input data classification task. The quantum circuit construction module comprises a feature input encoding layer, a first feature mapping layer, a data reloading layer and a second feature mapping layer. The feature input encoding layer is configured to: perform mapping processing on the numerical feature vector based on a first preset mapping function to determine a quantum rotation angle corresponding to the numerical feature vector; and perform quantum state encoding on the numerical feature vector based on a first preset quantum gate according to the quantum rotation angle to determine an initial quantum state. The first feature mapping layer is configured to: perform deep mapping processing on the initial quantum state based on a preset parameterized single-bit quantum gate and a preset entanglement gate to determine a first target quantum state. The data reloading layer is configured to: multiplex third numerical feature information in the initial quantum state based on a second preset mapping function according to a preset feature importance score to determine a quantum gate application probability corresponding to the third numerical feature information; and perform bias processing on the first target quantum state based on a second preset quantum gate according to the quantum gate application probability to determine an intermediate quantum state, wherein the preset feature importance score is used to indicate a score measuring the importance of input features to the data classification task. The second feature mapping layer is configured to: perform deep mapping processing on the initial quantum state and the intermediate quantum state based on a preset parameterized single-bit quantum gate and a preset entanglement gate to determine a second target quantum state. The quantum circuit construction module is configured to construct a target parameterized quantum circuit according to the second target quantum state. The quantum measurement module is configured to determine a basis state probability distribution vector according to the target parameterized quantum circuit. The classical network module is configured to determine a data classification result according to the basis state probability distribution vector.

2. The data classification apparatus according to claim 1, wherein The data preprocessing module is configured to: map non-numerical feature information in the data classification task based on a first preset encoding algorithm to generate first numerical feature information; process second numerical feature information and the first numerical feature information in the data classification task based on a preset feature scaling algorithm to determine the numerical feature vector.

3. The data classification apparatus of claim 1, wherein The quantum-classical hybrid network further comprises a training evaluation module, and the training evaluation module comprises a training submodule and an evaluation submodule. The training submodule is configured to iteratively train the quantum-classical hybrid network according to a preset training data set. The evaluation submodule is configured to evaluate the trained quantum-classical hybrid network according to a preset test data set.

4. The data sorting device of claim 3, wherein, The training submodule is configured to: determine an output result of the quantum-classical hybrid network based on a first preset propagation algorithm according to training data in the training data set; determine a difference value of the output result and label data in the training data set based on a preset loss function, the preset loss function being determined based on a second preset propagation algorithm; determine that the quantum-classical hybrid network is trained in a case where the difference value is less than a preset difference value threshold.

5. A task processing method characterized by, The processing method is based on the data classification device of any one of claims 1-4, and the method comprises: determining a numerical feature vector according to an input data classification task; performing data reloading processing on the numerical feature vector according to a preset data reloading strategy and a preset feature importance score to construct a target parameterized quantum circuit, wherein the preset data reloading strategy is used to indicate a quantum gate parameterization control mechanism for the data reloading processing on the numerical feature vector, and the preset feature importance score is used to indicate a score for measuring the importance of input features to the data classification task; determining a base vector state probability distribution vector according to the target parameterized quantum circuit; determining a data classification result according to the base vector state probability distribution vector.

6. The method of claim 5, wherein, The data reloading processing on the numerical feature vector according to the preset data reloading strategy and the preset feature importance score to construct the target parameterized quantum circuit comprises: performing mapping processing on the numerical feature vector based on a first preset mapping function to determine a quantum rotation angle corresponding to the numerical feature vector; performing quantum state encoding on the quantum rotation angle and the numerical feature vector based on a first preset quantum gate to determine an initial quantum state.

7. The method of claim 6, wherein, The data reloading processing on the numerical feature vector according to the preset data reloading strategy and the preset feature importance score to construct the target parameterized quantum circuit comprises: performing deep mapping processing on the initial quantum state based on a preset parameterized single-bit quantum gate and a preset entanglement gate to determine a first target quantum state.

8. The method of claim 7, wherein, The data reloading processing on the numerical feature vector according to the preset data reloading strategy and the preset feature importance score to construct the target parameterized quantum circuit comprises: multiplexing third numerical feature information in the initial quantum state based on a second preset mapping function according to the preset feature importance score to determine a quantum gate application probability corresponding to the third numerical feature information; performing bias processing on the first target quantum state based on a second preset quantum gate according to the quantum gate application probability to determine an intermediate quantum state.

9. The method of claim 8, wherein, The data reloading processing on the numerical feature vector according to the preset data reloading strategy and the preset feature importance score to construct the target parameterized quantum circuit comprises: performing deep mapping processing on the initial quantum state and the intermediate quantum state based on a preset parameterized single-bit quantum gate and a preset entanglement gate to determine a second target quantum state; constructing the target parameterized quantum circuit according to the second target quantum state.

Citation Information

Patent Citations

  • Image multi-classification method based on hybrid quantum neural network, electronic equipment and storage medium

    CN118823483A

  • Vehicle-mounted radar signal interference noise reduction method based on quantum convolution region proposal network

    CN120161419A