Quantum-classical hybrid image classification method and system based on hardware performance adaptation

By constructing a hardware-adaptive quantum-classical hybrid neural network and dynamically adjusting model parameters and image dimensionality reduction, the efficiency and accuracy issues of image classification under resource-constrained conditions of quantum neural networks are solved, achieving more efficient image feature extraction and classification.

CN120997597BActive Publication Date: 2026-01-06TIANJIN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511510882.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-01-06
Estimated Expiration
2045-10-22

AI Technical Summary

Technical Problem

Existing quantum neural networks face problems such as high resource consumption and loss of important information when processing large images, and existing dimensionality reduction strategies cannot be dynamically adjusted, affecting the model's classification performance and generalization ability.

Method used

We construct a quantum-classical hybrid neural network based on hardware performance adaptation. By using quantum hardware resource information and training performance feedback through a joint parameter tuning controller, we dynamically adjust model parameters and image dimensionality reduction, forming an end-to-end closed-loop optimization mechanism.

Benefits of technology

It improves image classification efficiency and accuracy, adapts to different hardware resources and training task requirements, and significantly enhances the model's classification performance and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997597B_ABST
    Figure CN120997597B_ABST
Patent Text Reader

Abstract

The application discloses a kind of quantum classical hybrid image classification method and system based on hardware performance self-adaption, belong to artificial intelligence technical field.The method includes constructing quantum classical hybrid neural network;Image dataset is used to train the quantum classical hybrid neural network, and the model parameters of the quantum classical hybrid neural network are adjusted and optimized using joint parameter tuning controller in the training process, the joint parameter tuning controller inputs current quantum hardware resource information and the training performance feedback index of the quantum classical hybrid neural network, and outputs the model parameters of the quantum classical hybrid neural network after adjustment and optimization;Image classification is carried out using the trained quantum classical hybrid neural network.The application avoids the problem of relying on manual setting and fixed parameters in traditional model by dynamically adjusting model parameters, effectively improves classification performance and model generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of interdisciplinary integration of artificial intelligence, computer vision and quantum machine learning, and more specifically to a quantum-classical hybrid image classification method and system based on hardware performance adaptation. Background Technology

[0002] With the continuous advancement of deep learning, Convolutional Neural Networks (CNNs) have been widely applied to tasks such as image recognition, image classification, and object detection, achieving remarkable results in multiple fields. However, traditional neural network models such as CNNs often rely on a large number of parameters and high-performance computing resources. Especially when processing large-sized images or performing large-scale training tasks, the consumption of computing power and memory is extremely significant, limiting their application efficiency in resource-constrained scenarios.

[0003] In recent years, with the rapid development of quantum computing technology, quantum machine learning (QML) has gradually become an important research direction in the field of artificial intelligence. In particular, the successive proposals of quantum neural networks (QNN) and quantum-classical hybrid neural network models have provided new theoretical systems and practical pathways for performing machine learning tasks on current noisy intermediate-scale quantum devices (NISQ). Numerous studies have shown that QML models have significant potential in nonlinear mapping of high-dimensional feature spaces, polymorphism modeling, and enhanced expressive power, and have been widely applied in computer vision fields such as image recognition, medical image analysis, and remote sensing image processing.

[0004] However, limitations in current quantum computing hardware, such as the limited number of qubits, insufficient fidelity of quantum gate operations, and short coherence time of qubits, make large-scale qubit systems and deep quantum circuit models difficult to realize. This poses numerous challenges for quantum neural networks when processing large images. To meet current hardware requirements, images typically require dimensionality compression before being input into the quantum module to reduce qubit resource consumption. However, existing approaches often employ static, fixed-dimensional dimensionality reduction strategies, failing to dynamically adjust the compression scale for different image features or quantum resources. This can lead to the loss of important information, thus affecting the model's final classification performance and generalization ability.

