Image classification method based on quantum circuit convolution

Through the image classification method based on quantum circuit convolution, the feature extraction and encoding is used to extract and entangle characteristics, the calculation complexity and resource consumption problems of quantum convolution networks on large-scale data sets are solved, more efficient feature representation and stronger discrimination are achieved, and the scalability and accuracy of the model are improved.

CN120356019AInactive Publication Date: 2025-07-22HUNAN UNIV OF SCI & TECH

Patent Information

Application Number
CN202510848715.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-07-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing quantum convolutional neural networks have high computational complexity, high resource consumption, high training cost and limited scalability when processing large-scale data sets. The measurement operations are complex and there is noise interference, which affects the accuracy and stability of the model.

Method used

Using the image classification method based on quantum circuit convolution, through data preprocessing, quantum circuit convolution layer and image classification layer design, the feature extraction and encoding are used to reduce measurement operations and improve computing efficiency and scalability.

Benefits of technology

Process more data under the same number of qubit conditions, reduce errors, improve model performance, improve feature representation and discrimination, and expand the adaptability and feasibility of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120356019A_ABST
    Figure CN120356019A_ABST
Patent Text Reader

Abstract

The invention discloses an image classification method based on quantum circuit convolution, and the method comprises the following steps: receiving a to-be-classified image, and carrying out the data preprocessing of the to-be-classified image; inputting the preprocessed data into a quantum circuit convolutional layer, and carrying out data coding, quantum evolution and measurement; and inputting data output by the quantum circuit convolution layer into an image classification layer to obtain category output with the maximum probability, namely a classification result of the to-be-classified image. According to the method, quantum circuit convolution is introduced into a traditional convolutional neural network, and the feature extraction capability is enhanced by using the characteristics of quantum calculation. Compared with a classic convolution kernel, the quantum convolution kernel can process information in a higher-dimensional Hilbert space so as to capture richer features.
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 particularly to an image classification method based on quantum circuit convolution. Background Art

[0002] With the rapid development of quantum computing technology, quantum machine learning has gradually become a research hotspot in the field of artificial intelligence. Relying on its unique quantum superposition, entanglement, and interference characteristics, quantum computing shows significant advantages in certain specific computing tasks.

[0003] As one of the core models of deep learning, the traditional convolutional neural network has achieved remarkable results in many fields such as image recognition, object detection, and natural language processing. The core structure of the traditional convolutional neural network is usually sequentially stacked by three key components: the convolutional layer, which uses multiple learnable filters to perform local feature extraction on the input data in a sliding window manner, and each filter can capture different feature patterns (such as edges, textures, etc.); the pooling layer (usually using max-pooling or average-pooling), which downsamples the feature map to reduce the spatial dimension, while enhancing the translational invariance of the features and reducing the computational amount; the fully connected layer unfolds the high-level features extracted after multiple convolutions and poolings into a one-dimensional vector, and realizes the final classification or regression task through a multi-layer perceptron structure. It mainly relies on classical computing to complete feature extraction, data processing, and parameter optimization. However, the traditional convolutional neural network faces a series of challenges when dealing with large-scale datasets: the computational complexity of the model is relatively high, and as the network depth and parameter scale increase, the training cost rises sharply; a large number of parameters bring huge consumption of video memory and computing resources; the optimization and tuning process of the deep model is also time-consuming and prone to falling into local optima. These problems significantly limit the application of the traditional convolutional neural network in large-scale datasets and complex tasks.

[0004] To solve the above problems, researchers have begun to try to combine quantum computing with convolutional neural networks in order to improve the model performance by utilizing the characteristics of quantum computing. The core idea is to use a parameterized quantum circuit to simulate the classical convolution operation. By introducing parameterized quantum gates, the quantum convolutional neural network has achieved certain results in experiments on small-scale datasets. However, the existing quantum convolution methods still face many problems in practical applications: the computational resource utilization rate of the quantum circuit is relatively low, resulting in the failure to fully utilize the hardware potential; the measurement operation is complex and there is significant noise interference, affecting the accuracy and stability of the model; the current quantum convolution structure has obvious limitations in terms of scalability and is difficult to be directly applied to larger-scale quantum bit systems or more complex datasets.

