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

By adopting a hybrid quantum neural network model based on parameterized quantum circuits and matrix product states in image classification tasks, the shortcomings of convolutional neural networks in feature extraction and model training are solved, and more efficient feature extraction and more robust prediction are achieved.

CN119580278AActive Publication Date: 2025-03-07ANHUI UNIVERSITY OF TECHNOLOGY

Patent Information

Application Number
CN202411739801.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-07
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In the image classification task, existing convolutional neural networks have problems such as insufficient feature extraction, easy overfitting of training models for a small number of data sets, and difficult to explain the prediction logic.

Method used

A hybrid quantum neural network model based on parametric quantum circuits and matrix product states is designed to extract primary features through pooling operations, parametric quantum circuits extract advanced features, and use matrix product state structure for classification, and combine with Adam optimizer for parameter update.

Benefits of technology

The model's ability to capture sample features is improved, the number of trainable parameters is reduced, the learning efficiency and prediction robustness is improved, the dependence on sample size is reduced, and the generalization ability of the model is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580278A_ABST
    Figure CN119580278A_ABST
Patent Text Reader

Abstract

The invention discloses an image classification method of a hybrid quantum neural network model based on PQC, and belongs to the technical field of quantum computing. On the basis of a classic neural network structure, a classic convolutional layer is replaced by the parameterized quantum circuit, the trainable parameter quantity in the network structure is reduced, the designed entangled structure Ub is added in the parameterized quantum circuit, and the feature capture capability of the structure and the learning efficiency of the whole network are improved. A mixed quantum neural network architecture is utilized, a corresponding entanglement structure Ub is designed according to a given label sample and acts on a parameterized quantum circuit, and the entanglement structure Ub is combined with a classification module formed by a classic matrix product state network structure; the feature extraction capability of the parameterized quantum circuit structure and the performance of the overall network structure are continuously improved, so that a better classification effect is achieved, prediction is performed on a test set to evaluate the model performance, and finally parameter optimization and iterative updating in the model are performed by using a classical optimization method. And a hybrid quantum neural network structure with excellent performance can be obtained. Compared with an existing network structure, the performance is improved well.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image classification, and in particular to an image classification method based on a hybrid quantum neural network model of a parameterized quantum circuit. Background Art

[0002] Image classification is a fundamental problem in the field of computer vision. Machine learning models represented by deep convolutional neural networks (CNN) have become the mainstream technology for solving such problems. Like other neural network models, it does not require manually designed feature operators and implements end-to-end learning. Its basic structure generally consists of multiple convolutional layers, pooling layers, and fully connected layers, which can automatically learn extremely complex hierarchical features from massive data. For example, in the recognition and classification of handwritten data sets, convolutional neural networks are used to automatically extract complex features, and the classification accuracy can reach more than 90%.

[0003] The model structure is improved to solve the problem that the upsampling method of convolutional neural networks is not fine enough, and the multi-dimensional information in the scene is better understood through optimization methods such as data enhancement, multi-scale fusion, self-attention mechanism, and additional features (elevation information, vegetation index, spectral features), and feature representation is enhanced, which greatly improves the model's ability to capture sample features. Common convolutional neural networks such as fully convolutional networks (FCNs), U-nets, and generative adversarial networks (GANs) have become ideal models for various image classification tasks, showing great potential in image classification.

[0004] Despite the great success of convolutional neural networks, there are still some challenging problems in classification. The main reasons are as follows:

[0005] (1) There are many types of images, covering a variety of different objects, which have significant differences in size, color, position, and orientation. It is often difficult to effectively distinguish these objects based on spectral characteristics alone, so it is necessary to use features such as spatial position information for identification. Therefore, how to combine rich spectral information with spatial features to make them complement each other, thereby significantly improving the performance of deep learning models in image classification tasks, has become a key direction of current research.