[0005] Therefore, there is an urgent need to construct a method that can flexibly adapt to quantum resources and combine the quantum classical hybrid neural network structure with the quantum resource requirements to dynamically adjust the compression scale for image compression and preprocessing, and to complete efficient image feature extraction and classification prediction while preserving the image's expressive power as much as possible. Summary of the Invention

[0006] In view of this, the present invention provides a quantum-classical hybrid image classification method and system based on hardware performance adaptation, which is used to at least solve some of the technical problems in the background art.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] This invention first discloses a quantum-classical hybrid image classification method based on hardware performance adaptation, comprising the following steps:

[0009] Constructing a quantum-classical hybrid neural network;

[0010] The quantum classical hybrid neural network is trained using a preprocessed image dataset. During the training process, a joint parameter tuning controller is used to adjust and optimize the model parameters of the quantum classical hybrid neural network. The joint parameter tuning controller takes into account the current quantum hardware resource information and the training performance feedback index of the quantum classical hybrid neural network, and outputs the adjusted and optimized model parameters of the quantum classical hybrid neural network.

[0011] Image classification is performed using a trained quantum classical hybrid neural network.

[0012] Furthermore, in the training step of the quantum classical hybrid neural network, the current quantum hardware resource information includes the number of qubits of the quantum computer, the quantum gate operation fidelity, the connection structure between qubits, the maximum supported quantum depth, and the readout fidelity. The connection structure includes a topological adjacency list.

[0013] Furthermore, in the training step of the quantum classical hybrid neural network, the training performance feedback indicators of the quantum classical hybrid neural network include the classification accuracy, training loss function value, and model convergence rate of the quantum classical hybrid neural network.

[0014] Furthermore, in the training step of the quantum classical hybrid neural network, the model parameters of the quantum classical hybrid neural network include: network structure depth, quantum encoding dimension, quantum entanglement structure, number of quantum circuit layers, quantum encoding method, and activation function type.

[0015] Furthermore, in the step of constructing a quantum classical hybrid neural network, the constructed quantum classical hybrid neural network includes an input layer, a variable quantum circuit, and an output prediction layer connected in sequence.

[0016] The input layer includes a classic fully connected layer or a convolutional layer, which is used to extract features from the preprocessed image data and encode the extracted image features into quantum states.

[0017] The variable quantum circuit is used to measure the encoded quantum state data;

[0018] The output prediction layer includes a fully connected layer and a Softmax activation function, which are used to generate the predicted probability for each image category based on the measurement results of the quantum state data.

[0019] Furthermore, the model parameters of the quantum-classical hybrid neural network are adjusted and optimized using a joint parameter tuning controller, specifically including:

[0020] S1. Receive current quantum hardware resource information and training performance feedback metrics for quantum-classical hybrid neural networks Where Q represents the number of currently available qubits, Indicates the fidelity of quantum gate operations. This represents the connection structure between qubits. Indicates the maximum supported quantum circuit depth. Indicates readout fidelity; Acc represents the model classification accuracy during the training phase; and L represents the training loss function value. Indicates the convergence rate;

[0021] S2. Generate a parameter search space Θ based on the parameters of the quantum-classical hybrid neural network model to be optimized. The parameter search space Θ includes the network structure depth, quantum encoding dimension, quantum entanglement structure, number of quantum circuit layers, quantum encoding method, and activation function type. Based on the current quantum hardware resource information H, determine the hardware constraints that must be satisfied for each search.

[0022] Required number of qubits ≤ Q;

[0023] Number of circuit layers ≤ ;

[0024] Required quantum gate operation fidelity ≥ ;

[0025] Required readout fidelity ≥ ;

[0026] The interconnection structure between qubits conforms to the topology supported by quantum hardware. ;

[0027] S3. Constructing an objective evaluation function based on the training performance feedback index M of a quantum-classical hybrid neural network:

[0028] Score = α * Acc - β * L - γ *

