A multi-classification method and device based on variational quantum computing

Through variable component quantum computing and quantum encoding technology, the problems of complexity and resource consumption in existing quantum classification models in multi-classification problems are solved, and more efficient and accurate multi-classification results are achieved.

CN116756663BActive Publication Date: 2025-06-06CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310518690.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2025-06-06
Estimated Expiration
2043-05-10

AI Technical Summary

Technical Problem

Existing quantum classification models are mainly used for binary classification problems. When converting multi-classification problems, multiple binary classification devices need to be established, resulting in increased system complexity and resource consumption, and the decision boundaries are not smooth enough and the classification results are not accurate enough.

Method used

The multi-classification method based on variable component quantum computing is adopted, and the classical data is converted into quantum state information through quantum amplitude coding and binary multi-particle state coding, and the variable component quantum circuit is used for training, and the loss value is calculated in combination with the swap-test circuit, and the parameters are backpropagated to optimize the parameters to achieve the accuracy of multi-classification.

Benefits of technology

It reduces the complexity and resource consumption of quantum computing circuits, improves the accuracy of multi-classification, solves the problem of unsmooth decision-making boundaries, and achieves more efficient quantum resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116756663B_ABST
    Figure CN116756663B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-classification method based on variational quantum computing, which includes preprocessing classical data to be classified; encoding feature data into quantum data by means of quantum amplitude encoding, and simultaneously using log2L quantum bits to represent L classification labels, and converting the classification labels into label states in binary form; inputting the encoded quantum data into a variational quantum circuit model for training, and using a swap test circuit to calculate the fidelity between the output state and the label state to optimize the internal parameters of the variational quantum circuit model; and realizing the classification of classical data by measuring the output state after training. The present invention uses multi-particle states to represent classification labels, reduces the number of auxiliary particles required from L to log2L, compresses the number of auxiliary particles, effectively reduces the circuit width, reduces the system complexity while ensuring the classification accuracy, reduces the consumption of quantum resources, and solves the decision boundary problem arising in the quantum multi-classifier scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of quantum computing and machine learning, and in particular to a multi-classification method and device based on variational quantum computing. Background Art

[0002] With the development of quantum computing technology, people have begun to combine quantum computing with machine learning, which has brought new ideas for solving complex problems in quantum physics. This combination may bring unprecedented prospects to both fields. Currently, researchers are mainly conducting research in two areas: on the one hand, using quantum computers to accelerate the operation of machine learning algorithms, and on the other hand, developing new quantum machine learning algorithms.

[0003] As one of the most important branches in machine learning, classification has been widely used in practical applications such as image recognition, text classification, and speech recognition. With the rapid development of quantum computing theory, the development of quantum-enhanced classification models that can handle complex classification tasks has certain prospects. So far, there have been many works that have extended popular classical algorithms to the quantum field, including quantum support vector machines, quantum nearest neighbor algorithms, and quantum decision tree classifiers. Inspired by the results of classical machine learning, variational quantum classifiers that inherit some characteristics of classical neural networks have attracted widespread attention and achieved rapid development. Similar to the classical case, variational quantum classifiers contain variational parameters that can be optimized during training, and the optimization of parameters is achieved by calculating the partial derivatives of the objective function with respect to the parameters. Similarly, some works directly extend the concept of classical neural networks to the quantum field, such as quantum convolutional neural networks and continuous variable quantum neural networks. However, most of the quantum classification models that have been proposed are designed to solve binary classification problems. Although multi-classification problems can be converted into multiple binary classification problems for solution, the same processing method may cause the following problems in quantum scenarios: ① Multiple binary classifiers need to be established, which may increase the complexity of the system; ② Since the decision boundaries of each binary classifier may not be coordinated, the final decision boundary may not be smooth enough, which may lead to inaccurate classification results; ③ The number of classifiers increases significantly, but quantum resources are limited; ④ The classifier accuracy is not high. Although the decision boundary problem can be solved by directly using a multi-class classifier, if the number of categories is too large and there are too many auxiliary particles, it will aggravate the impact of system complexity and resource problems. Summary of the invention

[0004] In view of the above problems in the prior art, the present invention provides a multi-classification method and device based on variational quantum computing to reduce the complexity and resource consumption of quantum computing circuits.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] A multi-classification method based on variational quantum computing comprises the following steps:

[0007] S10, preprocessing the classical data to be classified;

[0008] S20, encoding the characteristic data in the preprocessed classical data into quantum state information by using quantum amplitude coding, and encoding the classification label data into a label state in the form of a binary multi-particle state;

[0009] S30, using the encoded quantum state information as an input state to train the variational quantum circuit model, wherein the output state of the corresponding output bit of the variational quantum circuit model represents the predicted classification label of the model;

[0010] S40, using a swap-test circuit to calculate the loss value between the output state of the variational quantum circuit model and the true label state, and performing back propagation iterative update based on the loss value to optimize the parameters in the variational quantum circuit model;

[0011] S50, when the loss value is lower than a set threshold or reaches a set number of iterations, the training of the variational quantum circuit model is completed, and the parameter weights in the variational quantum circuit model are determined;

[0012] S60. After the classical data to be classified is quantum encoded and input into the variational quantum circuit model, the data is classified by measuring the output state of the variational quantum circuit model.

[0013] Specifically, the preprocessing of the classical data to be classified in step S10 includes:

[0014] According to the number of classification labels L, the dimension of the classical data is reduced to N dimensions, where

[0015] And log 2 N is an integer.

[0016] Specifically, in step S20, the characteristic data in the preprocessed classical data is encoded into quantum state information by using quantum amplitude encoding as follows:

[0017]

[0018] Where N represents the vector dimension of the classical data, d represents the dth data vector after encoding, and x 0 ,x 1 ,...,x N-1 is the value of each dimension of the input vector after normalization, corresponding to the amplitude of each superposition state, that is, x 0 2 +x 12 +...+x N-1 2 =1.

[0019] Specifically, encoding the classification label data into a label state in the form of a binary multi-particle state in step S20 includes:

[0020] Different classification labels y d ∈{0,1,2...,L-1} is converted to binary and encoded into log using angle encoding. 2 The corresponding label state |ψ> is formed on L quantum bits d ∈{0,1...,L-1}.

[0021] Specifically, the quantum data set D formed by the classical data to be classified after quantum coding is expressed as

[0022] D={(|φ> d ,|ψ> d )} d=1 D

[0023] In the formula, |φ> d represents the input state, |ψ> d Indicates the label state of the corresponding input state.

[0024] Specifically, the variational quantum circuit model in step S30 includes a unit quantum circuit that is repeated multiple times, wherein the unit quantum circuit is composed of a layer of Y rotation gate and a layer of CX entanglement gate operations alternately, and the number of repetitions is determined according to the data dimension corresponding to the input state.

[0025] Specifically, the step S40 of using the swap-test circuit to calculate the loss value between the output state of the variational quantum circuit model and the actual label state includes:

[0026] An auxiliary particle is configured in the swap-test circuit. The fidelity F between the output state of the variational quantum circuit model and the true label state is obtained through single-particle measurement of the auxiliary particle, and the fidelity is used as the loss value.

[0027] Specifically, in step S40, back propagating iteratively to update and optimize the parameters in the variational quantum circuit model based on the loss value includes:

[0028] Setting the objective function Among them, F i represents the fidelity of the i-th training data;

[0029] The objective function is continuously optimized using the first-order gradient-based stochastic objective function optimizer Adam to minimize the fidelity and thus minimize the classification error.

[0030] Specifically, the state obtained with the maximum probability when measuring the output state of the variational quantum circuit model in step S60 is the predicted label state, and the classification of the corresponding input classical data is determined according to the predicted label state.

[0031] Furthermore, a device for implementing the above-mentioned multi-classification method based on variational quantum computing includes:

[0032] The data is input into a quantum circuit, which is used to pre-process the classical data to be classified and encode the characteristic data in the pre-processed classical data into the quantum circuit using quantum amplitude coding, so that the classical data is converted into quantum data for processing, and at the same time, the classification label data is encoded into the quantum state of the multi-particle state using binary coding and angle coding;

[0033] Variational quantum circuits are used to process the encoded quantum data and convert the quantum data into corresponding classification prediction information through configuration training and continuous optimization of internal parameters to achieve multi-classification; and

