Image classification method, system and device based on quantum convolutional neural network, medium and product

By adopting a method based on quantum convolutional neural network in the image classification task, using structures such as quantum entanglement layers to extract and classify images, the problem of poor classification performance and accuracy in the existing technology is solved, and efficient image classification effect is achieved.

CN120125909APending Publication Date: 2025-06-10CHANGCHUN UNIV OF SCI & TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510284204.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The existing quantum convolutional neural networks have poor classification performance and classification accuracy in image classification tasks, and the scale and stability of existing quantum computers have not yet met the needs of large-scale applications.

Method used

The image classification method based on quantum convolution neural network is adopted to obtain the images to be classified, preprocess and quantum encoding, and the image is featured using quantum entanglement layer, quantum convolution layer, quantum pooling layer and quantum fully connected layer.

Benefits of technology

By fully utilizing quantum entanglement and superposition characteristics, the classification performance and overall accuracy of the network are improved, and efficient image classification under the existing quantum computing framework is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120125909A_ABST
    Figure CN120125909A_ABST
Patent Text Reader

Abstract

The invention discloses an image classification method, system and device based on a quantum convolutional neural network, a medium and a product, and relates to the field of image classification, and the method comprises the steps: obtaining a to-be-classified image; preprocessing the to-be-classified image to obtain a processed to-be-classified image; converting the processed to-be-classified image into quantum image information by using a quantum coding technology; determining the category of the to-be-classified image by using an image classification model according to the quantum image information; wherein the image classification model is obtained by training a quantum convolutional neural network by using a training data set; the quantum convolutional neural network comprises a quantum entanglement layer, a quantum convolutional layer, a quantum pooling layer and a quantum full-connection layer which are connected in sequence. According to the method, the quantum convolutional neural network is adopted to classify the images, quantum entanglement and superposition characteristics are fully utilized, and the classification performance and the overall precision of the network are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image classification, and particularly to an image classification method, system, device, medium and product based on a quantum convolutional neural network. Background Art

[0002] With the rapid development of artificial intelligence technology, image classification, as one of the core tasks of computer technology, plays a crucial role in fields such as medical image analysis, autonomous driving technology, and security monitoring. However, traditional methods, such as image classification algorithms based on classical convolutional neural networks, face bottlenecks such as high computational resource requirements and slow training speed when dealing with large-scale image data. Quantum computing, as an emerging computing paradigm, relies on characteristics such as superposition and entanglement between qubits and shows potential to outperform classical computing in certain computational tasks. Quantum neural networks combine quantum computing and neural networks and have unique advantages in accelerating computational tasks, and can significantly improve computational efficiency under certain conditions, thereby promoting the development of image classification tasks.

[0003] In recent years, the quantum convolutional neural network, as an innovative model that combines quantum computing and convolutional neural networks, has received extensive attention. The quantum convolutional neural network utilizes the advantages of quantum computing, not only improving the processing efficiency of high-dimensional data, but also effectively utilizing the superposition and parallelism of quantum states to significantly accelerate the computational process of image classification tasks. However, although the quantum convolutional neural network shows potential in accelerating computing, the current development of quantum hardware is still in its initial stage, and the scale and stability of existing quantum computers have not yet met the requirements of large-scale applications, and the classification performance and classification accuracy of image classification methods that combine quantum computing and convolutional neural networks are poor. Therefore, how to propose an efficient and feasible quantum image classification method by combining the advantages of classical convolutional neural networks under the existing quantum computing framework is still an issue worthy of in-depth study. Summary of the Invention

[0004] The purpose of the present application is to provide an image classification method, system, device, medium and product based on a quantum convolutional neural network to improve image classification performance and classification accuracy.

[0005] To achieve the above object, the present application provides the following solutions:

[0006] In the first aspect, the present application provides an image classification method based on a quantum convolutional neural network, including:

[0007] Obtain an image to be classified;

[0008] Preprocess the image to be classified to obtain a preprocessed image to be classified;

[0009] Using quantum coding technology, convert the processed image to be classified into quantum image information;

[0010] According to the quantum image information, use an image classification model to determine the category of the image to be classified; wherein, the image classification model is obtained by training a quantum convolutional neural network using a training data set; the quantum convolutional neural network includes a quantum entanglement layer, a quantum convolutional layer, a quantum pooling layer, and a quantum fully connected layer connected in sequence.

[0011] Optionally, perform normalization processing on the image to be classified to obtain the processed image to be classified.

