Papers
Topics
Authors
Recent
2000 character limit reached

Quantum Temporal CNN (QTCNN)

Updated 14 December 2025
  • Quantum Temporal Convolutional Neural Network (QTCNN) is a hybrid architecture that combines classical multi-scale temporal encoders with quantum convolution circuits to predict equity returns.
  • It employs efficient angle embedding and hierarchical, parameter-sharing quantum layers to harness superposition and entanglement for robust sequential modeling in noisy financial environments.
  • Empirical evaluations on the JPX Tokyo Stock Exchange dataset demonstrate superior out-of-sample Sharpe ratios, highlighting its performance advantage over classical models.

The Quantum Temporal Convolutional Neural Network (QTCNN) is a hybrid quantum–classical architecture engineered for cross-sectional equity return prediction in noisy, nonstationary financial environments. QTCNN integrates a classical temporal encoder with hierarchical, parameter-efficient quantum convolutional circuits, designed to leverage quantum features such as superposition and entanglement for more robust and generalizable sequential modeling. The primary modeling pipeline consists of a classical temporal encoder ("TConv") that extracts multi-scale temporal features, followed by quantum angle embedding and convolutional processing, and culminating in a hybrid classification head. Empirical evaluation on the JPX Tokyo Stock Exchange dataset demonstrates superior out-of-sample Sharpe ratios compared to both classical and other quantum deep learning baselines (Chen et al., 7 Dec 2025).

1. Architectural Overview

QTCNN is composed of three major modules: (1) a classical temporal CNN encoder (TConv), (2) a quantum convolutional circuit, and (3) a hybrid classification stage. Input data XRT×FX \in \mathbb{R}^{T \times F}, representing multi-day sequences of technical indicators per equity, is processed through these stages as follows:

  • Classical Temporal Encoder: Extracts temporally compact feature zRnqz \in \mathbb{R}^{n_q}.
  • Quantum Convolutional Circuit: Embeds zz via angle embedding onto nqn_q qubits, follows with LL hierarchical quantum convolution and pooling layers, and outputs a single-qubit expectation value qq.
  • Hybrid Classification Head: Concatenates qq and zz, propagates through an MLP, and outputs probability prediction y^\hat{y} via sigmoid activation.

The canonical instantiation sets the qubit count nq=8n_q=8, sequence length T=20T=20, and utilizes dozens of feature channels FF derived from engineered technical indicators.

2. Classical Temporal Encoder Design

Given a sequential input X=[xtT+1,,xt]RT×FX = [x_{t-T+1}, \ldots, x_t] \in \mathbb{R}^{T \times F}, the TConv encoder applies a stack of one-dimensional temporal convolutions:

  • Convolutional Layer: h:,f()=τ=0K1Wτ,f,f()htτ,f(1)h^{(\ell)}_{:,f'} = \sum_{\tau=0}^{K-1} W^{(\ell)}_{\tau, f, f'} \cdot h^{(\ell-1)}_{t-\tau, f}
  • Nonlinear Activation: ReLU or variant.
  • Global Average Pooling (GAP): gf=1Tt=1Tht,f(L)g_f = \frac{1}{T} \sum_{t=1}^T h^{(L)}_{t,f}
  • MLP Projection: z=WMLPGAP[h(L)]+bRnqz = W_{MLP} \cdot GAP[h^{(L)}] + b \in \mathbb{R}^{n_q}

This encoder ensures efficient multi-scale temporal pattern extraction, including capturing momentum and volatility fluctuations. The projection to zz yields an nqn_q-dimensional latent representation suitable for quantum encoding.

3. Quantum Convolutional Module

3.1 Data Encoding (“Angle Embedding”)

The feature vector z=(z1,,znq)z=(z_1, \ldots, z_{n_q}) is mapped to a quantum state using RYR_Y rotations independently applied to each qubit:

ψ0(z)=j=1nqRY(zj)0nq|\psi_0(z)\rangle = \bigotimes_{j=1}^{n_q} R_Y(z_j) |0\rangle^{\otimes n_q}

where RY(θ)=exp(iθY/2)R_Y(\theta) = \exp(-i \theta Y/2).

3.2 Hierarchical Quantum Convolution and Pooling

Each convolutional layer applies a shared six-parameter unitary to adjacent pairs (i,i+1)(i,i+1):

Uconv(θ)=CNOTi,i+1[RY(θ1)RZ(θ2)]CNOTi+1,i[RY(θ3)RZ(θ4)][RY(θ5)RZ(θ6)]U_{conv}(\theta) = \mathrm{CNOT}_{i,i+1}[R_Y(\theta_1)\otimes R_Z(\theta_2)]\, \mathrm{CNOT}_{i+1,i}[R_Y(\theta_3)\otimes R_Z(\theta_4)][R_Y(\theta_5)\otimes R_Z(\theta_6)]

  • Parameters θ()R6\theta^{(\ell)} \in \mathbb{R}^6 are shared across all pairs within layer \ell, reducing trainable quantum parameters.
  • After each layer, pooling discards alternate qubits (odd indices), halving the register size. This is recursively applied over LL layers, resulting in depth Lefflog2(nq)L_{eff} \leq \lfloor \log_2(n_q) \rfloor and a final single-qubit state.

