Quantum classical mixed image classification method and system based on hardware performance self-adaption

By introducing a hardware-adaptive quantum-classical hybrid image classification method and dynamically adjusting the parameters of the quantum neural network, the problem of classification efficiency and accuracy of large-size images under the constraint of quantum resources is solved, and efficient image feature extraction and classification are achieved.

CN120997597AActive Publication Date: 2025-11-21TIANJIN UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing quantum neural networks face problems of excessive resource consumption and information discard when processing large images. Traditional fixed-dimensionality reduction strategies fail to adjust dynamically, affecting the model's classification performance and generalization ability.

Method used

A hardware-adaptive quantum-classical hybrid image classification method is adopted. By using quantum hardware resource information and training performance feedback through a joint parameter tuning controller, the model parameters of the quantum-classical hybrid neural network, including network structure depth and quantum encoding dimension, are dynamically adjusted to achieve dynamic image compression and preprocessing.

Benefits of technology

It improves image classification efficiency and accuracy, significantly enhances the model's adaptability and generalization ability, and forms an end-to-end closed-loop optimization process to adapt to the needs of different hardware resources and training tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997597A_ABST
    Figure CN120997597A_ABST
Patent Text Reader

Abstract

The invention discloses a quantum classical mixed image classification method and system based on hardware performance self-adaption, and belongs to the technical field of artificial intelligence. The method comprises the following steps: constructing a quantum classical hybrid neural network; training the quantum classical hybrid neural network by using an image data set, and adjusting and optimizing model parameters of the quantum classical hybrid neural network by using a joint parameter adjustment controller in the training process, the joint parameter adjustment controller inputs current quantum hardware resource information and a training performance feedback index of the quantum classical hybrid neural network, and outputs adjusted and optimized quantum classical hybrid neural network model parameters; and carrying out image classification by using the trained quantum classical hybrid neural network. According to the method, the model parameters are dynamically adjusted, so that the problem that the traditional model depends on manual setting and fixed parameters is avoided, and the classification performance and the model generalization ability are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cross-fusion of artificial intelligence, computer vision and quantum machine learning, and more particularly to a quantum-classical hybrid image classification method and system based on hardware performance adaptation. BACKGROUND

[0002] With the continuous progress of deep learning, Convolutional Neural Networks (CNN) has been widely used in image recognition, image classification and target detection tasks, and has achieved remarkable results in many fields. However, traditional neural network models such as CNN often rely on large parameter size and high-performance computing resources, especially when dealing with large-size images or performing large-scale training tasks, the consumption of computing power and memory is extremely significant, which limits its application efficiency in resource-constrained scenarios.

[0003] In recent years, with the rapid development of quantum computing technology, Quantum Machine Learning (QML) is gradually becoming an important research direction in the field of artificial intelligence. In particular, the successive proposal of Quantum Neural Networks (QNN) and quantum-classical hybrid neural network models provides a new theoretical system and practical path for performing machine learning tasks on current noisy intermediate-scale quantum (NISQ) devices. A large number of studies have shown that QML models have significant potential in high-dimensional feature space nonlinear mapping, multi-state modeling and enhanced expression ability, and have been widely applied to computer vision fields such as image recognition, medical image analysis, remote sensing image processing, etc.

[0004] However, due to the limitations of current quantum computing hardware, such as limited number of qubits, insufficient quantum gate operation fidelity, and short quantum bit coherence time, large-scale quantum bit systems and deep quantum circuit models are still difficult to achieve. This makes quantum neural networks face many challenges when processing large-size images. In order to meet the current hardware conditions, the image usually needs to be dimensionally compressed before inputting into the quantum module to reduce the consumption of quantum bit resources. However, the existing approach mostly adopts a static and fixed dimension reduction strategy, which fails to dynamically adjust the compression scale according to different image features or quantum resources, resulting in important information being discarded and affecting the final classification performance and generalization ability of the model.

[0005] Therefore, it is urgent to build a method that can flexibly adapt to quantum resources and dynamically adjust the compression scale to compress and preprocess images in combination with the needs of quantum-classical hybrid neural network structure for quantum resources, and complete efficient image feature extraction and classification prediction while preserving the image expression ability as much as possible. SUMMARY