[0012] Optionally, using quantum coding technology to convert the processed image to be classified into quantum image information specifically includes:

[0013] Perform FRQI coding or amplitude coding on the processed image to be classified to obtain quantum image information.

[0014] Optionally, training the quantum convolutional neural network using the training data set specifically includes:

[0015] Obtain the MNIST data set and the FashionMNIST data set;

[0016] Screen out the sample images with labels 0 and 1 from the MNIST data set and the FashionMNIST data set as the training data set and the test data set;

[0017] Perform normalization processing on the training data set to obtain the processed training data set; the processed training data set includes the processed sample images and their corresponding labels;

[0018] Perform FRQI coding or amplitude coding on the processed sample images to obtain the quantum image information of the sample images;

[0019] Use the quantum image information of the sample images as the input and the corresponding labels as the output to train the quantum convolutional neural network to obtain an image classification model.

[0020] Optionally, before performing normalization processing on the training data set, it further includes:

[0021] Adjust the size of the sample images to 16×16.

[0022] Optionally, the construction of the quantum entanglement layer specifically includes:

[0023] Use singular value decomposition to decompose a random matrix to obtain a unitary matrix;

[0024] Apply the unitary matrix as a quantum gate to a qubit to form a quantum entanglement layer.

[0025] In a second aspect, the present application provides an image classification system based on a quantum convolutional neural network. The image classification system based on a quantum convolutional neural network is used to implement the above-mentioned image classification method based on a quantum convolutional neural network. The image classification system based on a quantum convolutional neural network includes:

[0026] A data acquisition module, configured to acquire an image to be classified;

[0027] A preprocessing module, configured to preprocess the image to be classified to obtain a preprocessed image to be classified;

[0028] An encoding module, configured to use quantum encoding technology to convert the preprocessed image to be classified into quantum image information;

[0029] A classification module, configured to determine the category of the image to be classified according to the quantum image information by using an image classification model; wherein, the image classification model is obtained by training a quantum convolutional neural network using a training data set; the quantum convolutional neural network includes a quantum entanglement layer, a quantum convolutional layer, a quantum pooling layer, and a quantum fully connected layer connected in sequence.

[0030] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the computer program to implement the image classification method based on a quantum convolutional neural network described in any one of the above.

[0031] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the image classification method based on a quantum convolutional neural network described in any one of the above.

[0032] In a fifth aspect, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the image classification method based on a quantum convolutional neural network described in any one of the above.

[0033] According to the specific embodiments provided by the present application, the present application has the following technical effects:

[0034] The present application provides an image classification method, system, device, medium and product based on a quantum convolutional neural network. The method includes obtaining an image to be classified; preprocessing the image to be classified to obtain a preprocessed image to be classified; using a quantum encoding technique to convert the preprocessed image to be classified into quantum image information; determining the category of the image to be classified according to the quantum image information by using an image classification model, where the image classification model is obtained by training a quantum convolutional neural network using a training data set; and the quantum convolutional neural network includes a quantum entanglement layer, a quantum convolutional layer, a quantum pooling layer and a quantum fully connected layer connected in sequence. The present application classifies images using a quantum convolutional neural network, making full use of the quantum entanglement and superposition characteristics, and effectively improving the classification performance and overall accuracy of the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0036] Figure 1 It is a schematic flowchart of an image classification method based on a quantum convolutional neural network provided by an embodiment of the present application;

[0037] Figure 2 It is a flowchart of the image classification method based on a quantum convolutional neural network of the present application in practical application;

[0038] Figure 3 It is a picture of the MNIST data set in the experiment of the present application and a sample picture after being adjusted to the experimental size;

[0039] Figure 4 It is a picture of the Fashion MNIST data set in the experiment of the present application and a sample picture after being adjusted to the experimental size;

[0040] Figure 5 It is a schematic diagram of a custom unitary matrix for designing a quantum entanglement layer and a quantum convolutional layer of the present application;

[0041] Figure 6 It is a schematic diagram of a basic pooling unit for designing a quantum pooling layer of the present application;

[0042] Figure 7 It is a schematic diagram of an important component swap test for designing a quantum fully connected layer of the present application;

[0043] Figure 8 It is a global circuit schematic diagram for preparing a quantum convolutional neural network of the present application;

[0044] Figure 9 Schematic diagram of experimental comparison results of different coding methods on the MNIST dataset in the simulation experiment of this application;