[0006] (2) In practical applications, it is often difficult to obtain a large number of labeled data sets, which is not only reflected in the lack of data volume, but also in the challenge of accurately defining category labels for the data sets. At the same time, current complex deep neural networks usually require the setting of a large number of hyperparameters, resulting in an overly complex network structure that is difficult to optimize effectively. Therefore, when using a small number of data sets to train a deep neural network, it is very easy to cause the model to overfit.

[0007] (3) Although the current “end-to-end” learning strategy enables deep learning to achieve excellent performance in classification tasks, the prediction logic behind it is difficult to explain. In addition to the final output results, it becomes very difficult to understand the reasoning process within the network, which also brings challenges to the in-depth analysis and processing of image classification tasks.

[0008] Taking the above points into consideration, we designed a hybrid quantum neural network model to replace the traditional convolutional neural network constructed by scalar neurons and convolution kernels. The hybrid quantum neural network model is a combination of parameterized quantum circuits with designed entanglement structure Ub and matrix product states. Its output is a high-dimensional vector that can represent various attribute information of the entity, such as posture, lighting, and deformation. The modulus of the vector is used to represent the probability of the entity appearing. The larger the modulus of the high-dimensional vector, the greater the possibility of the entity's existence. The vector can be used to represent the direction of the object and the relative relationship in space, which greatly makes up for the shortcomings of the convolutional neural network. The training method of the hybrid quantum neural network mainly uses the classic Adam optimization method. In the case of a network structure with fewer trainable parameters, the model learning efficiency and prediction robustness can be improved, while reducing the number of samples required. Summary of the invention

[0009] The technical problem to be solved by the present invention is: how to effectively solve the image classification problem in the field of computer vision and improve the structural performance of the network model, and provide an image classification method based on a hybrid quantum neural network model. First, through the pooling operation, a compressed image of the primary features can be obtained, and then the advanced features are further extracted through the parameterized quantum circuit, and the expected value measured by each quantum circuit is used as the tensor form of the input node in the matrix product state network, and the parameter node containing the trainable parameter is condensed and calculated to obtain the predicted classification vector, and then the probability distribution of the softmax function output category is performed, and then the gradient calculation and update of the parameters in the entire hybrid quantum neural network are performed through the Adam optimizer, so that the performance of the entire network and the generalization ability of the model are further improved and optimized, and a better performance structure is found.

[0010] The present invention solves the above technical problems through the following technical solutions, and the present invention comprises the following steps:

[0011] Step S1: preprocessing the handwritten data set, dividing the preprocessed image data into training set data and verification set data;

[0012] Step S2: Taking the parameterized quantum circuit as the basic network architecture, integrating the matrix product state model, and establishing a hybrid quantum neural network model;

[0013] The hybrid quantum neural network model includes:

[0014] A compression processing module, comprising a convolution layer and a pooling layer, wherein the convolution layer is used to extract primary features of an input handwritten image; and the pooling layer is used to convert the primary features extracted by the convolution layer into a feature map of a smaller scale through pooling processing;

[0015] A parameterized quantum circuit module, which includes a coding layer, an entanglement layer and a measurement layer. The entire module is composed of a coding layer (RY gate) and an entanglement layer (CX gate) interlaced with each other, and finally a measurement layer is applied to the quantum circuit. The entire parameterized quantum circuit module is used to perform high-level feature extraction on the feature map obtained by the compression processing module;

[0016] A classification module, comprising a matrix product state structure, wherein the matrix product state structure comprises a plurality of tensor nodes, the dimensions of which are mainly used to calculate the contraction of input eigenvalues ​​and weight parameters, and finally calculate a contraction vector having a dimension equal to the number of categories, which is used to calculate the prediction probability corresponding to the instance of each class;

[0017] Step S3: training the hybrid quantum neural network model using the training set data and the verification set data to obtain the trained hybrid quantum neural network model;

[0018] Step S4: Classify the image data to be classified using the trained hybrid quantum neural network model.

