Max-Cut Linear Binary Classifier Based on Quantum Approximate Optimization Algorithm
摘要
The rapid development of quantum computing has opened up entirely new possibilities for the field of machine learning. However, for the implementation of many existing quantum classification algorithms, a large number of qubits and quantum circuits with high complexity are still required. To effectively solve this problem, the Quantum Approximate Optimization Algorithm (QAOA) arises as a promising solution due to its comparative advantages. In particular, it can be realized in the case of shallow quantum circuits and a finite small number of qubits. Along these lines, in this work, a Max-Cut linear binary classifier based on QAOA (QAOA-MaxCut-LBC) was proposed. First, the data set was constructed into an undirected weighted graph, and the binary classification task was transformed into a Max-Cut problem. Then, a Variational Quantum Circuit (VQC) was built by using QAOA, and the expected value of the target Hamiltonian was transformed into a loss function. Finally, the circuit parameters were iteratively updated to make the loss function converge. The computational basis state with the maximum probability was taken as the classification result after the measurement. In the experimental study, our algorithm was validated on various datasets and compared with classical linear classifiers. Our scheme can be flexibly adjusted for the number of qubits, possessing the potential to scale to multi-classification tasks. The source code is accessible at the URL: https://github.com/Dullne/QAOA-MaxCut-LBC.