[0034] The post-processing circuit is used to process the intermediate quantum state data of the variational quantum circuit during the training process. The fidelity between the intermediate quantum state and the true label state is calculated as the loss value through the swap-test circuit, and then the internal parameters in the variational quantum circuit are continuously optimized through back propagation to achieve accurate classification.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] While encoding classical data into quantum data, the present invention cleverly uses different multi-particle states to represent each classification label, thereby compressing the number of auxiliary particles, reducing the quantum circuit width, reducing the system complexity, and reducing quantum resource consumption, while ensuring the scalability and stability of the system; combined with the fidelity of the swap-test circuit output to measure the difference between the true label and the predicted label, the classification task is converted into a state optimization task, achieving improved accuracy of multi-classification, and effectively solving the decision boundary problem generated in quantum multi-classification scenarios compared to other methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of a flow chart of an embodiment of the present invention.

[0038] Figure 2 Schematic diagram of the quantum circuit structure based on the variational quantum circuit model in an embodiment of the present invention.

[0039] Figure 3 Schematic diagram of a swap-test circuit used in an embodiment of the present invention.

[0040] Figure 4 This is a schematic diagram of an example of an MNIST handwriting dataset image used in a test in an embodiment of the present invention.

[0041] Figure 5 This is the accuracy change curve of the MNIST test data set in the embodiment of the present invention.

[0042] Figure 6 This is a schematic diagram of a sample image of the CIFAR-10 dataset used in the test of the embodiments of the present invention.

[0043] Figure 7 This is the accuracy change curve of the CIFAR-10 test data set in the embodiment of the present invention. DETAILED DESCRIPTION

[0044] The present invention is further described below in conjunction with the accompanying drawings and examples. The embodiments of the present invention include but are not limited to the following examples.

[0045] like Figures 1 to 3 As shown, the multi-classification method based on variational quantum computing first designs a multi-classifier based on variational quantum computing, which includes a data input quantum circuit for data encoding, a variational quantum circuit for training data, and a post-processing circuit for calculating loss values ​​to update variable parameters in the variational quantum circuit. Among them, the input classical data includes feature data to be classified and corresponding classification label information; the data input quantum circuit is used to preprocess the classical data to be classified and encode the feature data in the preprocessed classical data into the quantum circuit using quantum amplitude coding, so that the classical data is converted into quantum data for processing, and the classification label data is encoded into the quantum state of the multi-particle state using binary coding and angle coding; the variational quantum circuit is used to process the encoded quantum data, and convert the quantum data into corresponding classification prediction information by configuring training and continuously optimizing internal parameters to achieve the purpose of multi-classification; the post-processing circuit is used to process the intermediate quantum state data of the variational quantum circuit during the training process, and the fidelity between the intermediate quantum state and the true label state is calculated as the loss value through the swap test circuit (swap-test), and then the internal parameters in the variational quantum circuit are continuously optimized through back propagation to achieve accurate classification.

[0046] The specific instructions are as follows:

[0047] Data input quantum circuit: Classification of classical data on quantum devices requires quantum state encoding of the input vector. For data with fewer feature dimensions, angle encoding is generally used to encode N-dimensional data into N quantum bits. For classical data with large feature dimensions such as images, using conventional encoding methods will face a dilemma. First, if data dimensionality reduction is not performed, excessive quantum resources will be used. Second, if data dimensionality reduction is performed, it will have a huge impact on the classification results. Therefore, the present invention cleverly uses quantum amplitude encoding to encode the input classical data, which is expressed as follows:

[0048]

[0049] In the formula, d represents the dth data vector in the data set, and N represents the vector dimension. Since the trace of a quantum system in a pure state should be 1, the encoded vector data needs to be normalized. 0 ,x 1 ,...,x N-1 is the value of each dimension of the input vector after normalization, corresponding to the amplitude of each superposition state, that is, x 0 2 +x 1 2 +...+x N-1 2 =1.

[0050] In the multi-classification problem, the number of classification labels is L, and the labels y of different data are d ∈{0,1,2...,L-1}, convert it into binary, and encode it into log using angle encoding 2 The corresponding label state |ψ> is formed on L quantum bits d ∈{0,1...,L-1}. For example, when L=4, the corresponding four label states are {|00>,|01>,|10>,|11>}. The data encoding method of the present invention is used to convert the classical data to be classified into

