Density Matrix Emulation of Quantum Recurrent Neural Networks for Multivariate Time Series Prediction
Authors:
José Daniel Viqueira,
Daniel Faílde,
Mariamo M. Juane,
Andrés Gómez,
David Mera
Abstract:
Quantum Recurrent Neural Networks (QRNNs) are robust candidates for modelling and predicting future values in multivariate time series. However, the effective implementation of some QRNN models is limited by the need for mid-circuit measurements. Those increase the requirements for quantum hardware, which in the current NISQ era does not allow reliable computations. Emulation arises as the main ne…
▽ More
Quantum Recurrent Neural Networks (QRNNs) are robust candidates for modelling and predicting future values in multivariate time series. However, the effective implementation of some QRNN models is limited by the need for mid-circuit measurements. Those increase the requirements for quantum hardware, which in the current NISQ era does not allow reliable computations. Emulation arises as the main near-term alternative to explore the potential of QRNNs, but existing quantum emulators are not dedicated to circuits with multiple intermediate measurements. In this context, we design a specific emulation method that relies on density matrix formalism. Using a compact tensor notation, we provide the mathematical formulation of the operator-sum representation involved. This allows us to show how the present and past information from a time series is transmitted through the circuit, and how to reduce the computational cost in every time step of the emulated network. In addition, we derive the analytical gradient and the Hessian of the network outputs with respect to its trainable parameters, which are needed when the outputs have stochastic noise due to hardware errors and a finite number of circuit shots (sampling). We finally test the presented methods using a hardware-efficient ansatz and four diverse datasets that include univariate and multivariate time series, with and without sampling noise. In addition, we compare the model with other existing quantum and classical approaches. Our results show how QRNNs can be trained with numerical and analytical gradients to make accurate predictions of future values by capturing non-trivial patterns of input series with different complexities.
△ Less
Submitted 30 January, 2025; v1 submitted 31 October, 2023;
originally announced October 2023.
Using Differential Evolution to avoid local minima in Variational Quantum Algorithms
Authors:
Daniel Faílde,
José Daniel Viqueira,
Mariamo Mussa Juane,
Andrés Gómez
Abstract:
Variational Quantum Algorithms (VQAs) are among the most promising NISQ-era algorithms for harnessing quantum computing in diverse fields. However, the underlying optimization processes within these algorithms usually deal with local minima and barren plateau problems, preventing them from scaling efficiently. Our goal in this paper is to study alternative optimization methods that can avoid or re…
▽ More
Variational Quantum Algorithms (VQAs) are among the most promising NISQ-era algorithms for harnessing quantum computing in diverse fields. However, the underlying optimization processes within these algorithms usually deal with local minima and barren plateau problems, preventing them from scaling efficiently. Our goal in this paper is to study alternative optimization methods that can avoid or reduce the effect of these problems. To this end, we propose to apply the Differential Evolution (DE) algorithm to VQAs optimizations. Our hypothesis is that DE is resilient to vanishing gradients and local minima for two main reasons: (i) it does not depend on gradients, and (ii) its mutation and recombination schemes allow DE to continue evolving even in these cases. To demonstrate the performance of our approach, first, we use a robust local minima problem to compare state-of-the-art local optimizers (SLSQP, COBYLA, L-BFGS-B and SPSA) against DE using the Variational Quantum Eigensolver algorithm. Our results show that DE always outperforms local optimizers. In particular, in exact simulations of a 1D Ising chain with 14 qubits, DE achieves the ground state with a 100\% success rate, while local optimizers only exhibit around 40\%. We also show that combining DE with local optimizers increases the accuracy of the energy estimation once avoiding local minima. Finally, we demonstrate how our results can be extended to more complex problems by studying DE performance in a 1D Hubbard model.
△ Less
Submitted 29 September, 2023; v1 submitted 21 March, 2023;
originally announced March 2023.