Quantum convolutional neural network classification model construction method based on variational measurement basis
Patent Information
- Application Number
- CN202610857162.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-10-30
AI Technical Summary
该类固定测量方式实现较为简单,但其测量方向无法随分类任务、输入数据分布以及训练状态进行自适应调整
相较于传统量子卷积神经网络,本发明能够在保持模型结构相对紧凑的基础上,提高分类任务中的特征表达能力、分类准确率和测量策略适应性,并有助于增强模型在噪声环境下的鲁棒性。该分类模型不仅适用于图像分类任务,也可推广至量子态分类、量子材料相判别等多种分类场景,体现出较好的通用性和应用拓展潜力。
Smart Images

Figure CN123012688A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of quantum computing and quantum artificial intelligence technology, specifically relating to a method for constructing a quantum convolutional neural network classification model based on variational measurement basis. Background Technology
[0002] With the continuous development of quantum information technology, advancements have been made in quantum computing, quantum communication, quantum simulation, and quantum measurement. The cross-integration of quantum computing and artificial intelligence is gradually becoming an important research direction in the field of intelligent information processing. Classification tasks, as fundamental problems in pattern recognition and intelligent analysis, are widely found in scenarios such as image recognition, quantum state recognition, material phase discrimination, and complex system state analysis. How to utilize properties such as quantum superposition, quantum entanglement, and high-dimensional quantum state representation to improve feature extraction capabilities and discrimination performance in classification tasks is an important research topic in the field of quantum machine learning.
[0003] Existing classification models mainly include classical neural network models and quantum neural network models based on parameterized quantum circuits. While classical neural networks have achieved good results in tasks such as image classification and pattern recognition, they may suffer from problems such as large parameter size, high training cost, and limited feature representation efficiency when dealing with high-dimensional data, complex quantum state data, or tasks with quantum correlations. Quantum neural networks and quantum convolutional neural networks achieve feature processing through processes such as quantum state encoding, parameterized quantum evolution, and quantum measurement, providing a new technical path for classification tasks.
[0004] However, existing quantum convolutional neural networks typically employ fixed computational basis measurements or pre-defined Pauli measurements to read quantum state information after completing quantum circuit evolution. For example, common schemes often use Pauli-Z basis measurements and use the expected measurement value as input to subsequent classification layers. While this type of fixed measurement is relatively simple to implement, its measurement direction cannot adaptively adjust to the classification task, input data distribution, and training state. Since the quantum measurement process directly determines the conversion of quantum state information into classical features, a fixed measurement basis may result in some task-related information in the quantum state not being fully extracted, thus limiting the model's classification performance and noise adaptability.
[0005] Furthermore, existing quantum convolutional neural networks typically optimize quantum circuit parameters primarily, with less emphasis on modeling quantum measurement fundamentals themselves as trainable variables. The lack of a co-optimization mechanism between the quantum convolution feature extraction process and the quantum measurement readout process makes it difficult for the model to dynamically adjust its quantum measurement strategy when faced with different data features and classification objectives.
[0006] Existing quantum convolutional neural networks typically use a fixed measurement basis to read quantum state information in classification tasks. This makes it difficult to adaptively adjust the quantum measurement strategy according to different data features and classification objectives, thus limiting the ability to extract task-related information from the quantum state and affecting the model's feature representation ability, classification performance, and stability in noisy environments.
[0007] Therefore, it is necessary to propose a new quantum convolutional neural network classification model that can not only optimize the quantum circuit parameters in the quantum convolutional neural network, but also adaptively control the quantum measurement process, thereby achieving synergistic optimization of the quantum feature extraction process and the quantum measurement process, and improving the feature representation ability, classification accuracy and stability in noisy environments in the classification task. Summary of the Invention
[0008] To overcome the shortcomings of existing technologies, this invention provides a method for constructing a quantum convolutional neural network classification model based on variational measurement basis. By introducing a measurement basis parameter generation network, the measurement basis optimization process is separated from the fixed readout method of traditional quantum convolutional neural networks and co-designed with the quantum convolutional feature extraction process, enabling the measurement basis to adaptively optimize during the training process of the classification task. Simultaneously, this invention employs a hybrid learning mechanism that alternates between supervised learning and reinforcement learning. The parameters of the quantum convolutional neural network are optimized during the supervised learning phase, while the parameters of the measurement basis parameter generation network are optimized during the reinforcement learning phase, thereby achieving coordinated optimization of the quantum feature extraction process and the quantum measurement process. Compared with traditional quantum convolutional neural networks using a fixed measurement basis, this invention can adaptively adjust the quantum measurement strategy according to different classification tasks and data characteristics. While maintaining a relatively compact model structure, it improves the feature representation ability, classification accuracy, and adaptability to noisy environments in classification tasks, thus providing an effective technical solution for the application of quantum machine learning in multi-class classification scenarios.
[0009] The technical solution adopted by this invention to solve its technical problem is as follows: Step 1: Input the training dataset and initialize the parameters of the quantum convolutional neural network classification model and the measurement basis parameters to generate network parameters; Step 2: Enter the training iteration process. In each round of training, the supervised learning phase is executed first, and the measurement basis parameters are fixed to generate network parameters. Step 3: The measurement basis parameter generation network outputs the current variational measurement basis parameters, and the training samples are input into the quantum convolutional neural network to obtain the corresponding classification output results; Step 4: Calculate the supervised loss function based on the classification output and the true labels, and use the supervised loss function to update the parameters of the quantum convolutional neural network; Step 5: After completing the supervised learning phase, proceed to the reinforcement learning phase and fix the parameters of the quantum convolutional neural network classification model; Step 6: The variational measurement basis parameters are re-output by the measurement basis parameter generation network. The training samples are then input into the quantum convolutional neural network classification model with fixed parameters for classification evaluation, and a reward signal is constructed based on the classification results. Step 7: Update the measurement basis parameter generation network parameters based on the reward signal to optimize the measurement basis strategy; Step 8: Repeat the supervised learning and reinforcement learning phases until the preset number of training rounds is reached or the convergence condition is met. Output the optimized quantum convolutional neural network classification model parameters and measurement basis parameters to generate network parameters, and use them for classification prediction of the samples to be classified.
[0010] Preferably, step 1 specifically comprises: Input training dataset:
[0011] in, Indicates the input sample. Indicates the corresponding tag; Initialize the parameters of the quantum convolutional neural network And measurement basis parameters to generate network parameters ;in, This represents the quantum circuit parameters in a quantum convolutional neural network. Indicates the parameters of the classification output layer. This represents the network parameters used to generate variational measurement basis parameters; it also sets the number of training epochs. Quantum convolutional neural network learning rate And measure the basis parameters to generate the network learning rate .
[0012] Preferably, step 2 specifically comprises: In the In the first round of training, the supervised learning phase is initiated, during which the network parameters are frozen. This ensures that the parameters remain unchanged during the supervised learning phase; at this point, only the parameters of the quantum convolutional neural network classification model are adjusted. and Conduct training.
[0013] Preferably, step 3 specifically comprises: Network generation by measuring basic parameters Generate the current variational measurement basis parameters ; For each mini-batch sample in the training dataset The input samples are fed into a quantum convolutional neural network to obtain the classification output results:
[0014] in, This represents the class probability distribution of the model output. This represents a classification mapping of a quantum convolutional neural network consisting of a quantum encoding layer, a quantum convolutional layer, a quantum pooling layer, a variational measurement layer, and a classification output layer.
[0015] Preferably, step 4 specifically comprises: Output results based on classification With real labels The supervised loss function is calculated using the cross-entropy loss function, expressed as:
[0016] in, This represents the classification loss function during the supervised learning phase. The cross-entropy loss function represents the relationship between the model's output class probability distribution and the true label. Then, the parameters of the quantum convolutional neural network are adjusted based on the supervised loss function. During this stage, the measured basis parameters are used to generate network parameters. It remains unchanged.
[0017] Preferably, step 5 specifically comprises: After completing the supervised learning phase, the network parameters for generating measurement basis parameters are deselected. The parameters of the quantum convolutional neural network are frozen and enter the reinforcement learning phase; the parameters of the quantum convolutional neural network are fixed. This ensures that it remains unchanged during the reinforcement learning phase.
[0018] Preferably, step 6 specifically comprises: During the reinforcement learning phase, for each mini-batch of samples in the training dataset The variational measurement basis parameters are regenerated by the measurement basis parameter generation network:
[0019] The input samples are then fed into a quantum convolutional neural network with fixed parameters for classification and evaluation, yielding the output results:
[0020] Based on the output results With real labels Constructing reward signals The reward signal is used to characterize the degree of adaptation of the current measurement basis parameters to the classification task, and is expressed as:
[0021] in, Indicates the model output results The Middle The predicted probabilities of each category, Indicates real label In the one-hot encoding, the first The values corresponding to each category.
[0022] Preferably, step 7 specifically comprises: Based on reward signals For network parameters Optimize and update; the update method is expressed as follows:
[0023] in, Indicates a reward signal Regarding the generation of network parameters from measurement basis parameters gradient, This represents the learning rate of the network generated by measuring the basis parameters.
[0024] Preferably, step 8 specifically comprises: Repeat the supervised learning phase and the reinforcement learning phase until the preset number of training rounds is reached. Alternatively, the model may satisfy the convergence condition; after training, the optimized quantum convolutional neural network parameters are output. and network parameters ; In the actual classification process, the sample to be classified is input into the trained quantum convolutional neural network, and the corresponding variational measurement basis parameters are generated by the measurement basis parameter generation network to obtain the classification output result:
[0025] Then determine the category to which the sample belongs based on the output results.
[0026] The beneficial effects of this invention are as follows: Compared to traditional quantum convolutional neural networks, this invention can improve feature representation capabilities, classification accuracy, and measurement strategy adaptability in classification tasks while maintaining a relatively compact model structure, and also helps to enhance the model's robustness in noisy environments. This classification model is not only applicable to image classification tasks, but can also be extended to various classification scenarios such as quantum state classification and quantum material phase discrimination, demonstrating good versatility and application expansion potential. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating the workflow of a quantum convolutional neural network classification model based on variational measurement basis. Figure 2A diagram illustrating the training accuracy and test accuracy for training the MNIST dataset. Detailed Implementation
[0028] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0029] This invention proposes a quantum convolutional neural network classification model based on variational measurement basis, aiming to solve the problem that existing quantum convolutional neural networks use fixed measurement basis to read quantum state information, making it difficult to adaptively adjust the measurement method according to the classification task.
[0030] To achieve the above objectives, this invention introduces a measurement basis parameter generation network into a quantum convolutional neural network, using the quantum measurement basis as a trainable variable. It also combines a hybrid optimization mechanism that alternates between supervised learning and reinforcement learning, enabling the feature extraction process and the quantum measurement process of the quantum convolutional neural network to be optimized collaboratively. This differs from traditional quantum convolutional neural networks that use a fixed computational basis or a fixed... The present invention proposes a scheme for measurement based on the basis parameters. By generating variational measurement basis parameters through a measurement basis parameter generation network, the classification model can dynamically adjust the quantum measurement direction according to the current task characteristics and training state, thereby improving the ability to read task-related quantum features.
[0031] In this invention, the classification model includes a quantum convolutional neural network, a measurement basis parameter generation network, and a classification output layer. The quantum convolutional neural network is used to extract quantum features from the input samples; the measurement basis parameter generation network is used to generate variational measurement basis parameters; and the classification output layer is used to output a class probability distribution based on the quantum measurement results.
[0032] The parameters of the quantum convolutional neural network and the parameters of the measurement basis parameter generation network are trained using an alternating optimization method. During the supervised learning phase, the parameters of the measurement basis parameter generation network are fixed, and the parameters of the quantum convolutional neural network and the classification output layer are updated using the classification loss. During the reinforcement learning phase, the parameters of the quantum convolutional neural network and the classification output layer are fixed, a reward signal is constructed based on the classification result, and the parameters of the measurement basis parameter generation network are updated based on the reward signal. Through this training method, the present invention can improve classification performance, measurement strategy adaptability, and stability in noisy environments while maintaining a relatively compact model structure.
[0033] This invention is based on the appendix Figure 1 and Figure 2 and with recognition To further illustrate, the specific invention steps are as follows: Step 1: Input the training dataset ,in, Indicates the input sample. Indicates the corresponding label. Initializes the parameters of the quantum convolutional neural network. And measurement basis parameters to generate network parameters .in, This represents the quantum circuit parameters in a quantum convolutional neural network. Indicates the parameters of the classification output layer. This represents the network parameters used to generate the variational measurement basis parameters. It also sets the number of training epochs. Quantum convolutional neural network learning rate And measure the basis parameters to generate the network learning rate .
[0034] Step 2: In the In the first round of training, the supervised learning phase is initiated, where the measured baseline parameters are frozen to generate network parameters. This ensures that the parameters remain unchanged during this stage; at this point, only the parameters of the quantum convolutional neural network classification model are adjusted. and Conduct training.
[0035] Step 3: Generate a network by measuring the basic parameters Generate the current variational measurement basis parameters , represented as:
[0036] For each mini-batch sample in the training dataset The input samples are fed into a quantum convolutional neural network to obtain the classification output results:
[0037] Step 4: Output results based on classification With real labels The supervised loss function is calculated, preferably using the cross-entropy loss function, which is expressed as:
[0038] Then, based on the aforementioned supervised loss function, the parameters of the quantum convolutional neural network are... During this stage, the measured basis parameters are used to generate network parameters. It remains unchanged.
[0039] Step 5: After completing the supervised learning phase, deselect the network parameters generated from the measurement basis parameters. The parameters are frozen and then enter the reinforcement learning phase. The parameters of the quantum convolutional neural network are fixed. This ensures that it remains unchanged during that stage.
[0040] Step 6: In the reinforcement learning phase, for each mini-batch of samples in the training dataset... The variational measurement basis parameters are regenerated by the measurement basis parameter generation network:
[0041] The input samples are then fed into a quantum convolutional neural network with fixed parameters for classification and evaluation, yielding the output results:
[0042] Based on the output results With real labels Constructing reward signals The reward signal is used to characterize the degree of adaptation of the current measurement basis parameters to the classification task, and can preferably be expressed as:
[0043] The larger the reward signal, the more favorable the current measurement base strategy is to the classification task.
[0044] Step 7: Based on the reward signal Generate network parameters from measurement basis parameters Optimize and update; the update method is expressed as follows:
[0045] Through the above update method, the measurement basis parameter generation network continuously learns variational measurement basis parameters that are more suitable for the current classification task, thereby improving the ability of the quantum measurement process to extract classification and discrimination information.
[0046] Step 8: Repeat the supervised learning phase and reinforcement learning phase until the preset number of training rounds is reached. Alternatively, the model may satisfy the convergence condition. After training, the optimized quantum convolutional neural network parameters are output. and measurement basis parameters to generate network parameters .
[0047] In the actual classification process, the sample to be classified is input into the trained quantum convolutional neural network, and the corresponding variational measurement basis parameters are generated by the measurement basis parameter generation network to obtain the classification output result.
[0048] Then, the category to which the sample belongs is determined based on the output results.
[0049] This embodiment uses a quantum convolutional neural network classification model based on variational measurement basis to classify... Classifying handwritten digit images, the training accuracy and test accuracy during the dataset training process are as follows: Figure 2As shown, this classification model can adaptively adjust the quantum measurement process through a variational measurement basis, and achieve synergistic optimization of the quantum convolution feature extraction process and the quantum measurement process through an alternating optimization mechanism of supervised learning and reinforcement learning. This classification model can not only be used for... The handwritten digital image classification task can also be applied to other image classification, quantum state classification, quantum material phase discrimination, and complex system state recognition tasks, depending on the actual task requirements.
Claims
1. A method for constructing a quantum convolutional neural network classification model based on variational measurement basis, characterized in that, Includes the following steps: Step 1: Input the training dataset and initialize the parameters of the quantum convolutional neural network classification model and the measurement basis parameters to generate network parameters; Step 2: Enter the training iteration process. In each round of training, the supervised learning phase is executed first, and the measurement basis parameters are fixed to generate network parameters. Step 3: The measurement basis parameter generation network outputs the current variational measurement basis parameters, and the training samples are input into the quantum convolutional neural network to obtain the corresponding classification output results; Step 4: Calculate the supervised loss function based on the classification output and the true labels, and use the supervised loss function to update the parameters of the quantum convolutional neural network; Step 5: After completing the supervised learning phase, proceed to the reinforcement learning phase and fix the parameters of the quantum convolutional neural network classification model; Step 6: The variational measurement basis parameters are re-output by the measurement basis parameter generation network. The training samples are then input into the quantum convolutional neural network classification model with fixed parameters for classification evaluation, and a reward signal is constructed based on the classification results. Step 7: Update the measurement basis parameter generation network parameters based on the reward signal to optimize the measurement basis strategy; Step 8: Repeat the supervised learning and reinforcement learning phases until the preset number of training rounds is reached or the convergence condition is met. Output the optimized quantum convolutional neural network classification model parameters and measurement basis parameters to generate network parameters, and use them for classification prediction of the samples to be classified.
2. The method for constructing a quantum convolutional neural network classification model based on a variational measurement basis according to claim 1, characterized in that, Step 1 specifically involves: Input training dataset: in, Indicates the input sample. Indicates the corresponding tag; Initialize the parameters of the quantum convolutional neural network And measurement basis parameters to generate network parameters ;in, This represents the quantum circuit parameters in a quantum convolutional neural network. Indicates the parameters of the classification output layer. This represents the network parameters used to generate variational measurement basis parameters; it also sets the number of training epochs. Quantum convolutional neural network learning rate And measure the basis parameters to generate the network learning rate .
3. The method for constructing a quantum convolutional neural network classification model based on variational measurement basis according to claim 2, characterized in that, Step 2 specifically involves: In the In the first round of training, the supervised learning phase is initiated, during which the network parameters are frozen. This ensures that the parameters remain unchanged during the supervised learning phase; at this point, only the parameters of the quantum convolutional neural network classification model are adjusted. and Conduct training.
4. The method for constructing a quantum convolutional neural network classification model based on a variational measurement basis according to claim 3, characterized in that, Step 3 specifically involves: Network generation by measuring basic parameters Generate the current variational measurement basis parameters ; For each mini-batch sample in the training dataset The input samples are fed into a quantum convolutional neural network to obtain the classification output results: in, This represents the class probability distribution of the model output. This represents a classification mapping of a quantum convolutional neural network consisting of a quantum encoding layer, a quantum convolutional layer, a quantum pooling layer, a variational measurement layer, and a classification output layer.
5. The method for constructing a quantum convolutional neural network classification model based on a variational measurement basis according to claim 4, characterized in that, Step 4 specifically involves: Output results based on classification With real labels The supervised loss function is calculated using the cross-entropy loss function, expressed as: in, This represents the classification loss function during the supervised learning phase. The cross-entropy loss function represents the relationship between the model's output class probability distribution and the true labels. Then, the parameters of the quantum convolutional neural network are adjusted based on the supervised loss function. During this stage, the measured basis parameters are used to generate network parameters. It remains unchanged.
6. The method for constructing a quantum convolutional neural network classification model based on a variational measurement basis according to claim 5, characterized in that, Step 5 specifically involves: After completing the supervised learning phase, the network parameters for generating measurement basis parameters are deregulated. The parameters of the quantum convolutional neural network are frozen and enter the reinforcement learning phase; the parameters of the quantum convolutional neural network are fixed. This ensures that it remains unchanged during the reinforcement learning phase.
7. The method for constructing a quantum convolutional neural network classification model based on a variational measurement basis according to claim 6, characterized in that, Step 6 specifically involves: During the reinforcement learning phase, for each mini-batch of samples in the training dataset The variational measurement basis parameters are regenerated by the measurement basis parameter generation network: The input samples are then fed into a quantum convolutional neural network with fixed parameters for classification and evaluation, yielding the output results: Based on the output results With real labels Constructing reward signals The reward signal is used to characterize the degree of adaptation of the current measurement basis parameters to the classification task, and is expressed as: in, Indicates the model output results The Middle The predicted probabilities of each category, Indicates real label In the one-hot encoding, the first The values corresponding to each category.
8. The method for constructing a quantum convolutional neural network classification model based on a variational measurement basis according to claim 7, characterized in that, Step 7 specifically involves: Based on reward signals For network parameters Optimize and update; the update method is expressed as follows: in, Indicates a reward signal Regarding the generation of network parameters from measurement basis parameters gradient, This represents the learning rate of the network generated by measuring the basis parameters.
9. The method for constructing a quantum convolutional neural network classification model based on a variational measurement basis according to claim 8, characterized in that, Step 8 specifically involves: Repeat the supervised learning phase and the reinforcement learning phase until the preset number of training rounds is reached. Alternatively, the model may satisfy the convergence condition; after training, the optimized quantum convolutional neural network parameters are output. and network parameters ; In the actual classification process, the sample to be classified is input into the trained quantum convolutional neural network, and the corresponding variational measurement basis parameters are generated by the measurement basis parameter generation network to obtain the classification output result. Then determine the category to which the sample belongs based on the output results.