[0019] Furthermore, the step S1 also includes a preprocessing method of pooling compression, in which the original grayscale image with a shape of 28×28 is subjected to an average pooling operation with a convolution layer and a kernel size of 6 to obtain a compressed feature map containing the primary features.

[0020] Furthermore, the step S2 also includes the selection and design of the entanglement structure in the parameterized quantum circuit module, mainly the use of two entanglement structures. The first selection is the CX double quantum gate, and its corresponding matrix form is as follows:

[0021]

[0022] The second structure is the entanglement structure Ub designed for the selected sample label. The design process is as follows:

[0023] Input: 28x28 normalized pixel matrix

[0024] Output: Entanglement module Ub

[0025] Process steps:

[0026] 1. Get the processing matrix U of size 4x4.

[0027] %Perform pooling compression on the pixel matrix and reduce the dimension from 28x28 to 4x4.

[0028] 2. Construct a binary matrix B.

[0029] % By setting a threshold or applying a mask, the matrix U is processed to obtain a binary matrix B.

[0030] 3. Calculate the symmetric matrix V and generate an undirected graph G:

[0031] ^

[0032] V=B*BT

[0033] % Calculate the autocorrelation matrix of V and map it to an undirected graph G.

[0034] 4. Construct matrix Hb based on undirected graph G:

[0035]

[0036] %Dj represents the number of edges between neighbor nodes of node j.

[0037] 5. Construct matrix Ub based on matrix Hb:

[0038]

[0039] %γ ζ is the adjustment parameter in the experiment and is set to 1.

[0040] Returns: Ub.

[0041] Furthermore, step S2 also includes a parameter node updating method in the classification module, which uses the Adam optimizer to calculate gradients and iteratively update parameters, just like the parameter updating method in the quantum circuit part.

[0042] Furthermore, step S3 also includes a step of verifying the hybrid quantum neural network model using the verification set data, including setting a given threshold or stopping the training iteration when the maximum number of iterations is met, thereby completing the training of the hybrid quantum neural network model.

[0043] Furthermore, in step S3 and step S4, a parameterized quantum circuit of an entanglement layer Ub containing specified sample labels is used in the hybrid quantum neural network model, so that the primary features are extracted layer by layer to obtain higher-level features, and for the same type of labeled sample inputs, the same quantum circuit structure is used for network forward calculations.

[0044] Furthermore, in step S3 and step S4, the hybrid quantum neural network model uses a parameterized quantum circuit of an entanglement layer Ub containing a specified sample label, so that the primary features are extracted layer by layer to obtain higher-level features, and the output of the measurement layer of the quantum part network is used as the tensor form of the input node in the matrix product state structure of the classical part, and then the forward calculation of the matrix product state network part is performed, and finally the performance evaluation of the model is performed. There are two criteria for the evaluation of the model. The first is the convergence of the loss function, and its corresponding mathematical form is as follows:

[0045]

[0046] Where M represents the number of categories, i is the index of the training set sample, and y c is a one-hot encoded true label vector of length M, is a probability distribution vector of length M obtained after the model prediction, in which each element represents the probability that the model predicts that the data is of category c. Another evaluation criterion is the accuracy of the model prediction, and its corresponding mathematical form is as follows:

[0047]

[0048] Among them, N test represents the number of samples in the test set, and j is the index of the test set sample. Indicates predicting sample j and returning the index of the maximum value of the prediction result, y c represents the true label of sample j. Therefore, When the result is true, it means that the model's prediction result for sample j is consistent with the true label.

[0049] Compared with the prior art, the present invention has the following advantages:

[0050] (1) Under the hybrid quantum neural network structure, although the convergence result of the loss function in the final evaluation and the prediction accuracy of the final trained robust model are comparable to the performance of the classical network structure, the improvement in the prediction accuracy of the hybrid quantum neural network model and the corresponding convergence rate of the loss function are faster than those of the convolutional neural network.

