---
title: Hybrid Quantum LSTM
url: https://www.emergentmind.com/topics/hybrid-quantum-long-short-term-memory-qlstm
type: topic
---

# Hybrid Quantum LSTM

Hybrid Quantum Long Short-Term Memory (QLSTM) denotes a family of hybrid quantum-classical recurrent architectures in which parts of the classical Long Short-Term Memory computation are replaced or augmented by quantum subroutines, while the LSTM-style recurrence over cell state and hidden state is retained. In the most direct formulations, the classical affine maps inside the forget, input, candidate, and output gates are replaced by variational quantum circuits (VQCs); in kernelized formulations they are replaced by quantum kernel evaluations; and in training-time variants a quantum model generates the parameters of an otherwise classical LSTM. Since the introduction of the hybrid QLSTM model in 2020, the literature has expanded to include kernel-based, federated, distributed, recursive, attention-augmented, reservoir, and architecture-searched variants for forecasting, reinforcement learning, signal reconstruction, and privacy-sensitive edge deployment [2009.01783, 2411.13225, 2503.16049, 2503.14088].

## 1. Origin and defining idea

The paper "Quantum Long Short-Term Memory" introduced a hybrid quantum-classical model of LSTM, dubbed QLSTM, motivated by the standard role of LSTM in temporal dependency modeling and by the possibility that variational quantum circuits may provide a more expressive transformation with modest qubit count and circuit depth on NISQ devices [2009.01783]. The central design principle is not to quantize the entire recurrent system, but to preserve the classical memory algebra of LSTM while inserting quantum modules at the transformation points where a classical LSTM would ordinarily use learned matrices and biases.

In the now-standard gate-level formulation, with input \(x_t\), previous hidden state \(h_{t-1}\), and concatenated recurrent input \(v_t = [h_{t-1}; x_t]\), the hybrid cell is written as
\[
\begin{aligned}
f_t &= \sigma(\mathrm{VQC}_f(v_t)),\\
i_t &= \sigma(\mathrm{VQC}_i(v_t)),\\
\tilde{C}_t &= \tanh(\mathrm{VQC}_C(v_t)),\\
o_t &= \sigma(\mathrm{VQC}_o(v_t)),\\
C_t &= f_t \odot C_{t-1} + i_t \odot \tilde{C}_t,\\
h_t &= o_t \odot \tanh(C_t).
\end{aligned}
\]
This formulation, or closely related variants, recurs across reinforcement-learning, anomaly-detection, forecasting, and attention-based papers, even when the surrounding stack differs substantially [2210.14876, 2505.01735, 2601.02818].

The earliest QLSTM paper also used additional VQC blocks for hidden-state and output computation,
\[
\begin{aligned}
h_t &= \mathrm{VQC}_5(o_t * \tanh(c_t)),\\
y_t &= \mathrm{VQC}_6(o_t * \tanh(c_t)),
\end{aligned}
\]
illustrating that the boundary between the classical recurrent scaffold and the quantum substitution layer is not fixed across the literature [2009.01783]. A plausible implication is that "hybrid QLSTM" is better understood as an architectural family defined by where quantum computation is inserted into the recurrent pipeline, rather than as a single canonical cell.

## 2. Cell mechanics and quantum operators

The dominant gate implementation strategy is VQC substitution. In this setting, each gate receives a classical vector, encodes it into a quantum state, evolves that state through trainable unitary layers, and returns classical expectation values that are post-processed by sigmoid or hyperbolic tangent nonlinearities. A recurrent motif is classical-to-quantum input encoding by single-qubit rotations, entanglement with CNOT patterns, and readout by Pauli expectation values [2009.01783, 2210.14876, 2309.07339].