[0029] Where α, β, and γ are the corresponding weighting coefficients;

[0030] S4. Search for the target evaluation function within the generated parameter search space Θ, and use the combination of quantum classical hybrid neural network model parameters that makes the target evaluation function obtain the optimal value as the parameters of the whole optimized quantum classical hybrid neural network model.

[0031] Furthermore, the training step of the quantum-classical hybrid neural network also includes preprocessing the image dataset, specifically including:

[0032] Normalize each image in the image dataset;

[0033] The image after normalization is compressed to reduce its dimension so that the dimension of the image is the same as the quantum encoding dimension of the quantum classical hybrid neural network.

[0034] Another aspect of this invention discloses a quantum-classical hybrid image classification system based on hardware performance adaptation, comprising:

[0035] The model building module is used to construct quantum-classical hybrid neural networks;

[0036] The model training module is used to train the quantum classical hybrid neural network using an image dataset. During the training process, a joint parameter tuning controller is used to adjust and optimize the model parameters of the quantum classical hybrid neural network. The joint parameter tuning controller takes into account the current quantum hardware resource information and the training performance feedback index of the quantum classical hybrid neural network, and outputs the adjusted and optimized model parameters of the quantum classical hybrid neural network.

[0037] The image classification module is used to classify images using a trained quantum-classical hybrid neural network.

[0038] Preferably, in the model training module, the current quantum hardware resource information includes the number of qubits of the quantum computer, the quantum gate operation fidelity, the connection structure between qubits, the maximum supported quantum depth, and the readout fidelity.

[0039] Preferably, in the model training module, the training performance feedback metrics of the quantum classical hybrid neural network include the classification accuracy, training loss function value, and model convergence rate of the quantum classical hybrid neural network.

[0040] Preferably, the model parameters of the quantum classical hybrid neural network include quantum encoding dimension, structural depth of the quantum classical hybrid neural network, quantum entanglement structure, number of quantum circuit layers, quantum encoding method, and activation function type.

[0041] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a quantum-classical hybrid image classification method and system based on hardware performance adaptation, which has the following beneficial effects:

[0042] First, this invention introduces an automated structural adjustment mechanism based on quantum hardware resource awareness. By interfacing with a real quantum computing device and reading its existing quantum hardware resource information (number of qubits, gate fidelity, connectivity information), a joint parameter tuning controller can optimize and adjust the image dimensionality reduction parameters and quantum neural network structure parameters using a grid search strategy in the early stages of modeling. Through grid search, the controller gradually tests all possible parameter combinations within a preset parameter space, thereby finding the optimal configuration best suited to the current hardware resources. This ensures that the model structure always matches the hardware resource capabilities, improving system operating efficiency.

[0043] Secondly, the joint parameter tuning controller disclosed in this invention not only optimizes initially through grid search but also automatically adjusts based on real-time feedback during training (such as classification accuracy and loss function values). By utilizing a real-time training feedback closed-loop mechanism, the controller can dynamically adjust the dimensionality reduction dimension and quantum network parameters during training, achieving dynamic iterative optimization. This feedback-based optimization mechanism effectively avoids the problems of relying on manual setting and fixed parameters in traditional models, significantly improving classification performance and the model's generalization ability, enabling quantum-classical hybrid neural networks to better adapt to the needs of different hardware resources and training tasks.

[0044] Furthermore, this invention constructs an end-to-end integrated image processing system, forming a complete closed-loop image recognition process from image input, dimensionality reduction, patch extraction and quantum encoding, to quantum-classical hybrid neural network inference and output results. All modules support dynamic adjustment and combination replacement, and have good scalability and module compatibility.

[0045] Overall, this invention not only significantly improves the efficiency and accuracy of image classification under current medium-scale quantum computing conditions, but also provides a feasible architecture and optimization strategy for the future deployment of larger-scale quantum neural networks, and has significant value for technology promotion and industrial application potential. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0047] Figure 1 This is a schematic diagram of the overall process of the method provided in the embodiment of the present invention.

