# Quantum Discrete Maps: Data-driven Quantum Dynamical Embedding Method for
Long-term Prediction on a Near-term Quantum Computer

Tai-Ping Sun  Key Laboratory of Quantum Information, Chinese Academy of
Sciences, School of Physics, University of Science and Technology of China,
Hefei, Anhui, 230026, P. R. China  CAS Center For Excellence in Quantum
Information and Quantum Physics, University of Science and Technology of
China, Hefei, Anhui, 230026, P. R. China  Zhao-Yun Chen
<EMAIL_ADDRESS>Institute of Artificial Intelligence, Hefei
Comprehensive National Science Center, Hefei, Anhui, 230088, P. R. China
Cheng Xue  Institute of Artificial Intelligence, Hefei Comprehensive National
Science Center, Hefei, Anhui, 230088, P. R. China  Huan-Yu Liu  Key Laboratory
of Quantum Information, Chinese Academy of Sciences, School of Physics,
University of Science and Technology of China, Hefei, Anhui, 230026, P. R.
China  CAS Center For Excellence in Quantum Information and Quantum Physics,
University of Science and Technology of China, Hefei, Anhui, 230026, P. R.
China  Xi-Ning Zhuang  Key Laboratory of Quantum Information, Chinese Academy
of Sciences, School of Physics, University of Science and Technology of China,
Hefei, Anhui, 230026, P. R. China  CAS Center For Excellence in Quantum
Information and Quantum Physics, University of Science and Technology of
China, Hefei, Anhui, 230026, P. R. China  Origin Quantum Computing, Hefei,
Anhui, 230026, P. R. China  Yun-Jie Wang  Institute of Advanced Technology,
University of Science and Technology of China, Hefei, Anhui, 230031, P. R.
China  Shi-Xin Ma  Key Laboratory of Quantum Information, Chinese Academy of
Sciences, School of Physics, University of Science and Technology of China,
Hefei, Anhui, 230026, P. R. China  National Innovation Institute of Defense
Technology, AMS, Beijing, 100071, P. R. China  Hai-Feng Zhang  Key Laboratory
of Quantum Information, Chinese Academy of Sciences, School of Physics,
University of Science and Technology of China, Hefei, Anhui, 230026, P. R.
China  CAS Center For Excellence in Quantum Information and Quantum Physics,
University of Science and Technology of China, Hefei, Anhui, 230026, P. R.
China  Yu-Chun Wu<EMAIL_ADDRESS>Key Laboratory of Quantum Information,
Chinese Academy of Sciences, School of Physics, University of Science and
Technology of China, Hefei, Anhui, 230026, P. R. China  CAS Center For
Excellence in Quantum Information and Quantum Physics, University of Science
and Technology of China, Hefei, Anhui, 230026, P. R. China  Institute of
Artificial Intelligence, Hefei Comprehensive National Science Center, Hefei,
Anhui, 230088, P. R. China  Guo-Ping Guo<EMAIL_ADDRESS>Key Laboratory of
Quantum Information, Chinese Academy of Sciences, School of Physics,
University of Science and Technology of China, Hefei, Anhui, 230026, P. R.
China  CAS Center For Excellence in Quantum Information and Quantum Physics,
University of Science and Technology of China, Hefei, Anhui, 230026, P. R.
China  Institute of Artificial Intelligence, Hefei Comprehensive National
Science Center, Hefei, Anhui, 230088, P. R. China

###### Abstract

The increasing focus on long-term time series prediction across various fields
has been significantly strengthened by advancements in quantum computation. In
this paper, we introduce quantum discrete maps (QDMs), a data-driven method
designed for long-term time series prediction with quantum dynamical
embedding. This approach enables a trainable embedding of the data space into
an extended state space, allowing for the recursive retrieval of time series
information. Based on its independency of time series length, this method
achieves depth-efficient quantum circuits that are crucial for near-term
quantum computers. Numerical simulations demonstrate the model’s improved
performance in prediction accuracy and resource efficiency over existing
methods. We implement this model on the Originq Wu-Kong superconducting
quantum processor with a learnable error-cancellation layer (LECL) for error
mitigation, further validates the practical applicability of our approach on
near-term quantum devices. Furthermore, the theoretical analysis of the QDM’s
dynamical properties and its universality enhances its potential for time
series prediction. This study establishes a significant step towards the
processing of long-term time series on near-term quantum computers,
integrating data-driven learning with discrete time quantum maps for enhanced
forecasting capabilities.

##  I Introduction

Recent years have witnessed a surge in the application of time series
prediction across a range of fields, including finance, physics, and
engineering, underscoring its significance [1, 2, 3]. Classical algorithms for
time series prediction predominantly rely on long short-term memory (LSTM)
networks [4, 5], special networks like echo state networks (ESNs) [6, 7] and
reservoir computing (RC) [8]. These approaches are based on data-driven
learning methods and have shown potential in capturing dynamical features.
Recently, it has been shown that classical data could be mapped into a quantum
feature space based on certain embeddings, which is further used to
approximate a variety of functions. These universal approximation properties
[9, 10, 11, 12] facilitate the construction of inference function for modeling
temporal data patterns. These advancements suggest the potential of quantum
systems for effectively modelling the complex dynamics inherent in long-term
time series.

Figure 1: Circuits for QDMs and Learning Protocols. (a) Illustration of a
generic QDM architecture. The qubits for encoding the classical state are
divided into two sets: the memory register (top, with $n_{m}$ qubits) for
inputting memory $\bm{m}_{t}$, and the data register (bottom, with $n_{x}$
qubits) for inputting data $\bm{x}_{t}$ at time $t$. The circuit then
undergoes evolution through a unitary operator $U(\bm{\theta})$, comprising
parametrized quantum gates and fixed Hamiltonian evolution across $D$ layers.
Finally, selected observable ensembles are measured to extract classical
information. With this architecture and the initial point
$(\bm{m}_{0},\bm{x}_{0})$, the state pairs
$(\bm{m}_{1},\bm{x}_{1}),(\bm{m}_{2},\bm{x}_{2}),(\bm{m}_{3},\bm{x}_{3}),\dots$
are obtained in an autoregressive way. (b) The protocol of QRC and QRNN. The
data is injected into the quantum system and measured to retrieve classical
information. The memory register maintains the quantum state form and will
lose coherence in the long run. (c) An enhanced QDM architecture with $M$
linear-composite channels. In this design, the QDM is available to explore the
dynamics with higher degrees of freedom. The final signal $\bm{x}_{t}$ is
retrieved through the superposition of sub-signals
$\bm{x}_{1}^{1},\dots,\bm{x}_{t}^{M}$ from different channels. (d) Training
and predicting protocols. In the training stage, initial data $\bm{x}_{0}$ is
fed into the QDM block, and the output data $\hat{\bm{x}}_{i}$ is used to
compute the cost function, with $i={1,\cdots,L}$ and time updated over $L$
steps. After the training, the system undergoes an additional $T$ steps of
evolution to predict future values. Note that while the memory evolves
simultaneously with the data in both stages, it does not contribute to the
cost function calculation.

Current quantum algorithms for time series processing have been heuristically
constructed based on the classical counterparts [13, 14, 15, 16, 17, 18].
These models, such as quantum reservoir computing (QRC) [19, 20, 18, 15, 21,
22, 23, 24, 25, 26, 27], quantum recurrent neural networks (QRNNs) [16] and
quantum dynamic mode decomposition (QDMD) [28], have demonstrated significant
potential in understanding temporal dependencies of sequential data. However,
these current algorithms exhibit a linear increase in circuit depth as the
length of the time sequence grows, which poses challenges for near-term
quantum computers. The growth in circuit depth threatens the maintenance of
quantum coherence in the long run, a vital factor for the accuracy of long-
term predictions. Despite the existence of physical implementations on NMR
systems [29, 30] and weak measurement protocols of superconducting systems
[31] that aim to address this challenge, how to predict long-term time series
with shallow quantum circuits remains an open question. However, there is a
possibility that preserving long-term coherence of the quantum system may not
be necessary for time series prediction tasks.

In this study, we present a data-driven approach for time series prediction
using quantum discrete maps (QDMs), which are analogous to classical discrete-
time maps in dynamical systems [32]. We can recurrently retrieve time series
from strong measurements of the QDM at current time step. Our approach allows
for the dynamical embedding of original data into an extended state space and
facilitates the data-driven learning of embedding parameters. This approach
offers a solution for long-term time series prediction with circuit depth
independent on the length of the time series. We demonstrate the effectiveness
of our method through numerical experiments with cosine-wave and composite
signals. A comparative analysis with existing methodologies reveals that our
approach offers significant advantages in terms of prediction accuracy and
computational efficiency. To validate the noise resistance, we perform long-
term predictions using a noisy simulator with a learnable error-cancellation
layer (LECL) following the QDM. Further, we extend our implementation to the
Originq Wu-Kong superconducting quantum computer, integrating a LECL to
generate time series. This demonstrates the potential of leveraging current
quantum computing capabilities for real-world time series prediction
challenges. Theoretically, we explore the dynamics of a specific 2-qubit case,
providing insights into the connection between the QDM and the inherent
characteristics of time series. We present several theorems that underscore
the universality of the QDM in this context. This study marks a significant
step towards realizing time series processing on near-term quantum devices.

##  II Results

###  II.1 The quantum discrete map model

####  II.1.1 Model setup

The common target among different time series prediction tasks can be viewed
as to learn the complex system’s dynamics from a huge size of history data.
While Markovian dynamics is characterized by an iteration, $x_{t+1}=f(x_{t})$,
one need to introduce a memory architecture to handle with the more
complicated non-markovian case, i.e.
$(x_{t+1},m_{t+1})=\mathcal{F}(x_{t},m_{t})$. Such an embedding, from the low-
dimensional yet non-Markovian space of original data into a high-dimensional
Markovian phase space, has shown great power in RC, ESNs, and recurrent neural
networks [8, 7, 33, 34, 35, 4, 5].