[0051] (2) When the overall network model has fewer trainable parameters, the quantum sub-network we designed, namely the parameterized quantum circuit, has a stronger ability to extract structural features than the classical convolutional layer, and the learning efficiency of the overall model is higher.

[0052] (3) The entanglement module Ub designed for a given sample label acts on the PQC structure to improve the performance of the network structure. This makes the convergence result of the loss function of the model training slightly better, the convergence rate faster, and more importantly, it can achieve higher prediction accuracy at a lower time cost. This further confirms the feasibility of our structural design ideas. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is the network architecture of the hybrid quantum neural network based on PQC in the embodiment of the present invention;

[0054] Figure 2 is the structure of the parameterized quantum circuit in the embodiment of the present invention;

[0055] Figure 3 Schematic diagram of the performance effect of the entanglement structure Ub designed in an embodiment of the present invention;

[0056] Figure 4 It is a schematic diagram comparing the effects of the embodiment of the present invention with those of the classic convolutional neural network. DETAILED DESCRIPTION

[0057] The embodiments of the present invention are described in detail. The embodiments are implemented on the premise of the technical solution of the present invention, and detailed implementation methods and specific operation processes are given, but the protection scope of the present invention is not limited to the following embodiments.

[0058] The present invention uses handwriting recognition MNIST data to experimentally solve the problem of binary image classification in the experiment, and provides an image classification method based on a hybrid quantum neural network model of PQC, including: step S1: firstly, a compression processing method is used to process the original sample into a feature map containing primary features; step S2: using the entanglement module structure Ub designed by us for samples with given labels and the combination of matrix product states and parameterized quantum circuits to construct an image classification method based on a hybrid quantum neural network model of PQC; step S3: using the training set data and the verification set data to train the hybrid quantum neural network model to obtain the trained hybrid quantum neural network model; step S4: using the trained hybrid quantum neural network model to classify the image data to be classified.

[0059] Data preprocessing

[0060] The present invention uses the handwriting dataset MNIST for experiments, which contains 70,000 samples, of which 60,000 are used for training and 10,000 are used for testing. Each sample is a grayscale image of 28×28 pixels, representing a handwritten digit. Based on this dataset, we benchmark different network architectures to evaluate model performance. Before inputting the image data into the network for training, we need to perform preliminary feature extraction and scale compression processing. To this end, we use an average pooling operation with a kernel size of 6 to preprocess the original grayscale image. This step helps to reduce the data dimension and improve the training efficiency and generalization ability of the network.

[0061] Establishment of hybrid quantum neural network model based on PQC

[0062] The present invention proposes an image classification model based on a hybrid quantum neural network model of PQC. In the image classification problem, the parameterized quantum circuit (PQC) and the convolution layer in the convolution network both play the role of filter extraction feature, so the hybrid neural network with PQC structure is also called quantum convolution neural network. The feature extraction process in the classical convolution neural network is mainly responsible for the convolution layer, and the spatial features of the image are extracted through the mechanism of local receptive field and weight sharing. Compared with the classical convolution neural network, our hybrid quantum classical convolution neural network architecture based on parameterized quantum circuit (PQC) has two main improvements: first, the convolution layer is replaced by a parameterized quantum circuit (PQC) and the entanglement structure Ub constructed for a given label is applied. This part of the architecture usually involves fewer parameters. This is because each parameterized quantum gate involves a specific parameter, and the effect of each gate is limited to a single or double quantum bit. This locality helps to effectively reduce the number of parameters required. Secondly, the matrix product state (MPS) is introduced as an effective tensor network structure in the image classification task to replace the pooling layer and the fully connected layer in the classical convolution neural network (CNN). The role of the pooling layer is usually to reduce the spatial dimension and suppress the risk of overfitting of the model through dimensionality reduction operations. However, the pooling operation (especially when the kernel scale is not chosen properly) may lead to a large amount of information loss, thereby reducing the accuracy of feature extraction and the final performance of the model. The fully connected layer classifies by mapping high-dimensional features to a fixed-dimensional space, but its parameter scale is large and the computational overhead is high. In contrast, the matrix product state (MPS) compresses high-dimensional data while retaining the core information of the input data by converting the input tensor into a low-rank representation. The advantage of MPS is that it can gradually capture long-range correlations through local tensor operations, which not only avoids excessive information loss during the pooling process, but also can more effectively compress data. This advantage of MPS can be further exploited by combining quantum circuits. The specific division of labor can be seen as: after multiple entanglements and evolutions, the quantum state in the quantum circuit can provide complex pattern recognition capabilities for the input data, and MPS realizes the effective mapping from the quantum state to the final classification output. Therefore, combining MPS with quantum circuits not only eliminates the need for pooling operations and fully connected layers in the traditional CNN framework, but also improves the performance of the model in classification tasks by retaining key features of the data.