[0048] Figure 2 A schematic diagram of a joint parameter tuning controller provided for an embodiment of the invention.

[0049] Figure 3 A schematic diagram of a variable quantum circuit structure provided for an embodiment of the invention.

[0050] Figure 4 A schematic diagram of the overall structure of a quantum classical hybrid neural network provided for an embodiment of the invention. Detailed Implementation

[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0052] refer to Figure 1 As shown, the hardware performance-adaptive quantum-classical hybrid image classification method disclosed in this invention efficiently solves the core contradiction of "high image dimensionality vs. limited quantum computing resources" through the following steps:

[0053] Step 1. Image Input and Dataset Construction:

[0054] The user inputs RGB image data, and the system performs preprocessing operations such as standardization and dividing the data into training and validation sets.

[0055] Step 2. Hardware Information Acquisition:

[0056] The software reads parameters of the docked real quantum computer (such as qubits, fidelity, connection diagram, etc.) through an interface; this information serves as the input basis for subsequent structural adjustments.

[0057] Step 3. Dynamic image dimensionality reduction:

[0058] Image data is processed by an adjustable dimensionality reduction module (such as Lanczos) to compress the high-dimensional image to the dimension required to match the quantum input. The dimensionality reduction dimension K is automatically set by the subsequent parameter tuning controller.

[0059] Step 4. Patch Extraction and Quantum Encoding:

[0060] The image is divided into multiple patches, and each patch is encoded as a quantum state. Amplitude encoding, angle encoding, and other methods are used to convert it into an input format acceptable to quantum neural networks.

[0061] Step 5. Quantum-classical hybrid neural network inference:

[0062] The patch input is fed into a hybrid neural network consisting of classical layers and quantum circuits. The parameters in this network structure (such as the number of quantum circuit layers k′) are also limited by current quantum hardware resources.

[0063] Step 6. Model Training and Evaluation:

[0064] The system performs forward propagation and backward gradient updates on the training set to evaluate training accuracy and loss. The output performance metrics are used for parameter tuning.

[0065] Step 7. Joint parameter tuning controller optimization:

[0066] The joint parameter tuning controller adjusts the dimensionality reduction dimension K and the quantum-classical hybrid neural network structure parameters k′ based on training feedback and hardware resources. This achieves multi-round system-level optimization until the model performance reaches its optimal level.

[0067] Step 8. Final Model Deployment and Inference:

[0068] The finalized network structure and parameters are used to classify images, and the identified category is output as the result.

[0069] The image classification method proposed in this invention combines an image adaptive dimensionality reduction mechanism with a quantum classical hybrid neural network. Its core lies in introducing a hardware resource-aware structural adjustment mechanism and realizing end-to-end joint optimization from the input image to the classification result.

[0070] In one specific embodiment, this is achieved in the following way:

[0071] A modular and scalable image classification system is constructed to implement the hardware performance-adaptive quantum-classical hybrid image classification method described in this invention. The overall structure of this image classification system consists of the following functional modules:

[0072] Image input and preprocessing module: Receives standard RGB images (such as the CIFAR-10 dataset);

[0073] Image dimensionality reduction module: compresses high-dimensional images to adapt to quantum computing resources (Lanczos method is used in this embodiment);

[0074] Patch partitioning and quantum coding module: Divides the image into several small patches and performs quantum state mapping;

[0075] Quantum-classical hybrid neural network module: integrates classical neural networks and quantum circuits;

[0076] Hardware information reading module: Acquires current quantum hardware resource information;

[0077] Joint parameter tuning controller module: dynamically adjusts dimensionality reduction parameters, quantum structure, and encoding method based on hardware resources and training feedback;

[0078] Model training and output module: Trains the model and outputs the image classification results.

[0079] The system supports parameter transfer and control feedback between modules, enabling closed-loop optimization of the entire process.