However, this embedding procedure turns out to be too expansive when training
a highly non-markovian process with a quickly growing phase space.
Fortunately, quantum systems, due to their exponentially large Hilbert space,
can be leveraged as a work memory to encode and evolve the phase space[29, 30,
31, 16]. Nevertheless, there are still two essential weaknesses faced by all
of the works mentioned above: Firstly, a long-term coherence needs to be
preserved which seems formidable in the noisy intermediate-scale quantum
(NISQ) era. Secondly, the circuit depth grows at least linearly in those
approaches, inducing a strong restriction on any further long-term training or
predicting procedures.

To address this issue, we propose a classical-quantum hybrid protocol to learn
and predict long-term time series, wherein only fixed-depth circuits are
employed, and long-term training and predicting are enabled, as shown in Fig.
1. More specifically, for each step, given the hidden memory $\bm{m}_{t}$ of
size $n_{m}$ and the observable data $\bm{x}_{t}$ of size $n_{x}$, a shallow
parameterized quantum circuit $(n_{m},n_{x})$-QDM is applied to the input pair
$(\bm{m}_{t},\bm{x}_{t})$

$|\psi_{t}\rangle=U(\bm{\theta})|\bm{m}_{t}\rangle_{m}|\bm{x}_{t}\rangle_{x},$
(1)

where

$|\bm{m}_{t}\rangle_{m}|\bm{x}_{t}\rangle_{x}=\left(U_{\text{enc}}(\bm{m}_{t})|0\rangle_{m}\right)\otimes\left(U_{\text{enc}}(\bm{x}_{t})|0\rangle_{x}\right)$

is the encoded input state. $U(\bm{\theta})$ is a trainable parameterized
quantum circuit. The memory and data of the next step are extracted from
observables of their corresponding subspaces, namely

$\bm{m}_{t+1}=\operatorname{Tr}\left(\mathcal{H}_{m}|\psi_{t}\rangle\langle\psi_{t}|\right),$
(2)

and

$\bm{x}_{t+1}=\operatorname{Tr}\left(\mathcal{H}_{x}|\psi_{t}\rangle\langle\psi_{t}|\right).$
(3)

This process gives a mapping from $(\bm{m}_{t},\bm{x}_{t})$ to
$(\bm{m}_{t+1},\bm{x}_{t+1})$, which is denoted as
$\operatorname{QDM}(\bm{m}_{t},\bm{x}_{t};\theta)\mapsto(\bm{m}_{t+1},\bm{x}_{t+1})$.
Given any parametrized quantum circuit $U(\bm{\theta})$ and the initial state
$(\bm{m}_{0},\bm{x}_{0})$, one could keep performing this mapping to obtain
$\bm{x}_{1}$, $\bm{x}_{2}$, … $\bm{x}_{\infty}$, as illustrated in Fig. 1 (a).

The QDM distinguishes itself from previous studies of QRC and QRNNs in the
manner of the memory information storage. Unlike these models, where the
quantum system serves as a memory reservoir for historical data, our approach
overcomes the issue of coherence loss—a challenge in long-term data embedding
and retrieval—through the QDM model, as illustrated in Fig. 1 (b).

Enhancements to the QDM model are achieved by integrating $M$ linear-composite
channels, as shown in Fig.1 (c). Each channel in the QDM utilizes the
architecture in Fig. 1 (a), albeit with distinct parameters. These channels
are designed to contain identical qubit numbers for both data and memory
registers. The final output, $\bm{x}_{t}$, is a synthesis of sub-signals
$\bm{x}_{t}^{1},\dots,\bm{x}_{t}^{M}$ from these varied channels, enabling the
QDM to explore dynamics with increased degrees of freedom.

####  II.1.2 Training and predicting

As we can see from the QDM model, with a fixed circuit $U(\bm{\theta})$ and
the initial point, we can determine the evolution of this system. Given the
trainability of the parametrized quantum circuit, we can employ a data-driven
method for predicting the time series. That is, we utilize historical data
points to develop a model that accurately represents the underlying patterns
in the data. Once this model is established, we extrapolate it over time to
forecast future trends and values. The training of the model can be formulated
as

######  Definition 1 (Training a data-driven model).

Given a trainable predictive model $\mathcal{F}(\bm{x},\bm{m};\bm{\theta})$,
where $\bm{x}$ denotes the data, $\bm{m}$ the hidden memory, $\bm{\theta}$ the
trainable parameters, and a standard historical dataset $\bm{x}_{0:L}$, where
$\bm{x}_{0:L}$ represents the series of data points from time 0 to L. Use this
model to sequentially generate a predicted data $\hat{\bm{x}}_{0:L}$ from the
initial point $\bm{x}_{0}$. The objective is to optimize the parameter
$\bm{\theta}$, formulated as

$\operatorname{argmin}_{\bm{\theta}}\mathcal{L}(\hat{\bm{x}}_{0:L},\bm{x}_{0:L};\bm{\theta})$

where $\mathcal{L}$ quantifies the difference between the predicted and
historical series.

In the subsequent applications, the QDM is optimized using mean square error
(MSE) as the loss function, defined as:

$\mathcal{L}_{\mathrm{mse}}=\frac{1}{L}\sum_{t=1}^{L}\left\|\bm{x}_{t}-\hat{\bm{x}}_{t}\right\|_{2}^{2},$
(4)

where the $\hat{\bm{x}}_{t}$ and $\bm{x}_{t}$ denote the time series values at
time step $t$ for $\hat{\bm{x}}_{0:L}$ and $\bm{x}_{0:L}$, respectively. The
term $\|\cdot\|_{2}$ represents the $L^{2}$ norm.

Building on the findings of previous research, the embedding of time series
and the evolving of quantum systems require a circuit depth of
$\mathcal{O}(L)$. Comparatively, our approach marks a notable advancement by
achieving this with a significantly reduced circuit depth of
$\mathcal{O}(\Gamma)$, where $\Gamma$ represents the base depth of a single
QDM circuit block.

Moreover, we employ gradient descent for circuit parameter optimization, with
the number of circuit executions scaling as $\mathcal{O}(nL)$, where
$n=n_{m}+n_{x}$ denotes the total qubit number in the QDM. The linear
dependency on the time series length $L$ facilitates the use of gradient-based
optimization methods. For an in-depth discussion of this procedure, see Sec.
IV.2.

After training, the iterative mapping is applied over $T$ additional steps for
prediction, generating the series $\hat{\bm{x}}_{L+1:L+T}$ to approximate
target values. In the subsequent tests, we compare the prediction results with
the ideal results to show the performance of the QDM. The predicting error is
also defined as MSE.

####  II.1.3 Applications

Figure 2: Demonstrations of QDMs for Time Series Prediction: (a) 2-qubit QDM
application on cosine-wave prediction with $x(t)=0.5\cos(\omega t)$, where
$\omega=\pi/25$ and the value of time axis is rescaled by $\Delta=0.04$. The
training and predicting lengths are set to $L=T=100$ in this and the following
tests. (b) Composite periodic signal predicting, $x(t)=0.2\cos(\omega
t)+0.3\sin(2\omega t)$, where $\omega=\pi/25$. (c) Aperiodic time series
predicting, $x(t)=0.2\cos(\omega t)+0.3\sin(\sqrt{5}\omega t)$, with the same
architecture and settings as (b). (d), (e) and (f) are the predictions of
cosine-wave from 3-qubit QRC models, varied by evolution time $\tau$.
Additional settings and details are provided in the supplementary information.

This part establishes both numerical and experimental evidence on some
applications to characterize the adaptability of the QDM introduced above.
Firstly, we employ the QDM to predict a cosine-wave signal with single
channel. In the context of composite signal functions, our approach
effectively captures the characteristics inherent in superpositions of
different cosine-wave signals with the architecture depicted in Fig. 1 (c).
For benchmarking purposes, we compare it with the performance using QRC.
Additionally, we focus on long-term time series and noisy simulations,
training and forecasting them at a ratio of $1:10$ under the influence of
depolarizing or amplitude-damping noise. Notably, an experimental test on a
superconducting quantum computer indicates significant promise for real-world
time series processing.

We designed the hardware-efficient ansatz (HEA) in this application and
tailored the number of linear-composite channels to align with the task’s
complexity. For more details about the architecture design and initial
settings, see Sec. IV.1 of Methods.

##### Cosine-wave signal

Firstly, we apply the QDM on the cosine-wave signal,

$x(t)=A\cos(\omega t+\phi),$

where $\omega=0.04\pi$, $A=0.5$ and $\phi=0$ for simplicity. In this
application, the QDM configuration is simplified to a single channel
comprising two qubits. The ansatz for this setup follows the HEA, as detailed
in Sec. IV.1. We define the temporal domain as $0\leq t\leq
200,t\in\mathbb{N}$. In this and the following demonstrations, we train the
QDM with the first 100 points generated from the equation (blue dots) and test
the extrapolation prediction result for the next 100 points (orange dots), as
depicted in Fig. 2 (a). The prediction error, defined by the MSE, is
$1.10\times 10^{-5}$, which demonstrates the capability of QDM to accurately
represent the periodic nature of the cosine-wave. Detailed theoretical
foundations of these observations are further elaborated in Sec. II.4.

##### Composite signal

We consider applying the QDM on the composite cosine-waves

$x(t)=\sum_{i}A_{i}\cos(\omega_{i}t+\phi_{i}),$

