Abstract:
A Multi-head Quantum Self-Attention Predict Network (MQSAPN) is designed in hybrid manner, which could be used in time-series forecasting. MQSAPN comprises two components, one is the Multi-head Quantum Self-Attention (MQSA) model, and the other is the predicting Variational Quantum Circuits (pVQC). When fed with sequential inputs, the MQSA firstly computes the key, query, and value vectors corresponding to all time steps through the variational circuits, and then according to exist studies, the attention is estimated via Gaussian function. With residual link on input and multi-head features, the output of MQSA were pushed to pVQC part, which was encoded into quantum circuit again, and the prediction would be ultimately calculated out by measurements on observables. The prediction results of MQSAPN numerical experiments on atmospheric variables indicate the effectiveness of quantum self-attention, by comparison with the results of a data-reuploading VQC model with almost same amount of parameters. The accuracy of predicting is close to classic multi-head transformer model and LSTM net. To be noted, as input time window extends or the more features are adopted, the number of parameters of pVQC will also increases correspondingly, which makes the pVQC part become the bottleneck of the whole model due to ‘barren plateau’ problems during training process.