[0080] In one specific embodiment, to address the problem of not being able to directly process high-dimensional images under the constraints of limited quantum computing resources, the image dimensionality reduction module of this invention designs a dynamically adjustable image dimensionality reduction strategy. This strategy automatically determines the optimal dimensionality reduction dimension and compresses the input data while balancing image feature preservation and hardware adaptability. The image dimensionality reduction module supports multiple implementation methods, including but not limited to PCA (Principal Component Analysis), Autoencoder, SVD truncation, and the Lanczos method. Specific algorithms can be flexibly switched according to system deployment requirements.

[0081] In the image dimensionality reduction module, the input image I∈R H×W×C (e.g., 32×32×3) is first flattened into a high-dimensional vector, and then subjected to a dimension reduction function D. k Convert to low-dimensional representation: ;

[0082] The dimension reduction dimension K is not a fixed constant, but is dynamically calculated and generated by the joint parameter tuning controller module based on the current quantum computing hardware capabilities and training feedback. The dimension reduction dimension calculation function is expressed as follows: ;

[0083] Where Q represents the number of currently available qubits, F represents the quantum gate operation fidelity, C represents the connection structure between qubits, Acc represents the model classification accuracy during the training phase, L represents the training loss function value, and F reduce This represents the dimensionality reduction calculation function within the system. This dimensionality reduction calculation function F... reduceTaking into account both current hardware conditions and model learning performance, the optimal dimensionality reduction dimension K suitable for the current resource conditions is output. This dynamic adjustment process is continuously updated during model training, enabling the dimensionality reduction mechanism to have feedback closed-loop optimization capabilities. The dimensionality-reduced feature vector I... K The data will be divided into multiple patches, which will then be input into the subsequent quantum encoding module. The patch size can also be automatically derived by the controller based on K, enabling a hardware-software collaborative and end-to-end adapted image classification processing flow.

[0084] In one specific embodiment, to achieve adaptive adjustment of the system structure and maximize the utilization of quantum resources, the image classification system disclosed in this invention also introduces a quantum hardware sensing module. This module is used to acquire and analyze the core performance parameters of the current quantum computing device in real time, and guide the system structure configuration accordingly. The quantum hardware parameters collected by the system form the input vector:

[0085] ;

[0086] in, Indicates the maximum supported quantum circuit depth; This indicates the readout fidelity. The above hardware parameters will be input into the system's adaptive structure generation function:

[0087] ;

[0088] Where K represents the image dimensionality reduction dimension, P represents the patch size, E represents the quantum encoding method (such as amplitude encoding, angle encoding, etc.), and k′ represents the quantum neural network structure parameters (such as the number of layers, etc.). This function This can be achieved through rule mapping and other methods. Its core objective is to configure the optimal computing structure under the current hardware resource constraints, so that the subsequent model has high efficiency and robustness.

[0089] To achieve performance optimization and adaptive parameter adjustment of the overall system structure, this invention designs a joint parameter tuning controller module, which is responsible for integrating hardware information and training feedback results to dynamically optimize network structure parameters and form a closed-loop control mechanism of "perception-feedback-tuning".

[0090] like Figure 2 As shown, the joint parameter tuning controller in this invention receives two main inputs: hardware parameter information H and training performance feedback index M.

[0091] Where R represents the convergence rate.

[0092] Controller internal parameter generation function: ;

[0093] Here, Θ represents the set of other trainable or configurable hyperparameters (such as the number of patches, encoding strategy, etc.). This function It can be implemented based on heuristic strategies, grid search, empirical rules, or reinforcement learning systems. The controller periodically determines whether to trigger parameter adjustments or maintain the current structure to continue optimization based on the training results, so that the entire system achieves a dynamic balance between training convergence and structure fit.

[0094] In one specific implementation, the joint parameter tuning controller adjusts and optimizes the model parameters of the quantum-classical hybrid neural network, specifically including the following steps:

[0095] S1. Receive current quantum hardware resource information and training performance feedback metrics for quantum-classical hybrid neural networks Where Q represents the number of currently available qubits, Indicates the fidelity of quantum gate operations. This represents the connection structure between qubits. Indicates the maximum supported quantum circuit depth. Indicates readout fidelity; Acc represents the model classification accuracy during the training phase; and L represents the training loss function value. Indicates the convergence rate;

[0096] S2. Generate a parameter search space Θ based on the parameters of the quantum-classical hybrid neural network model to be optimized. The parameter search space Θ includes the network structure depth, quantum encoding dimension, quantum entanglement structure, number of quantum circuit layers, quantum encoding method, and activation function type. Based on the current quantum hardware resource information H, determine the hardware constraints that must be satisfied for each search.

[0097] Required number of qubits ≤ Q;

[0098] Number of circuit layers ≤ ;

[0099] Required quantum gate operation fidelity ≥ ;

[0100] Required readout fidelity ≥ ;

[0101] The interconnection structure between qubits conforms to the topology supported by quantum hardware. ;

[0102] S3. Constructing an objective evaluation function based on the training performance feedback index M of a quantum-classical hybrid neural network:

[0103] Score = α * Acc - β * L - γ *

[0104] Where α, β, and γ are the corresponding weighting coefficients;

[0105] S4. Search for the target evaluation function within the generated parameter search space Θ, and use the combination of quantum classical hybrid neural network model parameters that makes the target evaluation function obtain the optimal value as the parameters of the whole optimized quantum classical hybrid neural network model.

[0106] In this invention, the quantum-classical hybrid neural network module combines the feature extraction capability of classical neural networks with the expressive capability of quantum circuits, specifically including:

[0107] (1) Pre-classical layer (such as convolutional layer or MLP): used to further process the reduced-dimensional image features, such as feature mapping, compression or nonlinear transformation, to prepare input vectors for subsequent quantum coding;

[0108] (2) Quantum Coding and Variable Quantum Circuit (VQC): In the preprocessing stage, the image has been divided into several patches and dimensionality reduction has been completed. The feature vector of each patch will be mapped to a quantum state through a specific quantum coding method (such as angle coding). The encoded quantum state is input into the VQC containing tunable parameter quantum gates and entanglement structure for processing;

[0109] The variable quantum circuit mentioned in this invention is a quantum computing circuit structure with adjustable parameters, consisting of parameterized quantum gates and entanglement operations. Its structure can be dynamically adjusted according to training feedback. In one specific embodiment, the variable quantum circuit structure diagram is as follows: Figure 3 As shown in the diagram, RX(θ) represents the quantum encoding gate, which encodes classical data into a quantum state by rotating the qubit around the X-axis. H is the Hadamard gate, which converts the qubit from the ground state |0> or |1> to an equally probable superposition state. The RY gate represents the rotation gate around the Y-axis, which rotates the qubit to adjust its phase. Z is the Pauli-Z gate, which applies a phase flip to the qubit, reversing the phase of the |1> state while leaving the |0> state unchanged. M represents the measurement operation of the qubit, typically used to extract classical information from the quantum state.

[0110] (3) Quantum measurement: Each qubit is measured, and its expected value is calculated. The measurement results are used as the real-valued eigenvectors of the quantum network output;

[0111] (4) Post-classical layer and classification output: The measured feature vectors are input into the post-fully connected layer, and finally the predicted probability of each class of images is generated through the softmax activation function to achieve classification output.

[0112] The overall structure of the quantum classical hybrid neural network disclosed in this invention is as follows: Figure 4 As shown.

[0113] Furthermore, the joint parameter tuning controller in this invention can dynamically adjust key parameters in the network, such as the depth of the variable quantum circuit, the mapping method between qubits and patches, and the measurement strategy, based on quantum hardware resource information and training feedback indicators, thereby ensuring the feasibility and optimization of the network structure under current NISQ hardware conditions.

