$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
QTSMixer methodology
Let
be a multivariate time series of length sl and number of channels c. The multivariate forecasting task is defined as predicting future values
given some history
by a forecasting model
, which can be formulated as

Where
is the forecast sequence length and
denotes the prediction value. In QTSMixer, let XL×C denote the original multivariate time series of length L and the number of channels c. We input the multivariate time series by minibatch
, where sl ≤ L and b is the batch size. As shown in Figure 1, the QTSMixer model consists of four components: normalization, patch embedding, mixing layers, and forecasting. In the training phase, the loss of the model is calculated by the Mean Square Error (MSE) loss function
to achieve the best fit. The QTSMixer can be characterized as

Where θ is the trainable parameter vector and is updated by stochastic gradient descent.

Figure 1: The high-level architecture of QTSMixer. Here we divide QTSMixer into four components: normalization, patch embedding, mixing layers, and forecasting. Please click here to view a larger version of this figure.
Next, we will detail the model components of QTSMixer.
Normalization
The forward propagation process of QTSMixer starts with receiving the input time series data
. First, the input data are normalized and standardized by the PatchTSMixer StandardScaler8 or other scalers to eliminate the dimensional differences between features and ensure the stability of data performance during training.
Patch embedding
First, the standardized time series data are divided into multiple fixed-length segments (patches) through the patching module. This model design is inspired by Ekambaram et al.8, and the ability to capture local features is improved through the division of patches. Through patch division, QTSMixer can effectively deal with complex time series data patterns, reduce the number of model input tokens, and achieve better results in a shorter training time. The minibatch
is reshaped into
, where n is the number of patches and pl denotes the patch length. Let s denote the stride of patching, then
.
To increase the expressive power of the model, each patch is mapped to a higher-dimensional space through a linear layer. Then, the data are reshaped into
by linear transformation
, where hf is the number of hidden features. The weight matrix has a dimension of pl × hf .
Mixing layers
In this part, the patch, feature, and channel dimensions are mixed through multiple mixing layers. Based on the dimension under focus in each mixer layer, the input is first permuted accordingly to learn correlation along the focused dimension. Then, the information is extracted by layer normalization, MLP, QNN, and Gated Attention (GA) mechanism to extract more comprehensive feature information.
In the patch mixing layer, the input is first reshaped to
, in which we focus on the patch dimension (i.e., the last dimension); then, the layer normalization is performed. After that, this module employs a shared MLP (weight dimension n × n) to learn the correlation between different patches. Meanwhile, the QNN is realized by quantum re-uploading technology20 to enhance the expression ability of the quantum layer. The quantum circuit in QNN has a total of ql layers, and the ith layer contains an encoding circuit Ux and an ansatz
, where θi is the trainable parameter vector and i = 1, 2, ..., ql. Following a weighted addition operation, the model produces a hybrid structure of MLP and QNN, formulated as
for the ith component of the patch dimension, to effectively integrate classical and quantum feature extraction capabilities. Note that here αi is a trainable parameter with an initial value of 0, which indicates how strongly the quantum behavior is introduced. Finally, the GA8 probabilistically upscales the dominant features and downscales the unimportant features. The feature mixing layer and the channel mixing layer work in a similar way.
After multiple mixing layers, the data are processed as
.
Forecasting
In the forecasting layer, the data are first reshaped to
. The future values are predicted through a classical prediction head8—the encoded features are flattened and fed into a classical linear layer with dropout to generate a prediction
of future values.
Experimental results
We conducted a detailed empirical analysis on the real-world dataset, i.e., the Long-Term Network Traffic Forecasting (LTNTF) dataset21, and three other popular public datasets. The first experiment is based on the LTNTF dataset21, which provides hourly traffic data and holiday information for three cities A, B, and C, in the real-world network from January 1, 2017, to February 20, 2019. The task is to use historical data to build an appropriate model to predict the hourly traffic values for each city for the next 95 days. The uniqueness of the dataset lies in its authenticity and long-term nature, offering detailed hourly network traffic data covering multiple cities over more than 800 days. The experimental results are summarized in Table 1, Figure 2, and Figure 3. To reproduce the experiment, refer to README.md in Experiment_1_LTNFT in Supplemental File 1.
Table 1: Performance comparison between QTSMixer and TSMixer in the LTNTF dataset. Here the MAPE and RMSE are used as the main evaluation metrics, and lower values indicate better performance. Please click here to download this Table.

Figure 2: Comparison of prediction results of TSMixer and QTSMixer. Here we randomly select three samples from three cities and give the visual comparison between the real values and the predicted values of TSMixer and QTSMixer. Please click here to view a larger version of this figure.

Figure 3: Comparison of prediction results of a special case of TSMixer and QTSMixer. Here the samples with the best performances of QTSMixer are selected. Please click here to view a larger version of this figure.
The second experiment is based on the BasicTS+(Basic Time Series)22 framework, which is a benchmark library and toolbox for time series forecasting. It supports a variety of tasks and datasets, such as spatio-temporal forecasting and long series forecasting, and covers statistical models, machine learning models, deep learning models, and other algorithms. BasicTS+ provides a fair and comprehensive platform for the replication and comparison of popular deep learning models through a unified and standardized process. The BasicTS benchmark comprises seven carefully curated multivariate time series (MTS) datasets spanning diverse real-world domains to enable rigorous evaluation of forecasting models. The collection includes traffic datasets (PEMS04/08 for flow monitoring), energy consumption records (Electricity/Etth1/Ettm1), economic indicators (Exchange-Rate), and environmental measurements (Beijing Air Quality). The experimental results are shown in Table 2. To reproduce the experiment, refer to README.md in Experiment_2_Basicts in Supplemental File 1.
Table 2: Performance comparisons among QTSMixer and other models on various datasets of BasicTS+ framework. Here MAE, WAPE and RMSE are used as evaluation metrics, and lower values indicate better performance. The models with similar parameter counts are grouped. Please click here to download this Table.
The third experiment involves a comparative analysis between the quantum simulator and a real quantum computer. This experiment compares the performance of Qiskit and the DQ framework by evaluating their respective implementations of QTSMixer. The accuracy and execution efficiency of both frameworks in forecasting tasks were assessed. The superconducting quantum computer, ibm_brisbane, is used in this experiment. The experimental results are shown in Figure 4 and Table 3. To reproduce the experiment, refer to README.md in Experiment_3_Qiskit in Supplemental File 1.

Figure 4: Comparison of prediction results of Qiskit (on quantum hardware) and DQ (on the simulator). Comparison between actual values and predictions, with predictions derived from Qiskit and DQ experiments. Please click here to view a larger version of this figure.
Table 3: Performance comparison of QTSMixer between quantum hardware and simulation experiments. Here, the MAPE and RMSE are used as the main evaluation metrics, and lower values indicate better performance. Please click here to download this Table.