where each term represents an independent wave component. In Fig. 2 (b) and
(c), we demonstrate two cases, a periodic and an aperiodic one with only 2
linear-composite channels, which can be viewed as two simplest non-trivial
examples to benchmark the model. In the first case, we set
$\omega_{1}=0.04\pi$ and $\omega_{2}=2\omega_{1}$; the second case,
$\omega_{1}=0.04\pi$ and $\omega_{2}=\sqrt{5}\omega_{1}$. The corresponding
prediction errors are $5.21\times 10^{-6}$ and $8.10\times 10^{-5}$,
respectively. In both cases, each channel of the QDM employs follows the
ansatz configuration used in cosine-wave prediction. The decent performance on
prediction error proved that the QDM correctly learned the systems’ dynamics.

##### Comparison with QRC

In this application, we compare the performance on cosine-wave prediction
between the QDM and the QRC model. For the QRC model, we employ a 3-qubit
system with 5 evolution slices ($V=5$), maintaining the same training and
predicting length as the QDM. The results of this comparison are depicted in
Fig. 2 (d)-(f). The corresponding prediction errors for these results are
$2.81\times 10^{-1}$, $1.29\times 10^{-2}$ and $2.89\times 10^{-1}$. Detailed
insights into the QRC theory and its configurations can be found in the
supplementary information. Notably, the 2-qubit QDM demonstrates more stable
performance in terms of precision, circuit depth, and training resource
allocation compared to the QRC model.

Figure 3: Long-term Prediction on Composite Aperiodic Signal with Quantum
Noise. The training and predicting protocols replicate those in Fig. 2, with
the distinction of a training-to-predicting ratio of $1:10$.

###  II.2 Performing long-term prediction by recovering from noisy results

In this part, we show how the QDM can be applied to noisy quantum computers.
As analyzed above, the long-term coherence of qubits need to be kept for the
QRC and QRNN models. As a result, the long-term prediction task turns to be
formidable due to the strong sensitivity to noise. Here, we propose a
trainable method to recover the system from noisy results. Moreover, we show
that our method can allow the QDM to spontaneously unbias the difference among
different quantum computers.

First, we analyze the effect of noise for a QDM running on a noisy quantum
computer with typical error sources, including the depolarizing, the
amplitude-damping, and the readout error. We denote the noiseless and actual
results for qubit $i$ as $\langle\sigma_{z}^{i}\rangle^{*}$ and
$\langle\sigma_{z}^{i}\rangle$, respectively.

For the depolarizing noise, let $\sigma$ be the initial quantum state,
$\rho^{(k)}$ the state after $k$ applications of the depolarizing and unitary
channels, and $\rho$ the state absent noise channels. We can express
$\rho^{(k)}$ as:

$\rho^{(k)}\equiv\left[\left(\prod_{j=1}^{k}\mathcal{U}_{j}\circ\mathcal{E}^{\mathcal{D}}_{p_{j}}\right)\right]\circ\sigma,$
(5)

where $p_{j}$ represents the probability of the depolarizing channel
$\mathcal{E}^{\mathcal{D}}_{p_{j}}$ and $\mathcal{U}_{j}(\cdot)=U_{j}\cdot
U_{j}^{\dagger}$ represents the unitary channel.

Drawing from Lem. 1 in [36], this is reformulated as:

$\displaystyle\rho^{(k)}=$
$\displaystyle\left(\prod_{j=1}^{k}(1-p_{j})\right)U_{k}\cdots U_{1}\sigma
U_{1}^{\dagger}\cdots U_{k}^{\dagger}$ (6)
$\displaystyle+\left(1-\prod_{j=1}^{k}(1-p_{j})\right)\frac{I}{2^{n}}$
$\displaystyle=$
$\displaystyle\prod_{j=1}^{k}(1-p_{j})\rho+\left(1-\prod_{j=1}^{k}(1-p_{j})\right)\frac{I}{2^{n}}.$

Subsequently, the noisy result $\langle\sigma_{z}^{i}\rangle$ is represented
as:

$\displaystyle\langle\sigma_{z}^{i}\rangle=$
$\displaystyle\operatorname{Tr}[\rho^{(k)}\sigma_{z}^{i}]$ (7)
$\displaystyle=$
$\displaystyle\left(\prod_{j=1}^{k}(1-p_{j})\right)\langle\sigma_{z}^{i}\rangle^{*}.$

For the amplitude damping noise, characterized by the amplitude damping
channel $\mathcal{E}_{\gamma}^{\mathcal{AD}}$, it affects the quantum state
$\rho$ like:

$\displaystyle\langle\sigma_{z}^{i}\rangle=$
$\displaystyle\operatorname{Tr}[\mathcal{E}_{\gamma}^{\mathcal{AD}}(\rho)\sigma_{z}^{i}]$
(8) $\displaystyle=$
$\displaystyle(1-\gamma)\langle\sigma_{z}^{i}\rangle^{*}+\gamma,$

where $\gamma$ is the strength of the amplitude damping channel.

For the readout error, this can be understand as a probabilistic
transformation of ideal measurement results. Specifically, the readout error
can be characterized as bit-flip events, which is quantified using a response
matrix $M$. The observed outcome probabilities, denoted as
$\bm{p}_{\operatorname{obs}}$, are obtained from the transformation of the
error-free probabilities $\bm{p}_{\operatorname{ideal}}$ as follows:

$\bm{p}_{\operatorname{obs}}=M\bm{p}_{\operatorname{ideal}}.$ (9)

Given that the observable $\sigma_{z}^{i}$ can be decomposed into projectors
of computational bases, it is feasible to express the result with readout
error as the combination of elements from $\bm{p}_{\operatorname{obs}}$,
further as the linear transformation on the ideal result. This is similar to
what is observed in depolarizing and amplitude damping scenarios.

To recover the results from noisy quantum computers, we introduce a linear
layer called LECL, consisting of a linear transformation with parameters
$A:\mathbb{R}^{n\times n}$, $\mathbf{b}:\mathbb{R}^{n}$. This layer performs
the mapping $(\bm{x},\bm{m})^{T}\mapsto A(\bm{x},\bm{m})^{T}+\mathbf{b}$ on
the obtained measurements. As we have applied a back-propagation algorithm to
train the QDM, the training of this linear layer will only slightly increase
the cost for classical postprocessing, and will not affect the required number
of quantum circuit executions. Note that the quantum process should still be
the resource of the ability of this model, instead of this linear layer. A
model comprising only the linear layer, without the QDM, lacks non-linearity
and is therefore unsuitable for most problems.

We evaluated long-term prediction capabilities of the QDM under aforementioned
noise channels using a cosine-wave signal and two composite signals.
Maintaining a training-to-predicting ratio of $1:10$ and replicating previous
settings, including the LECL, these simulations highlight the robustness of
the QDM complemented by a linear layer. This robustness demonstrates the QDM’s
potential for long-term time series prediction in practical scenarios.

The numerical results also demonstrate the models’ stability under different
noise strengths, showcasing the main benefit of this error-recovery QDM
method: the system is trained not only to capture dynamical features but also
to adapt to the system’s noise characteristics. Due to the efficiency of the
training algorithm, we achieve enhanced adaptability without incurring
additional costs.

Figure 4: Error Distribution in Encoding Space and the Cosine-wave Signal
Generation. (a) Error distribution within the encoding space $(m,x)$, each
grid point indicating the deviation between the ideal output $(m^{*},x^{*})$
and the quantum computer’s output $(\hat{m},\hat{x})$ without LECL, denoted as
$\epsilon_{m}=\hat{m}-m^{*}$ and $\epsilon_{x}=\hat{x}-x^{*}$. (b) Adjusted
error distribution following the application of LECL as detailed in Sec.
II.1.3, illustrating the changes in error magnitude. (c) Generation of a
single period of a cosine-wave time series, as outlined in Sec. II, showing
the data register dynamics and the memory register responses; solid lines
correspond to the results from ideal simulations with optimized parameters,
while dashed lines represent the outcomes from the quantum computer after the
LECL is applied.

###  II.3 Experimental demonstration on a superconducting quantum processor

As discussed in Sec. II.2, the realization of time series predictions is
challenged by different typical errors. Our approach addresses these
compounded errors by focusing on the mitigation of gate and readout errors
with LECL method. This focus is crucial for maintaining accuracy in our model,
as the fixed circuit depth does not increase with the time series length,
making gate and readout error mitigation paramount regardless of decoherence.

Previous studies have developed error mitigation techniques to refine
expectation values on quantum computers [37, 38, 39, 40, 41]. In this
experimental demonstration on the Originq platform, we utilize a 2-qubit
system for cosine-wave prediction. We leverage a learning-based error
mitigation approach, integrated with learnable error-cancellation layer as
described in Sec. II.2, considering only gate and readout errors. Different
from the direct error model determination and probabilistic correction in [37,
38], we aim to average errors within the encoding space, establishing a
transformation between noiseless results and those obtained from near-term
quantum computers. This transformation is vital in error compensation during
time series forecasting.

To further elaborate, we consider executing quantum circuits with gridded
inputs $m^{i},x^{i}$ in the state space $m,x\in[-1,1]$. The discrepancy
between the ideal outputs, $(m^{*},x^{*})=\operatorname{QDM}(m,x)$, and actual
outputs from the quantum processor without LECL, $(\hat{m},\hat{x})$, is
quantified as $\epsilon_{m}=\hat{m}-m^{*}$ and $\epsilon_{x}=\hat{x}-x^{*}$.
Subsequently, an LECL characterized by parameters $A$ and a bias vector
$\mathbf{b}$ is applied to the experimental results within this state space.
These parameters are optimized with Broyden-Fletcher-Goldfarb-Shanno (BFGS)
algorithm [42, 43, 44, 45], implemented in SCIPY [46], and fixed for the time
series generation. Utilizing these optimized parameters, we construct a
$25$-step time sequence that aligns with a single period of cosine-wave.