[0006] Therefore, the application 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-mentioned purpose, the application adopts the following technical solutions:

[0008] The application 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] Training the quantum-classical hybrid neural network using the preprocessed image dataset, and adjusting and optimizing the model parameters of the quantum-classical hybrid neural network using a joint parameter tuning controller during the training process, wherein the joint parameter tuning controller inputs current quantum hardware resource information and training performance feedback indicators of the quantum-classical hybrid neural network, and outputs the adjusted and optimized quantum-classical hybrid neural network model parameters.

[0011] Using the trained quantum-classical hybrid neural network to perform image classification.

[0012] Further, in the training step of the quantum-classical hybrid neural network, the current quantum hardware resource information includes the number of qubits of a quantum computer, the fidelity of quantum gate operation, the connection structure between qubits, the maximum quantum depth that can be supported, and the readout fidelity, and the connection structure includes a topology relationship adjacency table.

[0013] Further, 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 of the quantum-classical hybrid neural network, the training loss function value, and the model convergence rate.

[0014] Further, in the training step of the quantum-classical hybrid neural network, the model parameters of the quantum-classical hybrid neural network include the network structure depth, the quantum encoding dimension, the quantum entanglement structure, the quantum circuit layer number, the quantum encoding mode, and the activation function type.

[0015] Further, in the step of constructing the quantum-classical hybrid neural network, the quantum-classical hybrid neural network constructed comprises an input layer, a variational quantum circuit and an output prediction layer connected in sequence.

[0016] The input layer comprises a classical fully connected layer or a convolutional layer, and is configured to perform feature extraction on the preprocessed image data and encode the extracted image features into a quantum state.

[0017] The variational quantum circuit is configured to measure the encoded quantum state data.

[0018] 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 the measurement result of the quantum state data.

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

[0020] S1. Receive current quantum hardware resource information and training performance feedback indicators of the quantum-classical hybrid neural network wherein Q represents the number of currently available 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;

[0021] S2. Generate a parameter search space Θ based on the quantum-classical hybrid neural network model parameters to be optimized, wherein the parameter search space Θ comprises network structure depth, quantum encoding dimension, quantum entanglement structure, quantum circuit layer number, quantum encoding mode and activation function type, and determines the hardware constraint conditions to be met each time according to the current quantum hardware resource information H:

[0022] The required number of quantum bits ≤ Q;

[0023] The number of circuit layers ≤ ;

[0024] The required quantum gate operation fidelity ≥ ;

[0025] The required readout fidelity ≥ ;

[0026] The connection structure between quantum bits conforms to the topology structure supported by quantum hardware ;

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

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

[0029] Wherein, α, β, γ are corresponding weight coefficients;

[0030] S4. Searching for the target evaluation function in the generated parameter search space Θ, and the quantum-classical hybrid neural network model parameter combination that makes the target evaluation function optimal value is used as the optimized quantum-classical hybrid neural network model parameter.

[0031] Further, the quantum-classical hybrid neural network in the training step further comprises pre-processing the image data set, specifically comprising:

[0032] Normalizing each image in the image data set;

[0033] Dimension reduction compression is performed on the normalized image, so that the dimension of the image is the same as the quantum coding dimension of the quantum-classical hybrid neural network.

[0034] Another aspect of the present application also discloses a quantum-classical hybrid image classification system based on hardware performance adaptation, comprising,

[0035] A model construction module is used to construct a quantum-classical hybrid neural network;

[0036] A model training module is used to train the quantum-classical hybrid neural network using an image data set, and a joint parameter adjustment controller is used to adjust and optimize the model parameters of the quantum-classical hybrid neural network during the training process, the joint parameter adjustment controller inputs the current quantum hardware resource information and the training performance feedback index of the quantum-classical hybrid neural network, and outputs the quantum-classical hybrid neural network model parameters after adjustment and optimization;

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

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

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

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

[0041] Via the above technical solution, compared with the prior art, the present application provides a quantum-classical hybrid image classification method and system based on hardware performance self-adaptation, which has the following beneficial effects:

[0042] Firstly, the present application introduces an automatic structure adjustment mechanism based on quantum hardware resource perception. By reading the pre-quantum hardware resource information (number of qubits, gate fidelity, connectivity information) of a real quantum computing device, the joint parameter adjustment controller can optimize and adjust the image dimension reduction parameters and quantum neural network structure parameters at the initial modeling stage using a grid search strategy. Through grid search, the controller gradually tests all possible parameter combinations within the preset parameter space, thereby finding the best configuration that best suits the current hardware resources, ensuring that the model structure always matches the hardware resource capabilities and improving system operation efficiency.

[0043] Secondly, the joint parameter adjustment controller disclosed in the present application not only optimizes through grid search at the initial stage, but also can automatically optimize and adjust according to real-time feedback (such as classification accuracy, loss function value, etc.) during the training process. By using a real-time training feedback closed-loop mechanism, the controller can dynamically adjust the dimension reduction dimension and quantum network parameters during the training process, realizing dynamic iterative optimization. This feedback-based optimization mechanism effectively avoids the problem of relying on manual setting and fixed parameters in traditional models, significantly improves the classification performance and model generalization ability, and enables the quantum-classical hybrid neural network to better adapt to the needs of different hardware resources and training tasks.

[0044] In addition, the present application constructs an end-to-end integrated image processing system, from image input, dimension reduction, patch extraction and quantum encoding, to quantum-classical hybrid neural network inference and output results, forming a complete closed-loop image recognition process, and all modules support dynamic adjustment and combination replacement, having good scalability and module compatibility.

[0045] Overall, the present application not only significantly improves the image classification efficiency and accuracy under the current condition of medium-scale quantum computing, but also provides a feasible architecture and optimization strategy for the future landing of larger-scale quantum neural networks, having important technical promotion value and industrial application potential. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to make the technical solutions in the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only a part of the embodiments of the present application, and other drawings can be obtained by those of ordinary skill in the art without any creative effort on the basis of the provided drawings.

[0047] Figure 1 The method provided by the embodiments of the present application is shown in the whole flowchart.

[0048] Figure 2 The joint parameter adjustment controller provided by the embodiments of the present application is shown in the schematic diagram.

[0049] Figure 3 The variational quantum circuit structure provided by the embodiments of the present application is shown in the schematic diagram.

[0050] Figure 4 The quantum-classical hybrid neural network overall structure provided by the embodiments of the present application is shown in the reference schematic diagram. DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort belong to the protection scope of the present application.

[0052] Reference Figure 1 As shown in the drawings, the quantum-classical hybrid image classification method based on hardware performance self-adaption disclosed in the present application efficiently solves the core contradiction between high image dimension and limited quantum computing resources through the following steps:

[0053] Step 1. Image input and data set construction:

[0054] The user inputs the RGB image data, and the system performs standardization, training set and validation set division, and other preprocessing operations on the data.

[0055] Step 2. Hardware information acquisition:

[0056] The software reads the parameters of the real quantum computer connected through the interface (such as Qubit, fidelity, connection graph, etc.); the information serves as the input basis for subsequent structure adjustment.

[0057] Step 3. Dynamic image dimension reduction:

[0058] Image data is compressed to the required dimension by an adjustable dimension reduction module (such as Lanczos) to match the quantum input. The dimension K of the dimension reduction is automatically set by the subsequent parameter adjustment controller.

[0059] Step 4. Patch extraction and quantum encoding:

[0060] The image is divided into multiple patches, each of which is encoded into a quantum state. Amplitude encoding, angle encoding, etc. are used to convert it into an input format acceptable to the quantum neural network.

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

[0062] The patch input is fed into a hybrid neural network composed 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 the current quantum hardware resources.

[0063] Step 6. Model training and evaluation:

[0064] The system performs forward propagation and backward gradient update in the training set, and evaluates the training accuracy and loss. The output performance indicators are used for parameter adjustment.

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

[0066] The joint parameter adjustment controller adjusts the dimension reduction dimension K and the quantum-classical hybrid neural network structure parameter k' according to the training feedback and hardware resources. It realizes multi-round optimization at the system level until the model performance reaches the optimal.

[0067] Step 8. Final model deployment and inference:

[0068] Use the final determined network structure and parameters to perform image classification, and output the recognition category as the result.