Several concrete encodings recur. The original QLSTM work encoded each input component by \(R_y(\arctan(x_i))\) and \(R_z(\arctan(x_i^2))\), followed by parameterized single-qubit rotations \(R(\alpha,\beta,\gamma)\), entangling CNOT gates, and Pauli-\(Z\) measurements [2009.01783]. In reinforcement-learning variants the same style of encoding was retained inside hybrid "dressed" recurrent agents [2210.14876]. Other application-specific implementations altered the quantum primitive while preserving the LSTM recurrence. The Remaining Useful Life model replaced each gate’s linear transformation by a Quantum Depth-Infused circuit on 4 qubits, using \(R_z(\phi)\) for input encoding, trainable \(R_x(\theta)\) rotations for data re-uploading, CNOT entanglement, and expectation values of the Pauli-\(Y\) observable [2504.20823]. The finance QLSTM used direct angle encoding through \(R_y(\theta)\), followed by CNOT layers and expectation-value readout before classical sigmoid and \(\tanh\) activations [2509.09176].

A second major route replaces gate-wise affine maps by quantum kernels rather than by trainable gate circuits. In QK-LSTM, the gate computation takes the form
\[
f_t = \sigma \left( \sum_{j=1}^{N} \alpha_j^{(f)} k^{(f)}(v_t, v_j) + b_f \right),
\]
with analogous expressions for \(i_t\), \(\tilde{C}_t\), and \(o_t\), where \(k(\cdot,\cdot)\) is a quantum kernel induced by a quantum feature map [2411.13225, 2412.08851]. The kernel itself is defined by Hilbert-space overlap,
\[
k(v,v') = |\langle \phi(v) \mid \phi(v') \rangle|^2
= \left| \langle 0|^{\otimes n} U^\dagger(v') U(v) |0\rangle^{\otimes n} \right|^2,
\]
and the surrounding LSTM algebra remains classical [2411.13225]. In this literature, the quantum contribution is therefore not a variational recurrent gate in the narrow sense, but a non-linear feature-space similarity operator embedded into the recurrent gates.

A third route, Quantum-Train LSTM, leaves the inference-time LSTM classical and uses a QNN only during training to generate the classical LSTM parameters. The mapping is
\[
\mathcal{M}_\beta(|\phi_i\rangle, |\langle \phi_i | \psi(\gamma)\rangle|^2) = \kappa_i,
\]
where the measured probabilities of a parameterized quantum circuit and a learnable classical mapping function produce the real-valued LSTM parameters \(\kappa_i\) [2503.16049]. This construction shifts the hybridization point from recurrent computation to parameter generation.

## 3. Architectural variants

The literature quickly moved beyond the baseline gate-replacement design. One branch augments QLSTM with classical front ends or back ends. The DeepConv-QK-LSTM architecture places convolutional layers before a shallow QK-LSTM so that local temporal patterns are extracted classically as
\[
\phi(X) = [\phi(x_1), \ldots, \phi(x_T)] \in \mathbb{R}^{T \times p},
\]
and the recurrent quantum-kernel layer then processes
\[
v_t = [h_{t-1}; \phi(x_t)] \in \mathbb{R}^{n+p}
\]
for long-range temporal modeling in human activity recognition [2508.06078]. The Hybrid Quantum Recurrent Neural Network for remaining useful life prediction stacks three QLSTM layers with hidden sizes \(32\), \(16\), and \(8\), then uses classical dense layers for the scalar prediction head [2504.20823]. The QLSTMA model inserts an attention layer after the quantum LSTM layer and compares a shared-gate design, in which a single VQC is shared among all gates, against an independent-gate design with four separately parameterized VQCs [2601.02818].

A second branch modifies the internal organization of the quantum subsystem. Recursive QLSTM introduces a MetaCore network that takes the recurrent context
\[
z_t = [h_{t-1}; c_{t-1}; x_t]
\]
and outputs gate-wise parameter updates \((\Delta_t^i,\Delta_t^f,\Delta_t^g,\Delta_t^o)\) for the gate circuits [2606.24932]. It evaluates three recursive rules:
\[
\Theta_t^a = \bar{\Theta}^a + \Delta_t^a,
\quad
\Theta_t^a = \Delta_t^a,
\quad
\Theta_t^a = \Theta_{t-1}^a + \Delta_t^a,
\]
labelled "base+delta", "meta-only", and "delta" respectively [2606.24932]. DiffQAS-QLSTM addresses a different design bottleneck—manual VQC selection—by introducing differentiable architecture search over a structured circuit space, optimizing both the circuit parameters and the architecture weights through an ensemble output
\[
f_{\mathcal{C}} = \sum_{j=1}^{N} w_j f_{\mathcal{C}_j}.
\]
This directly targets the task-specificity of handcrafted quantum circuits [2508.14955].

A third branch addresses scaling. Distributed QLSTM partitions the recurrent input into
\[
\mathbf{v}_t = [\mathbf{v}_t^{(1)}; \mathbf{v}_t^{(2)}; \cdots; \mathbf{v}_t^{(M)}]
\]
and assigns each partition to a smaller VQC on a separate quantum processing unit, concatenating the partial outputs into the full gate vector [2503.14088]. Multi-parallelized QLSTM goes further by assigning one independent VQC per cell-state dimension and per gate, measuring all qubits of every VQC rather than only a subset; with \(K\) cell dimensions, each gate output becomes
\[
g = [g_1, g_2, \ldots, g_K].
\]
This contrasts explicitly with the original QLSTM, where only a subset of qubits is measured [2507.10876].

A fourth branch redefines the meaning of "quantum-enhanced LSTM" at the sequence-model level. The QLSTM Seq2Seq autoencoder embeds a depth-1 VQC inside each recurrent gate of the encoder and uses the resulting latent vectors for downstream RBF-kernel portfolio allocation [2602.11578]. The brain-inspired QSNN-QLSTM model composes a Quantum Spiking Neural Network front end with a QLSTM memory module in a two-stage architecture intended to emulate sensory extraction followed by pattern memorization [2505.01735]. Recent papers therefore use related labels such as QLSTM, QK-LSTM, Recursive QLSTM, QLSTMA, MP-QLSTM, and Federated QT-LSTM for different but structurally connected hybrid recurrent constructions.

## 4. Training regimes and systems integration

Hybrid QLSTM research is notable not only for cell design but also for the variety of optimization and deployment regimes in which the cells are embedded. The original QLSTM used hybrid optimization with parameter-shift gradients,
\[
\frac{\partial f(x; \theta)}{\partial \theta}
= \frac{1}{2}\left[f\left(x; \theta + \frac{\pi}{2}\right) - f\left(x; \theta - \frac{\pi}{2}\right)\right],
\]
coupled to classical optimizers such as RMSprop [2009.01783]. QK-LSTM forecasting used backpropagation through time for the classical coefficients and the parameter-shift rule for quantum parts when the feature map was parameterized [2412.08851].

Federated learning introduces a systems-level hybridization. In Fed-QK-LSTM, each client trains a DeepConv-QK-LSTM locally, computes the quantum kernels locally through simulated quantum circuits, and shares only model parameters with the server; aggregation is performed with Federated Averaging, and raw data never leaves the client [2508.06078]. Federated QT-LSTM applies a similar decentralized protocol to a training-time quantum parameter generator, again with server-side aggregation and the explicit property that inference uses a purely classical LSTM [2503.16049]. This shifts QLSTM research into privacy-preserving edge and distributed settings.

Reinforcement learning supplied another major integration pathway. QLSTM-DRQN uses QLSTM as the recurrent core of a deep \(Q\)-learning agent, combining classical preprocessing and output layers with a QLSTM memory module and training the full system with policy and target networks in standard deep \(Q\)-learning style [2210.14876]. QLSTM-Reservoir RL instead fixes the QLSTM parameters after random initialization and trains only the classical layers around it with the asynchronous advantage actor-critic algorithm; in that setting, the QLSTM acts as a quantum dynamical reservoir rather than a fully trainable recurrent core [2309.07339]. In a trading architecture, a supervised QLSTM is first trained as a price-movement forecaster, then frozen, and its two-dimensional softmax output is concatenated with technical and portfolio features for a QA3C agent [2509.09176]. The QSNN-QLSTM anomaly-detection model adopts still another training schedule: independent QSNN pretraining, single-pass QLSTM adaptation with frozen QSNN, and then joint co-training with separate optimizers [2505.01735].

These training regimes show that hybrid QLSTM is not restricted to end-to-end supervised sequence prediction. It has been used as a trainable recurrent core, a frozen reservoir, a pre-trained state generator, and a training-only quantum compressor.

## 5. Empirical record across application domains

Reported performance spans synthetic temporal benchmarks, environmental forecasting, industrial prognostics, human activity recognition, spatial geoscience, finance, and reinforcement learning.

| Setting | Reported result | Source |
|---|---|---|
| Original temporal benchmarks | QLSTM used \(\sim 146\) parameters vs. \(166\) for classical LSTM and reached training loss \(1.89 \times 10^{-2}\) and test loss \(1.69 \times 10^{-2}\) on the sine task at Epoch 15, versus \(2.86 \times 10^{-2}\) and \(2.81 \times 10^{-2}\) for LSTM | [2009.01783] |
| AQI forecasting | QK-LSTM used \(209\) trainable parameters vs. \(1{,}873\) for LSTM; RMSE \(9.20\) vs. \(15.94\), MAE \(7.15\) vs. \(11.07\), MAPE \(9.14\%\) vs. \(13.32\%\), \(R^2\) \(0.84\) vs. \(0.78\) | [2412.08851] |
| Federated HAR | Fed-QK-LSTM reported accuracy \(0.95\), precision \(0.97\), recall \(0.97\), F1-score \(0.97\), with \(137{,}996\) trainable parameters vs. \(202{,}696\) for Fed-LSTM | [2508.06078] |
| Remaining Useful Life | HQRNN achieved RMSE \(15.46\), improving over LSTM \(16.14\), Random Forest \(17.91\), CNN \(18.45\), and MLP \(16.78\) | [2504.20823] |
| Distributed sequence benchmarks | Distributed QLSTM reached \(R^2 = 0.9936\) on damped harmonic oscillator and \(R^2 = 0.7523\) on NARMA sequences | [2503.14088] |
| Spatial permeability prediction | 8-qubit QLSTMA-IG reduced MAE by \(19\%\) and RMSE by \(20\%\) versus LSTMA | [2601.02818] |
| High-dimensional spatial forecasting | MP-QLSTM and MP-QGRU achieved approximately \(1.5\%\) lower test loss than classical LSTM and GRU; MP-QLSTM reported RMSPE \(0.256\%\) against semiconductor pressure-sensor measurements | [2507.10876] |

Beyond these settings, the finance QLSTM Seq2Seq autoencoder was evaluated on fourteen rolling S and P 500 windows from 2022 to 2025; the QLSTM-derived RBF-Graph strategy reported final net value \(2.4\times\) and mean Sharpe \(1.07\), against an S and P 500 benchmark of \(1.45\times\) and \(0.78\), while the latent manifold was described as producing smoother trajectories, clearer regime transitions, and more stable, sector-coherent clusters than a classical LSTM baseline [2602.11578]. In trading, the supervised QLSTM forecaster in the QA3C pipeline stabilized around \(71.5\%\) test accuracy, and the long-only agent achieved \(11.87\%\) return over around 5 years with \(0.92\%\) max drawdown [2509.09176].

Reinforcement-learning evidence is also mixed but substantial. On Cart-Pole, QLSTM-DRQN reported more stable and higher average scores than classical DRQN with similar architecture and number of model parameters, and QLSTM variants used only \(150\)–\(270\) parameters against \(634\)–\(2290\) for matched classical DRQNs [2210.14876]. In the reservoir-computing setting, fixed-parameter QLSTM reservoirs achieved performance comparable to a fully trained QLSTM RL model on MiniGrid-Empty benchmarks, especially in small and medium environments [2309.07339].

Taken together, the empirical record consistently emphasizes two properties: lower trainable parameter counts than directly matched classical recurrent baselines, and competitive or improved convergence or error metrics on task-specific benchmarks. This suggests a recurring design objective in hybrid QLSTM research: to trade heavy recurrent parameterization for structured quantum feature transformation.

## 6. Limitations, misconceptions, and open questions

A persistent limitation is that many results remain simulation-based. The original QLSTM paper explicitly noted training overhead that scales as \(\mathcal{O}(nms)\) per epoch and highlighted shot noise, decoherence, and limited parallelization as constraints on real hardware [2009.01783]. The Remaining Useful Life model, QLSTMA, the finance QLSTM forecaster, and the QLSTM Seq2Seq autoencoder were all evaluated with simulated quantum components or classical simulation of quantum layers rather than deployment on actual quantum devices [2504.20823, 2601.02818, 2509.09176, 2602.11578]. This suggests that practical advantage on current hardware remains an open engineering question rather than a settled empirical fact.

A second limitation is that gains are not uniform and are sometimes benchmark-relative rather than state-of-the-art. The RUL paper stated that the hybrid method remains outperformed by certain advanced joint architectures despite outperforming Random Forest, CNN, MLP, and a stacked-LSTM baseline [2504.20823]. Recursive QLSTM reported markedly faster convergence but only generally matched static QLSTM in final test loss, with "delta" sometimes suffering from error accumulation at long sequence lengths and "meta-only" underperforming in early optimization [2606.24932]. QLSTMA reported improvements with increasing qubit count, but the study also acknowledged reliance on classical simulations [2601.02818].

A third issue concerns the source of the reported benefit. "A Novel Stochastic LSTM Model Inspired by Quantum Machine Learning" showed that stochastic rounding inserted after classical multiply-and-accumulate operations could mimic much of the enhanced convergence and some of the performance behavior reported for quantum LSTM models; in that study, the stochastic LSTM with 100-shot averaging approached or sometimes matched the best classical and analytical QLSTM results, whereas 1-shot QLSTM degraded under shot noise [2305.10212]. This does not refute the hybrid QLSTM program, but it does narrow the interpretation of empirical gains: some observed advantages may arise from stochasticity or regularization effects that are not uniquely quantum.

Several misconceptions therefore require qualification. Hybrid QLSTM is not synonymous with a single VQC-gated cell; kernel-based QK-LSTM, training-time Federated QT-LSTM, and reservoir-style QLSTM are structurally distinct [2411.13225, 2503.16049, 2309.07339]. Nor does every quantum-enhanced LSTM require quantum hardware at inference: Federated QT-LSTM was designed specifically to eliminate reliance on quantum devices during inference, producing a purely classical deployed model after quantum-assisted training [2503.16049].

Open questions follow directly from the surveyed work: actual hardware deployment beyond simulation; scalable communication-efficient federated protocols; stability-preserving recursive parameterization; task-adaptive circuit design through differentiable architecture search; larger and more irregular sequence data; direct quantum parameter generation; and the extent to which parameter efficiency, convergence speed, and generalization in hybrid recurrent systems are attributable to quantum feature spaces, circuit structure, or more general stochastic and regularizing mechanisms [2508.14955, 2606.24932]. In that sense, hybrid QLSTM has already diversified into a broad research program whose central problem is no longer whether one can place quantum computation inside an LSTM, but which insertion point, circuit formalism, and training regime best justify the added complexity.

Source: https://www.emergentmind.com/topics/hybrid-quantum-long-short-term-memory-qlstm