[0045] Figure 10 Schematic diagram of experimental comparison results of different coding methods on the Fashion MNIST dataset in the simulation experiment of this application;

[0046] Figure 11 Curve graph of loss change at different bit flip noise levels in the quantum entanglement layer in the simulation experiment of this application;

[0047] Figure 12 Curve graph of loss change at different bit flip noise levels in the quantum convolutional layer in the simulation experiment of this application;

[0048] Figure 13 Curve graph of loss change at different bit flip noise levels in the quantum pooling layer in the simulation experiment of this application;

[0049] Figure 14 Curve graph of loss change at different phase flip noise levels in the quantum entanglement layer in the simulation experiment of this application;

[0050] Figure 15 Curve graph of loss change at different phase flip noise levels in the quantum convolutional layer in the simulation experiment of this application;

[0051] Figure 16 Curve graph of loss change at different phase flip noise levels in the quantum pooling layer in the simulation experiment of this application;

[0052] Figure 17 Curve graph of loss change at different depolarizing flip noise levels in the quantum entanglement layer in the simulation experiment of this application;

[0053] Figure 18 Curve graph of loss change at different depolarizing flip noise levels in the quantum convolutional layer in the simulation experiment of this application;

[0054] Figure 19 Curve graph of loss change at different depolarizing flip noise levels in the quantum pooling layer in the simulation experiment of this application;

[0055] Figure 20 Schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed implementation manners

[0056] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying 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. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0057] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0058] In an exemplary embodiment, as Figure 1 and Figure 2 shown, a method for image classification based on a quantum convolutional neural network is provided, which effectively classifies images with labels 0 and 1 in the MNIST or Fashion MNIST datasets, including the following steps:

[0059] S1: Obtain the image to be classified.

[0060] S2: Preprocess the image to be classified to obtain the preprocessed image to be classified.

[0061] As an optional implementation manner, perform normalization processing on the image to be classified to obtain the preprocessed image to be classified.

[0062] S3: Use quantum encoding technology to convert the preprocessed image to be classified into quantum image information.

[0063] As an optional implementation manner, S3 specifically includes:

[0064] Perform FRQI encoding or amplitude encoding on the preprocessed image to be classified to obtain quantum image information.

[0065] S4: According to the quantum image information, use an image classification model to determine the category of the image to be classified; wherein, the image classification model is obtained by training a quantum convolutional neural network using a training dataset; the quantum convolutional neural network includes a quantum entanglement layer, a quantum convolutional layer, a quantum pooling layer, and a quantum fully connected layer connected in sequence.

[0066] As an optional implementation manner, training a quantum convolutional neural network using a training dataset specifically includes:

[0067] S41: Obtain the MNIST dataset and the FashionMNIST dataset.

[0068] S42: Select sample images with labels 0 and 1 from the MNIST dataset and the Fashion MNIST dataset as the training dataset and the test dataset.

[0069] S43: Normalize the training dataset to obtain the processed training dataset; the processed training dataset includes the processed sample images and their corresponding labels.

[0070] S44: Perform FRQI encoding or amplitude encoding on the processed sample images to obtain the quantum image information of the sample images.

[0071] S45: Use the quantum image information of the sample images as the input and the corresponding labels as the output to train the quantum convolutional neural network to obtain an image classification model.

[0072] In practical applications, this application constructs a new type of quantum convolutional neural network based on quantum computing, which shows good application potential in image classification tasks. The implementation steps are as follows: (1) Data preprocessing and quantum encoding; (2) Design of the quantum entanglement layer; (3) Design of the quantum convolutional layer; (4) Design of the quantum pooling layer; (5) Design of the quantum fully connected layer; (6) Overall architecture and training of the quantum convolutional neural network; (7) Experimental results and application verification.

[0073] This application makes full use of the entanglement and parallelism of quantum computing, simplifies the structure of the neural network, reduces the number of training parameters, and achieves excellent results in image classification tasks.

[0074] The specific steps for step (1) are as follows:

[0075] First step, adjust the input image to a size suitable for quantum computing to adapt to the input requirements of quantum computing. To ensure that the size of the image matches the number of qubits, so as to be effectively mapped into the quantum system.

[0076] Second step, normalize the image so that the pixel values are scaled to the range [0, 1] to ensure that the qubits can effectively receive the input data. The normalized image data can ensure the high-precision requirements of quantum computing and improve the computational efficiency of the data, enabling quantum computing to process larger-scale image data.