3.3 Quantum Measurement

The final state’s single qubit is measured in the ZZ basis to obtain output q[1,1]q \in [-1, 1]:

q=Z=ψfinalZψfinalq = \langle Z \rangle = \langle \psi_{final}| Z | \psi_{final} \rangle

4. Hybrid Classification and Training

The quantum output qq is concatenated with classical embedding zz, forming h0=[q;z]Rnq+1h_0 = [q; z] \in \mathbb{R}^{n_q + 1}. A two-layer MLP propagates h0h_0 using ReLU activations, with intermediate dimensionalities [64,32][64, 32], and applies a sigmoid to yield probability prediction y^\hat{y}.

4.1 Loss Function and Optimization

Classification targets are binary labels y{0,1}y \in \{0,1\}, identifying extreme long/short equity candidates. The binary cross entropy objective is:

LBCE=1Ni=1N[yilogy^i+(1yi)log(1y^i)]\mathcal{L}_{BCE} = -\frac{1}{N} \sum_{i=1}^N \left[y_i \log \hat{y}_i + (1-y_i) \log(1-\hat{y}_i)\right]

QTCNN uses AdamW optimization (lr=1×103lr=1 \times 10^{-3}, batch size 128, 50 epochs).

4.2 Quantum Gradient Evaluation

For quantum circuit parameters θj\theta_j, observables’ gradients are computed via the parameter-shift rule:

Oθj=12[Oθj+π2Oθjπ2]\frac{\partial \langle O \rangle}{\partial \theta_j} = \frac{1}{2} [\langle O \rangle_{\theta_j + \frac{\pi}{2}} - \langle O \rangle_{\theta_j - \frac{\pi}{2}}]

These gradients interface with classical optimization frameworks using PennyLane’s autodifferentiation.

5. Benchmarking and Empirical Performance

5.1 Dataset, Feature Engineering, and Labeling

The principal evaluation utilizes daily JPX Tokyo Stock Exchange data (2017–2022), focusing on Universe0 stocks (\sim2,000 equities). Feature engineering comprises momentum, volatility, and volume signals, all z-scored and winsorized cross-sectionally. Labels are assigned with weak supervision, selecting the top/bottom p=200p=200 equities per day as positive/negative classes.

  • Training set: First 80% temporal partition
  • Testing set: Last 20% (out-of-sample, OOS)
  • Subsampling with stride k=11k=11: \sim100 train days, 22 OOS days per run
  • Evaluation metric: Annualized Sharpe ratio of long/short portfolios (K=200K=200 stocks per side), with bootstrap 95% confidence intervals

5.2 Comparative Results

Model OOS Sharpe Ratio 95% CI
QTCNN 0.538 ±0.042
QNN 0.467 ±0.038
QCNN 0.361 ±0.298
QLSTM 0.333 ±0.051
Transformer 0.313 ±0.036
LSTM 0.044 ±0.029

QTCNN achieves a Sharpe ratio of $0.538$, outperforming the best classical baseline (Transformer) by approximately 72%72\%, and surpassing quantum convolutional variants lacking temporal encoders by 49%\sim49\%. This suggests a critical role for the temporal encoder and parameter-efficient quantum convolution structure in enhancing predictive robustness and generalization.

6. Quantum Circuit Implementation and Complexity

  • Qubit count: nq=8n_q = 8
  • Quantum depth: L3L \leq 3 (determined by pooling hierarchy)
  • Entanglement layout: Nearest-neighbor ring CNOTs, NISQ-compatible
  • Simulation framework: PennyLane, using default.qubit/lightning backends
  • Per-iteration wall time: QTCNN \approx 0.25 s, LSTM \approx 0.002 s (hardware: RTX3090 + i9 CPU)

The implementation leverages parameter sharing and pooling to optimize sample efficiency and scalability with limited qubit resources.

7. Limitations and Prospective Directions

Key limitations include the modest OOS sample (22 days) and extensive subsampling (\sim9% of available days), leading to reduced statistical power. All experiments utilize idealized (noiseless) qubit simulation; future work must address robustness to quantum noise (e.g., depolarizing, amplitude damping channels) and physical device constraints. Feature engineering is restricted to price-volume technical indicators; incorporating sentiment, macroeconomic, or order-book data could potentially enrich the representational scope. Generalizability to other global equity markets and asset classes remains unverified. Additionally, theoretical investigation into expressivity, barren-plateau phenomena, and conditions for quantum advantage in financial time series models is an open avenue.

In summary, QTCNN represents a hybrid paradigm in quantum machine learning, synthesizing classical multi-scale temporal encoding with hierarchical, parameter sharing quantum circuits to address predictive challenges in complex financial data. Empirical results indicate substantial outperformance relative to canonical deep learning and hybrid quantum approaches, underscoring the practical relevance of quantum-enhanced forecasting for quantitative finance (Chen et al., 7 Dec 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Whiteboard

Follow Topic

Get notified by email when new papers are published related to Quantum Temporal Convolutional Neural Network (QTCNN).