[0114] Implementation Case: Using Lanczos for Dimensionality Reduction of the CIFAR-10 Dataset

[0115] This embodiment is based on the publicly available image classification dataset CIFAR-10, which contains 10 classes of natural images, 6000 images per class, with a resolution of 32×32 pixels and three-channel RGB input.

[0116] Step 1: Image Data Loading and Preprocessing

[0117] Load the CIFAR-10 dataset using Python + PyTorch; standardize the images; and divide them into a training set (50,000 images) and a test set (10,000 images).

[0118] Step 2: Apply the Lanczos dimensionality reduction algorithm for image compression.

[0119] Each CIFAR-10 image is a 32×32×3=3072-dimensional vector; each image is flattened into a one-dimensional vector; the image feature matrix is ​​reduced in dimensionality using the Lanczos method (an approximation of eigenvalue decomposition); the first K feature vectors are retained to construct a compressed space, and the value of K is dynamically set by the controller (e.g., initially K=16); the reduced-dimensional vector is output for subsequent encoding.

[0120] Step 3: Patch Partitioning and Quantum State Encoding

[0121] The dimensionality-reduced image vector is divided into multiple patches of equal length; each patch is treated as an independent data unit; an angle encoding method is used to map each patch to a quantum state consisting of n qubits; the encoding method ensures normalization and satisfies the quantum state condition.

[0122] Step 4: Construct a quantum-classical hybrid neural network

[0123] The neural network uses classical fully connected or convolutional layers for initial processing in the front end; a variable quantum circuit (VQC) is embedded in the middle, with each quantum circuit processing one encoded patch; the quantum circuit includes rotation gates, entanglement gates, etc., and the structural depth k′ is set by a joint parameter tuning controller; finally, the output layer performs classification prediction.

[0124] Step 5: Controller commissioning and hardware resource adaptation

[0125] The system reads the hardware resources of the connected quantum chip (or quantum simulator): such as the number of qubits of the IBM Q machine (e.g., 7), fidelity (97%), and topology (linear or fully connected); the joint parameter tuning controller calculates the currently acceptable dimensionality reduction dimension K and quantum network depth k′; receives training evaluation feedback (accuracy, loss); adjusts K and k′, and enters the next round of iterative training; until the model performance reaches convergence.

[0126] Step 6: Testing and Classification Output

[0127] Perform model inference on the test set; obtain the image category output (such as "cat", "airplane", "car" etc.); the system records the final parameter settings, inference time, resource usage and other information.

[0128] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0129] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A quantum-classical hybrid image classification method based on hardware performance adaptation, characterized in that, The method comprises the following steps: constructing a quantum-classical hybrid neural network; training the quantum-classical hybrid neural network by using a preprocessed image dataset, and adjusting and optimizing model parameters of the quantum-classical hybrid neural network by using a joint parameter adjustment controller during the training process, and the adjusting and optimizing specifically comprises: S1. receiving current quantum hardware resource information and the training performance feedback index of the quantum-classical hybrid neural network wherein Q represents the current available number of quantum bits, represents the quantum gate operation fidelity, represents the connection structure between quantum bits, represents the maximum quantum circuit depth that can be supported, represents the readout fidelity; Acc represents the model classification accuracy in the training stage, and L represents the training loss function value, represents the convergence rate; S2. generating a parameter search space Θ based on model parameters of the quantum-classical hybrid neural network to be optimized, the parameter search space Θ comprising a network structure depth, a quantum encoding dimension, a quantum entanglement structure, a quantum circuit layer number, a quantum encoding mode, and an activation function type, and determining hardware constraint conditions to be met in each search according to current quantum hardware resource information H: a required number of quantum bits ≤ Q; Circuit layer number ≤ ; The required quantum gate operation fidelity ≥ ; Required readout fidelity ≥ ; Connection structures between qubits conform to topologies supported by quantum hardware ; S3. constructing a target evaluation function based on a training performance feedback index M of the quantum-classical hybrid neural network: Score = a * Acc - β * L - γ ; wherein α, β, and γ are corresponding weight coefficients; S4. searching for the target evaluation function in the generated parameter search space Θ, and taking a combination of model parameters of the quantum-classical hybrid neural network that makes the target evaluation function obtain an optimal value as the optimized model parameters of the quantum-classical hybrid neural network; performing image classification by using the trained quantum-classical hybrid neural network.