[0051] The quantum data set used is represented by D = {(|φ> d ,|ψ> d )} d=1 D , where |φ> d represents the input state, |ψ> d Indicates the label state of the corresponding input state. This data processing method can reduce the circuit width (from O(N) to O(log 2 N)), and the number of auxiliary particles is also reduced from L to log 2L, can be implemented more efficiently on existing quantum devices.

[0052] Variational quantum circuits: Variational quantum circuit models with adjustable parameters are designed based on hardware-efficient circuit structures to accommodate noisy medium-sized quantum devices, which have very few qubits and usually only perform some simple gates between sparse qubits, and can be efficiently implemented on quantum devices. Figure 2 The circuit in Part II is used as the model of Ansatz. The circuit consists of a layer of Y rotation gate and a layer of CX entanglement gate operations alternating. The number of repetitions in the repetition part can be designed according to different problem scales.

[0053] Post-processing circuit: In the classification task, it is necessary to calculate the difference between the real label and the predicted label as the loss value for feedback, and continuously update the parameters in the circuit; the commonly used ones are the mean square error loss function or the cross entropy loss function. Since the present invention converts the real label into a multi-particle state for representation, the swap-test circuit outputs the similarity (fidelity) between the real label state and the predicted label state to measure the difference between the two. This training method only needs to measure one auxiliary particle each time to update the parameters, and does not need to measure multiple auxiliary particles (the number is generally the number of labels), thereby saving quantum resources. Figure 3 The swap-test circuit shown, the output probability on the auxiliary qubit is directly related to the similarity (fidelity) of the two input states, as shown below:

[0054] 1. Assume that input state 1 represents the predicted label |φ>predict, and input state 2 represents the true label |φ> true , the auxiliary particle required for the circuit is a, and the initial state is |0>;

[0055] 2. According to the swap-test circuit, an H-gate operation is performed on the auxiliary particle, and the system state becomes:

[0056]

[0057] 3. Execute the control swap gate (C-swap) again, and the system state becomes:

[0058]

[0059] 4. Perform another H-gate transformation on the auxiliary particle, and the system state changes to:

[0060]

[0061] 5. Finally, perform a single-particle measurement on the auxiliary particle and define The probability of measuring |0> is:

[0062]

[0063] Similarly,

[0064] F is used to represent fidelity. According to the definition of fidelity That is, the fidelity can be expressed as F = p 0 -p 1 .

[0065] In order to minimize the classification error, the objective function is set as: Where D represents the number of training data. This objective function is used to continuously optimize the internal parameters of the variational quantum circuit to minimize the classification error. The parameter optimization method uses the first-order gradient-based stochastic objective function optimizer Adam, which is a gradient descent algorithm with adaptive learning rate, fast convergence, good generalization performance and robustness.

[0066] Through the specific design of the multi-classifier based on variational quantum computing, the multi-classification method based on variational quantum computing can be implemented to achieve the purpose of multi-classification of classical data.

[0067] Specifically, the multi-classification method based on variational quantum computing includes the following steps:

[0068] S10, preprocessing the classical data to be classified, for example, reducing the dimension of the data when the feature dimension of the classical image data is too high; in the dimensionality reduction process, reducing the dimension of the classical data to N dimensions according to the number of classification labels L, where And log 2 N is an integer;

[0069] S20, encoding the preprocessed feature data into quantum state information by using quantum amplitude coding, and encoding the classification label data into a label state in the form of a binary multi-particle state;

[0070] S30, using the encoded quantum state information as an input state to train the variational quantum circuit model, wherein the output state of the corresponding output bit of the variational quantum circuit model represents the predicted classification label of the model;

[0071] S40, using a swap-test circuit to calculate the loss value between the output state of the variational quantum circuit model and the true label state, and performing back propagation iterative update based on the loss value to optimize the parameters in the variational quantum circuit model;

[0072] S50, when the loss value is lower than a set threshold or reaches a set number of iterations, the training of the variational quantum circuit model is completed, and the parameter weights in the variational quantum circuit model are determined;