[0069] The image classification method combining image adaptive dimension reduction mechanism and quantum-classical hybrid neural network proposed by the present application is characterized by introducing a hardware resource-aware structure adjustment mechanism and realizing end-to-end joint optimization from input image to classification result.

[0070] In one specific embodiment, it is realized by the following way:

[0071] A modular and scalable image classification system is constructed to realize the quantum-classical hybrid image classification method based on hardware performance adaptation described in the present application. The overall structure of the image classification system is composed of the following multiple functional modules:

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

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

[0074] Patch division and quantum encoding module: divide the image into small patches and perform quantum state mapping;

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

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

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

[0078] Model training and output module: trains the model and outputs the image classification result.

[0079] The system supports parameter transfer and control feedback between modules, realizing full-process closed-loop optimization.

[0080] In one specific embodiment, to address the problem that high-dimensional images cannot be directly processed under the condition of limited quantum computing resources, the image dimensionality reduction module of the present application designs a dynamically adjustable image dimensionality reduction strategy to automatically determine the optimal dimensionality reduction dimension and compress the input data while considering image feature preservation and hardware adaptation capability. The image dimensionality reduction module supports multiple implementation methods, including but not limited to PCA (Principal Component Analysis), Autoencoder (Autoencoder), SVD truncation (Singular Value Decomposition Truncation), and Lanczos method, and the specific algorithm can be flexibly switched according to system deployment requirements.

[0081] In the image dimensionality reduction module, the input image I ∈ R H×W×C (such as 32x32x3) is first flattened into a high-dimensional vector, and then converted to a low-dimensional representation by the dimensionality reduction function D k : ;

[0082] where the dimensionality reduction dimension K is not a fixed constant, but is dynamically calculated by the joint parameter tuning controller module according to the current quantum computing hardware capability and training feedback, and the dimensionality reduction dimension calculation function is represented as follows: ;

[0083] where Q represents the number of available quantum bits, F represents the quantum gate operation fidelity, C represents the connection structure between quantum bits, Acc represents the model classification accuracy during training, L represents the training loss function value, and F reduce represents the dimensionality reduction dimension calculation function inside the system. The dimensionality reduction dimension calculation function F reduceThe current hardware condition and model learning performance are comprehensively considered, and the optimal dimension K of dimension reduction suitable for the current resource condition is output. The dynamic adjustment process can be continuously updated during the model training process, so that the dimension reduction mechanism has feedback closed-loop optimization capability. The feature vector I K Will be divided into multiple patches, input into the subsequent quantum coding module. The patch size can also be automatically derived and generated by the controller according to K, so as to realize the image classification processing flow of software and hardware cooperation and full link adaptation.

[0084] In one specific embodiment, in order to realize the adaptive adjustment of the system structure and the maximum utilization of quantum resources, the image classification system disclosed by the application also introduces a quantum hardware perception module for real-time acquisition and analysis of the core performance parameters of the current quantum computing device, and guides the system structure configuration accordingly. The quantum hardware parameters collected by the system form an input vector:

[0085] ;

[0086] Among them, Indicates the maximum quantum circuit depth that can be supported; Indicates the readout fidelity. The above hardware parameters will be input into the system adaptive structure generation function:

[0087] ;

[0088] Among them, K represents the image dimension reduction dimension, P represents the patch size, E represents the quantum coding mode (such as amplitude coding, angle coding, etc.), and k' represents the quantum neural network structure parameter (such as the number of layers, etc.). The function Can be realized by rule mapping and the like, and the core goal is to configure the optimal computing structure under the current hardware resource constraint, so that the subsequent model has high efficiency and robustness.

[0089] In order to realize the performance optimization and parameter adaptive adjustment of the overall system structure, the application designs a joint parameter adjustment controller module, which is responsible for fusing hardware information and training feedback results, dynamically optimizing network structure parameters, and forming a "perception-feedback-tuning" closed-loop control mechanism.

[0090] As Figure 2 Indicated, the joint parameter adjustment controller in the application receives two main inputs: hardware parameter information H and training performance feedback index M:

[0091] ; Wherein R represents the convergence rate.

[0092] The controller internal operation parameter generation function is: ;

