{"id":"601fe51c-4610-46bb-85d6-2c473f5394d3","arxiv_id":"2608.11173","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":6.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":0,"one_line_summary":"Softmax attention on the probability simplex is exactly realized by a quantum circuit where scores are Hadamard-test estimates, the softmax is Born-rule readout, temperature is measurement repetition, and the residual is an ancilla angle.","lead":"This paper gives a quantum circuit construction that reproduces single-head softmax attention exactly when inputs and outputs are probability distributions, mapping each attention component to a standard quantum primitive. It also introduces a cosine-squared softmax family that strictly extends exponential softmax and may be useful classically.","discovery_kind":"new_application","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Theorem 27 is exact only for the amplitude-lift, normalized-overlap layer of Remark 2, not for textbook softmax attention on probability vectors; the central claim's scope rests wholly on that redefinition.","rationale":"Reading the construction in good faith, the algebraic core checks out: the bijection θ=2 arccos(e^{z/2}) gives cos²(θ/2)=e^z; the L-round post-selection identity gives β=L; the column-loading channel's partial-trace diagonal is Σ_j A_ij W_V x_j; and the incoherent single-ancilla mixture at η=π/2 has diagonal (x_i+Y_i)/2. The composed Hadamard-test reweighting in Eq. 10 is stated without proof but is algebraically correct when derived. The no-go theorem for exact coherent realization is sound under its affine-encoding assumption. The weakest point is not a hidden algebraic error but the definitional target of the equivalence. Remark 2 changes the classical layer to amplitude-lift features √x_i, normalized unit-norm overlaps Re⟨q_i|k_j⟩, and a row-max shift; without these conventions the quantum scores are not the classical inner products. The identity-projection example shows the quantum kernel is genuinely different from standard dot-product attention, so the result is a dictionary for a non-standard attention variant, not for textbook attention restricted to simplex inputs. Because the authors state Remark 2 explicitly, the paper is internally consistent; the concern is about scope and external significance, not soundness. The reader's CONDITIONAL verdict already captures this in its weakest_assumption, so no verdict change is needed. A separate small-scale numerical simulation of the full composition, including Eq. 10, would still be a worthwhile independent check, but it would test internal consistency rather than the scope limitation identified here.","tokens_in":26515,"tokens_out":25639,"duration_ms":227994,"concrete_test":"For n=d=2 with x_1=(0.5,0.5), x_2=(0.9,0.1), W_Q=W_K=I_2, W_V=I_2, compute the textbook attention output of Eq. 1 (scores x_i·x_j/√2, softmax, value sum) and the Remark-2 layer output (scores Σ_m √(x_im x_jm), row shift, softmax, value sum). If the two outputs differ, Theorem 27's equivalence is to the Remark-2 layer only, not to textbook softmax attention on the probability simplex; this settles that the central claim's scope is exactly what Remark 2 admits.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central equivalence in Theorem 27 is exact only for a classical layer that has been redefined to match the quantum primitives. Remark 2 replaces input features x_i by amplitude lifts √x_i, so queries and keys are W_Q√x_i and W_K√x_j; replaces the score Q_i^T K_j/√d by the normalized unit-norm overlap Re⟨q_i|k_j⟩ after block-encoding post-selection; and requires the softmax-invariant row-max shift to force z≤0. Consequently the 'classical single-head attention' reproduced by the circuit is not the textbook layer of Eq. 1 on probability vectors: even with W_Q=W_K=I, the score is the Bhattacharyya coefficient Σ_m √(x_im x_jm), not the inner product x_i·x_j, and the a_q, a_k normalization makes the score a nonlinear, input-dependent function of the raw features. The theorem is internally consistent and the authors state the convention explicitly, but the headline claim 'quantum equivalent of softmax attention on the probability simplex' is load-bearing on this redefinition: if the intended target is Eq. 1 with raw probability features, the equivalence fails. The Lean-verified identities prove the cos²/exp equality for this redefined score model, not for textbook dot-product scores, so the formal certificate does not mitigate the scope limitation.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper constructs a quantum circuit that, under Assumption 1 (inputs on the probability simplex) and the conventions of Remark 2 (amplitude-lift features, normalized unit-norm overlap scores, and a row shift to non-positive scores), exactly reproduces a classical single-head softmax attention layer with residual in the infinite-shot limit. Theorem 27 assembles amplitude encoding, block-encoded Q/K projections, Hadamard-test score extraction, a Born-rule cos^2-softmax with the angle-score bijection theta = 2 arccos(e^{z/2}), an L-stage post-selected temperature realization, a column-loading channel for the column-stochastic value matrix, and a single-ancilla gated residual. The paper also proves a boundary strict-extension of the cos^2 family to sparse attention, a finite-depth no-go for coherent QSVT realization of affinely encoded scores, an epsilon-approximate coherent QSVT alternative, and reports Lean 4 machine-checked proofs of the algebraic identities.","tokens_in":26659,"tokens_out":18227,"duration_ms":173832,"significance":"If the claims are read under their stated conventions, this is a careful and honest construction. The algebraic identities are correct, the scope limitations are stated explicitly, the absence of a speedup claim is candid, and the Lean-checked core is a genuine strength. The paper provides a useful dictionary that maps each mechanism of a simplex-valued attention layer to a specific quantum primitive, and it gives a precise boundary between what can be realized exactly with measure-and-reload and what cannot be realized exactly in finite-depth coherent QSVT. The finite-shot and gate-count analysis is correspondingly frank about the lack of practical advantage for single-layer inference on classical data.","major_comments":[{"comment":"The exact equivalence is stated for a classical layer that has been redefined in several ways: the features presented to W_Q and W_K are the amplitude lifts sqrt(x_i) rather than x_i; the score is the normalized overlap Re<q_i|k_j> rather than Q_i^T K_j / sqrt(d); and the residual in Eq. (4) is the equal-weight convex combination (1/2)(Y_i + x_i), not the standard transformer residual x_i + Y_i. For W_Q = W_K = I the score reduces to the Bhattacharyya coefficient sum_m sqrt(x_im x_jm), not the inner product x_i dot x_j. Although Remark 2 states the first two conventions, the title and abstract present the result as a realization of \"softmax attention\" without these qualifications. Because the target layer is load-bearing for the central claim, the headline should be reframed and the abstract should state explicitly that the classical target is the amplitude-lift, normalized-score, convex-residual layer.","section":"Theorem 27; Remark 2; Section 2.1"},{"comment":"The statement that the Born-rule readout of Q(X) \"equals\" the classical layer needs a sampler-semantics clarification. Theorem 23 yields the output row Y_i only conditionally on the A-register outcome i, and a single run of the full circuit samples (i,j) from the joint distribution (1/n) A_ij rather than producing the full output matrix. Recovering all n rows requires either conditioning on A (which collapses the superposition) or n repeated runs. The theorem should state that the equivalence is distributional in the infinite-shot limit over these samples, rather than implying that a single circuit evaluation returns the entire classical output matrix deterministically.","section":"Theorem 27; Section 11, step 8"}],"minor_comments":[{"comment":"The machine-checking claim cannot be independently verified because the repository URL and commit hash are placeholders (\"<repository URL>, commit<hash>\"). Please provide a permanent archive, such as a Zenodo DOI, with the Lake project pinned to the stated toolchain.","section":"Section 10; Code availability"},{"comment":"The abstract says the fully-coherent variant is epsilon-approximate \"in the infinite depth limit,\" but Theorem 20 gives a finite-depth bound O(sqrt(max{c, log(1/epsilon)}) log(1/epsilon)); the abstract should be aligned with the finite-depth statement.","section":"Abstract; Theorem 20"},{"comment":"Calling eta = pi/2 the \"standard transformer additive identity\" is misleading because Eq. (4) uses the equal-weight convex combination (1/2)(Y_i + x_i), not x_i + Y_i; please use \"equal-weight convex combination\" or explicitly note that this is the simplex-adapted residual.","section":"Section 8.1; Corollary 25"},{"comment":"The composed Hadamard-test form of Remark 10 requires estimating the post-selection rates a_q^2 and a_k^2 to recover the normalized score z_ij, so the \"one measure-and-reload step per attention score\" in Theorem 27 should mention that this auxiliary estimation may be part of the same step.","section":"Remark 10; Theorem 27"},{"comment":"The row-TV bound \"E ||A_hat_i - A_i||_TV lesssim sqrt(n/N)\" is stated without an explicit constant; please either state the universal constant or say the bound holds up to a constant independent of n and N.","section":"Section 12.3"}],"recommendation":"major_revision","confidential_remarks":"The mathematical content appears sound under the stated conventions, and the authors are unusually transparent about scope and lack of speedup. The decision hinges on whether the authors are willing to reframe the central claim around the amplitude-lift, normalized-score, convex-residual layer and to make the Lean artifacts publicly available. If those framing and reproducibility issues are fixed, the paper would be a solid theoretical contribution for a quantum-machine-learning audience."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Thanks for the Pith Report. I read the paper against your stress test and think the main concern lands. The construction is real, the algebra checks out, but the classical target in Theorem 27 is not the attention layer of Eq. 1 on probability vectors. Remark 2 replaces features by amplitude lifts, scores by normalized overlaps. With identity weights the score is the Bhattacharyya coefficient, not the inner product. The equivalence is exact under that convention, and the authors say so, but the abstract and title say 'softmax attention' without the qualifier. That is a scope problem, not a fraud.\n\nWhat is genuinely new: the cos²-softmax family and the boundary strict-extension result are correct and interesting. The temperature-as-repetition identity, the column-loading value channel, and the single-ancilla residual are assembled into a coherent dictionary for the first time. The no-go theorem for finite-depth polynomial realization is a clean argument. The Lean snippets in the text are plausible, and the claims they verify (interior isomorphism, strict extension, Trotter identity, channel diagonal) are exactly the load-bearing algebraic steps.\n\nSoft spots, in order: (1) The scope gap above. The paper should lead with the Hellinger convention, not bury it in Remark 2. (2) The Lean verification is not auditable: the repository is a placeholder URL. Machine-checked is only meaningful if the build is public. This is a reproducibility requirement, not a nit. (3) Eq. 10, the composed Hadamard-test formula, is stated without proof. It may be right, but it is doing work in the composition. (4) The QSVT result is a proof sketch; acceptable for a paper of this type, but it should be labeled as such in the abstract.\n\nThe resource accounting is honest: they explicitly say there is no regime where this beats classical attention on classical data. That helps credibility.\n\nWho it is for: people working on quantum machine learning architectures and on the classical cos²-softmax as a sparse-attention parameterization. The classical side might be the more practical residue.\n\nRecommendation: send it to peer review. A serious referee can push on the scope framing and the missing build. The algebraic core deserves to be in the literature.","headline":"A careful, mostly correct quantum dictionary for a Hellinger-flavored attention layer whose abstract overstates the match to textbook softmax attention.","tokens_in":27297,"tokens_out":2164,"would_cite":false,"duration_ms":20772,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":["68Q12","81P68"],"pacs":["03.67.Lx"],"model":"deepseek-v4-flash","headline":"Softmax attention on probability data can be reproduced exactly by a quantum circuit whose every learned parameter is a rotation angle.","keywords":["softmax attention","quantum circuit","Born rule","Hadamard test","linear combination of unitaries","residual connection","probability simplex","block encoding"],"falsifier":"Take $x_1=(1/2,1/2)$ and $x_2=(1,0)$ with $W_Q=W_K=I$. The textbook attention score is $(1/2)/\\sqrt{2}$, while the normalized amplitude overlap used by the circuit is $1/\\sqrt{2}$; running the circuit and comparing its readout with exp-softmax on the textbook scores gives different distributions, showing that exactness holds for the amplitude-lift variant, not raw-feature attention.","tokens_in":26204,"feed_emoji":"⚛️","tokens_out":8109,"duration_ms":72585,"temperature":0.7,"pith_summary":"Softmax attention is usually defined in unconstrained feature space, but when inputs and outputs live on the probability simplex, this paper argues that the whole single-head attention layer moves into quantum hardware exactly. It constructs a circuit in which scores come from a Hadamard-test overlap measurement, softmax comes from the classic Born-rule probability rule with the angle-score bijection $\\theta = 2\\arccos(e^{z/2})$ that makes the squared-cosine family equal the exponential family pointwise, temperature comes from repeating the same post-selected measurement, and the residual comes from one ancilla prepared at angle $\\pi/2$. The learned matrices $W_Q$, $W_K$, $W_V$ become rotation-gate angles. The main theorem says the Born-rule readout equals the classical layer exactly in the infinite-shot limit, provided the classical layer is read with the paper's stated conventions: amplitude lifts $\\sqrt{x_i}$, normalized overlaps, and row-shifted scores. If right, it gives a component-by-component dictionary rather than a black-box simulation, and it turns the softmax temperature from a hyperparameter into a physical repetition count.","feed_headline":"Softmax attention maps onto a quantum circuit, piece by piece","feed_subtitle":"Scores, softmax, temperature, values, and residual each become a rotation-gate construction, exact in the infinite-shot limit.","key_machinery":"The load-bearing objects are the angle-score bijection $\\theta = 2\\arccos(e^{z/2})$, which converts a classical score into a rotation angle so that measurement probability is the softmax weight; the identity $\\beta = L$, which turns $L$ post-selected rounds into inverse temperature; the column-loading value channel, a Stinespring dilation whose partial-trace diagonal equals the classical output $Y_i$; and the gated single-ancilla residual, a linear combination of unitaries whose additive identity sits at the ancilla preparation angle $\\eta = \\pi/2$. These primitives are assembled from amplitude encoding, block-encoded $W_Q$ and $W_K$ contractions, a Hadamard-test overlap extraction, Born-rule cosine-squared softmax, the stochastic value channel, and the residual sandwich. The algebraic core of the dictionary is machine-checked in a formal proof assistant.","core_discovery":"The paper's central discovery is that the exponential softmax is the interior of the cosine-squared measurement family on the simplex: under the bijection $\\theta = 2\\arccos(e^{z/2})$, the identity $\\cos^2(\\theta/2)/\\sum_l \\cos^2(\\theta_l/2) = e^z/\\sum_l e^{z_l}$ holds pointwise for $z \\le 0$. This makes Born-rule readout a native softmax, and the construction composes that softmax with Hadamard-test overlaps for scores, a deterministic column-loading channel for values, and a single-ancilla residual gate. The master equivalence (Theorem 27) states that a quantum circuit with one measure-and-reload step per attention score reproduces the classical single-head gated attention layer exactly in the infinite-shot limit under the probability-simplex assumption. Exactness is conditional: the classical layer is the lifted-feature, normalized-score, row-shifted variant defined in Remark 2, not textbook attention on raw feature vectors. A finite-depth fully coherent exact circuit is provably impossible for affine score encodings; the coherent alternative is $\\epsilon$-approximate via quantum singular value transformation.","pith_inferences":["Editorial extension: the dictionary is not tied to exponential softmax specifically; any bijective score-to-angle map on a bounded domain would generate a legitimate Born-rule softmax family, and the paper's bijection is one such choice.","Editorial extension: because the construction rewrites attention scores as normalized amplitude overlaps, it is best understood as a quantum-native attention variant defined in Hellinger-like geometry rather than a simulation of standard attention on raw features.","Editorial extension: the cosine-squared softmax is a plausible classical drop-in attention nonlinearity for simplex-valued generative models, where it would add sparse-attention expressivity at finite parameters; the paper raises this as an empirical question, and we infer it is worth testing directly.","Editorial extension: replacing the measure-and-reload sampler with amplitude estimation or other coherent score extraction creates a design trade-off between shot overhead, circuit depth, and exactness that the paper leaves open for later work."],"forward_implications":["If Theorem 27 is correct, any single-head attention layer whose data are probability vectors admits a gate-level quantum implementation with no classical softmax normalization step: the simplex constraint is automatic from the Born rule.","The softmax temperature is no longer a free hyperparameter in the quantum realization: $\\beta = L$, the number of repeated post-selected rounds, so cooling the attention distribution costs shots and the post-selection rate reads off the Gibbs partition function.","The cosine-squared softmax is a strict extension of exponential softmax: it can return exactly zero attention weights at finite angle $\\theta = \\pi$, which exponential softmax cannot do with finite scores.","Exactness requires breaking full coherence with one measure-and-reload step per score; the paper proves that a finite-depth fully coherent version cannot be exact and is only $\\epsilon$-close via quantum singular value transformation.","For inference on classical data, no speedup is claimed: the per-layer shot budget is $\\Omega(n^2/\\varepsilon^2)$ naively, or $\\Omega(n^2/\\varepsilon)$ with amplitude estimation, so the contribution is structural exactness rather than efficiency."],"supporting_citations":[{"why":"Defines the classical dot-product attention layer (Eq. 1) that the construction claims to reproduce.","marker":"[1]"},{"why":"Supplies the quantum singular value transformation framework used for the epsilon-approximate coherent route and the polynomial-degree no-go.","marker":"[16]"},{"why":"Supplies the linear-combination-of-unitaries primitive used by the gated residual construction.","marker":"[18]"},{"why":"Establishes the universal gate set used to argue that the block-encoding dilations decompose exactly into rotation gates and two-qubit entanglers.","marker":"[21]"},{"why":"Supports the density/universal-approximation assumption behind the variational rotation-CRY ansatz for the Q and K projections.","marker":"[23]"},{"why":"Provides the standard synthesis algorithms used to realize the state-preparation and dilation unitaries exactly.","marker":"[24]"},{"why":"Supplies the state-overlap Hadamard-test construction used to extract attention scores as ancilla marginals.","marker":"[25]"},{"why":"Provides the exponential-to-polynomial approximation bounds used in the fully coherent QSVT approximation theorem.","marker":"[26]"},{"why":"Supplies amplitude amplification and estimation, which set the post-selection boosting and finite-shot budget analysis.","marker":"[32]"}],"fun_headline_variants":["Softmax attention is a Born-rule measurement","Exact quantum circuit for softmax attention","Attention's softmax maps to quantum gates exactly","Piecewise quantum circuit for softmax attention","Machine-checked quantum analog for softmax attention"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The equivalence is exact only for the redefined classical layer of Remark 2: features enter as amplitude lifts $\\sqrt{x_i}$, scores are normalized unit-norm overlaps, and scores are row-shifted to be non-positive.","fun_headline_variants_meta":{"raw":{"variants":["Softmax attention is a Born-rule measurement","Exact quantum circuit for softmax attention","Attention's softmax maps to quantum gates exactly","Piecewise quantum circuit for softmax attention","Machine-checked quantum analog for softmax attention"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.00026,"raw_usage":{"total_tokens":1632,"prompt_tokens":1030,"completion_tokens":602,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":646,"completion_tokens_details":{"reasoning_tokens":533}},"tokens_in":646,"tokens_out":602,"duration_ms":5607,"temperature":1.0,"reasoning_tokens":533,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-12T04:44:46.689999+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Take $x_1=(1/2,1/2)$ and $x_2=(1,0)$ with $W_Q=W_K=I$. The textbook attention score is $(1/2)/\\sqrt{2}$, while the normalized amplitude overlap used by the circuit is $1/\\sqrt{2}$; running the circuit and comparing its readout with exp-softmax on the textbook scores gives different distributions, showing that exactness holds for the amplitude-lift variant, not raw-feature attention.","supporting_citations":[{"cited_title":"Gomez, Lukasz Kaiser, and Illia Polosukhin","cited_arxiv_id":null,"evidence_quote":"Defines the classical dot-product attention layer (Eq. 1) that the construction claims to reproduce."},{"cited_title":"Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics","cited_arxiv_id":null,"evidence_quote":"Supplies the quantum singular value transformation framework used for the epsilon-approximate coherent route and the polynomial-degree no-go."},{"cited_title":"Childs and Nathan Wiebe","cited_arxiv_id":null,"evidence_quote":"Supplies the linear-combination-of-unitaries primitive used by the gated residual construction."},{"cited_title":"Bennett, Richard Cleve, David P","cited_arxiv_id":null,"evidence_quote":"Establishes the universal gate set used to argue that the block-encoding dilations decompose exactly into rotation gates and two-qubit entanglers."},{"cited_title":"The effect of data encoding on the expressive power of variational quantum machine learning models.Physical Review A, 103(3):032430, 2021","cited_arxiv_id":null,"evidence_quote":"Supports the density/universal-approximation assumption behind the variational rotation-CRY ansatz for the Q and K projections."},{"cited_title":"Shende, Stephen S","cited_arxiv_id":null,"evidence_quote":"Provides the standard synthesis algorithms used to realize the state-preparation and dilation unitaries exactly."},{"cited_title":"Quantum fingerprinting","cited_arxiv_id":null,"evidence_quote":"Supplies the state-overlap Hadamard-test construction used to extract attention scores as ancilla marginals."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Provides the exponential-to-polynomial approximation bounds used in the fully coherent QSVT approximation theorem."},{"cited_title":"Quantum amplitude amplifi- cation and estimation.Contemporary Mathematics, 305:53–74, 2002","cited_arxiv_id":null,"evidence_quote":"Supplies amplitude amplification and estimation, which set the post-selection boosting and finite-shot budget analysis."}],"review_version":1}