[0005] How to effectively process more data under the condition of the same number of qubits, reduce measurement operations in the quantum circuit, thereby reducing errors and improving the model performance, has become a key problem to be solved urgently in the current research of quantum convolutional neural networks. Summary of the Invention

[0006] To solve the above technical problems, the present invention provides an image classification method based on quantum circuit convolution with simple algorithm and high classification accuracy.

[0007] The technical solution of the present invention to solve the above technical problems is: an image classification method based on quantum circuit convolution, comprising the following steps:

[0008] S1: Receive the image to be classified, and perform data preprocessing on the image to be classified;

[0009] S2: Input the preprocessed data into the quantum circuit convolution layer, and perform data encoding, quantum evolution and measurement;

[0010] S3: Input the data output by the quantum circuit convolution layer into the image classification layer, and obtain the classification result of the image to be classified, which is the category output with the highest probability.

[0011] In the above image classification method based on quantum circuit convolution, in the step S1, the data preprocessing includes data dimensionality reduction and data normalization processing, and average pooling is used as the data dimensionality reduction method, which is expressed as:

[0012]

[0013] where, is the data of the th column and the th row after pooling, , are the length and width of the pooling data range respectively, represents the value of the th row and the th column of the pooling data.

[0014] In the above image classification method based on quantum circuit convolution, in the step S1, the normalization processing is used to adjust the numerical range of the data to make the data distribution uniform, and the normalization processing is expressed as:

[0015]

[0016] where, is the data after normalization, is the pi, is the data before normalization, is the minimum value of the data before normalization, is the maximum value of the data before normalization.

[0017] In the above image classification method based on quantum circuit convolution, in step S2, the quantum circuit convolution layer includes Rx rotation gates and CNOT gates, which are used for quantum feature mapping and quantum convolution. The process of data encoding is as follows:

[0018] Apply Rx rotation gates to 4 qubits to encode the input data into a quantum state, such that the state of each qubit is associated with the input data. The unitary matrix of the Rx rotation gate is expressed as:

[0019]

[0020] where is the rotation angle; is the imaginary unit, representing the phase change.

[0021] In the above image classification method based on quantum circuit convolution, in step S2, the specific process of quantum evolution is as follows:

[0022] Use CNOT gates to create entanglement and propagate information between qubits; the CNOT gate uses the unitary matrix which is expressed as:

[0023]

[0024] The CNOT gate acts on (0→1), (1→2), (2→3) in sequence. In the parentheses, the former number represents the control qubit and the other number represents the target qubit, forming a linear entanglement structure.

[0025] In the above image classification method based on quantum circuit convolution, in step S2, the specific process of measurement is as follows:

[0026] Perform convolution on the preprocessed data. Each time, obtain a data block of size from the preprocessed data, one-dimensionalize it and then input it into the quantum circuit convolution layer. For one convolution operation, the unitary operation of the entire quantum circuit convolution layer is expressed as:

[0027] where represents establishing a CNOT gate between the 2nd qubit and the 3rd qubit; represents the sequential action of the quantum circuit; is the identity gate, indicating that no operation is performed on this qubit; represents the RX gate operation; represents the combination of each gate in the multi-qubit operation; represents the data to be convolved;

[0028] The final state after the circuit runs It is expressed as:

[0029]

[0030] where is the output state and U is the unitary operation;

[0031] By running the quantum circuit times and measuring, the average value of the final state is taken as the output of the entire convolutional layer of the quantum circuit. Thus, a convolutional operation on a data block is completed, and so on, to complete the convolutional operation on the entire image.

[0032] In the above image classification method based on quantum circuit convolution, in step S3, in the image classification task, the fully connected layer maps the extracted features to class probabilities; the quantum circuit convolutional layer generates high-dimensional feature representations and converts them into one-dimensional vectors through flattening , , is the real number field, represents the length of the feature vector, and the fully connected layer uses the weight matrix and the bias term to perform a linear transformation to obtain the output :