[0093] where Θ represents other trainable or configurable hyperparameter sets (e.g., patch number, encoding strategy, etc.). The function It can be implemented based on heuristic strategies, grid search, empirical rules or reinforcement learning systems. The controller will periodically determine whether to trigger parameter adjustment based on training results, or keep the current structure unchanged to continue optimization, so as to achieve a dynamic balance between training convergence and structure adaptability for the entire system.

[0094] In one specific embodiment, the joint parameter adjustment 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 the training performance feedback indicators of the quantum-classical hybrid neural network where Q represents the current number of available 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 during training, and L represents the training loss function value, represents the convergence rate;

[0096] S2. Generate a parameter search space Θ based on the quantum-classical hybrid neural network model parameters to be optimized, which includes network structure depth, quantum encoding dimension, quantum entanglement structure, quantum circuit layer number, quantum encoding method and activation function type, and determine the hardware constraint conditions that need to be met each time according to the current quantum hardware resource information H:

[0097] The required number of quantum bits ≤ Q;

[0098] The circuit layer number ≤ ;

[0099] The required quantum gate operation fidelity ≥ ;

[0100] The required readout fidelity ≥ ;

[0101] The connection structure between quantum bits conforms to the topology structure supported by quantum hardware ;

[0102] S3. Construct a target evaluation function based on the training performance feedback indicators M of the quantum-classical hybrid neural network:

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

[0104] wherein, alpha, beta, gamma are corresponding weight coefficients;

[0105] S4. Searching for the target evaluation function in the generated parameter search space Θ, the quantum-classical hybrid neural network model parameter combination that makes the target evaluation function obtain the optimal value is taken as the optimized quantum-classical hybrid neural network model parameter.

[0106] In the present application, the quantum-classical hybrid neural network module combines the feature extraction capability of the classical neural network and the expression capability of the quantum circuit, and specifically comprises:

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

[0108] (2) Quantum encoding and variational quantum circuit (VQC): the image has been divided into several patches and completed dimension reduction in the pre-processing stage, and the feature vector of each patch will be mapped to a quantum state through a specific quantum encoding method (such as angle encoding). The encoded quantum state is input into the VQC containing adjustable parameter quantum gates and entanglement structure for processing;

[0109] The variational quantum circuit mentioned in the present application is an adjustable parameter quantum computing circuit structure composed of parameterized quantum gates and entanglement operations, and its structure can be dynamically adjusted according to the training feedback. In a specific embodiment, the structure diagram of the variational quantum circuit is as shown in Figure 3 The RX(θ) in the figure represents a quantum encoding gate, which encodes classical data into a quantum state by rotating the quantum bit around the X axis. H is a Hadamard gate, which converts the quantum bit from the ground state |0> or |1> to an equal probability superposition state. RY gate represents a rotation gate around Y axis, which performs rotation operation on the quantum bit to adjust the phase of the quantum bit. Z is a Pauli-Z gate, which applies phase inversion to the quantum bit, so that the phase of the |1> state of the quantum bit is inverted, while the |0> state remains unchanged. M is the measurement operation of the quantum bit, which is usually used to obtain classical information from the quantum state.

[0110] (3) Quantum measurement: each quantum bit is measured to calculate its expected value. The obtained measurement result is taken as the real-valued feature vector output by the quantum sub-network;

[0111] (4) Post-classical layer and classification output: the feature vector obtained by measurement is input into the post-connected layer, and finally the prediction probability of each class of image is generated through the softmax activation function to realize the classification output.

[0112] The overall structure of the quantum-classical hybrid neural network disclosed in the present application is as shown in Figure 4

[0113] In addition, the joint parameter adjustment controller in the present application can dynamically adjust the key parameters in the network, such as the depth of the variational quantum circuit, the mapping mode of the qubits and the patch, the measurement strategy, and the like, according to the quantum hardware resource information and the training feedback index, so as to ensure the feasibility and optimization of the network structure under the current NISQ hardware condition.

[0114] Implementation case: using Lanczos dimension reduction to process CIFAR-10 dataset

[0115] The present embodiment is based on the disclosed image classification dataset CIFAR-10, which contains 10 categories of natural images, 6000 images for each category, a resolution of 32x32 pixels, and three-channel RGB input.