[0077] In the third step, quantum coding technology is adopted to convert classical image data into quantum information, enabling the image data to be processed in parallel in quantum computing and making full use of the parallelism and high-dimensional space characteristics of quantum computing. This process can compress and transform large-scale classical image data into quantum information, thereby achieving more efficient and accurate image processing in quantum computing. Through the superposition and entanglement characteristics of quantum computing, feature extraction and image classification can be carried out in a higher-dimensional space, thus improving the accuracy and efficiency of image processing tasks.

[0078] Figure 3 and Figure 4 respectively show the sample images with labels 0 and 1 selected from the MNIST dataset and the Fashion MNIST dataset. These sample images are divided into a training dataset and a test dataset. In the experiment, the training dataset contains 2,000 images, and the test dataset contains 1,000 images. The original size of each image is 28×28 pixels. To meet the experimental requirements, all images are resized to 16×16 and normalized. The processed sample images adopt two encoding methods, FRQI encoding and amplitude encoding, to convert classical image information into quantum image information to suit the input format of the quantum convolutional neural network.

[0079] The specific steps for step (2) are as follows:

[0080] In the first step, the random matrix is decomposed using Singular Value Decomposition (SVD) to obtain a unitary matrix U gate (Custom unitary matrix):

[0081]

[0082] where A is a randomly generated complex matrix, i.e., the random matrix, U is the left singular matrix, V is the right singular matrix, and S is the diagonal matrix. In singular value decomposition, U and V, as the left and right singular vectors of matrix A, are both unitary matrices. The U and V obtained through singular value decomposition can be combined into a quantum gate U gate , which is also a unitary matrix and meets the unitary operation requirements in quantum computing. Since the unitary matrix keeps the probability of the quantum state unchanged, U gate can be used as a quantum gate in the quantum circuit to realize the entanglement and operation between qubits.

[0083] Step 2: Use the unitary matrix as a quantum gate to act on the qubits to form a quantum entanglement layer. In the quantum entanglement layer, the first entanglement operation is achieved by applying the first unitary matrix Ugate, and subsequent entanglement operations are successively achieved by applying different unitary matrices to act on the qubits, forming a series of quantum entanglements. Specifically, the first unitary operation is U 1 , the second unitary operation is U 2 , and so on until all the qubits that need to be entangled are properly operated:

[0084]

[0085] where A 1 , A 2 , A 3 , A 4 are respectively partition matrices; is the direct sum operation; k is the counting index; i is the i-th unitary operation; n is the number of unitary operations; a 11 -a 44 are respectively random numbers.

[0086] According to the principle of quantum computing, after the operations of multiple quantum gates, the final quantum state |ψ E > can be expressed in the following form:

[0087]

[0088] where I is the identity matrix; |ψ E > is the quantum state after quantum encoding, E 1 , E 2 , …, E n represent the unitary operations applied in each step. Through this series of operations, each qubit acts on the quantum gate in a predetermined manner, thus forming a quantum entanglement layer and gradually changing the quantum state. These unitary operations ensure the normalization of the probability amplitude of the quantum state throughout the process, while realizing the entanglement and information sharing between qubits.

[0089] As Figure 5 shown, the custom unitary matrix is obtained by decomposing a random matrix into a unitary matrix through singular value decomposition. By arranging these unitary matrices in a specific order, entanglement can be generated between qubits, thereby enhancing the expression ability of image information, enabling the quantum convolutional neural network to process image data more efficiently, and improving its classification performance.

[0090] Step 3: Design of the quantum convolutional layer.

[0091] The specific steps for step (3) are as follows:

[0092] In the first step, a custom unitary matrix is constructed through singular value decomposition and applied as a quantum gate to qubits.

[0093] In the second step, a quantum convolution operation is designed to simulate the convolution process in a classical convolutional neural network. The key to the quantum convolution operation is to apply the custom unitary matrix to adjacent qubits. In a classical convolutional neural network, local features are extracted by sliding a convolution kernel over an image, while in a quantum convolutional neural network, this process is simulated by applying the same unitary matrix to adjacent qubits:

[0094]

[0095] where C 1 、C 2 、C 3 are convolution operations; N is the number of qubits required for convolution design; width is the width of the image; height is the length of the image.

[0096] According to the principles of quantum computing, after operations with multiple quantum gates, the final quantum state |ψ C > can be expressed as