The experiments are performed on the Wu-Kong quantum processor of the Originq
platform and reveal the error distribution with and without LECL, depicted in
Fig. 4 (a) and (b). Comparative analysis of error distributions before and
after applying the optimization procedure reveals that errors are reduced to
below the threshold of $10^{-2}$. Consequently, the time series can be
reconstructed using the optimized linear transformation. As demonstrated in
Fig. 4(c), this error mitigation technique effectively prevents divergence in
the time series data, validating the feasibility of the QDM on NISQ platforms
and marking a significant advance in quantum-based time series analysis.

###  II.4 Dynamics analysis

Figure 5: Comparison of QDM Trajectory and Its Linear Approximation. The
trajectory generated by the QDM of Eq.(10) extends along the timeline, while
the surface is plotted based on the dynamics of Eq.(11) with parameters set to
$(a^{*},b^{*},\gamma^{*})$.

The classical discrete time maps exhibit a variety of characteristics, whereas
the properties of quantum discrete maps remain less explicit. An in-depth
analysis of classical dynamical properties, such as periodicity and fixed
points, facilitates a foundational understanding of the QDM and enhances the
learnability of data-driven methods. Nevertheless, dynamical analysis
necessitates an explicit formulation of the QDM, a task that becomes
increasingly complex with higher qubit number or greater circuit depth.

Utilizing a simplified $(1,1)$-QDM architecture with TIEA construction as
described in Sec. IV.1, we derive the theoretical mapping equations as
follows:

$\left\\{\begin{array}[]{ll}m_{t+1}&=m_{t}\cos\theta_{1}-x_{t}\sqrt{1-m^{2}_{t}}\sin\theta_{1},\\\
x_{t+1}&=x_{t}\cos\theta_{2}-m_{t}\sqrt{1-x^{2}_{t}}\sin\theta_{2}.\end{array}\right.$
(10)

In subsequent analysis, we treat the given data $\bm{x}_{t+1}$ and its
estimator $\hat{\bm{x}}_{t+1}$ as equivalent within a generative model
framework, not distinguishing between them. Although quantum computation
operates linearly with unitary quantum operators, it is possible to derive a
nonlinear discrete map of the state vector. This nonlinearity, evident as a
square root in Eq. (10), arises from encoding and measurement protocols.
Nonetheless, analyzing nonlinear dynamical systems typically involves
identifying fixed points and linearizing the system in a small neighborhood, a
technique that loses efficacy when initial values are distant from these
points, limiting its applicability across the entire phase plane. While
identifying the fixed point at $(0,0)$ of $(1,1)$-QDM is straightforward,
linear properties in its neighborhood can not extend to the global phase
space.

Considering a specific scenario where $\theta_{2}=-\theta_{1}=\theta>0$ and
$x,m\in[-0.5,0.5]$, the square root terms in Eq.(10) range from $0.866$ to
$1.0$. To linearize the equations, we replace the square root with a constant
$\gamma\in(0.866,1.0)$, transforming Eq.(10) into a matrix form
$(m_{t+1},x_{t+1})^{T}=R(m_{t},x_{t})^{T}$, where $R$ is the Jacobi matrix:

$R=b\begin{bmatrix}\cos a&\gamma\sin a\\\ -\gamma\sin a&\cos a\end{bmatrix},$
(11)

with $a$ being an angle correction and $b$ an amplitude correction relative to
$1$. The eigenvalues of $R$ are $\lambda_{\pm}=b(\cos a\pm i\gamma\sin a)$.
Optimizing $(a,b,\gamma)$ for an initial point $(m_{0},x_{0})=(0,0.5)$ and a
fixed $\theta=0.04\pi$ (corresponding to the angular frequency of a cosine-
wave, as discussed in Sec. II), we find that $|\lambda_{\pm}|<1$ for optimal
values $(a^{*},b^{*},\gamma^{*})=(0.12754,0.9996,0.9973)$. This implies that
the fixed point $(0,0)$ is a stable focus, and the system’s dynamics will
converge to it over extended evolution.

A more concise expression of the discrete map can be achieved by rescaling the
matrix as $R=\beta\tilde{R}$, where
$\beta=b\sqrt{\cos^{2}a+\gamma^{2}\sin^{2}a}<1$ and $\tilde{R}$ is an
orthogonal matrix:

$\tilde{R}=\begin{bmatrix}\cos\alpha&\sin\alpha\\\
-\sin\alpha&\cos\alpha\end{bmatrix},$ (12)

with $\alpha=\arctan(\gamma\arctan(a))$. For a given initial point
$(m_{0},x_{0})^{T}$, the state after $t$ iterations is
$(m_{t},x_{t})^{T}=\beta^{t}\tilde{R}^{t}(m_{0},x_{0})^{T}$, leading to a norm
$|(m_{t},x_{t})^{T}|=|\beta^{t}\tilde{R}^{t}(m_{0},x_{0})^{T}|=\beta^{t}|(m_{0},x_{0})^{T}|$.
This reveals that the trajectory on the phase plane follows a logarithmic
spiral, as illustrated in Fig. 5. The trajectory generated by the QDM is
bounded by the surface formed by the linear dynamics of Eq. (11), validating
the reasonability of our linear approximation in the presence of weak
nonlinearity.

Adjusting the observables of quantum circuits allows for the simulation of
similar dynamics. Introducing a scalar $\mu$ to the right-hand side of Eq.
(10), the Jacobi matrix becomes $\mu R=\mu\beta\tilde{R}$, yielding
eigenvalues $\lambda_{\pm}=\mu\beta(\cos\alpha\pm i\gamma\sin\alpha)$. By
tuning $\mu$, we can ensure the eigenvalue norms are equal to or greater than
$1$, indicating that the fixed point is either a center or an unstable focus,
respectively.

The preceding analysis elucidates the theoretical basis for the $(1,1)$-QDM
model’s ability to simulate the cosine-wave. This capability primarily stems
from the QDM’s weak nonlinearity, which, when combined with non-Markovian
memory, enables a precise approximation of the cosine-wave signal.

###  II.5 Universality

In this section, we explore the universal applicability of the QDM in
addressing a wide range of dynamical problems, with a specific focus on signal
approximation.

####  II.5.1 Universality in the regime of signal approximation

We initiate our discussion by considering QDM’s ability to model a cosine-wave
signal. The equations governing the QDM are shown in Eq. (10). Here,
$\theta_{1}$ and $\theta_{2}$ are parameters that can be adjusted to model the
signals $x(t)=A\cos(\omega t)=A\cos(\pi\Delta t)$ and $m(t)=A\sin(\omega
t)=A\sin(\pi\Delta t)$, subject to amplitude $A<1/2$, $t\in\mathbb{N}$ and
time step length $\Delta<1/20$. Let $\theta_{1}=-\theta<0$ and
$\theta_{2}=\theta>0$, then we have the following lemmas.

######  Lemma 1.

From a precise step $m(t)=\hat{m}(t)$ and $x(t)=\hat{x}(t)$, the error
produced in the next step is less than $|\pi\Delta|/4$.

######  Lemma 2.

For an erroneous step $\hat{m}(t)=m(t)+\delta_{m}$ and
$\hat{x}(t)=x(t)+\delta_{x}$, suppose $|\pi\Delta|<1/4$, the error produce in
the next step is less than $\delta+\frac{1}{4}|\pi\Delta|$ where
$\delta=\max(|\delta_{m}|,|\delta_{x}|)$.

Proofs of Lem. 1 and Lem. 2 can be found in the supplementary information (See
Supplementary Detailed Proofs).

These two lemmas establish the error propagation from both an error-free
initial point and an erroneous initial point to the next time step. Building
on these foundational lemmas, we present the following theorems:

######  Theorem 1 (Single mode cosine-wave approximation).

By properly selecting $\theta_{1}$ and $\theta_{2}$, QDM can approximate
$A\cos(\pi\Delta t+\phi)$, where $|A|<1/2$, $|\pi\Delta|<1/4$ with a bounded
error increasing linearly over time steps.

######  Theorem 2 (Composite cosine-wave approximation).

Given a composite signal formed by the superposition of multiple cosine-waves,
$\sum_{i}^{K}A_{i}\cos(\omega_{i}t+\phi_{i})$, where each term has a distinct
amplitude $A_{i}$, frequency $\omega_{i}$ and phase $\phi_{i}$. A $K$-channel
QDM can approximate this composite signal with a bounded error by properly
selecting parameters
$\theta_{1}^{1},\theta_{2}^{2},\dots,\theta_{1}^{K},\theta_{2}^{K}$, with each
superscript indexing the corresponding channel.

In Thm. 1, we proved the QDM’s capability to approximate a single mode cosine-
wave signal with a bounded error. This establishes the potential for QDMs to
approximate composite cosine-wave signals, as further explored in Thm. 2.
Proofs are provided in the supplementary information (Supplymentary Detailed
Proofs).

Lastly, we present a theorem that shows the universality of the QDM based on
preceding discussions:

######  Theorem 3 (Approximating any continuous function).

If $g(t)$ is continuous on an interval $[a,b]$, then there exists a
$K$-channel QDM approximating $g(t)$ with a bounded error for any $t$ in
$[a,b]$.

The proof is located in the supplementary information.

Through these lemmas and theorems, we underscore the universality of QDM in
accurately modeling a wide range of signals, thereby reinforcing its potential
in time series prediction.

####  II.5.2 Ability for learning from non-linear dynamics

We also demonstrate the learnability on the Rayleigh equation, a cornerstone
in the study of nonlinear dynamics. We use the van der Pol form of the
Rayleigh equation [32]:

$\ddot{x}-\varepsilon\dot{x}(1-\delta x^{2})+\omega^{2}x=0,$ (13)

where $x$ is the position, $\varepsilon$ and $\delta$ represent the
nonlinearity and damping strength, and $\omega$ is the angular frequency.

Figure 6: Simulation of Rayleigh Dynamics Using a $(1,2)$-QDM. This diagram
illustrates the dynamics of the Rayleigh system, focusing on displacement
$x_{t}$ and the velocity $v_{t}$, which constitute the data register in the
QDM. An additional qubit is allocated for the memory register. The learning
protocols employed here align with those detailed in Fig. 2.

Introducing the velocity $v$, Eq. 13 can be recast as a system:

$\begin{cases}\dot{x}=v,\\\ \dot{v}=\varepsilon v(1-\delta
x^{2})-\omega^{2}x.\end{cases}$ (14)

To learn the dynamics of Rayleigh equation, the QDM model employs two qubits
as the data register and one qubit as the memory register. This demonstration
utilizes the ansatz TIEA as described in Sec. IV.1 and the same training and
predicting protocols in Sec. II.1.3. For the Rayleigh system, we set the
parameters at $\varepsilon=\pi$, $\delta=3$, and $\omega=\pi$, initializing
the system with $\bm{x}_{0}=(0,0.01)$. Fig. 2 presents the results, dipicting
two panels that represents $x(t)$ and $v(t)$ over time. The QDM model not only
replicates the dynamics of the Rayleigh system but also exhibits consistent
performance, closely following the ideal trajectory throughout the simulation.

##  III Discussion

In this research, we have developed a data-driven method that unites quantum
machine learning with the analysis of dynamical systems in discrete time. The
QDM provides a perspective of dynamical maps for understanding quantum systems
and the characteristics of time series.

Distinct from existing quantum-based methods for time series prediction, our
method offers a practical solution for near-term quantum computers. It
addresses the significant challenge of quantum decoherence, a common obstacle
in deep quantum circuits, by employing the QDM within a fixed circuit depth.
This design ensures that the circuit complexity does not increase with the
length of the time series, making QDM particularly suited for current NISQ
devices. Through numerical simulations and practical experiments, our method
has proven effective in both long-term predicting capability and noise-
resistance in practical scenarios.

Looking forward, the QDM lays a robust foundation for future explorations into
the complex behaviors of systems with shallow quantum circuits. This paper
paves the way to merge quantum time series algorithms with the study of
dynamic systems, stepping into a new avenue for understanding the physical
characteristics inherent to time series prediction.

##  IV Methods

###  IV.1 Experimental settings

The quantum circuit of the QDM comprises three primary components: encoding,
parametrized evolution, and quantum measurement, as detailed in Sec. II. To
simplify the QDM circuit, we implement the encoding layer $U_{enc}(\cdot)$
with rotation $R^{i}_{Y}(\arccos(\cdot))$ for the $i^{\text{th}}$ qubit. Here,
$R_{Y}(\cdot)$ is defined as $R_{Y}(\theta)=e^{-i\frac{\theta}{2}\sigma_{y}}$,
with the input normalized to the range $[-1,1]^{\otimes n}$. Furthermore, the
observables $\mathcal{H}_{m},\mathcal{H}_{x}$ are designed as $\sigma_{z}$ for
the respective qubit. This design choice is driven by the understanding that
the input can be efficiently reconstructed using the $\sigma_{z}$ expectation,
eliminating the need for additional evolution. As the number of qubits,
circuit depth, and linear-composite channels increase, the QDM exhibits more
complex dynamics. The methodology for scaling these elements is depicted in
Fig. 1 (c) and further discussed in Sec. II.4. Throughout the time sequence
iterations, all quantum circuit parameters remain constant.

The QDM’s circuit architecture is tailored to match the complexity of the
specific task at hand. In our study, we propose two distinct quantum circuit
architectures: the transverse Ising evolution ansatz (TIEA) and the hardware-
efficient ansatz (HEA).

TIEA: This architecture is designed to enhance the expressiveness of each
ansatz layer. The unitary operator $U(\bm{\theta})$ includes sequential
single-qubit rotations followed by a Hamiltonian evolution applied across the
entire circuit. The single-qubit rotations are defined by the equation:

$U_{1}(\theta_{1},\theta_{2},\theta_{3})=R_{X}(\theta_{1})R_{Z}(\theta_{2})R_{X}(\theta_{3}),$
(15)

with $\theta_{1}$, $\theta_{2}$, and $\theta_{3}$ as real parameters from the
set $\bm{\theta}$, and $R_{X}$ and $R_{Z}$ as single-qubit rotations around
the x and z axes, expressed as
$R_{X}(\theta)=e^{-\frac{i}{2}\theta\sigma_{x}}$ and
$R_{Z}(\theta)=e^{-\frac{i}{2}\theta\sigma_{z}}$, respectively. These
rotations are followed by a Hamiltonian evolution, denoted as $e^{-iH\tau}$,
where $\tau$ signifies the evolution time and $H$ the Hamiltonian, specified
as in previous works [47, 16]:

$H=\sum_{i=1}^{n}h_{i}\sigma_{x,i}+\sum_{i=2}^{n}\sum_{j=1}^{i-1}J_{ij}\sigma_{z,i}\sigma_{z,j}.$
(16)

The coefficients $h_{i},J_{ij}$ are randomly chosen from a uniform
distribution within $[-1,1]$ and remain fixed during training.

HEA[48]: This architecture utilizes a CZ entanglement layer combined with
single-qubit rotations $U_{1}$ as described in TIEA. In the specific case of a
2-qubit QDM, the architecture simplifies to a CZ gate followed by single-layer
parametrized $R_{Y}$ rotations, which are then utilized in the prediction of
composite signals.

###  IV.2 Gradient evaluation

The optimal parameters for the QDM are obtained by minimizing the loss
function, as expressed in Eq. (4). During the training stage, the initial
state vector $(\bm{m}_{0},\bm{x}_{0})$ at time $t=0$ is composed of the given
initial data $\bm{x}_{0}$ and its complementary component $\bm{m}_{0}$, which
is initialized randomly. This state vector is then fed into the QDM block,
yielding a time sequence
$\\{(\bm{m}_{1},\hat{\bm{x}}_{1}),\dots,(\bm{m}_{L},\hat{\bm{x}}_{L})\\}$,
with the explicit part represented as
$\\{\hat{\bm{x}}_{1},\dots,\hat{\bm{x}}_{L}\\}$. To simplify the illustration,
we focus on a 2-qubit QDM, where both the given data and the memory are
scalars. The loss function is then reformulated as
$\mathcal{L}_{mse}=\frac{1}{L}\sum_{t=1}^{L}\left(\hat{x}_{t}-x_{t}\right)^{2}$.
The derivative of $\mathcal{L}_{mse}$ with respect to $\theta_{i}$ is given
by:

$\displaystyle\frac{\partial\mathcal{L}_{mse}}{\partial\theta_{i}}$
$\displaystyle=\frac{2}{L}\sum_{t=1}^{L}\left(\hat{x}_{t}-x_{t}\right)\frac{\partial\hat{x}_{t}}{\partial\theta_{i}}.$
(17)

Referring to the definition of $\hat{x}_{t}$ in Sec. II, this expression can
be equivalently written as:

$\displaystyle\frac{\partial\hat{x}_{t+1}}{\partial\theta_{i}}$
$\displaystyle=\frac{\partial}{\partial\theta_{i}}\operatorname{Tr}\left(\mathcal{H}_{x}|\psi_{t}\rangle\langle\psi_{t}|\right).$
(18)
$\displaystyle=\frac{\partial}{\partial\theta_{i}}\mathrm{Tr}\left[\mathcal{H}_{x}U(\bm{\theta})U_{enc}(\hat{X}_{t})\rho_{0}U_{enc}^{\dagger}(\hat{X}_{t})U^{\dagger}(\bm{\theta})\right],$

where $\hat{X}_{t}=(m_{t},\hat{x}_{t})$ and $\rho_{0}=\left(|0\rangle\langle
0|\right)^{\otimes n}$ for simplicity. It is important to note that both
$U(\bm{\theta})$ and $U_{enc}(\hat{X}_{t})$ depend on $\theta_{i}$. Hence, the
derivative of Eq. (18) is:

$\displaystyle\frac{\partial\hat{x}_{t+1}}{\partial\theta_{i}}$
$\displaystyle=\mathrm{Tr}\left[\mathcal{H}_{x}\frac{\partial
U(\bm{\theta})}{\partial\theta_{i}}U_{enc}(\hat{X}_{t})\rho_{0}U_{enc}^{\dagger}(\hat{X}_{t})U^{\dagger}(\bm{\theta})\right]+\mathrm{Tr}\left[\mathcal{H}_{x}U(\bm{\theta})U_{enc}(\hat{X}_{t})\rho_{0}U_{enc}^{\dagger}(\hat{X}_{t})\frac{\partial
U^{\dagger}(\bm{\theta})}{\partial\theta_{i}}\right]$ (19)
$\displaystyle\quad+\mathrm{Tr}\left[\mathcal{H}_{x}U(\bm{\theta})\frac{\partial
U_{enc}(\hat{X}_{t})}{\partial\theta_{i}}\rho_{0}U_{enc}^{\dagger}(\hat{X}_{t})U^{\dagger}(\bm{\theta})\right]+\mathrm{Tr}\left[\mathcal{H}_{x}U(\bm{\theta})U_{enc}(\hat{X}_{t})\rho_{0}\frac{\partial
U_{enc}^{\dagger}(\hat{X}_{t})}{\partial\theta_{i}}U^{\dagger}(\bm{\theta})\right].$

The first two terms on the right-hand side of Eq. (19) can be computed using
the parameter shift rule [49], as the rotation gates are generated with Pauli
operators, e.g., $R_{Y}(\theta_{i})=e^{-i\theta_{i}/2\sigma_{y}}$. Assuming
that the encoding gates are also Pauli-generated unitaries and that the
function $u(x)=\arccos(x)$ is designed to convert state to rotation angle, the
remaining terms on the right-hand side of Eq. (19) can be computed as follows:

$\displaystyle\frac{\partial U_{enc}(\hat{X}_{t})}{\partial\theta_{i}}$
$\displaystyle=\frac{\partial U_{enc}(m_{t})}{\partial\theta_{i}}\otimes
U_{enc}(\hat{x}_{t})+U_{enc}(m_{t})\otimes\frac{\partial
U_{enc}(\hat{x}_{t})}{\partial\theta_{i}}$ (20) $\displaystyle=\frac{\partial
U(u)}{\partial u}\frac{\partial u(m_{t})}{\partial m_{t}}\frac{\partial
m_{t}}{\partial\theta_{i}}\otimes
U_{enc}(\hat{x}_{t})+U_{enc}(m_{t})\otimes\frac{\partial U(u)}{\partial
u}\frac{\partial
u(\hat{x}_{t})}{\partial\hat{x}_{t}}\frac{\partial\hat{x}_{t}}{\partial\theta_{i}}$
$\displaystyle=\left(-\frac{1}{\sqrt{1-m_{t}^{2}}}\cdot\frac{\partial
m_{t}}{\partial\theta_{i}}\right)\frac{\partial U(u)}{\partial u}\otimes
U_{enc}(\hat{x}_{t})+\left(-\frac{1}{\sqrt{1-\hat{x}_{t}^{2}}}\cdot\frac{\partial\hat{x}_{t}}{\partial\theta_{i}}\right)U_{enc}(m_{t})\otimes\frac{\partial
U(u)}{\partial u}.$

Together with its conjugate term $\partial
U_{enc}^{\dagger}(\hat{X}_{t})/\partial\theta_{i}$, each term in the last
equation of Eq. (20) can be efficiently calculated using the parameter shift
rule. This is because the coefficients can be evaluated with the current
values of $m_{t}$, $\hat{x}_{t}$, and previous values of $\partial
m_{t}/\partial\theta_{i}$, $\partial\hat{x}_{t}/\partial\theta_{i}$. Thus,
while the gradient of $\hat{x}_{t+1}$ with respect to variable $\theta_{i}$
depends on all previous time steps, the gradient for a single time step can be
computed in 6 evaluations based on the parameter shift rule, provided that the
partial derivatives $\partial m_{t}/\partial\theta_{i}$,
$\partial\hat{x}_{t}/\partial\theta_{i}$ are computed in order
$t=1,2,\dots,L$. Since $m_{t+1}$ is obtained with the same quantum circuit as
$\hat{x}_{t}$ but with a different measurement $\mathcal{H}_{m}$, computing
$\partial m_{t}/\partial\theta_{i}$ will not increase the number of
evaluations. The total complexity for computing $\partial
L/\partial\theta_{i}$ is $\mathcal{O}(nL)$.

##  V Acknowledgements

This work was supported by National Key Research and Development Program of
China (Grant No. 2023YFB4502500) and National Natural Science Foundation of
China (Grant No. 12034018).

##  VI Data availability

The data that support the findings of this study are available upon reasonable
request from the authors.

## References

  * Shumway  _et al._ [2000] R. H. Shumway, D. S. Stoffer, and D. S. Stoffer,  _Time series analysis and its applications_, Vol. 3 (Springer Cham, 2000).
  * Kantz and Schreiber [2004] H. Kantz and T. Schreiber,  _Nonlinear time series analysis_ , Vol. 7 (Cambridge university press, 2004).
  * Winterhalder  _et al._ [2006] M. Winterhalder, B. Schelter, and J. Timmer,  _Handbook of Time Series Analysis: Recent Theoretical Developments and Applications_ (John Wiley & Sons, 2006).
  * Hochreiter and Schmidhuber [1997] S. Hochreiter and J. Schmidhuber, Long short-term memory, Neural Computation 9, 1735 (1997).
  * Cho  _et al._ [2014] K. Cho, B. van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, Learning phrase representations using rnn encoder-decoder for statistical machine translation (2014).
  * Jaeger [2001] H. Jaeger,  _Short term memory in echo state networks_ (GMD Forschungszentrum Informationstechnik, 2001).
  * Jaeger and Haas [2004] H. Jaeger and H. Haas, Harnessing nonlinearity: Predicting chaotic systems and saving energy in wireless communication, Science 304, 78 (2004).
  * Nakajima and Fischer [2021] K. Nakajima and I. Fischer,  _Reservoir Computing: Theory, Physical Implementations, and Applications_, edited by K. Nakajima and I. Fischer (Springer, Singapore, 2021) pp. 423–450.
  * Mitarai  _et al._ [2018a] K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii, Quantum circuit learning, Phys. Rev. A 98, 032309 (2018a).
  * Schuld  _et al._ [2021] M. Schuld, R. Sweke, and J. J. Meyer, Effect of data encoding on the expressive power of variational quantum-machine-learning models, Phys. Rev. A 103, 032430 (2021).
  * Goto  _et al._ [2021] T. Goto, Q. H. Tran, and K. Nakajima, Universal approximation property of quantum machine learning models in quantum-enhanced feature spaces, Phys. Rev. Lett. 127, 090506 (2021).
  * Yu  _et al._ [2022] Z. Yu, H. Yao, M. Li, and X. Wang, Power and limitations of single-qubit native quantum neural networks (2022), arXiv:2205.07848 [quant-ph] .
  * Rebentrost  _et al._ [2014] P. Rebentrost, M. Mohseni, and S. Lloyd, Quantum support vector machine for big data classification, Phys. Rev. Lett. 113, 130503 (2014).
  * Lloyd and Weedbrook [2018] S. Lloyd and C. Weedbrook, Quantum generative adversarial learning, Phys. Rev. Lett. 121, 040502 (2018).
  * Fujii and Nakajima [2021] K. Fujii and K. Nakajima, Quantum reservoir computing: A reservoir approach toward quantum machine learning on near-term quantum devices, in  _Reservoir Computing: Theory, Physical Implementations, and Applications_, edited by K. Nakajima and I. Fischer (Springer Singapore, Singapore, 2021) pp. 423–450.
  * Takaki  _et al._ [2021] Y. Takaki, K. Mitarai, M. Negoro, K. Fujii, and M. Kitagawa, Learning temporal data with a variational quantum recurrent neural network, Phys. Rev. A 103, 052414 (2021).
  * Bausch [2020] J. Bausch, Recurrent quantum neural networks, in  _Advances in Neural Information Processing Systems_, Vol. 33, edited by H. Larochelle, M. Ranzato, R. Hadsell, M. Balcan, and H. Lin (Curran Associates, Inc., 2020) pp. 1368–1379.
  * Chen  _et al._ [2020] J. Chen, H. I. Nurdin, and N. Yamamoto, Temporal information processing on noisy quantum computers, Phys. Rev. Appl. 14, 024065 (2020).
  * Fujii and Nakajima [2017] K. Fujii and K. Nakajima, Harnessing disordered-ensemble quantum dynamics for machine learning, Phys. Rev. Appl. 8, 024030 (2017).
  * Nakajima  _et al._ [2019] K. Nakajima, K. Fujii, M. Negoro, K. Mitarai, and M. Kitagawa, Boosting computational power through spatial multiplexing in quantum reservoir computing, Phys. Rev. Appl. 11, 034021 (2019).
  * Martínez-Peña  _et al._ [2021] R. Martínez-Peña, G. L. Giorgi, J. Nokkala, M. C. Soriano, and R. Zambrini, Dynamical phase transitions in quantum reservoir computing, Phys. Rev. Lett. 127, 100502 (2021).
  * Mujal  _et al._ [2021] P. Mujal, R. Martínez-Peña, J. Nokkala, J. García-Beni, G. L. Giorgi, M. C. Soriano, and R. Zambrini, Opportunities in quantum reservoir computing and extreme learning machines, Advanced Quantum Technologies 4, 2100027 (2021).
  * Tran and Nakajima [2021] Q. H. Tran and K. Nakajima, Learning temporal quantum tomography, Phys. Rev. Lett. 127, 260401 (2021).
  * Govia  _et al._ [2022] L. C. G. Govia, G. J. Ribeill, G. E. Rowlands, and T. A. Ohki, Nonlinear input transformations are ubiquitous in quantum reservoir computing, Neuromorphic Computing and Engineering 2, 014008 (2022).
  * Kalfus  _et al._ [2022] W. D. Kalfus, G. J. Ribeill, G. E. Rowlands, H. K. Krovi, T. A. Ohki, and L. C. G. Govia, Hilbert space as a computational resource in reservoir computing, Phys. Rev. Res. 4, 033007 (2022).
  * Pfeffer  _et al._ [2022] P. Pfeffer, F. Heyder, and J. Schumacher, Hybrid quantum-classical reservoir computing of thermal convection flow, Phys. Rev. Res. 4, 033176 (2022).
  * Suzuki  _et al._ [2022] Y. Suzuki, Q. Gao, K. C. Pradel, K. Yasuoka, and N. Yamamoto, Natural quantum reservoir computing for temporal information processing, Scientific Reports 12, 1353 (2022).
  * Xue  _et al._ [2023] C. Xue, Z.-Y. Chen, T.-P. Sun, X.-F. Xu, S.-M. Chen, H.-Y. Liu, X.-N. Zhuang, Y.-C. Wu, and G.-P. Guo, Quantum dynamic mode decomposition algorithm for high-dimensional time series analysis, Intelligent Computing 2, 0045 (2023).
  * Negoro  _et al._ [2018] M. Negoro, K. Mitarai, K. Fujii, K. Nakajima, and M. Kitagawa, Machine learning with controllable quantum dynamics of a nuclear spin ensemble in a solid (2018), arXiv:1806.10910 [quant-ph] .
  * Negoro  _et al._ [2021] M. Negoro, K. Mitarai, K. Nakajima, and K. Fujii, Toward nmr quantum reservoir computing, in  _Reservoir Computing: Theory, Physical Implementations, and Applications_, edited by K. Nakajima and I. Fischer (Springer Singapore, Singapore, 2021) pp. 451–458.
  * Mujal  _et al._ [2023] P. Mujal, R. Martínez-Peña, G. L. Giorgi, M. C. Soriano, and R. Zambrini, Time-series quantum reservoir computing with weak and projective measurements, npj Quantum Information 9, 16 (2023).
  * Wiggins [2003] S. Wiggins,  _Introduction to Applied Nonlinear Dynamical Systems and Chaos_ (Springer New York, NY, Singapore, 2003) pp. 423–450.
  * Rumelhart  _et al._ [1986] D. E. Rumelhart, G. E. Hinton, and R. J. Williams, Learning representations by back-propagating errors, Nature 323, 533 (1986).
  * ELMAN [1990] J. L. ELMAN, Finding structure in time, COGNITIVE SCIENCE 14, 179 (1990).
  * Jordan [1997] M. I. Jordan, Serial order: A parallel distributed processing approach, in  _Neural-Network Models of Cognition_, Advances in Psychology, Vol. 121, edited by J. W. Donahoe and V. Packard Dorsel (North-Holland, 1997) pp. 471–495.
  * LaRose and Coyle [2020] R. LaRose and B. Coyle, Robust data encodings for quantum classifiers, Phys. Rev. A 102, 032420 (2020).
  * Temme  _et al._ [2017] K. Temme, S. Bravyi, and J. M. Gambetta, Error mitigation for short-depth quantum circuits, Phys. Rev. Lett. 119, 180509 (2017).
  * Endo  _et al._ [2018] S. Endo, S. C. Benjamin, and Y. Li, Practical quantum error mitigation for near-future applications, Phys. Rev. X 8, 031027 (2018).
  * Kandala  _et al._ [2019] A. Kandala, K. Temme, A. D. Córcoles, A. Mezzacapo, J. M. Chow, and J. M. Gambetta, Error mitigation extends the computational reach of a noisy quantum processor, Nature 567, 491 (2019).
  * Smith  _et al._ [2021] A. W. R. Smith, K. E. Khosla, C. N. Self, and M. S. Kim, Qubit readout error mitigation with bit-flip averaging, Science Advances 7, eabi8009 (2021).
  * Strikis  _et al._ [2021] A. Strikis, D. Qin, Y. Chen, S. C. Benjamin, and Y. Li, Learning-based quantum error mitigation, PRX Quantum 2, 040330 (2021).
  * Broyden [1970] C. G. Broyden, The convergence of a class of double-rank minimization algorithms 1. general considerations, IMA Journal of Applied Mathematics 6, 76 (1970).
  * Fletcher [1970] R. Fletcher, A new approach to variable metric algorithms, The Computer Journal 13, 317 (1970).
  * Goldfarb [1970] D. Goldfarb, A family of variable-metric methods derived by variational means, Mathematics of computation 24, 23 (1970).
  * Shanno [1970] D. F. Shanno, Conditioning of quasi-newton methods for function minimization, Mathematics of computation 24, 647 (1970).
  * Virtanen  _et al._ [2020] P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy, D. Cournapeau, E. Burovski, P. Peterson, W. Weckesser, J. Bright, S. J. van der Walt, M. Brett, J. Wilson, K. J. Millman, N. Mayorov, A. R. J. Nelson, E. Jones, R. Kern, E. Larson, C. J. Carey, İ. Polat, Y. Feng, E. W. Moore, J. VanderPlas, D. Laxalde, J. Perktold, R. Cimrman, I. Henriksen, E. A. Quintero, C. R. Harris, A. M. Archibald, A. H. Ribeiro, F. Pedregosa, P. van Mulbregt, and SciPy 1.0 Contributors, SciPy 1.0: Fundamental algorithms for scientific computing in python, Nature Methods 17, 261 (2020).
  * Mitarai  _et al._ [2018b] K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii, Quantum circuit learning, Phys. Rev. A 98, 032309 (2018b).
  * Kandala  _et al._ [2017] A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, J. M. Chow, and J. M. Gambetta, Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets, Nature 549, 242 (2017).
  * Schuld  _et al._ [2019] M. Schuld, V. Bergholm, C. Gogolin, J. Izaac, and N. Killoran, Evaluating analytic gradients on quantum hardware, Phys. Rev. A 99, 032331 (2019).
  * Tolstov [2012] G. P. Tolstov,  _Fourier series_ (Courier Corporation, 2012).

Supplementary Information
Quantum Discrete Maps: Data-driven Quantum Dynamical Embedding Method for
Long-term Prediction on a Near-term Quantum Computer

##  I Quantum Reservoir Computing

Quantum Reservoir Computing (QRC) is a useful approach for processing time
sereis data on quantum computers. In this framework, each node is defined as a
quantum orthogonal basis in Hilbert space. For a quantum state described by a
density matrix in a system with $N$ qubits, there are $4^{N}$ elements. This
quantum state equivalently represented as a classical state vector $\vec{x}$
with a dimensionality of $4^{N}$, which is similar to classical reservoir
computing. The state injection in QRC is described as a completely positive
and trace preserving (CPTP) map on the system, represented by the
transformation
$\rho_{t-1}\rightarrow\rho_{s}\otimes\mathrm{Tr}_{s}[\rho_{t-1}]$, where
$\rho_{s}$ is the subsystem used for state encoding. Then the quantum
reservoir envolves under a Hamiltonian $H$, which is expressed as:

$H=\sum_{i=1}^{n}h_{i}\sigma_{x,i}+\sum_{i=2}^{n}\sum_{j=1}^{i-1}J_{ij}\sigma_{z,i}\sigma_{z,j},$
(S1)

where the coefficients $h_{i},J_{ij}$ are coefficients randomized from a
uniform distribution within the range of $[-1,1]$ and remain fixed during
training as shown in [19]. Time multiplexing is employed to enhance learning,
dividing the time interval $\tau$ into $V$ equal subintervals to increase the
number of virtual nodes. The quantum state after $v$ subintervals’ evolution
is given by:

$\rho\left((t-1+v/V)\tau\right)=e^{-iH\tau
v/V}\rho_{s_{t}}\otimes\mathrm{Tr}\left[\rho\left((t-1)\tau\right)\right]e^{iH\tau
v/V},v\in\\{1,2,\dots,V\\}.$ (S2)

Computational nodes are obtained by measuring the quantum reservoir at the end
of each subinterval, using a selected measurement ensemble
$\\{\sigma_{z,i},\sigma_{z,i}\otimes\sigma_{z,i+1}\\}$. These node values are
then used to optimize the linear regression between the target $\bm{y}_{t}$
and the QRC output $\hat{\bm{y}}_{t}$. In our demonstrations, the state
injection function is chosen as
$\rho(s_{t})=\sqrt{(1-s_{t})/2}\left|0\right\rangle+\sqrt{(1+s_{t})/2}\left|1\right\rangle$,
considering the signal is one-dimensional and rescaled to the range $[-1,1]$.

Figure S1: Training and Predicting Error of Different Evolution Time. Figure
S2: Training and Predicting Error of Different Training Length. Figure S3:
Training and Predicting Error of Different Washout Time.

The learning performance is evaluated using the normalized mean square error
(NMSE). The efficacy of QRC is significantly influenced by both the evolution
time $\tau$ and the number of time-multiplexing intervals $V$, as shown in
Fig. S1. While specific values of $\tau$, such as $\tau=2.8$, can lead to low
NMSE in time series prediction, neighboring values like $\tau=2.6$ or
$\tau=3.0$ may result in different performance, as illustrated in Fig 2. It is
observed that the NMSE between predictions and targets decreases as the number
of time-multiplexing intervals increases. However, this improvement becomes
less pronounced beyond a certain point, such as when the number of intervals
reaches $10$, indicating a limit to the method’s effectiveness compared to a
lower number like $5$.

Additionally, the extension of both training length and washout period, when
paired with a suitable evolution time $\tau$, can substantially enhance the
QRC’s learning ability. This is clearly shown in Fig.S2 and Fig.S3. However,
these improvements are only evident with an optimal evolution value, such as
$\tau=0.28$. In cases where the evolution time is not optimal, the prediction
error does not decrease with increasing length. This highlights one of the
significant challenges faced by QRC: the random selection of hyperparameters
in the Hamiltonian $H$ prior to training, which significantly influences the
model’s learning capacity.

##  II Training Procedures

In the training stage, the circuit parameters of the QDM are optimized using
the Adam optimizer within VQNet, a quantum neural network package in Python.
Here We showcase the optimization process by tracking the variation of the
loss function value across training epochs.

Figure S4: Training Loss for Different Tasks

The parameters of our architecture are divided into three components. The
first comprises the rotation angles of the parameterized quantum gates. The
second includes the weights and biases of the learnable error-cancellation
layer as shown in main text. The final component consists of the initial
values of memory from different QDM blocks.

In the simulations of a cosine-wave signal and composite signals, the QDM
utilizes two linear-composite channels, each adopting the 2-qubit hardware-
efficient ansatz (HEA). The simulation of the cosine-wave signal follows a
similar approach but employs only one QDM channel. For the more complex
Rayleigh dynamics, which requires modeling two-dimensional phase space and a
one-dimensional hidden space, we use the transverse Ising evolution ansatz
(TIEA).

During the training stage, the initial value $(\bm{m}_{0},\bm{x}_{0})$ is
input into the QDM model. The autoregressively generated time series
$\\{\hat{\bm{x}}_{1},\hat{\bm{x}}_{2},\hat{\bm{x}}_{3},\dots\\}$ is then
collected to compute the loss function, which is defined as mean square error.
In the predicting stage, the system evolves for additional $T$ steps to
generate predictions. Here $T$ is set to $100$ and $1000$ for short-term and
long-term predictions, respectively.

The QRC model follows the training and predicting protocol of our approach,
distinct in its data injecting method. Unlike the autoregressive feeding used
in the QDM model, the QRC model is trained by feeding only the target data
into the Quantum Reservoir (QR) network.

##  III Quantum Chip Information

The experiment presented in the main text was executed on the Originq Wu-Kong
superconducting quantum computer. This platform is composed of $72$ transmon
qubits arranged in a two-dimensional array, with each qubit individually
controlled via an XY line and Z control. The coupling strength of these qubits
is adjustable from $0$ to $80$ MHz, and the two-qubit CZ gate operates at a
strength of $50$ MHz. The base frequencies of these transmon qubits are
arranged in alternating high and low, the high frequency qubits have a
sweetspot frequency of about $5$ GHz and the low are $4.5$ GHz.

Benchmarking results for single-qubit gates indicate an average fidelity for
Pauli gates of $99.6\%$. The primary two-qubit gate of this quantum processor
is the CZ gate, which achieves an average fidelity of approximately $97\%$.
The gate time durations are $30$ ns for single qubit gates and $40$ ns for
two-qubit gates.

Given that the experiment required only two qubits, we selected qubits $q-45$
and $q-46$ for data and memory registers of the QDM. The single gate
fidelities for $q-45$ and $q-46$ are $99.59\%$ and $99.76\%$, respectively,
with the CZ gate fidelity at $98.35\%$. The coherence times for these qubits
are $T_{1}^{45}=11.8\ {\mu}s,\ T_{2}^{45}=1.3\ {\mu}s$ and $T_{1}^{46}=21.4\
{\mu}s,\ T_{2}^{46}=0.8\ {\mu}s$, respectively.

Quantum circuits for the experiment were compiled using Originq Pilot and
submitted through Qpandalite, a lite version of Qpanda (Quantum Programming
Architecture for NISQ Device Application).

##  IV Additional experiments for long-term time series prediction

Here, we demonstrate our results for single-mode cosine-wave signal and
composite periodic signal for completeness.

Figure S5: Long-term Prediction on Cosine-Wave Signal with Quantum Noise. The
training and predicting protocols replicate those in Fig. 2, with the
distinction of a training-to-predicting ratio of $1:10$.  Figure S6: Long-term
Prediction on Composite Periodic Signal with Quantum Noise.

##  V Detailed proofs

Here we present detailed proofs of the Lem. 1-2 and Thm. 1-3 introduced in the
main text.

##### Proof of Lemma 1:

From a precise step $m(t)=\hat{m}(t)$ and $x(t)=\hat{x}(t)$, the error
produced in the next step is less than $|\pi\Delta|/4$.

###### Proof.

For $m$, we have

$\displaystyle|m(t+1)-\hat{m}(t+1)|$ (S3) $\displaystyle=|A\sin(\pi\Delta
t)[\cos(\pi\Delta)-\cos\theta]+A\cos(\pi\Delta
t)[\sin(\pi\Delta)-\sqrt{1-m^{2}_{t}}\sin\theta)]|$ $\displaystyle\leq
A(1-\sqrt{1-A^{2}})|\sin(\pi\Delta)|$ $\displaystyle<\frac{1}{4}|\pi\Delta|.$

