CG-QRNN: A Conditional Gated Quantum Recurrent Neural Network with Recurrent Temporal Attention
Haibin Wang, Tianjiao Li, Wenjie Liu, Qingshan Wu
Abstract
Abstract Quantum recurrent neural networks (QRNNs) have been investigated as a promising paradigm for sequential modeling by integrating parameterized quantum circuits with recurrent architectures. However, existing QRNNs often require additional quantum resources to implement effective gating mechanisms and struggle to capture long-range temporal dependencies. To address these issues, a Conditional Gated Quantum Recurrent Neural Network with Recurrent Temporal Attention (CG-QRNN) is proposed. The Conditional Gating (CG) strategy uses mid-circuit measurement outcomes as control signals to selectively execute subsequent quantum operations within each recurrent update. By coupling intermediate measurement with conditional quantum operations, quantum gating is implemented while the existing qubits are reused, thereby avoiding the introduction of additional qubits for quantum gating. The Recurrent Temporal Attention (RTA) mechanism uses the current hidden state to interact with historical hidden states and dynamically determines their contributions to the current recurrent update. The historical hidden states are then aggregated according to these contributions and incorporated into the current hidden state update. Experiments on five ordinary differential equation benchmarks demonstrate that the CG-QRNN achieves superior overall performance, with average prediction errors reduced by 59.1%, 69.6%, 83.3%, and 97.5% compared with the best-performing baselines on the Bessel, standard Lotka--Volterra, fractional Lotka--Volterra, and Robertson benchmarks, respectively, while more stable predictions and higher R2 scores are achieved on the damped oscillator benchmark.