NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Quantum Long Short-Term Memory

Samuel Yen-Chi Chen, Shinjae Yoo, Yao-Lung L. Fang

Introduction

Recurrent Neural Networks (RNNs), particularly Long Short-Term Memory (LSTM) networks, have long been the standard for processing sequential data such as speech, text, and time-series physics simulations. As we transition into the era of Noisy Intermediate-Scale Quantum (NISQ) devices, researchers are exploring whether quantum computers can offer advantages in learning complex temporal dependencies. This paper introduces the QLSTM, a hybrid quantum-classical architecture designed to handle sequential data by leveraging quantum entanglement and variational optimization.

Methodology

The QLSTM maintains the high-level logic of a classical LSTM cell but replaces its internal linear transformations with Variational Quantum Circuits (VQCs). A standard LSTM cell utilizes four internal gates: forget, input, update, and output. In the QLSTM framework, each of these gates is powered by a dedicated VQC.

The internal logic of an LSTM cell, which serves as the structural template for the hybrid QLSTM model.

Quantum Gate Architecture

The process begins with Data Encoding, where classical input data (the current time step $x_t$ and the previous hidden state $h_{t-1}$) is mapped into quantum states using rotation gates ($R_y$ and $R_z$) scaled by an arctan function. This is followed by a Variational Layer consisting of CNOT gates to create entanglement and tunable rotation gates ($R(\alpha, \beta, \gamma)$) that serve as the model's learnable parameters.

The detailed Variational Quantum Circuit (VQC) used to implement the gates within the QLSTM, showing encoding, entanglement, and variational layers.

Hybrid Optimization

The quantum circuits are executed to obtain expectation values via Pauli-Z measurements. These values are then processed by classical activation functions (sigmoid $\sigma$ and hyperbolic tangent $\tanh$). The entire system is trained classically using the parameter-shift method for gradient calculation and the RMSprop optimizer.

Experimental Evaluation

The model was evaluated on several synthetic and physical temporal datasets, including:

  • Periodic Functions: Simple sine waves.
  • Damped Harmonic Oscillator: Simulating pendulum decay.
  • Bessel Functions ($J_2$): Complex mathematical decay patterns common in physics.
  • Delayed Quantum Feedback: Modeling non-Markovian dynamics in open quantum systems (OQS).
  • Population Inversion: Simulating dynamics in cavity quantum electrodynamics (CQED) systems.

Key Results and Insights

  • Quantum Expressivity: The QLSTM demonstrated the ability to represent complex functions with fewer parameters than classical counterparts. In experiments, a QLSTM with ~146 parameters outperformed a classical LSTM with ~166 parameters.
  • Training Stability and Convergence: The QLSTM's loss function proved significantly smoother than the classical model, avoiding the "peculiar spikes" often seen in classical LSTM training. Furthermore, the QLSTM reached lower training and testing loss values in fewer epochs, often capturing the essence of a signal (like frequency) as early as the first epoch.
  • Local Feature Fitting: The model showed superior performance in fitting local minima and maxima in oscillating data, indicating strong generalization capabilities on unseen testing data.

Conclusion and Future Work

While the QLSTM shows great promise for sequence learning on NISQ hardware, several challenges remain. Current training relies on classical simulators, which is computationally expensive due to the high number of circuit evaluations required. Future research will focus on hardware implementation, assessing robustness against environmental noise (decoherence), and exploring alternative encoding methods like amplitude encoding to further enhance quantum advantage.

Summary updated

BibTeX
@misc{chen2020quantum,
  author = {Samuel Yen-Chi Chen and Shinjae Yoo and Yao-Lung L. Fang},
  title = {{Quantum Long Short-Term Memory}},
  year = {2020},
  eprint = {2009.01783},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.01783},
}
Figure