2. The hardware performance adaptive quantum-classical hybrid image classification method according to claim 1, characterized in that, The connection structure between the quantum bits comprises a topological relationship adjacency table.

3. The hardware performance adaptive quantum-classical hybrid image classification method according to claim 1, wherein, In the step of constructing the quantum-classical hybrid neural network, the quantum-classical hybrid neural network comprises an input layer, a variational quantum circuit, and an output prediction layer connected in sequence. The input layer comprises a classical fully connected layer or a convolutional layer, is configured to perform feature extraction on the preprocessed image data, and encode the extracted image features into a quantum state; the variational quantum circuit is configured to perform measurement on the encoded quantum state data; the output prediction layer comprises a fully connected layer and a Softmax activation function, and is configured to generate a prediction probability of each image category according to a measurement result of the quantum state data.

4. The hardware performance adaptive quantum-classical hybrid image classification method according to claim 1, characterized in that, The image dataset is preprocessed, and the preprocessing specifically comprises: performing a normalization operation on each image in the image dataset; compressing the normalized image by using a dimension reduction algorithm, so that a feature dimension of the image is consistent with a quantum encoding dimension of the quantum-classical hybrid neural network. 5.A hardware performance self-adaptive quantum-classical hybrid image classification system, characterized in that, The method comprises the following steps: a model construction module configured to construct a quantum-classical hybrid neural network; a model training module configured to train the quantum-classical hybrid neural network by using an image dataset, and adjust and optimize model parameters of the quantum-classical hybrid neural network by using a joint parameter adjustment controller during the training process, and the adjusting and optimizing specifically comprises: S1. receiving current quantum hardware resource information and the training performance feedback index of the quantum-classical hybrid neural network wherein Q represents the current available number of quantum bits, represents the quantum gate operation fidelity, represents the connection structure between quantum bits, represents the maximum quantum circuit depth that can be supported, represents the readout fidelity; Acc represents the model classification accuracy in the training stage, and L represents the training loss function value, represents the convergence rate; S2. generating a parameter search space Θ based on model parameters of the quantum-classical hybrid neural network to be optimized, the parameter search space Θ comprising a network structure depth, a quantum encoding dimension, a quantum entanglement structure, a quantum circuit layer number, a quantum encoding mode, and an activation function type, and determining hardware constraint conditions to be met in each search according to current quantum hardware resource information H: a required number of quantum bits ≤ Q; Circuit layer number ≤ ; The required quantum gate operation fidelity ≥ ; Required readout fidelity ≥ ; Connection structures between qubits conform to topologies supported by quantum hardware ; S3. constructing a target evaluation function based on a training performance feedback index M of the quantum-classical hybrid neural network: Score = a * Acc - β * L - γ ; wherein α, β, and γ are corresponding weight coefficients; S4. search in the generated parameter search space Θ for the target evaluation function, and obtain a quantum-classical hybrid neural network model parameter combination that makes the target evaluation function optimal as an optimized quantum-classical hybrid neural network model parameter; an image classification module configured to perform image classification by using the trained quantum-classical hybrid neural network.

Citation Information

Patent Citations

  • Image classification method of quantum neural network based on error mitigation

    CN116310473A

  • Image data classification method and device of quantum-classical hybrid machine learning model based on lightweight quantum circuit

    CN117649560A