Abstract
Quantum compute is scaling fast, from cloud QPUs to high throughput GPU simulators, making it timely to prototype quantum NLP beyond toy tasks. However, devices remain qubit limited and depth limited, training can be unstable, and classical attention is compute and memory heavy. This motivates compact, phase aware quantum token mixers that stabilize amplitudes and scale to long sequences. We present CLAQS, a compact, fully quantum token mixer for text classification that jointly learns complex-valued mixing and nonlinear transformations within a unified quantum circuit. To enable stable end-to-end optimization, we apply l1 normalization to regulate amplitude scaling and introduce a two-stage parameterized quantum architecture that decouples shared token embeddings from a window-level quantum feed-forward module. Operating under a sliding-window regime with document-level aggregation, CLAQS requires only eight data qubits and shallow circuits, yet achieves 91.64% accuracy on SST-2 and 87.08% on IMDB, outperforming both classical Transformer baselines and strong hybrid quantum-classical counterparts.
Abstract (translated)
量子计算的发展速度非常快,从云端的量子处理单元(QPUs)到高吞吐量的GPU模拟器,这使得在玩具任务之外开发量子自然语言处理原型变得尤为紧迫。然而,设备仍然受到量子比特数量和深度的限制,训练过程可能不稳定,并且经典的注意力机制对计算资源和内存消耗较大。因此,设计紧凑、相位感知型的量子令牌混合器来稳定振幅并扩展到长序列的任务显得尤为重要。 我们提出了CLAQS(Compact Layer-Aware Quantum Sequence),这是一种用于文本分类任务的小巧而完全量子化的令牌混合器,在统一的量子电路内同时学习复值混合和非线性变换。为了实现端到端优化的稳定性,我们在模型中应用了L1正则化来调控振幅缩放,并引入了一种两阶段参数化量子架构,这种架构将共享令牌嵌入与窗口级的量子前馈模块分离。 在基于滑动窗口机制和文档级别聚合操作的前提下,CLAQS仅需要8个数据量子比特和浅层电路结构。尽管如此,在SST-2数据集上,它依然能够达到91.64%的准确率;而在IMDB数据集上,则达到了87.08%的准确率,这些结果优于经典的Transformer基线模型以及强大的混合型量子—经典模型。
URL
https://arxiv.org/abs/2510.06532