[0097] The quantum convolution layer also uses a custom unitary matrix. This unitary matrix is applied to every two adjacent qubits to effectively enhance the feature extraction ability by extracting local information. At the same time, to achieve parameter sharing, the quantum convolution layer processes all adjacent qubits with the same unitary operation.

[0098] The specific steps for step (4) are as follows:

[0099] In the first step, the Hadamard gate is used to perform a superposition state operation on the qubits, which can put the qubits in a superposition state, thus realizing the parallelism of quantum computing. The parallelism of quantum computing means that multiple computational paths can be carried out simultaneously, which greatly improves the computational efficiency. Then, auxiliary qubits are introduced and the X gate is applied to them for subsequent quantum operations and calculations:

[0100]

[0101] where V H1 、V H2 、...、V Hn are the entanglement processes in the pooling operation; H is the Hadamard gate.

[0102] In the second step, a Controlled Rotation around Y-axis Gate (CRY) is applied to the auxiliary qubits to perform an interaction operation between the qubits and the auxiliary qubits:

[0103]

[0104] Among them, V 1 、V 2 、V n are pooling operations; RY is the rotation gate around the Y-axis (Rotation around Y-axis).

[0105] By controlling the operation of the rotation gate CRY, the pooling process entangles the states of qubits, enabling information exchange and fusion among multiple qubits. Since the rotation angle of the CRY gate is related to the state of the control qubit, it can effectively extract the key information in the qubit and reduce irrelevant information, thus achieving the purpose of pooling. In this process, the parameters of the CRY gate can be optimized during the training process to adapt to the characteristics of different input data. According to the principle of quantum computing, after the operations of multiple quantum gates, the final quantum state |ψ V > can be expressed as

[0106] As Figure 6 shown, the circuit design of the quantum pooling layer mainly involves three quantum gates: Hadamard gate, X gate, and CRY gate, and the operation objects include two qubits and one auxiliary qubit. First, the Hadamard gate is applied to each of the two qubits respectively to put them into the superposition state. Then, the X gate is applied to the auxiliary qubit to control the transformation of the quantum state. Finally, these two qubits are respectively entangled with the auxiliary qubit through the CRY gate, thus achieving the pooling effect, effectively reducing the scale of the network while retaining important feature information.

[0107] The specific steps for step (5) are as follows:

[0108] In the first step, the rotation angle of the qubit is adjusted using the rotation gate (RY). The rotation angle represents the weight value of each qubit and is optimized through the training process. This design simulates the weight mechanism in classical neural networks and can effectively adjust the state of the qubit, thereby enhancing the expressive power of the network.

[0109] In the second step, the swap test is introduced to implement the design of the quantum fully connected layer. The swap test utilizes the entanglement and superposition effects between qubits to calculate the similarity between qubits, thereby enhancing the computing power of the fully connected layer. The principle of the swap test is to quantify the similarity between the auxiliary qubit and the two target qubits |ψ> and |φ> through information interaction. After measurement, the probability that the auxiliary qubit is in the state |0> is and the probability that it is in the state |1> is Here, |<ψ|φ>| 2 represents the degree of overlap between the target qubits |ψ> and |φ>, that is, their similarity.

[0110] In the third step, by measuring the state of the qubit <σ z > i =<ψ|σ (i) |ψ>, and applying the Softmax function to convert the desired measurement result into a classical probability Z i is the expected value of the i-th qubit, and finally the image classification task is completed.

[0111] As Figure 7 shown, the swap test, as the core design of the quantum fully connected layer, is used to implement the classification task of the network. First, after the quantum pooling layer, the RY gate is applied to the qubits, and the rotation angle is trained to simulate the weight parameters in the traditional neural network. Then, the swap test is introduced, and the similarity between the qubits is calculated by measuring the quantum state of the auxiliary qubit, and the classification result is obtained. The quantum fully connected layer makes full use of the quantum superposition and entanglement characteristics, effectively improving the expression ability and classification performance of the network.

[0112] The specific steps for step (6) are as follows:

[0113] Build the overall architecture of the quantum convolutional neural network. This architecture includes a quantum entanglement layer, a quantum convolutional layer, a quantum pooling layer, and a quantum fully connected layer, and information is transmitted and calculated through quantum gate operations in each layer. This quantum convolutional neural network architecture enables the calculation of each layer to be carried out more efficiently through the entanglement, superposition of qubits, and parallel operations of quantum gates. Compared with the classical neural network, the quantum convolutional neural network can process data in a higher-dimensional space, thereby improving the calculation efficiency.