[0063] See also Figure 1 and Figure 2The image classification model based on the hybrid quantum neural network model of PQC of the present invention comprises: a compression processing module, which comprises a convolution layer and a pooling layer, wherein the convolution layer is used to extract the primary features of the input handwritten image; the pooling layer is used to convert the primary features extracted by the convolution layer into a feature map with a smaller scale after pooling processing; a parameterized quantum circuit module, which comprises a coding layer, an entanglement layer and a measurement layer, wherein the entire module is composed of an alternating coding layer and an entanglement layer, and finally the measurement layer is applied to the quantum circuit, wherein the entire parameterized quantum circuit module is used to extract high-level features from the feature map obtained by the compression processing module; a classification module, which comprises a matrix product state structure, wherein the matrix product state structure comprises a plurality of tensor nodes, wherein the dimensions of the plurality of tensor nodes are mainly used to calculate the contraction of the input feature value and the weight parameter, and finally the contraction vector having the dimension size equal to the number of categories is calculated, and is used to calculate the prediction probability corresponding to the instance of each class.

[0064] According to an optional implementation of the present invention: in the comparison experiment, the CNN structure is selected, the input channel of the convolution layer is 1, the output channel is 2, and the size of the convolution kernel is 3×3, then the total number of parameters of the convolution layer is 18 without considering the bias term. The designed quantum convolution layer (i.e., parameterized quantum circuit) only uses 4 quantum bits, and the single quantum rotation gate Ry(θ) and the double quantum CNOT gate are interleaved for 4 layers, then the total number of parameters of the entire PQC is n×d (where n is the number of quantum bits, and d is the interleaving depth of the parameterized circuit), and the total number of parameters of the corresponding structural part is less than that of the classical convolution layer.

[0065] Model training and validation

[0066] The operating environment of the embodiment of the present invention adopts PyTorch and the quantum machine learning framework TorchQuantum. TorchQuantum is an open source library based on PyTorch that focuses on accelerating quantum computing. The library provides additional libraries and modules that enable users to easily build, optimize and deploy quantum classical applications. In order to build a hybrid network model, we implemented the classical module using PyTorch and the quantum module using TorchQuantum. We optimize the parameters of the quantum circuit through classical optimization algorithms such as gradient descent and Adam. In this process, we call the PyTorch interface to calculate the gradient of the quantum part and perform backpropagation to update the parameters. Each model is trained from scratch using the Adam optimizer with a training batch sample size of 256 and a learning rate of 0.005 for 10 rounds of iterative updates. In addition, we also use a learning rate annealing strategy based on the cosine function, CosineAnnealingLR, to periodically adjust the learning rate with each round of training to improve the generalization ability of the model.

[0067] Classification

[0068] In the classification stage, the trained PQC-based hybrid quantum neural network model is used for data classification of test samples. The matrix product state (MPS) is used to convert the input tensor into a low-rank representation, which compresses the high-dimensional data while retaining the core information of the input data. The advantage of MPS is that it can gradually capture long-range correlations through local tensor operations. As the final classification layer.

