arXiv:2412.00645 · Journal of Physics A Mathematical and Theoretical
A flexible quantum convolutional neural network
Kai Yu, Song Lin, Bin‐Bin Cai
Abstract
Abstract Convolutional neural network (CNN) is a crucial tool for machine learning, especially in the field of computer vision. The development of quantum information technology provides more possibilities for it in large-scale data processing. However, balancing the efficient utilization of quantum resources with the flexibility of algorithms while improving classical computational performance remains a significant challenge. In this paper, we propose a flexible quantum CNN algorithm. First, a data loading method based on quantum superposition is presented, which can exponentially reduce space requirements. Subsequently, quantum subroutines for convolutional layers, pooling layers, and fully connected layers were designed to fully replicate the core functionalities of classical CNNs. Quantum algorithm techniques were integrated to restore the data position of receptive fields based on feature location information, ensuring that the selection of window size and stride remains as flexible as in classical models. Moreover, parallel quantum amplitude estimation and swap test techniques enable parallel feature extraction. Analysis shows that the method can achieve exponential acceleration of data scale in less memory. Finally, the proposed method is numerically simulated on the Qiskit framework using handwritten digital images in the MNIST dataset. The experimental results provide evidence for the effectiveness of the model.