By symmetry, $|x(t+1)-\hat{x}(t+1)|$ can also be bounded in the same way. ∎

##### Proofs of Lemma 2:

For an erroneous step $\hat{m}(t)=m(t)+\delta_{m}$ and
$\hat{x}(t)=x(t)+\delta_{x}$, suppose $|\pi\Delta|<1/4$, the error produce in
the next step is less than $\delta+\frac{1}{4}|\pi\Delta|$ where
$\delta=\max(|\delta_{m}|,|\delta_{x}|)$.

###### Proof.

Firstly, Consider a scenario where the error terms, $\delta_{m}$ and
$\delta_{x}$ arise due to approximation. Assuming an error-free prior step,
i.e., $m(t-1)=\hat{m}(t-1)$ and $x(t-1)=\hat{x}(t-1)$, it follows that
$\delta_{m}$ and $\delta_{x}$ exhibit opposite signs. Without loss of
generality, let $\delta_{m}<0$, following a similar derivation as in Lem. 1.

Then, for $m$ we have

$\displaystyle|m(t+1)-\hat{m}(t+1)|$ (S4) $\displaystyle=|A\sin(\pi\Delta
t)[\cos(\pi\Delta)-\cos\theta]+A\cos(\pi\Delta
t)[\sin(\pi\Delta)-\sqrt{1-\hat{m}^{2}_{t}}\sin\theta)]+|\delta_{m}|\cos\theta-|\delta_{x}|\sqrt{1-\hat{m}_{t}^{2}}\sin\theta|$
$\displaystyle\leq
A(1-\sqrt{1-A^{2}})|\sin(\pi\Delta)|+\delta|\cos\theta-\sqrt{1-\hat{m}_{t}^{2}}\sin\theta|.$