[0114] As Figure 8 shown, this architecture diagram shows the complete process of the quantum convolutional neural network and is used to train the network to complete the classification task. By inputting the quantum-encoded image, features are extracted and processed layer by layer, and finally the classification result is output in the quantum fully connected layer. Each layer works together, making full use of the parallelism and entanglement of quantum computing to achieve efficient feature extraction and classification performance.

[0115] The specific steps for step (7) are as follows:

[0116] Conduct experimental verification on the quantum convolutional neural network and analyze the experimental results. The experiment is carried out on two public data sets, and in order to verify the robustness of the model, various types of quantum noise, such as bit-flip noise, phase-flip noise, and depolarizing noise, are specially introduced for comprehensive testing.

[0117] This application combines a classical convolutional neural network with quantum computing to construct a parametric quantum circuit quantum convolutional neural network model suitable for multiple quantum encodings, which is specifically used for the processing of quantum image classification. First, in the quantum entanglement layer, a custom unitary matrix is constructed through singular value decomposition (SVD) and applied between quantum bits to achieve the entanglement of quantum states. This design effectively enhances the expressive ability of quantum bits, can extract richer feature information, and thus improves the accuracy of the network in classification tasks. Secondly, the quantum convolutional layer realizes the parameter sharing mechanism by applying the custom unitary matrix to adjacent quantum bits. In the quantum pooling layer, the pooling operation of quantum states is realized by combining the Hadamard gate, the X gate, and the CRY gate. This design effectively retains the key information of the input data while reducing the overall scale of the network, further improving the computational efficiency and the training speed of the network. The quantum fully connected layer optimizes the rotation angle of quantum bits by introducing the RY gate, simulating the weight parameters in traditional neural networks. In addition, by swapping the test to measure the quantum state of the auxiliary quantum bit, the efficient calculation of the quantum state similarity is realized. This application makes full use of the quantum entanglement and superposition characteristics, effectively improving the classification performance and overall accuracy of the network.

[0118] Figure 9 It shows the comparison of the classification results of this application after 100 rounds of training using the MNIST dataset under two different encoding methods. The results show that the network exhibits good performance under both encoding methods. Specifically, the highest accuracy rate of amplitude encoding reaches 100%, while the accuracy rate of FRQI encoding is also as high as 99.9%. However, compared with FRQI encoding, amplitude encoding shows higher stability. Figure 10 It shows the comparison of the classification results of this application after 100 rounds of training using the Fashion MNIST dataset under two different encoding methods. The results also show that the network shows good classification performance under both encoding methods. The highest accuracy rate of amplitude encoding is 95.2%, while the accuracy rate of FRQI encoding is 93.3%. Compared with FRQI encoding, amplitude encoding shows more excellent stability performance.

[0119] Figures 11 - 19The experimental results of this application applied to different layers of a quantum convolutional neural network are respectively shown under different types of quantum noise and different noise probabilities. In these experiments, the types of quantum noise include bit-flip noise, phase-flip noise, and depolarizing noise. The experimental results show that whether in the case of low-probability noise or high-probability noise, the training process of the quantum convolutional neural network can converge stably in each layer, indicating that the network can still maintain high robustness when facing different types of quantum noise. This result verifies the effectiveness of the quantum convolutional neural network in an actual quantum computing environment and provides strong support for the practical application of future quantum neural networks.

[0120] The quantum convolutional neural network of this application has significant advantages over the prior art in terms of computing efficiency, classification accuracy, parameter optimization, stability, and applicability. By combining an innovative quantum computing architecture and various quantum coding methods, this application not only demonstrates excellent robustness in a quantum noise environment but also provides a more efficient, accurate, and stable solution for quantum image classification tasks. This application shows broad application prospects and technical potential, providing a solid foundation for the wide deployment of future quantum computing in practical applications.

[0121] Based on the same inventive concept, the embodiments of this application also provide a quantum convolutional neural network-based image classification system for implementing the above-mentioned quantum convolutional neural network-based image classification method. The solution provided by this system to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in the embodiments of the quantum convolutional neural network-based image classification system provided below can refer to the limitations on the quantum convolutional neural network-based image classification method in the above text and will not be repeated here.

[0122] In an exemplary embodiment, a quantum convolutional neural network-based image classification system is provided, including:

[0123] A data acquisition module for acquiring the image to be classified.

[0124] A preprocessing module for preprocessing the image to be classified to obtain the preprocessed image to be classified.

[0125] An encoding module for converting the preprocessed image to be classified into quantum image information by using quantum coding technology.

[0126] A classification module for determining the category of the image to be classified according to the quantum image information by using an image classification model; wherein, the image classification model is obtained by training a quantum convolutional neural network using a training data set; the quantum convolutional neural network includes a quantum entanglement layer, a quantum convolutional layer, a quantum pooling layer, and a quantum fully connected layer connected in sequence.

[0127] In an exemplary embodiment, a computer device is provided, which includes a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the above-mentioned image classification method based on a quantum convolutional neural network is implemented.

[0128] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the above-mentioned image classification method based on a quantum convolutional neural network is implemented.

[0129] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned image classification method based on a quantum convolutional neural network is implemented.

[0130] In an exemplary embodiment, a computer device is provided. The computer device can be a server or a terminal, and its internal structure diagram can be as Figure 20 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an image classification method based on a quantum convolutional neural network is implemented.

[0131] Those skilled in the art can understand that Figure 20 the structure shown in

[0132] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memories (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0134] The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.

[0135] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0136] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. An image classification method based on quantum convolutional neural network, characterized in that: include: Get the image to be classified; Preprocessing the image to be classified to obtain a processed image to be classified; Using quantum coding technology, converting the processed image to be classified into quantum image information; According to the quantum image information, the category of the image to be classified is determined using an image classification model; wherein the image classification model is obtained by training a quantum convolutional neural network using a training data set; the quantum convolutional neural network includes a quantum entanglement layer, a quantum convolution layer, a quantum pooling layer and a quantum fully connected layer connected in sequence.

2. The image classification method based on quantum convolutional neural network according to claim 1 is characterized in that: The image to be classified is normalized to obtain a processed image to be classified.

3. The image classification method based on quantum convolutional neural network according to claim 1 is characterized in that: The processed image to be classified is converted into quantum image information by using quantum coding technology, specifically including: The processed image to be classified is subjected to FRQI encoding or amplitude encoding to obtain quantum image information.

4. The image classification method based on quantum convolutional neural network according to claim 1 is characterized in that: The quantum convolutional neural network is trained using the training data set, including: Get the MNIST dataset and the FashionMNIST dataset; Filter out sample images with labels of 0 and 1 from the MNIST dataset and FashionMNIST dataset as training dataset and test dataset; Normalizing the training data set to obtain a processed training data set; the processed training data set includes processed sample images and corresponding labels; Performing FRQI encoding or amplitude encoding on the processed sample image to obtain quantum image information of the sample image; The quantum image information of the sample image is used as input and the corresponding label is used as output to train the quantum convolutional neural network to obtain an image classification model.

5. The image classification method based on quantum convolutional neural network according to claim 4 is characterized in that: Before normalizing the training data set, the method further includes: The sample image is resized to 16×16.

6. The image classification method based on quantum convolutional neural network according to claim 1, characterized in that: The construction of the quantum entanglement layer specifically includes: Decompose the random matrix using singular value decomposition to obtain a unitary matrix; The unitary matrix is ​​used as a quantum gate to act on quantum bits to form a quantum entanglement layer.

7. An image classification system based on quantum convolutional neural network, characterized in that: The image classification system based on quantum convolutional neural network is used to implement the image classification method based on quantum convolutional neural network according to any one of claims 1 to 6, and the image classification system based on quantum convolutional neural network includes: A data acquisition module, used for acquiring images to be classified; A preprocessing module, used for preprocessing the image to be classified to obtain a processed image to be classified; An encoding module, used to convert the processed image to be classified into quantum image information by using quantum encoding technology; A classification module is used to determine the category of the image to be classified according to the quantum image information using an image classification model; wherein the image classification model is obtained by training a quantum convolutional neural network using a training data set; the quantum convolutional neural network includes a quantum entanglement layer, a quantum convolution layer, a quantum pooling layer and a quantum fully connected layer connected in sequence.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the image classification method based on a quantum convolutional neural network as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image classification method based on quantum convolutional neural network described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the image classification method based on quantum convolutional neural network described in any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Image classification method of quantum convolutional neural network based on natural evolution optimizer

    CN120932016A

  • Image classification method of quantum convolutional neural network based on natural evolution optimizer

    CN120932016B