# QSAN: A Near-term Achievable Quantum Self-Attention Network

arXiv: https://arxiv.org/abs/2207.07563 · HTML: https://mlsanity.com/paper/2207.07563/

## Key facts

- Cited by 25 papers in the map (data through 14 Oct 2026).
- Builds on 35 of its 104 references that are in the map.
- First posted on arXiv 14 Jul 2022.

## Builds on (most cited first, 30 of 35)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://mlsanity.com/paper/2103.14030/) (2021)
- [Reformer: The Efficient Transformer](https://mlsanity.com/paper/2001.04451/) (2020)
- [Rethinking Attention with Performers](https://mlsanity.com/paper/2009.14794/) (2020)
- [Generating Long Sequences with Sparse Transformers](https://mlsanity.com/paper/1904.10509/) (2019)
- [Dual Attention Network for Scene Segmentation](https://mlsanity.com/paper/1809.02983/) (2018)
- [Variational Quantum Algorithms](https://mlsanity.com/paper/2012.09265/) (2020)
- [Supervised learning with quantum enhanced feature spaces](https://mlsanity.com/paper/1804.11326/) (2018)
- [Barren plateaus in quantum neural network training landscapes](https://mlsanity.com/paper/1803.11173/) (2018)
- [Efficient Content-Based Sparse Attention with Routing Transformers](https://mlsanity.com/paper/2003.05997/) (2020)
- [Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attention](https://mlsanity.com/paper/2102.03902/) (2021)
- [Efficient Attention: Attention with Linear Complexities](https://mlsanity.com/paper/1812.01243/) (2018)
- [Bottleneck Transformers for Visual Recognition](https://mlsanity.com/paper/2101.11605/) (2021)
- [Parameterized quantum circuits as machine learning models](https://mlsanity.com/paper/1906.07682/) (2019)
- [Theoretical Limitations of Self-Attention in Neural Sequence Models](https://mlsanity.com/paper/1906.06755/) (2019)
- [Noise-Induced Barren Plateaus in Variational Quantum Algorithms](https://mlsanity.com/paper/2007.14384/) (2020)
- [Transformer Quality in Linear Time](https://mlsanity.com/paper/2202.10447/) (2022)
- [Quantum Natural Gradient](https://mlsanity.com/paper/1909.02108/) (2019)
- [Entanglement Induced Barren Plateaus](https://mlsanity.com/paper/2010.15968/) (2020)
- [Real-Time Scene Text Detection with Differentiable Binarization and Adaptive Scale Fusion](https://mlsanity.com/paper/2202.10304/) (2022)
- [Encoding-dependent generalization bounds for parametrized quantum circuits](https://mlsanity.com/paper/2106.03880/) (2021)
- [Recurrent Quantum Neural Networks](https://mlsanity.com/paper/2006.14619/) (2020)
- [BiBERT: Accurate Fully Binarized BERT](https://mlsanity.com/paper/2203.06390/) (2022)
- [DiSAN: Directional Self-Attention Network for RNN/CNN-Free Language Understanding](https://mlsanity.com/paper/1709.04696/) (2017)
- [The Dawn of Quantum Natural Language Processing](https://mlsanity.com/paper/2110.06510/) (2021)
- [Stochastic gradient descent for hybrid quantum-classical optimization](https://mlsanity.com/paper/1910.01155/) (2019)
- [AAformer: Auto-Aligned Transformer for Person Re-Identification](https://mlsanity.com/paper/2104.00921/) (2021)
- [Quantum Self-Attention Neural Networks for Text Classification](https://mlsanity.com/paper/2205.05625/) (2022)
- [Experimental quantum adversarial learning with programmable superconducting qubits](https://mlsanity.com/paper/2204.01738/) (2022)
- [Visualizing and Understanding Patch Interactions in Vision Transformer](https://mlsanity.com/paper/2203.05922/) (2022)

## Built on by (most cited first, 25 of 25)

- [QKSAN: A Quantum Kernel Self-Attention Network](https://mlsanity.com/paper/2308.13422/) (2023)
- [Beyond Classical Attention: Quantum Attention for Scalable Computation](https://mlsanity.com/paper/2307.08045/) (2023)
- [Quantum Mixed-State Self-Attention Network](https://mlsanity.com/paper/2403.02871/) (2024)
- [QADQN: Quantum Attention Deep Q-Network for Financial Market Prediction](https://mlsanity.com/paper/2408.03088/) (2024)
- [HQViT: Hybrid Quantum Vision Transformer for Image Classification](https://mlsanity.com/paper/2504.02730/) (2025)
- [Quantum Natural Language Processing](https://mlsanity.com/paper/2403.19758/) (2024)
- [GQHAN: A Grover-inspired Quantum Hard Attention Network](https://mlsanity.com/paper/2401.14089/) (2024)
- [Personalized Quantum Federated Learning for Privacy Image Classification](https://mlsanity.com/paper/2410.02547/) (2024)
- [Quantum Adjoint Convolutional Layers for Effective Data Representation](https://mlsanity.com/paper/2404.17378/) (2024)
- [QAMA: Scalable Quantum Annealing Multi-Head Attention Operator for Deep Learning](https://mlsanity.com/paper/2504.11083/) (2025)
- [Quantum Graph Attention Network: A Novel Quantum Multi-Head Attention Mechanism for Graph Learning](https://mlsanity.com/paper/2508.17630/) (2025)
- [Hybrid quantum-classical convolutional neural network for phytoplankton classification](https://mlsanity.com/paper/2303.03707/) (2023)
- [A Survey of Classical And Quantum Sequence Models](https://mlsanity.com/paper/2312.10242/) (2023)
- [Integrating Quantum-Classical Attention in Patch Transformers for Enhanced Time Series Forecasting](https://mlsanity.com/paper/2504.00068/) (2025)
- [HQCC: A Hybrid Quantum-Classical Classifier with Adaptive Structure](https://mlsanity.com/paper/2504.02167/) (2025)
- [Multi-Scale Feature Fusion Quantum Depthwise Convolutional Neural Networks for Text Classification](https://mlsanity.com/paper/2405.13515/) (2024)
- [Quantum Information Fusion and Correction under the Transferable Belief Model](https://mlsanity.com/paper/2410.08949/) (2024)
- [Quantum Complex-Valued Self-Attention Model](https://mlsanity.com/paper/2503.19002/) (2025)
- [An Efficient Quantum Classifier Based on Hamiltonian Representations](https://mlsanity.com/paper/2504.10542/) (2025)
- [QCSE: A Pretrained Quantum Context-Sensitive Word Embedding for Natural Language Processing](https://mlsanity.com/paper/2509.05729/) (2025)
- [QAROO: AI-Driven Online Task Offloading for Energy-Efficient and Sustainable MEC Networks](https://mlsanity.com/paper/2604.25740/) (2026)
- [Advancing Multimodal Fusion on Heterogeneous Medical Data with Hybrid Geometry Attention](https://mlsanity.com/paper/2607.19086/) (2026)
- [Quantum Incremental Learning with Mixed State Prototypes](https://mlsanity.com/paper/2608.10464/) (2026)
- [QTrans: A Quantum Transformer for Sentiment Classification](https://mlsanity.com/paper/2609.12011/) (2026)
- [QiT: Quantum-Inspired Transformer for Visual Recognition Task](https://mlsanity.com/paper/2609.17789/) (2026)

## Abstract (arXiv)

Self-Attention Mechanism (SAM) is good at capturing the internal connections of features and greatly improves the performance of machine learning models, espeacially requiring efficient characterization and feature extraction of high-dimensional data. A novel Quantum Self-Attention Network (QSAN) is proposed for image classification tasks on near-term quantum devices. First, a Quantum Self-Attention Mechanism (QSAM) including Quantum Logic Similarity (QLS) and Quantum Bit Self-Attention Score Matrix (QBSASM) is explored as the theoretical basis of QSAN to enhance the data representation of SAM. QLS is employed to prevent measurements from obtaining inner products to allow QSAN to be fully implemented on quantum computers, and QBSASM as a result of the evolution of QSAN to produce a density matrix that effectively reflects the attention distribution of the output. Then, the framework for one-step realization and quantum circuits of QSAN are designed for fully considering the compression of the measurement times to acquire QBSASM in the intermediate process, in which a quantum coordinate prototype is introduced as well in the quantum circuit for describing the mathematical relation between the output and control bits to facilitate programming. Ultimately, the method comparision and binary classification experiments on MNIST with the pennylane platform demonstrate that QSAN converges about 1.7x and 2.3x faster than hardware-efficient ansatz and QAOA ansatz respevtively with similar parameter configurations and 100% prediction accuracy, which indicates it has a better learning capability. QSAN is quite suitable for fast and in-depth analysis of the primary and secondary relationships of image and other data, which has great potential for applications of quantum computer vision from the perspective of enhancing the information extraction ability of models.
