量子变分变换器架构用于合成语言生成
Variational Quantum Transformer Architecture for Synthetic Language Generation
这是关于量子计算和自然语言处理结合的研究,对关注量子计算和AI交叉领域的人可能有参考价值。
我们提出了一种紧凑的、适用于噪声中等量子(NISQ)的量子变换器架构,用于合成量子自然语言处理(QNLP)序列建模。该模型保留了经典变换器的自回归下一个标记接口,但用变分量子编码器块、连接电路、解码器块和一个直接的二比特测量读出替换了注意力和前馈子层。标记上下文被角度编码到小的量子寄存器中,通过并行变分头和编码器集成电路处理,并通过解码器辅助量子比特进行条件化,以产生对四标记词汇表的分布。我们对几种架构变体在确定性和词典生成任务上进行了评估,与一个紧凑的经典变换器基线进行比较。量子模型是端到端可训练的,并学习到非平凡的语法结构,包括单个运行中的完美确定性生成和在最强变体中的高词典有效性。经典基线更准确和稳定,而量子模型对初始化敏感。因此,贡献并非声称量子优势,而是对在接近量子约束下受变换器启发的QNLP序列建模的架构和评估。
Variational Quantum Transformer Architecture for Synthetic Language Generation
We propose a compact NISQ-compatible quantum transformer architecture for synthetic QNLP sequence modelling. The model preserves the autoregressive next-token interface of a classical transformer, but replaces attention and feed-forward sublayers with variational quantum encoder blocks, connector circuits, decoder blocks and a direct two-qubit measurement readout. Token contexts are angle-encoded into small quantum registers, processed by parallel variational heads and encoder integration circuits and conditioned through decoder ancillae to produce a distribution over a four-token vocabulary. We evaluate several architecture variants on deterministic and lexicographic grammar-generation tasks against a compact classical transformer baseline. The quantum models are trainable end-to-end and learn nontrivial grammar structure, including perfect deterministic generation in individual runs and high lexicographic validity in the strongest variant. The classical baseline remains more accurate and stable and the quantum models are sensitive to initialization. The contribution is therefore not a claim of quantum advantage, but a concrete architecture and evaluation of transformer-inspired QNLP sequence modelling under near-term quantum constraints.