[0033]

[0034] Then, the final output is obtained through the activation function. In the classification layer, the number of outputs of the last fully connected layer is equal to the total number of classes , and each value represents the predicted score of the class. The Softmax function is used to normalize the output:

[0035]

[0036] where represents the probability of being predicted as class , represents the original score of the model for class , and the exponential of the original score is taken to ensure that the score is positive, represents the sum of the scores of the model for all classes.

[0037] The beneficial effects of the present invention are as follows:

[0038] 1. The present invention innovatively introduces a quantum circuit convolution module into the traditional convolutional neural network architecture, fully integrating the core characteristics of quantum computing to enhance the feature extraction ability of the model. Different from classical convolutional kernels that only perform linear transformations in a fixed-dimensional space, the quantum circuit convolution proposed in the present invention encodes and evolves input information in a higher-dimensional Hilbert space by constructing adjustable quantum circuits and utilizing the superposition and entanglement of quantum states, thereby being able to mine deeper and more complex potential feature patterns. In addition, while keeping the model parameters controllable, the quantum convolutional kernel improves the model's ability to express non-linearity and high-dimensional correlations, making the feature representation more abundant and discriminative, providing new ideas for improving the overall model performance.

[0039] 2. The present invention proposes a new design scheme for the quantum circuit convolution layer, significantly improving the efficiency and scalability of the quantum convolution network in data processing. Through structural optimization and encoding mechanism innovation, the quantum circuit convolution layer can process more input data under the same quantum computing resource constraints, thereby improving the overall computing efficiency. Traditional quantum convolution methods usually adopt a one-to-one mapping relationship between input data and qubits, that is, each data point requires an independent qubit, which limits the scale expansion and computing efficiency of the model in practical applications. However, the present invention can simultaneously encode and process 9 data points with only 4 qubits by introducing an efficient data encoding strategy and a multi-data reuse mechanism, greatly reducing the demand for qubit resources. At the same time, the present invention reduces the number of quantum measurement operations, alleviates the impact of measurement errors on the model performance, and further optimizes the overall execution time and resource consumption. While ensuring the accuracy, it effectively expands the feasibility and adaptability of the quantum convolution network in practical tasks, providing technical support for constructing an efficient quantum-classical hybrid neural network. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is the overall flowchart of the present invention.

[0041] Figure 2 is the structural diagram of the quantum circuit convolution layer of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0042] The present invention will be further described below in conjunction with the drawings and embodiments.

[0043] As Figure 1 shown, an image classification method based on quantum circuit convolution includes the following steps:

[0044] S1: Receive the image to be classified and perform data preprocessing on the image to be classified.

[0045] Data preprocessing includes data dimensionality reduction and data normalization to improve the training efficiency and generalization ability of the model.

[0046] The dimensionality reduction operation aims to reduce the dimension of the data while retaining the main features, thereby reducing the computational complexity and reducing redundant information, and can effectively extract the key information of the data. Using average pooling as the data dimensionality reduction method, it is expressed as:

[0047]

[0048] where is the data of the th column and the th row after pooling, , are the length and width of the pooling data range respectively, represents the value of the th row and the th column of the pooling data.

[0049] The normalization process is used to adjust the numerical range of the data to make the data distribution uniform, thereby accelerating the optimization process and reducing the risk of gradient disappearance or gradient explosion. The normalization process is expressed as:

[0050]

[0051] where is the data before normalization, is the data after normalization, is pi, is the minimum value of the data within the pooling range before normalization, is the maximum value of the data within the pooling data range before normalization.

[0052] Through the preprocessing steps, the stability of the model can be improved, making the model more robust in different datasets.

[0053] S2: Input the preprocessed data into the quantum circuit convolutional layer for data encoding, quantum evolution, and measurement.

