Quantum Neural Network Based on Swap Test and Phase Estimation
LIU Guangshuo LI Panchi
Abstract
To address the integration of quantum computing and neural computing, this paper investigates a quantum neural network (QNN) model and its algorithm based on swap test and phase estimation. Firstly, a quantum circuit for swap tests with multi-qubit control is proposed, and a quantum neuron model is developed by combining this with phase estimation. The model uses quantum bits for inputs, weights, and outputs, where the phase of the weight qubits serves as the model parameters. Based on this quantum neuron, a QNN model is constructed, with measurements performed at the network output to obtain real-valued outputs. Various quantum circuits associated with the network model are designed in detail, and the input-output relationships for each network layer are derived according to quantum computing theory. Additionally, a method for adjusting network parameters based on the gradient descent algorithm is thoroughly developed. Finally, simulations are conducted on a classical computer using planar point set recognition and handwritten digit binary classification. Although these simulations do not verify the parallelism of quantum computing, they do validate the model??s execution effectiveness. The results show that the proposed model has a clear advantage in classification performance compared with a classical backpropagation (BP) neural network with the same parameter scale. This demonstrates that constructing QNN models based on multi-qubit swap tests and phase estimation is both effective and feasible, offering a new perspective for future research on quantum neural networks.