[0069] According to an optional embodiment of the present invention, four input tensor nodes are selected as the classical value input after the quantum convolution layer measurement is completed, and are shrunk and calculated with three trainable parameter tensor nodes, and finally a classification vector with a dimension of L is obtained, corresponding to the category prediction value of each label.

[0070] Evaluation Methodology

[0071] This paper will conduct comparative experiments on two different network models, and select the improvement and structural innovation made on the basis of the classic network structure CNN. Convolutional neural network (CNN) extracts features through operations such as convolution and pooling, maps data to a high-dimensional feature space, and classifies or regresses features through the fully connected layer. Its core features include weight sharing and local connection, which make convolutional networks have significant advantages in processing data with spatial structure such as images. Figure 3 , mainly to compare the performance of the structure with the designed entanglement module Ub and the structure without Ub in the main hybrid network structure HQCNN. Figure 4 In another set of experiments, we proposed a hybrid quantum convolutional network structure HQCNN (PQC+MPS) corresponding to CNN. The main purpose is to use the designed parameterized quantum circuit structure as a sub-network of the quantum part for forward calculation, replacing the classical convolution and pooling network forward transmission, and combining it with the classification layer (sub-network of the classical part) constructed by the matrix product state. Finally, the convergence of the loss function Loss and the accuracy of the model prediction on the test set are selected as evaluation indicators to evaluate and compare the framework structure we proposed with the classical network structure. The loss function Loss is a function commonly used in machine learning to evaluate the difference between the model's predicted value and the actual value. Specifically for image classification problems, the loss function measures the degree of inconsistency between the model's prediction results for the image category and the actual label. The equation is as follows:

[0072]

[0073] The accuracy of model prediction is one of the important indicators for evaluating the overall performance of the model. It indicates the proportion of samples with correct classification prediction to the total number of samples. The equation is as follows:

[0074]

[0075] In summary, the present invention discloses an image classification method based on a hybrid quantum neural network model. First, through the pooling operation, a compressed image of the primary features can be obtained, and then the advanced features are further extracted through the parameterized quantum circuit, and the expected value measured by each quantum circuit is used as the tensor form of the input node in the matrix product state network, and the parameter node containing the trainable parameter is condensed and calculated to obtain the predicted classification vector, and then the probability distribution of the softmax function output category is performed, and then the gradient calculation and update of the parameters in the entire hybrid quantum neural network are performed through the Adam optimizer, so that the performance of the entire network and the generalization ability of the model are further improved and optimized, and a better performance structure is found.

[0076] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. An image classification method based on a hybrid quantum neural network model of PQC, comprising: Step S1: preprocessing the handwritten data set, dividing the preprocessed image data into training set data and verification set data; Step S2: Taking the parameterized quantum circuit as the basic network architecture, integrating the matrix product state model, and establishing a hybrid quantum neural network model; The hybrid quantum neural network model includes: A compression processing module, comprising a convolution layer and a pooling layer, wherein the convolution layer is used to extract primary features of an input handwritten image; and the pooling layer is used to convert the primary features extracted by the convolution layer into a feature map of a smaller scale through pooling processing; A parameterized quantum circuit module, which includes a coding layer, an entanglement layer and a measurement layer. The entire module is composed of an interlaced coding layer and an entanglement layer, and a measurement layer is applied at the end of the quantum circuit. The entire parameterized quantum circuit module is used to perform high-level feature extraction on the feature map obtained by the compression processing module; A classification module, comprising a matrix product state structure, wherein the matrix product state structure comprises a plurality of tensor nodes, the dimensions of which are mainly used to calculate the contraction of input eigenvalues ​​and weight parameters, and finally calculate a contraction vector having a dimension equal to the number of categories, which is used to calculate the prediction probability corresponding to the instance of each class; Step S3: training the hybrid quantum neural network model using the training set data and the verification set data to obtain the trained hybrid quantum neural network model; Step S4: Classify the image data to be classified using the trained hybrid quantum neural network model.