[0054] The quantum circuit convolutional layer introduces the structure of quantum computing into the classical convolutional neural network, and uses the quantum circuit to transform the local input data to extract richer features. Figure 2 is the structure of the quantum circuit convolutional layer, , , , It represents four qubits, which are also connected by 3 CNOT gates among the four qubits. c represents the classical bit for receiving measurement data, and RX represents the RX operation gate. The number below the operation gate indicates that the data with the corresponding number should be input into this RX gate. Its core steps include data encoding, quantum evolution, and measurement. By means of quantum state mapping, the feature representation ability is improved. Only one measurement operation needs to be performed on the four qubits, reducing the number of measurements.

[0055] The quantum circuit convolution layer includes Rx rotation gates and CNOT gates, which are used for quantum feature mapping and quantum convolution. The process of data encoding is as follows:

[0056] Apply Rx rotation gates on 4 qubits to encode the input data into the quantum state, making the state of each qubit associated with the input data. The unitary matrix of the Rx rotation gate is expressed as:

[0057]

[0058] where is the rotation angle; is the imaginary unit, representing the phase change.

[0059] This parametric rotation of the Rx rotation gate can be used as a trainable parameter and optimized in the quantum neural network to learn complex data patterns. There are 9 Rx rotation gates in the quantum circuit convolution layer, which can receive 9 data and perform convolution on the 9 data, improving the data processing efficiency compared with the existing 4 data.

[0060] The specific process of quantum evolution is as follows:

[0061] Use CNOT gates to create entanglement and propagate information among qubits. The CNOT gate uses the unitary matrix which is expressed as:

[0062]

[0063] The CNOT gate acts on (0→1), (1→2), (2→3) in sequence. In the brackets, the former number represents the control bit and the latter number represents the target bit, forming a linear entanglement structure to ensure that the data is not limited to local bits but shared in the whole quantum system. This entanglement structure is similar to the feature interaction in the classical neural network and can capture the global dependencies of the data, thus enhancing the computing power.

[0064] The Rx rotation gate acts as a non-linear activation, and the CNOT gate is used for information propagation, which is equivalent to the convolution kernel in a classical Convolutional Neural Network (CNN). Due to the high-dimensional nature of quantum states, this method helps to extract richer features than classical methods, giving it potential advantages in tasks such as image classification and pattern recognition.

[0065] The specific process of measurement is as follows:

[0066] Perform convolution on the preprocessed data. Each time, obtain a data block of a certain size from the preprocessed data, flatten it and then input it into the quantum circuit convolutional layer. For one convolution operation, the unitary operation of the entire quantum circuit convolutional layer is expressed as: expressed as:

[0067]

[0068] where represents establishing a CNOT gate between the second qubit and the third qubit; represents the sequential action of the quantum circuit; is the identity gate, indicating that no operation is performed on this qubit; represents the Rx gate operation; represents the combination of each gate in the multi-qubit operation; represents the data to be convolved;

[0069] The final state after the circuit runs is expressed as:

[0070]

[0071] where is the output state, and U is the unitary operation;

[0072] By running the quantum circuit times and measuring, take the average value of the final state as the output of the entire quantum circuit convolutional layer. Thus, one convolution operation on the data block is completed, and so on, to complete the convolution operation on the entire image.

[0073] S3: Input the data output by the quantum circuit convolutional layer into the image classification layer, and the class output with the highest probability is the classification result of the image to be classified.

[0074] In the image classification task, the fully connected layer maps the extracted features to class probabilities; the quantum circuit convolutional layer generates a high-dimensional feature representation, which is converted into a one-dimensional vector through flattening , , is in the real number field, represents the length of the feature vector, and the fully connected layer uses the weight matrix and the bias term perform a linear transformation to obtain the output :

[0075]

[0076] Then, the final output is obtained through the activation function. In the classification layer, the number of outputs of the last fully connected layer is equal to the total number of classes , and each value represents the predicted score of the class. The Softmax function is used to normalize the output:

[0077]

[0078] where represents the probability of being predicted as class , represents the raw score of the model for class , and the exponential function is taken on the raw score to ensure that the score is positive represents the sum of the scores of the model for all classes

Claims

