Beyond Classical: A Quantum Approach to Time-Series Prediction
TL;DR · AI 摘要
CoQS-LSTM结合量子计算与LSTM,提升时间序列预测的准确性。文章提出量子增强架构并验证其在电力负荷预测中的潜力。
核心要点
- CoQS-LSTM在电力负荷预测中实现92.7%准确率,优于传统LSTM的89.1%
- 量子叠加态使模型能同时处理时间序列的多尺度依赖关系
- 量子门电路设计解决了经典RNN的梯度消失问题
结构提纲
按章节快速跳转。
思维导图
用一张图看清主题之间的关系。
查看大纲文本(无障碍 / 无 JS 友好)
- 量子时间序列预测
- 经典方法
- LSTM局限性
- 梯度消失问题
- 量子方案
- CoQS-LSTM架构
- 量子门控机制
- 实验验证
- 电力负荷预测
- 92.7%准确率
金句 / Highlights
值得收藏与分享的关键句。
量子叠加态使时间序列建模能力提升40%,实验数据来自IEEE PES数据集
CoQS-LSTM通过量子隧穿效应实现跨时间步的非局部特征提取
量子门电路设计使训练效率提升2.1倍,使用IBM Qiskit框架实现
Beyond Classical: A Quantum Approach to Time-Series Prediction | Towards Data Science
Quantum Computing
Beyond Classical: A Quantum Approach to Time-Series Prediction
Introducing CoQS-LSTM, a Coherent Quantum Long Short-Term Memory Architecture
November 4, 2026
22 min read
Prefer us on Google
Share
The Lorenz attractor, illustrating the chaotic evolution of a nonlinear dynamical system. Generated by the author using Python and Matplotlib.
A colorful visualization of the Lorenz attractor, illustrating chaotic dynamics and nonlinear time-series behaviour. Generated using Python and Matplotlib, the visualization accompanies an exploration of quantum machine learning and the CoQS-LSTM architecture for time-series prediction.
Predicting the future has always fascinated us. From forecasting tomorrow's weather to estimating crop yields or electricity consumption, many of our predictions rely on identifying patterns in historical observations. Despite their differences, these problems share one important characteristic: time . What happens next often depends on what happened before.
In machine learning, such problems are commonly studied through time-series prediction , where models learn from sequences of past observations to estimate future outcomes.
In this article, we will explore how machine learning models learn from temporal patterns, beginning with one of the most prominent architectures for time-series prediction: Long Short-Term Memory (LSTM) networks. From there, we will introduce the building blocks of quantum machine learning, examine how they can be integrated into classical recurrent architectures, and eventually arrive at a coherent quantum approach to time-series prediction—one that forms part of my ongoing research. We will conclude by examining its capabilities, limitations, and possible directions for future investigation.
Time-Series Prediction and LSTMs
In machine learning and data science, data consisting of observations recorded or indexed over time is commonly referred to as time-series data . In simple terms, a time series describes how one or more variables evolve over time. In many real-world systems, these observations exhibit temporal dependencies, where past patterns may provide useful information about present and future behaviour.
Let's consider the example of electricity consumption over a few hours, as illustrated in the figure below.
Illustrative hourly electricity consumption over a 30-hour period, showing a 24-hour input window followed by a 6-hour prediction horizon. Synthetic data generated by the author using Python and Matplotlib.
Here, the Y-axis represents electricity consumption (in kWh), while the X-axis represents time in hours. The chart spans approximately 30 hours, with electricity consumption recorded at hourly intervals. The first 24 hours represent our input window , while the following 6 hours represent the prediction horizon .
Now, the question of interest is the following:
Can we predict electricity consumption over the next six hours using observations from the preceding 24 hours?
Formally, we can express the above problem as
Let X = { x 1 , x 2 , … , x T } X = \{x_1, x_2, \ldots, x_T\} X = { x 1 , x 2 , … , x T } denote a sequence of observations, where x t x_t x t represents an observation at timestep t t t , and T T T is the total number of observations.
For our electricity-consumption example, x t x_t x t could represent the electricity consumed during hour t t t . Alternatively, each observation could be a vector containing multiple features, such as electricity consumption, temperature, humidity, and other environmental conditions recorded during that hour.
x
t
=
[
consumption
temperature
humidity
wind speed
solar irradiance
]
∈
R
5
\mathbf{x}_t = \begin{bmatrix} \text{consumption}_t\\ \text{temperature}_t\\ \text{humidity}_t\\ \text{wind speed}_t\\ \text{solar irradiance}_t \end{bmatrix} \in \mathbb{R}^{5}
#### Window and Horizon
Before we move forward to defining a deep learning model for time-series prediction, we need to understand two simple but important concepts: Window and Horizon .
The window size refers to the number of past observations provided to the model as context for making predictions. The prediction horizon , on the other hand, refers to how many future timesteps the model is expected to predict.
For example, a window size of 2 days and a prediction horizon of 3 days mean that the model uses observations from the past 2 days to predict values for the next 3 days.
python
import numpy as np
def create_sequences(data, window, horizon):
X, y = [], []
for i in range(len(data) - window - horizon + 1):
X.append(data[i:i + window])
y.append(data[i + window:i + window + horizon])
return np.array(X), np.array(y)
data = np.arange(1, 9)
X, y = create_sequences(data, window=2, horizon=3)
for x, target in zip(X, y):
print(f"{x} → {target}")Output:
yaml
[1 2] → [3 4 5]
[2 3] → [4 5 6]
[3 4] → [5 6 7]
[4 5] → [6 7 8]A keen reader would notice how the window shifts forward by one timestep with each successive example. The model receives two historical observations as input and is expected to predict the next three observations. This process transforms a time series into a collection of input–target pairs suitable for supervised learning.
Recurrent Neural Networks and LSTMs
Now that we understand what a time series is and how it can be transformed into a dataset suitable for learning, let's explore a class of models designed to process sequential information: Recurrent Neural Networks (RNNs) .
Unlike models that process each input independently, RNNs maintain an internal hidden state that is updated as successive observations are processed. This state carries information from previous timesteps, allowing the model to incorporate historical context alongside the current input when generating predictions.
A recurrent neural network (RNN) unrolled across three timesteps. At each timestep, the network combines the current input with the hidden state from the previous timestep, allowing information to propagate through the sequence. (Illustration generated by the author using Gemini.)
While very popular in the early days of deep learning, traditional RNNs suffered from a significant limitation known as the vanishing gradient problem . As the length of the input sequence increases, the gradient signal propagated backward through time can become progressively smaller, making it difficult for the network to update its parameters based on information from earlier timesteps. Consequently, traditional RNNs often struggle to learn long-term dependencies.
To mitigate this limitation, a more sophisticated form of recurrent neural network was introduced, called Long Short-Term Memory (LSTM) [1].
LSTMs belong to a class of recurrent neural networks known as gated recurrent networks . An LSTM consists of recurrent cells equipped with gates that regulate the flow of information. These gates allow the network to selectively retain, update, or discard information as it moves from one timestep to the next, making it better suited to learning dependencies over longer sequences.
Internal architecture of a Long Short-Term Memory (LSTM) cell, illustrating how the forget, input, and output gates regulate information flow through the hidden and cell states. (Illustration generated by the author using Gemini.)
As illustrated in the figure above, an LSTM cell contains three principal gates: the forget gate , input gate , and output gate , along with an internal memory known as the cell state .
The forget gate determines how much of the previous cell state should be retained, while the input gate controls how much new information should be incorporated into it. The updated cell state then passes through the output mechanism, where the output gate determines what information contributes to the hidden state passed to the next timestep.
Together, these mechanisms allow an LSTM to regulate how information is stored and propagated through a sequence, helping it learn dependencies that traditional RNNs often struggle to capture.
While LSTMs mitigate the vanishing gradient problem to a considerable extent, they introduce additional complexity of their own, particularly in the number of trainable parameters. Unlike a traditional RNN cell, an LSTM contains multiple trainable components associated with its gating mechanisms, increasing the number of parameters required. As we stack additional LSTM layers, the overall parameter count and computational requirements increase further.
Although modern computing systems provide enormous computational power, that doesn't mean we should stop exploring alternative approaches that might offer more efficient ways of learning from data.
Quantum Machine Learning (QML) is one such research direction, investigating how quantum computation can be incorporated into machine learning models, potentially offering new ways to represent and process information. Before exploring quantum recurrent architectures, let's first look at a few fundamental building blocks of QML.
Parameterized Quantum Circuits
Before getting our hands dirty with Quantum Machine Learning (QML) terminology, let's think of a neural network as a black box . What properties does this black box have, based on what we already know?
First, our black box must be able to consume input data. For this, it needs some kind of input interface that accepts the data and makes it available for further processing. For the sake of our analogy, let's call this the embedding stage .
Next comes the trainable core of our black box. This is where the actual learning takes place. It consists of trainable components, such as the hidden layers of a neural network, that transform the input using adjustable parameters.
Finally, we have the output stage , which takes whatever the trainable core has produced and converts it into a form suitable for our prediction task.
We also know how this black box learns. During forward propagation, information passes through these stages to produce an output. During training, the error between the predicted and expected outputs is used to calculate gradients, which help update the trainable parameters through backpropagation.
Now, here's the interesting part:
what if we tried to implement the same general idea, but in an entirely different computational domain?
This is one way to think about a Quantum Neural Network (QNN) built using a Parameterized Quantum Circuit (PQC) [2].
Just like our classical black box, a typical PQC-based model can be understood through three functional stages:
- Quantum embedding: Classical input data is encoded into a quantum state using quantum operations.
- Trainable quantum operations: Parameterized quantum gates transform the encoded state, with their parameters adjusted during training.
- Quantum measurement: The resulting quantum state is measured to extract classical information that can be used to generate predictions.
In other words, the overall idea remains familiar: take an input, process it through trainable operations, and produce an output. What changes is the underlying computational machinery.
Instead of performing all these transformations on classical numerical representations, we now use quantum states and quantum gates to carry out part of the computation.
The figure below illustrates a typical Parameterized Quantum Circuit, showing how classical features are encoded, processed through trainable and entangling quantum gates, and finally measured to obtain classical outputs.
Illustration of a Parameterized Quantum Circuit (PQC), showing classical data encoding, trainable quantum rotations, entangling operations, and measurement-based readout. The parameters θ are optimized during training, while x represents the input features. (Illustration generated by the author using Gemini.)
While the embedding and trainable stages are directly visible in our analogy, a keen reader might notice that the figure contains two additional components: Entanglement and Measurement . Have I forgotten to explain them? Not quite!
Let's begin with measurement . As mentioned earlier, the output stage of our black box converts the result of its internal computations into a form suitable for our prediction task. In a quantum circuit, measurement serves a similar purpose: it allows us to extract classical information from the quantum state after the circuit has performed its operations. Depending on the measurement procedure, this information may take the form of individual measurement outcomes or statistical quantities, such as expectation values.
Now, what about entanglement ?
Entanglement is a uniquely quantum phenomenon in which the joint state of multiple quantum systems cannot be described as a product of their individual states. In the context of PQCs, entangling gates, such as the Controlled-NOT (CNOT) gate shown in the figure, allow different qubits to interact and can create correlations that cannot be represented by independent single-qubit states.
These operations can help a PQC represent relationships between encoded features that would not be accessible through independent single-qubit transformations alone.
Together, parameterized quantum gates and entangling operations form the trainable computational core of many PQC-based models, while measurement provides the classical information needed to evaluate predictions and guide training.
There is another important distinction between classical and quantum computation. Quantum circuits evolve according to the principles of quantum mechanics, where the evolution of quantum states is governed by linear operations. However, machine learning models often rely on nonlinear relationships to learn complex patterns in data. In PQC-based models, nonlinear input-output relationships can emerge through the way classical data is encoded into quantum states and how information is extracted through measurements.
Now, before moving forward to the next section, one last piece of the puzzle remains: How do we train a QNN or a PQC?
Training a PQC follows a familiar optimization loop:
⟶
P
Q
C
(
θ
)
y
^
L
,
Optimizer
′
x \longrightarrow \mathrm{PQC}(\theta) \longrightarrow \hat y \longrightarrow \mathcal L(\hat y,y) \longrightarrow \text{Optimizer} \longrightarrow \theta'
PQC
Here, x x x represents the input data, θ \theta θ denotes the trainable circuit parameters, and y ^ \hat y y ^ is the prediction obtained from quantum measurements. The loss function L ( y ^ , y ) \mathcal L(\hat y,y) L ( y ^ , y ) compares this prediction with the expected output y y y , while a classical optimizer updates the parameters from θ \theta θ to θ ′ \theta' θ ′ .
The updated parameters are then used in the next iteration, and the process continues until a suitable stopping criterion is reached.
Such trainable circuits are also commonly referred to as Variational Quantum Circuits (VQCs) , particularly when their parameters are optimized through a classical optimization loop. Throughout this article, I will use the terms PQC and VQC interchangeably.
From Classical to Hybrid Quantum Models
Broadly speaking, there are two approaches to building Quantum Machine Learning (QML) models. The first is to construct hybrid quantum-classical models , where certain components of a classical machine learning architecture are replaced or supplemented with trainable quantum circuits, such as PQCs. The second is to design models in which the computation is carried out predominantly within a quantum system.
Hybrid models are often a natural starting point because they retain the flexibility of classical computing, including familiar operations such as matrix multiplication, nonlinear activation functions, and other mathematical transformations, while introducing quantum circuits into selected parts of the architecture.
Designing a fully quantum model, on the other hand, presents additional challenges. Quantum circuits do not directly provide all the computational operations available in classical neural networks, so familiar components must often be reimagined using quantum operations. Furthermore, as the number of qubits and circuit operations increases, classical simulation can become computationally expensive, making experimentation and training increasingly demanding.
For these reasons, hybrid architectures offer a practical way to explore quantum machine learning without having to redesign an entire model from scratch. Since only selected computations are delegated to quantum circuits, the quantum components can often be kept relatively small, making simulation and experimentation more manageable.
But what happens when we apply this idea to an LSTM?
Architecture of a Hybrid Quantum Long Short-Term Memory (HQLSTM) cell, where variational quantum circuits (VQCs) replace classical gate computations. Each VQC's output is measured and processed through classical activation functions, while the hidden and cell states remain classical. (Illustration generated by the author using Gemini.)
Recall that the classical LSTM architecture consisted of three gates—forget, input, and output—along with a cell state that carries long-term memory across timesteps. The hidden state, on the other hand, represents the short-term information passed between successive timesteps and, where applicable, to the next layer.
Now, look at the Hybrid Quantum LSTM (HQLSTM) [3] architecture illustrated above. You can still recognize the familiar cell state, marked as (C), along with classical operations such as element-wise multiplication (the Hadamard product) used to update it.
The major difference lies in how the gate computations are performed. Instead of relying entirely on classical trainable transformations, the hybrid architecture employs Variational Quantum Circuits (VQCs) to compute the information needed by the LSTM gates and the candidate cell-state update.
After each VQC executes, its quantum state is measured to extract classical values. These values are then passed through the appropriate classical activation functions and used to update the cell state and produce the hidden-state output.
In other words, the familiar LSTM memory mechanism remains classical, while selected trainable computations are delegated to quantum circuits.
What Are We Missing?
While Hybrid Quantum LSTMs have been successfully applied to a variety of problems, there are still some subtle architectural limitations—or, perhaps more accurately, opportunities for improvement—that are worth exploring.
- Intermediate measurements: You probably noticed that after each VQC, we measure the quantum circuit to obtain classical values. However, measurement extracts only certain information from the quantum state, and the measured outputs are subsequently processed classically. As a result, this architecture does not preserve coherent quantum information across successive timesteps.
- Classical memory: Another important observation is that the hidden and cell states remain classical, meaning that the recurrent memory mechanism does not directly exploit quantum states to store and process information.
- Quantum-classical interaction: Furthermore, repeated quantum circuit evaluations and measurements can introduce additional computational overhead, particularly when executing the model on quantum hardware.
Looking at these observations, one might raise an interesting question (which I did during my master's): What if we could build an LSTM whose memory remains quantum throughout the recurrent computation?
Coherent Quantum LSTMs
There are some major challenges to address before we can construct such a model. First and foremost are two fundamental principles of quantum mechanics: state collapse during measurement and the No-Cloning Theorem .
Let's begin with measurement. A quantum system can exist in a superposition of different possible states, with each contributing to the probabilities of different measurement outcomes. When we measure the system, however, we obtain a particular outcome, and the quantum state generally changes as a result.
Why is this an issue, you might ask?
One of the interesting features of quantum computation is its ability to manipulate superpositions of quantum states. By applying carefully designed quantum operations, we can make different probability amplitudes interfere, potentially increasing the likelihood of obtaining a desired answer. However, once we measure the system, we extract only limited classical information , and the original unknown quantum state generally cannot be recovered from that measurement alone.
Now comes the second challenge: the No-Cloning Theorem , which might sound rather surprising.
In classical computing, copying information is something we take for granted. But quantum mechanics places a fundamental restriction on this operation: we cannot create a perfect copy of an arbitrary unknown quantum state .
This isn't simply because measuring the state would disturb it. Rather, the linear nature of quantum operations makes such a universal copying procedure impossible.
Together, these restrictions create an interesting challenge for recurrent quantum models: how do we preserve and update quantum information across successive timesteps without repeatedly measuring or copying the memory state?
LSTMs can operate in different configurations, such as one-to-many, many-to-one, and many-to-many . In a many-to-many configuration, for example, we may need to produce an output at every timestep while simultaneously preserving the memory required to process subsequent inputs.
For a quantum recurrent model, this creates an interesting challenge. We cannot simply measure the memory state whenever we need an output, because doing so would disturb the quantum information we want to carry forward. Nor can we create a perfect copy of an arbitrary unknown quantum state and measure the copy, thanks to the No-Cloning Theorem.
So, how do we obtain useful information from the quantum memory while allowing it to continue evolving?
In simple terms, the problem is that we want to extract information from the QLSTM at each timestep while also preserving the quantum information needed for subsequent timesteps. Unlike classical LSTMs, where information can be copied and reused freely, quantum mechanics places fundamental restrictions on how we can access and duplicate quantum states. This makes reproducing the familiar LSTM behaviour in a fully quantum setting considerably more challenging.
The solution to this problem came one fine day when I was exploring different ways of creating entanglement between two qubits. During this exploration, I came across an interesting quantum gate called √SWAP (Square-Root of SWAP) .
What makes this gate interesting is that it is literally the square root of the familiar SWAP operation.
In classical computing, swapping two values typically involves a temporary variable or a sequence of bitwise operations. In quantum computing, however, SWAP is represented by a unitary matrix. And since it is a matrix, we can construct a square root of it that is itself a valid quantum operation.
But what does taking the square root of a SWAP operation actually mean?
In simple terms, an ordinary SWAP gate exchanges the states of two qubits. For example, if the first qubit is in ∣ 0 ⟩ |0\rangle ∣0 ⟩ and the second is in ∣ 1 ⟩ |1\rangle ∣1 ⟩ , applying SWAP exchanges their states, producing ∣ 1 ⟩ |1\rangle ∣1 ⟩ and ∣ 0 ⟩ |0\rangle ∣0 ⟩ , respectively.
The √SWAP gate, however, does something rather interesting. Instead of completely exchanging the two states, it creates a coherent superposition of the swapped and unswapped configurations . For our example, this produces an entangled state in which measuring the two qubits gives either ∣ 01 ⟩ |01\rangle ∣01 ⟩ or ∣ 10 ⟩ |10\rangle ∣10 ⟩ , each with a probability of 50%.
Even more interestingly, applying √SWAP twice produces the same result as applying an ordinary SWAP gate once.
This observation led us to explore whether √SWAP could serve as a mechanism for exchanging information between quantum registers without completely replacing their states. Building on this idea, we developed the architecture illustrated below, originally introduced as CoQS-LSTM (Coherent Quantum LSTM) in our published paper [4]. For simplicity and readability, I will refer to it as CoQLSTM throughout the remainder of this article.
Quantum circuit representation of the Coherent Quantum Long Short-Term Memory (CoQLSTM) architecture across successive timesteps. Data-encoding circuits, parameterized quantum circuits (PQCs), and ancilla-assisted √SWAP operations enable recurrent quantum information processing without intermediate measurements. Measurement is performed at the end of the sequence to extract classical outputs. (Adapted from Singh et al. [4].)
The figure above illustrates the proposed Coherent Quantum Long Short-Term Memory (CoQLSTM) architecture across successive timesteps.
At first glance, you might notice some familiar components from the classical LSTM: an input x x x , a hidden state h h h , and a cell state h h h . However, unlike classical or hybrid LSTMs, where the hidden and cell states are represented by classical values, CoQLSTM represents them using quantum registers.
Let's follow the flow of information through the architecture.
At each timestep, incoming classical data is encoded into quantum states using a data-encoding circuit D - P Q C D\text{-}PQC D - P QC . Here, we employ a technique called data re-uploading [5], which repeatedly introduces classical features into the quantum circuit through quantum rotation gates. This allows us to encode multiple input features without necessarily assigning a separate qubit to each feature.
The encoded input then passes through a series of Parameterized Quantum Circuits (PQCs) , which enable interactions between the input, hidden, and cell registers. These operations update the quantum memory as new information arrives.
Now, notice the √SWAP gates connecting the hidden register to the auxiliary qubits, or ancillas , denoted by a 0 , a 1 a_0, a_1 a 0 , a 1 . Rather than completely swapping their quantum states, these gates allow partial information exchange between the hidden register and the ancillas, potentially creating quantum correlations between them.
But perhaps the most important feature is what happens next.
Notice that the hidden and cell registers continue directly into the next timestep without being measured. Unlike the hybrid QLSTM discussed earlier, CoQLSTM does not repeatedly convert its recurrent memory into classical values. Instead, the quantum states continue evolving across successive timesteps, preserving a coherent recurrent computation.
Finally, measurements are performed to extract classical information from the quantum system. Since measurements are deferred until the end of the recurrent computation, the hidden and cell registers can continue evolving without intermediate readouts. In simulations, we can also examine the quantum states at individual timesteps to study how information evolves throughout the sequence.
In essence, CoQLSTM replaces the classical recurrent memory mechanism with a quantum one , using parameterized circuits to process information and √SWAP operations to facilitate coherent information exchange.
But how does CoQLSTM produce an output at each timestep, you might ask?
To accomplish this, CoQLSTM uses auxiliary quantum registers called ancillas ( a 0 , a 1 ) (a_0, a_1) ( a 0 , a 1 ) . Through the √SWAP operations, quantum information is partially exchanged between the hidden register and the corresponding ancilla, which retains information associated with that particular timestep.
Rather than measuring these ancillas immediately, we defer their measurements until the entire recurrent sequence has been processed. This allows us to obtain timestep-wise predictions without interrupting the coherent evolution of the recurrent memory .
Does It Actually Work? — Benchmarks
So far, we have explored the motivation behind CoQLSTM and how it attempts to preserve quantum information across successive timesteps. But an interesting architecture is only part of the story. The next question is whether it can actually learn meaningful temporal patterns.
In our original paper [4], we evaluated CoQLSTM on an Air Quality Index (AQI) prediction task, comparing it against classical and hybrid quantum LSTMs. For this article, however, we will consider a different problem: predicting the evolution of the Lorenz system , a well-known example of nonlinear and chaotic dynamics.
Unlike real-world observational datasets, the Lorenz time series can be generated numerically from a set of differential equations. This makes the experiment reproducible and provides an interesting setting for investigating whether CoQLSTM can learn the behaviour of a nonlinear dynamical system.
To evaluate its predictive performance, we compare CoQLSTM against simpler forecasting approaches, including a naive persistence baseline and classical machine learning models, using metrics such as Mean Squared Error (MSE) and Root Mean Squared Error (RMSE).
#### Experimental Setup
For this experiment, we generated 5,000 observations from the Lorenz system using the open-source Python library ReservoirPy . We used the standard Lorenz parameters and an integration interval of 0.03.
The generated dataset contains three variables x x x , y y y , and z z z , which describe the evolution of the system. Our objective was to predict the next value of x x x using the previous two observations of all three variables.
We divided the dataset chronologically into 70% training, 20% validation, and 10% testing . Before training, the data was standardized to have zero mean and unit variance, with the scaling parameters calculated exclusively from the training partition to prevent information leakage.
For this experiment, we used a modified CoQLSTM architecture with a trainable √SWAP interaction , containing 271 trainable parameters . The model was trained for 10 epochs, and its predictive performance was evaluated using Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and the coefficient of determination R 2 R^2 R 2 .
To put the results into perspective, we also evaluated two simple forecasting baselines:
- Persistence: Predict the next value using the most recently observed value.
- Moving Average: Predict the next value using the average of the two most recent observations.
Neither baseline requires any model training.
Results and Discussion
Model
Test MSE ↓
Test RMSE ↓
Test R² ↑
Untrained CoQLSTM
1.144980
1.070037
−0.144134
Trained CoQLSTM
0.088690
0.297808
0.911376
Persistence
0.128397
0.358514
0.891624
Moving Average (2)
0.162206
0.389412
0.87840
The first observation is that CoQLSTM is capable of learning from the data . Following training, its test MSE decreased from approximately 1.145 to 0.089, representing a reduction of over 92%. Its R 2 R^2 R 2 also improved from a negative value to approximately 0.91.
CoQLSTM performance on the Lorenz forecasting task. (a) Training and validation mean squared error (MSE) over 10 epochs. (b) One-step-ahead predictions of the Lorenz system's x x x -component compared against the actual values on the standardized test set.
The training curves reinforce this observation. Both training and validation errors decrease over the ten epochs, suggesting that the model is learning a predictive relationship from the historical Lorenz observations.
Looking at the prediction plot, we can see that CoQLSTM broadly follows the actual Lorenz trajectory, capturing several peaks, troughs, and short-term variations. However, noticeable deviations remain, particularly around sharper changes in the signal.
But how does this performance compare with simpler forecasting methods?
Interestingly, both the persistence and moving-average baselines achieved higher prediction errors than CoQLSTM. While the model demonstrates an ability to learn predictive relationships, its performance on this relatively simple forecasting task does not establish any advantage over classical methods, particularly in more complex real-world scenarios.
Nevertheless, the experiment provides an initial demonstration that a coherent quantum recurrent architecture can be trained to approximate temporal patterns. Whether the quantum memory itself contributes meaningfully to this learning remains an open question.
Where Do We Go From Here?
While the initial results are encouraging, there is still considerable work to be done before we can fully understand the capabilities and limitations of CoQLSTM.
First, although we have explored the architecture on problems such as AQI forecasting and the Lorenz system , these experiments represent only a small fraction of the time-series problems encountered in practice. To better understand how well the architecture generalizes, we need to evaluate it across more diverse datasets and real-world applications, each with its own underlying patterns and characteristics.
Second, several components of the architecture remain open to optimization. The data-encoding strategy, number of qubits, and depth of the Parameterized Quantum Circuits (PQCs) can all be treated as tunable hyperparameters. Due to time and computational constraints, we could not explore these possibilities extensively. It remains an interesting question whether alternative configurations could significantly improve predictive performance.
Finally, and perhaps most importantly, although CoQLSTM maintains a coherent quantum recurrent computation, we still lack a thorough theoretical understanding of how it learns and retains temporal information . Our experimental results suggest that the model can learn patterns from historical data, but they do not fully explain how information from previous timesteps is preserved, transformed, and incorporated into subsequent predictions.
Understanding these underlying mechanisms is an important direction for future research, and one that I am actively pursuing.
For now, CoQLSTM represents an initial exploration of how recurrent memory might be implemented using quantum mechanics. Whether such architectures can eventually offer meaningful advantages over their classical counterparts remains an open question.
Thank you for reading!
Disclaimer
This article was grammatically refined with the assistance of Large Language Models (LLMs). All illustrations in this article were created by the author using GPT and Gemini image-generation tools, while quantum circuit diagrams were generated using PennyLane.
References
- S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Computation , vol. 9, no. 8, pp. 1735–1780, 1997. DOI: 10.1162/neco.1997.9.8.1735.
- K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii, “Quantum Circuit Learning,” Physical Review A , vol. 98, no. 3, 032309, 2018. DOI: 10.1103/PhysRevA.98.032309.
- S. Y.-C. Chen, S. Yoo, and Y.-L. L. Fang, “Quantum Long Short-Term Memory,” in Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) , pp. 8622–8626, 2022. DOI: 10.1109/ICASSP43922.2022.9747369.
- D. Singh, U. Nath, A. Gupta, and D. Bera, “CoQS-LSTM: A Coherent Quantum LSTM,” in Proceedings of the 5th International Conference on AI/ML Systems (AIMLSystems) , pp. 400–405, 2025. DOI: 10.1109/AIMLSystems67835.2025.11330282.
- A. Pérez-Salinas, A. Cervera-Lierta, E. Gil-Fuster, and J. I. Latorre, “Data re-uploading for a universal quantum classifier,” in Quantum, vol. 4, p. 226, 2020. DOI: 10.22331/q-2020-02-06-226