[0073] S60, after the classical data to be classified is quantum encoded and input into the variational quantum circuit model, the data classification is realized by measuring the output state of the variational quantum circuit model. It should be noted here that the final measurement is not performed on the auxiliary qubit of the swap-test circuit, but on Figure 2 The terminal output bit in .

[0074] The multi-classification method based on variational quantum computing can realize the classification of image data but is not limited to the classification of image data. Figure 4 The example of MNIST handwriting dataset image sample shown is classified from 0 to 7:

[0075] Step 1: Preprocess the data according to the size of the classical data feature dimension: reduce the 28*28 pixel image data to 32 dimensions and encode it into 5 quantum bits using the following formula:

[0076]

[0077] Step 2: Convert the corresponding labels into multi-particle states. The label states of the eight categories 0-7 are expressed as:

[0078] {|000>, |001>, |010>, |011>, |100>, |101>, |110>, |111>}, each data is trained by encoding it into Figure 2 The labeled state |φ> is obtained in particles 5, 6, and 7 in Part I l ;

[0079] Step 3: Input the preprocessed feature data into the variational quantum circuit model. This part does not process the label state data. The variational quantum circuit is composed of multiple layers of Y rotation gates and CX entanglement gates. Figure 2 In Part II, the number of layers of the repeating unit is set to 15. The variational quantum circuit model will continuously process the input data and output the output states |φ> on particles 2, 3, and 4 out ;

[0080] Step 4: To measure the difference between the output state and the label state, use Figure 3 The swap-test circuit shown is used to measure |φ> l and |φ> out The fidelity between Figure 2 As shown in Part III, the fidelity of the two states can be directly expressed by the output probability of the auxiliary particle 8 as F = p 0 -p 1 ;

[0081] Step 5: After calculating the fidelity according to step 4, the objective function defined The loss value between the true label and the output state can be calculated, and back-propagation can be performed to update the parameters in the variational quantum circuit model;

[0082] Step 6: Repeat steps 3 to 5 for each round of data training until all training rounds are completed, and then obtain the parameter weights in the variational quantum circuit model;

[0083] Step 7: Substitute the parameter weights into the variational quantum circuit model and measure Figure 2 The output bit in , the state with the maximum probability is the predicted label state, thereby realizing the classification of the input data.

[0084] After completing the training and testing, we can get the accuracy curve of the 0-7 digital classification test data set as follows: Figure 5 As shown, the accuracy rate reaches 96.5%. In addition, the CIFAR-10 image dataset is used for testing, and the accuracy rate of eight categories can reach 85.25%. Figure 6 and Figure 7 shown.

[0085] For comparison, reference [1] Bokhan D, Mastiukova AS, Boev AS, et al. Multiclass classification using quantum convolutional neural networks with hybrid quantum-classical learning [J]. Frontiers in Physics, 2022, 10: 1173. A quantum multi-classifier based on the QCNN architecture is provided. Reference [2] Chalumuri A, Kune R, Manoj B S. A hybrid classical-quantum approach for multi-class classification [J]. Quantum Information Processing, 2021, 20 (3): 119. A multi-classifier based on the hybrid classical-quantum method is provided. Both belong to quantum multi-classifiers and can perform multi-classification processing on the MNIST data set. The comparison results of the data sets processed by the present invention and references [1] and [2] are shown in Table 1 below.

[0086]

[0087] Table 1 Comparison of the present invention, reference 1 and reference 2

[0088] It can be seen that the method of the present invention achieves higher accuracy on the MNIST handwritten digit dataset and the CIFAR-10 image dataset, and the model of the present invention is smaller and can be implemented using fewer parameters. Therefore, the present invention has significant advantages over existing conventional methods.

[0089] The above embodiments are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any changes made by adopting the design principles of the present invention and performing non-creative work on this basis should fall within the protection scope of the present invention.

Claims