Knowing that $\pi\Delta<1/4$, then we derive
$|\cos\theta-\sqrt{1-\hat{m}_{t}^{2}}\sin\theta|_{\theta=\pi\Delta}<1$.
Finally, we obtain

$|m(t+1)-\hat{m}(t+1)|<\delta+\frac{1}{4}|\pi\Delta|.$ (S5)

By symmetry, the bound of $|x(n+1)-\hat{x}(n+1)|$ can also established
analogously. ∎

##### Proof of Theorem 1:

By properly selecting $\theta_{1}$ and $\theta_{2}$, QDM can approximate
$A\cos(\pi\Delta t+\phi)$, where $|A|<1/2$, $|\pi\Delta|<1/4$ with a bounded
error.

###### Proof.

Firstly, the phase $\phi$ primarily influences the initial points
$(m_{0},x_{0})$, without contradicting the results of Lem. 1 and Lem. 2. For
simplicity, let’s set $\phi=0$.

Applying Lem. 1 and Lem. 2 with the initial conditions $m(0)=\hat{m}(0)$ and
$x(0)=\hat{x}(0)$, and setting $-\theta_{1}=\theta_{2}=\pi\Delta$, we obtain:

$\displaystyle|m(1)-\hat{m}(1)|$ $\displaystyle<\delta+\frac{1}{4}|\pi\Delta|$
(S6) $\displaystyle|m(2)-\hat{m}(2)|$
$\displaystyle<(\delta+\frac{1}{4}|\pi\Delta|)+\frac{1}{4}|\pi\Delta|$
$\displaystyle|m(3)-\hat{m}(3)|$
$\displaystyle<(\delta+\frac{2}{4}|\pi\Delta|)+\frac{1}{4}|\pi\Delta|$
$\displaystyle\vdots$ $\displaystyle|m(n)-\hat{m}(n)|$
$\displaystyle<\delta+\frac{n}{4}|\pi\Delta|$

