Researchers have achieved an exact quantum realization of the Softmax attention mechanism, a cornerstone of modern AI models like Transformers. This breakthrough is particularly relevant for problems where inputs and outputs are constrained to the probability simplex, meaning all outputs sum to one. The core insight is that attention scores can be expressed as Hadamard-test statistics on block-encoded projections of amplitude-encoded inputs.

The exponential Softmax function is shown to correspond to the interior of a cosine-squared family, generated by Born-rule measurements under an exact bijection. The boundary of this correspondence allows for sparse attention with exact zeros at finite parameter values. Furthermore, the Softmax temperature is interpreted as a repetition count, where post-selected measurement rounds precisely realize the discretized inverse temperature. Value aggregation is modeled as a deterministic column-loading channel that dilates the column-stochastic value matrix.

Each learnable parameter in this quantum model is represented as a rotation-gate angle. The composed layer is exact in the infinite-shot limit, requiring one measure-and-reload step per attention score. A fully-coherent variant has also been developed, which is ε-approximate via quantum singular value transformation in the infinite depth limit. The algebraic correctness of this model has been formally machine-checked using the Lean 4 proof assistant.