1. A multi-classification method based on variational quantum computing, It is characterized in that The following steps are involved: S10, preprocessing the classical data to be classified; S20, encoding the characteristic data in the preprocessed classical data into quantum state information by using quantum amplitude coding, and encoding the classification label data into a label state in the form of a binary multi-particle state; S30, using the encoded quantum state information as an input state to train the variational quantum circuit model, wherein the output state of the corresponding output bit of the variational quantum circuit model represents the predicted classification label of the model; S40, using a swap-test circuit to calculate the loss value between the output state of the variational quantum circuit model and the true label state, and performing back propagation iterative update based on the loss value to optimize the parameters in the variational quantum circuit model; The method of using a swap-test circuit to calculate the loss value between the output state of the variational quantum circuit model and the true label state includes: configuring an auxiliary particle in the swap-test circuit, obtaining the fidelity F between the output state of the variational quantum circuit model and the true label state through single-particle measurement of the auxiliary particle, and using the fidelity as the loss value; Back propagation iteratively updates and optimizes the parameters in the variational quantum circuit model based on the loss value, including: setting the objective function Where D represents the number of training data, F i Represents the fidelity of the i-th training data; the objective function is continuously optimized using the first-order gradient-based stochastic objective function optimizer Adam to minimize the fidelity, thereby minimizing the classification error; S50, when the loss value is lower than a set threshold or reaches a set number of iterations, the training of the variational quantum circuit model is completed, and the parameter weights in the variational quantum circuit model are determined; S60, after the classical data to be classified is quantum encoded and input into the variational quantum circuit model, the data is classified by measuring the output state of the variational quantum circuit model; The classical data is image data.

2. The multi-classification method based on variational quantum computing according to claim 1, It is characterized in that The step S10 of preprocessing the classical data to be classified includes: According to the number of classification labels L, the dimension of the classical data is reduced to N dimensions, where And log 2 N is an integer.

3. The multi-classification method based on variational quantum computing according to claim 2, It is characterized in that In step S20, the characteristic data in the preprocessed classical data is encoded into quantum state information by quantum amplitude encoding as follows: Where N represents the vector dimension of the classical data, d represents the dth data vector after encoding, and x 0 ,x 1 ,...,x N-1 is the value of each dimension of the input vector after normalization, corresponding to the amplitude of each superposition state, that is, x 0 2 +x 1 2 +...+x N-1 2 =1.

4. The multi-classification method based on variational quantum computing according to claim 3, It is characterized in that The step S20 of encoding the classification label data into a label state in the form of a binary multi-particle state includes: Different classification labels y d ∈{0,1,2...,L-1} is converted to binary and encoded into log using angle encoding. 2 The corresponding label state |ψ> is formed on L quantum bits d ∈{0,1...,L-1}.

5. The multi-classification method based on variational quantum computing according to claim 4, It is characterized in that The quantum data set D formed by the quantum coding of the classical data to be classified is expressed as D={(|φ> d ,|ψ> d )} d=1 D In the formula, |φ> d represents the input state, |ψ> d Indicates the label state of the corresponding input state.

6. The multi-classification method based on variational quantum computing according to claim 5, It is characterized in that The variational quantum circuit model in step S30 includes a unit quantum circuit that is repeated multiple times, wherein the unit quantum circuit is composed of a layer of Y rotation gate and a layer of CX entanglement gate operations alternately, and the number of repetitions is determined according to the data dimension corresponding to the input state.

7. The multi-classification method based on variational quantum computing according to claim 6, It is characterized in that The state obtained with the maximum probability when measuring the output state of the variational quantum circuit model in step S60 is the predicted label state, and the classification of the corresponding input classical data is determined according to the predicted label state.

8. A device for implementing the multi-classification method based on variational quantum computing as claimed in any one of claims 1 to 7, It is characterized in that include: The data is input into a quantum circuit, which is used to pre-process the classical data to be classified and encode the characteristic data in the pre-processed classical data into the quantum circuit using quantum amplitude coding, so that the classical data is converted into quantum data for processing, and at the same time, the classification label data is encoded into the quantum state of the multi-particle state using binary coding and angle coding; The variational quantum circuit is used to process the encoded quantum data. By configuring training and continuously optimizing internal parameters, the quantum data is converted into corresponding classification prediction information to achieve the purpose of multi-classification. as well as The post-processing circuit is used to process the intermediate quantum state data of the variational quantum circuit during the training process. The fidelity between the intermediate quantum state and the true label state is calculated as the loss value through the swap-test circuit, and then the internal parameters in the variational quantum circuit are continuously optimized through back propagation to achieve accurate classification.