1. An image classification method based on quantum circuit convolution, characterized in that, It includes the following steps: S1: Receive the image to be classified and perform data preprocessing on the image to be classified; S2: Input the preprocessed data into the quantum circuit convolutional layer for data encoding, quantum evolution, and measurement; S3: Input the data output by the quantum circuit convolutional layer into the image classification layer, and the class output with the highest probability is the classification result of the image to be classified.

2. The image classification method based on quantum circuit convolution according to claim 1, wherein In step S1, the data preprocessing includes data dimensionality reduction and data normalization processing. Average pooling is used as the data dimensionality reduction method, expressed as: ; Among them, is the data of the th column and the th row after pooling, , are the length and width of the pooling data range respectively, represents the value of the th row and the th column of the pooling data.

3. The image classification method based on quantum circuit convolution according to claim 2, wherein In step S1, the normalization processing is used to adjust the numerical range of the data to make the data distribution uniform. The normalization processing is expressed as: ; Among them, is the normalized data, is pi, is the data before normalization, is the minimum value of the data before normalization, is the maximum value of the data before normalization.

4. The image classification method based on quantum circuit convolution according to claim 1, wherein In step S2, the quantum circuit convolutional layer includes Rx rotation gates and CNOT gates, which are used for quantum feature mapping and quantum convolution. The process of data encoding is: Apply the Rx rotation gate to 4 qubits to encode the input data into the quantum state, so that the state of each qubit is associated with the input data. The unitary matrix of the Rx rotation gate is expressed as: ; where is the rotation angle; is the imaginary unit, representing the phase change.

5. The image classification method based on quantum circuit convolution according to claim 4, wherein In step S2, the specific process of quantum evolution is: Create entanglement using a CNOT gate to propagate information between qubits; the CNOT gate uses a unitary matrix Denoted as: ; The CNOT gate acts on (0→1), (1→2), (2→3) in sequence. In the parentheses, the former number represents the control bit and the other number represents the target bit, forming a linear entanglement structure.

6. The image classification method based on quantum circuit convolution according to claim 5, characterized in that, In step S2, the specific process of measurement is: Perform convolution on the preprocessed data, and each time obtain a data block of a certain size from the preprocessed data. After one-dimensionalization, it is input into the quantum circuit convolutional layer. For one convolution operation, the unitary operation of the entire quantum circuit convolutional layer is expressed as: ; Among them Indicates establishing a CNOT gate between the second qubit and the third qubit; Indicates the sequential action of the quantum circuit; Is an identity gate, indicating no operation on this qubit; Indicates an RX gate operation; Indicates the combination of each gate in a multi-qubit operation; Indicates the data to be convolved; The final state after the circuit operates It is expressed as: ; Among them is the output state, and U is the unitary operation; By running the quantum circuit times and taking the average value of the final state as the output of the convolutional layer of the entire quantum circuit, a convolutional operation on a data block is completed. By analogy, the convolutional operation on the entire image is completed.

7. The image classification method based on quantum circuit convolution according to claim 1, wherein In the step S3, in the image classification task, the fully connected layer maps the extracted features to class probabilities; the quantum circuit convolutional layer generates high-dimensional feature representations, which are converted into one-dimensional vectors through flattening. , , is the real number field, represents the length of the feature vector, and the fully connected layer uses the weight matrix and the bias term to perform a linear transformation to obtain the output : ; Then, the final output is obtained through the activation function. In the classification layer, the number of outputs of the last fully connected layer is equal to the total number of categories , and each value represents the predicted score of the category. The Softmax function is used to normalize the output: ; where represents the probability predicted as class , represents the raw score of the model for class , and the exponential of the raw score is taken to ensure a positive score, represents the sum of the scores of the model for all classes.

Citation Information

Patent Citations

  • Classification method based on quantum multilayer sensor and related equipment

    CN115293254A

  • EEG data classification method of hybrid convolutional neural network based on classical quantum

    CN118035843A

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

    CN118823483A

  • Quantum convolution operator

    US20240095563A1

Cited By

  • Data feature extraction method and device based on quantum convolutional neural network

    CN120541498A