By symmetry, the bound for $|x(n+1)-\hat{x}(n+1)|$ can be similarly
established:

$|x(n)-\hat{x}(n)|<\delta+\frac{n}{4}|\pi\Delta|$ (S7)

Therefore, under the worst-case scenario, QDM approximates $A\cos(\pi\Delta
t+\phi)$ with a linearly increasing error. ∎

##### Proof of Theorem 2:

Given a composite signal formed by the superposition of multiple cosine-waves,
$\sum_{i}^{K}A_{i}\cos(\omega_{i}t+\phi_{i})$, where each term has a distinct
amplitude $A_{i}$, frequency $\omega_{i}$ and phase $\phi_{i}$. A $K$-channel
QDM can approximate this composite signal with a bounded error by properly
selecting parameters
$\theta_{1}^{1},\theta_{2}^{2},\dots,\theta_{1}^{K},\theta_{2}^{K}$, with each
superscript indexing the corresponding channel.

###### Proof.

Each channel in the $K$-channel QDM contributes to the composite signal
independently. According to Thm. 1, each individual cosine-wave component,
represented by $A_{i}\cos(\omega_{i}t+\phi_{i})$, can be approximated with a
bounded error when parameters $\theta_{1}^{i},\theta_{2}^{i}$ are optimally
selected for each channel. Finally, the composite cosine-wave can be
approximated with a bounded cumulative error. ∎

##### Proof of Theorem 3:

If $g(t)$ is continuous on an interval $[a,b]$, then there exists a
$K$-channel QDM approximating $g(t)$ with a bounded error for any $t$ in
$[a,b]$.

###### Proof.

We can choose $c>b$ as the end of new interval $[a,c]$, which can be rescaled
to $[a^{\prime},c^{\prime}]$ where $c^{\prime}-a^{\prime}=2\pi$. Then from
Cor. 2 in Sec.1 of [50], there exists a trigonometric polynomial of the form

$\sigma_{J}(t^{\prime})=\alpha_{0}+\sum_{j=1}^{J}(\alpha_{j}\cos
jt^{\prime}+\beta_{j}\sin jt^{\prime})$

for which

$|g(t^{\prime})-\sigma_{J}(t^{\prime})|\leq\epsilon$

for any $t^{\prime}$ in $[a^{\prime},c^{\prime}]$. The polynomial
$\sigma_{J}(t^{\prime})$ can then be approximated using a $K$-channel QDM as
described in Thm. 2, where in this case $K=2J+1$. ∎