Quantum Complex-Valued Self-Attention Model

Fu Chen, Qinglin Zhao, Li Feng, Longfei Tang, Yangbin Lin +1 more
3/24/2025
quant-phcs.LG
transformer-attention

No confident code implementation found for this paper.

Abstract

Self-attention has revolutionized classical machine learning, yet existing quantum self-attention models underutilize quantum states' potential due to oversimplified or incomplete mechanisms. To address this limitation, we introduce the Quantum Complex-Valued Self-Attention Model (QCSAM), the first framework to leverage complex-valued similarities, which captures amplitude and phase relationships between quantum states more comprehensively.

Show full abstract

To achieve this, QCSAM extends the Linear Combination of Unitaries (LCUs) into the Complex LCUs (CLCUs) framework, enabling precise complex-valued weighting of quantum states and supporting quantum multi-head attention. Experiments on MNIST and Fashion-MNIST show that QCSAM outperforms recent quantum self-attention models, including QKSAN, QSAN, and GQHAN. With only 4 qubits, QCSAM achieves 100% and 99.2% test accuracies on MNIST and Fashion-MNIST, respectively. Furthermore, we evaluate scalability across 3-8 qubits and 2-4 class tasks, while ablation studies validate the advantages of complex-valued attention weights over real-valued alternatives. This work advances quantum machine learning by enhancing the expressiveness and precision of quantum self-attention in a way that aligns with the inherent complexity of quantum mechanics.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chen2025quantum,
  title  = {Quantum Complex-Valued Self-Attention Model},
  author = {Fu Chen and Qinglin Zhao and Li Feng and Longfei Tang and Yangbin Lin and Haitao Huang},
  year   = {2025},
  eprint = {2503.19002},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.19002v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.19002.svg)](https://codeofpaper.com/paper/2503.19002)

Discussion