← All papers
First page of A Quantum Roadmap for Softmax Attention: Exact Born-Rule Analogs for Softmax Attention on the Probability Simplex

A Quantum Roadmap for Softmax Attention: Exact Born-Rule Analogs for Softmax Attention on the Probability Simplex

Eric A. F. Reinhardt, Adam J. Hauser

quant-ph Aug 11, 2026 · v1 cs.LG
The algebraic core of the softmax-to-Born-rule attention correspondence is machine-checked in Lean 4.
The attention mechanism forms the foundation of many modern AI models such as the Transformer. In one subclass of problems where attention is used, inputs and outputs are bound to the probability simplex so that all outputs sum to one. In this setting, softmax attention admits an exact, component-by-component quantum realization. Attention scores are Hadamard-test statistics on block-encoded projections of amplitude-encoded inputs. The exponential softmax is the interior of a cosine-squared family generated by Born-rule measurement under an exact bijection, whose boundary expresses sparse attention with exact zeros at finite parameter values. The softmax temperature is a repetition count where post-selected measurement rounds realize discretized inverse temperature exactly. Value aggregation is a deterministic column-loading channel that dilates the column-stochastic value matrix. The gated residual is the preparation angle of a single ancilla, with the additive identity at a mixing angle of π/2. Every learnable parameter is a rotation-gate angle. The composed layer is exact in the infinite-shot limit with one measure-and-reload step per attention score; a fully-coherent variant is ε-approximate via quantum singular value transformation in the infinite depth limit. The algebraic core is machine-checked in Lean 4.

Softmax attention enforces the probability simplex structure via an explicit projection, whereas quantum circuits produce simplex-valued outputs natively through the Born rule. The paper asks whether transformer single-head attention admits an exact quantum realization.

Inputs are amplitude-encoded so the Born rule replaces softmax normalization. Attention scores are extracted as Hadamard-test statistics on block-encoded query/key projections, and softmax is realized as a cos-squared family bijective to the exponential form on the simplex interior. Value aggregation uses a Stinespring-dilated column-stochastic channel, and the gated residual is the preparation angle of a single ancilla. The algebraic core of these constructions is machine-checked in Lean 4.

The composed layer is shown exact in the infinite-shot limit with one measure-and-reload step per attention score, with a fully coherent epsilon-approximate variant via quantum singular value transformation. Every learnable parameter maps to a rotation-gate angle.