Vectorized Attention with Learnable Encoding for Quantum Transformer

Authors

  • Ziqing Guo Department of Computer Science, Texas Tech University NERSC, Lawrence Berkeley Natonal Lab
  • Ziwen Pan Department of Computer Science, Texas Tech University
  • Alex Khan National Quantum Laboratory, University of Maryland
  • Jan Balewski NERSC, Lawrence Berkeley Natonal Lab

DOI:

https://doi.org/10.1609/aaaiss.v7i1.36905

Abstract

Vectorized quantum block encoding provides a way to embed classical data into Hilbert space, offering a pathway for quantum models, such as Quantum Transformers (QT), that replace classical self-attention with quantum circuit simulations to operate more efficiently. Current QTs rely on deep-parameterized quantum circuits (PQCs), rendering them vulnerable to QPU noise, and thus hindering their practical performance. In this paper, we propose the Vectorized Quantum Transformer (VQT), a model that supports ideal masked-attention matrix computation through quantum approximation simulation and efficient training via vectorized nonlinear quantum encoder, yielding shot-efficient and gradient-free quantum circuit simulation (QCS) and reduced classical sampling overhead. In addition, we demonstrate an accuracy comparison for IBM and IonQ in quantum circuit simulation and competitive results in benchmarking natural language processing tasks on IBM’s state-of-the-art, high-fidelity Kingston QPU. Our noise intermediate-scale quantum (NISQ)-friendly VQT approach unlocks a novel architecture for end-to-end machine learning in quantum computing.

Downloads

Published

2025-11-23

How to Cite

Guo, Z., Pan, Z., Khan, A., & Balewski, J. (2025). Vectorized Attention with Learnable Encoding for Quantum Transformer. Proceedings of the AAAI Symposium Series, 7(1), 350–357. https://doi.org/10.1609/aaaiss.v7i1.36905

Issue

Section

First AAAI Symposium on Quantum Information & Machine Learning (QIML): Bridging Quantum Computing and Artificial Intelligence