2. The image classification method according to claim 1, characterized in that: Step S1 also includes a preprocessing method of pooling compression, in which the original grayscale image with a shape of 28×28 is subjected to an average pooling operation with a convolution layer and a kernel size of 6 to obtain a feature map containing the primary features, and the compressed size is 4×4.

3. The image classification method according to claim 1, characterized in that: Step S2 also includes the selection and design of the entanglement structure in the parameterized quantum circuit module, mainly the use of two entanglement structures. The first selection is the CX double quantum gate, and its corresponding matrix form is as follows: The second structure is the entanglement structure Ub designed for the selected sample label. The design process is as follows: Input: 28x28 normalized pixel matrix Output: Entanglement module Ub Process steps:

1. Get the processing matrix U of size 4x4, %Pooling compression is performed on the pixel matrix, reducing the dimension of 28x28 to 4x4, 2. Construct a binary matrix B, % By setting a threshold or applying a mask, the matrix U is processed to obtain a binary matrix B.

3. Calculate the symmetric matrix V and generate an undirected graph G: V=B*B^T % Calculate the autocorrelation matrix of V and map it to an undirected graph G, 4. Construct matrix Hb based on undirected graph G: %Dj represents the number of edges between neighbor nodes of node j, 5. Construct matrix Ub based on matrix Hb: %γ ζ is the adjustment parameter in the experiment, set to 1, Returns: Ub.

4. The image classification method according to claim 1, characterized in that: Step S2 also includes a parameter node update method in the classification module. Similar to the parameter update method in the quantum circuit part, the Adam optimizer is used to calculate the gradient and iteratively update the parameters.

5. The image classification method according to claim 1, characterized in that: Step S3 also includes the step of using the verification set data to verify the hybrid quantum neural network model, including setting a given threshold or when a maximum number of iterations is met, the training iteration stops, and the training of the hybrid quantum neural network model is completed.

6. The image classification method according to claim 1, characterized in that: In step S3 and step S4, the hybrid quantum neural network model uses a parameterized quantum circuit with an entanglement layer Ub containing specified sample labels, so that the primary features are extracted layer by layer to obtain higher-level features. For the same type of labeled sample input, the same quantum circuit structure is used for network forward calculation.

7. The image classification method according to claim 1 or 6, characterized in that: In step S3 and step S4, the parameterized quantum circuit adopted by the hybrid quantum neural network model, wherein the entanglement layer Ub contains the specified sample label; the entanglement layer extracts the primary features to obtain higher-level features for quantum convolution operation; after the module is measured, its output is used as the input node tensor in the classical partial matrix product state structure, followed by the forward calculation of the matrix product state network part, and finally the performance evaluation of the model is performed; there are two criteria for the evaluation of the model: the first is the convergence of the loss function, and its corresponding mathematical form is as follows: Where M represents the number of categories, i is the index of the training set sample, and y c is a one-hot encoded true label vector of length M, It is a probability distribution vector of length M after model prediction, and each component represents the probability that the predicted data is category c; another evaluation criterion is the accuracy of model prediction, and its corresponding mathematical form is as follows: Among them, N test represents the number of samples in the test set, and j is the index of the test set sample; Indicates predicting sample j and returning the index corresponding to the maximum value of the prediction result, y c represents the true label of sample j; therefore, When the result is true, it means that the model's prediction result for sample j is consistent with the true label.

Citation Information

Patent Citations

  • Method for processing graph data through quantum graph convolutional neural network

    CN113159239A

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

    CN117649560A

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

    CN118823483A

  • Quantum convolutional neural network circuit

    WO2024123742A1

Cited By

  • Space electromagnetic spectrum identification method based on parameterized quantum circuit

    CN118937813A

  • A method for spatial electromagnetic spectrum identification based on parameterized quantum circuits

    CN118937813B

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

    CN120598069A

  • Ocean surface cloud detection method based on quantum convolutional neural network

    CN120747728A

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

    CN120997597A