[0116] Step 1: image data loading and preprocessing

[0117] The CIFAR-10 dataset is loaded using the Python+PyTorch system; the images are standardized; and the images are divided into a training set (50,000 images) and a test set (10,000 images).

[0118] Step 2: applying Lanczos dimension reduction algorithm for image compression

[0119] Each image of CIFAR-10 is a 32x32x3=3072-dimensional vector; each image is flattened into a one-dimensional vector; the Lanczos method is used to reduce the dimension of the image feature matrix (approximate eigenvalue decomposition); the first K eigenvectors are retained to construct a compressed space, and the value of K is dynamically set by the controller (such as initial K=16); the reduced vector is output for subsequent encoding.

[0120] Step 3: patch division and quantum state encoding

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

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

[0123] ​The neural network front end uses classical fully connected or convolutional layers for preliminary processing; the middle part is embedded with a variational quantum circuit (VQC), each quantum sub-circuit processes one encoded patch; the quantum circuit contains rotation gates, entanglement gates, etc., and the structure depth k' is set by the joint tuning controller; the last output layer performs classification prediction.

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

[0125] The system reads the hardware resources of the interfaced quantum chip (or quantum simulator): such as the number of Qubits (7, for example) of the IBM Q machine, the fidelity (97%), the topology structure (linear or fully connected); the joint tuning controller calculates the current acceptable dimension reduction dimension K and the quantum network depth k'; receives training evaluation feedback (accuracy, loss); adjusts K and k', enters the next round of iterative training; until the model performance converges.

[0126] Step 6: Test and classification output

[0127] Model inference is performed on the test set; the output of the image category (such as "cat", "airplane", "car", etc.) is obtained; the system records the final parameter settings, inference time, resource occupation, etc.

[0128] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0129] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to 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, Includes the following steps: Constructing a quantum-classical hybrid neural network; 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. Image classification is performed using a trained quantum classical hybrid neural network.

2. The quantum-classical hybrid image classification method based on hardware performance adaptation according to claim 1, characterized in that, 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.

3. The quantum-classical hybrid image classification method based on hardware performance adaptation according to claim 1, characterized in that, 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.

4. The quantum-classical hybrid image classification method based on hardware performance adaptation according to claim 1, characterized in that, 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.

5. The quantum-classical hybrid image classification method based on hardware performance adaptation according to claim 1, characterized in that, 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. 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. The variable quantum circuit is used to measure the encoded quantum state data; 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.

6. The quantum-classical hybrid image classification method based on hardware performance adaptation according to claim 1, characterized in that, The model parameters of the quantum-classical hybrid neural network are adjusted and optimized using a joint parameter tuning controller, specifically including: 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; 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. Required number of qubits ≤ Q; Number of circuit layers ≤ ; Required quantum gate operation fidelity ≥ ; Required readout fidelity ≥ ; The interconnection structure between qubits conforms to the topology supported by quantum hardware. ; S3. Constructing an objective evaluation function based on the training performance feedback index M of a quantum-classical hybrid neural network: Score = a * Acc - b * L - c * ; Where α, β, and γ are the corresponding weighting coefficients; 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.

7. The quantum-classical hybrid image classification method based on hardware performance adaptation according to claim 1, characterized in that, Preprocessing of the image dataset specifically includes: Normalize each image in the image dataset; The normalized image is compressed using a dimensionality reduction algorithm so that the feature dimension of the image is consistent with the quantum encoding dimension of the quantum classical hybrid neural network.

8. A quantum-classical hybrid image classification system based on hardware performance adaptation, characterized in that, include, The model building module is used to construct quantum-classical hybrid neural networks; 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. The image classification module is used to classify images using a trained quantum-classical hybrid neural network.

9. A quantum-classical hybrid image classification system based on hardware performance adaptation according to claim 8, characterized in that, In the model training module, the current quantum hardware resource information includes the number of qubits in the quantum computer, the quantum gate operation fidelity, the connection structure between qubits, the maximum supported quantum depth, and the readout fidelity.

10. A quantum-classical hybrid image classification system based on hardware performance adaptation according to claim 8, characterized in that, 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.

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

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

    CN119580278A