{"id":"cbcb5ccc-7790-431b-b447-f175f00a4c7c","arxiv_id":"2507.16100","paper_version":1,"verdict":"ACCEPT","confidence":"HIGH","novelty_score":6.0,"correctness_risk":"low","formal_verification":"none","parameter_count":0,"one_line_summary":"The loop hafnian generating function is proven valid for all symmetric complex matrices via Gaussian integration, removing a quantum-optics restriction.","lead":"This short note proves that a generating function for loop hafnians, previously justified only for special matrices from quantum optics, holds for every symmetric matrix. It gives a clean proof via Gaussian integration, closing a gap that earlier work had treated as an assumption.","discovery_kind":"first_principles","skeptic_critique":{"model":"deepseek-v4-flash","headline":"No significant objection identified: the symmetric-square-root and density steps in the proof are standard and valid, so the central theorem holds as stated.","rationale":"The reader's verdict identifies the symmetric-square-root assumption as the weakest point, and I agree that this is the only non-explicit step. However, it is not load-bearing because the required square root is guaranteed by a standard polynomial-interpolation argument. The continuity/density extension the paper relies on is also rigorous for fixed small z, where the determinant factor does not vanish. I independently checked the key matrix identity (13) and found it correct. The theorem is therefore proven for all symmetric complex S and v, and the reader's ACCEPT verdict with HIGH confidence is appropriate. No adjustment to the verdict is needed.","tokens_in":6239,"tokens_out":20875,"duration_ms":219196,"concrete_test":"Run a numerical verification of the omitted square-root step: for a random 4x4 diagonalizable invertible complex symmetric matrix S, construct a polynomial p with p(λ)^2=λ on the spectrum and check p(S)^2=S and p(S)=p(S)^T. If this passes for a suite of random matrices, Eq. (9)'s representation is justified.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim is that Eq. (4) gives the loop hafnian generating function for every symmetric complex S and vector v. I checked the two places where the argument could fail. First, Eq. (9) requires a symmetric square root S^{1/2} for diagonalizable invertible S. Such a root exists: because S is diagonalizable, its minimal polynomial has simple roots, so a polynomial p can interpolate a chosen square root on the spectrum; then p(S)^2=S and, since p(S) is a polynomial in a symmetric matrix, p(S) is symmetric. This justifies the Gaussian representation in Eq. (9). One wording issue: the text says 'let S^{1/2} be any of its square roots, which is also symmetric'; not every square root is symmetric, but the proof only needs existence, which holds. Second, the extension to arbitrary symmetric S by density and continuity is sound. Symmetric matrices with distinct eigenvalues and nonzero determinant are dense in the space of complex symmetric matrices, and for z in a sufficiently small neighborhood of the origin, det(1-ZS) is bounded away from zero, so both sides of Eq. (4) are continuous in S and v. Derivatives at z=0 therefore pass to the limit. The algebraic simplification in Eq. (13) is also correct, using S^{-1}(I-SZ)^{-1}=(1-ZS)^{-1}S^{-1}. I find no load-bearing flaw.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The manuscript proves that the loop-hafnian generating function identity (Eq. (4)) is valid for every complex symmetric 2m x 2m matrix S and every 2m-dimensional complex vector v. The proof uses the derivative representation of loop hafnians (the Lemma), rewrites the exponential via a Gaussian integral for diagonalizable invertible S (Eq. (9)), converts the x-derivatives into z-derivatives of an auxiliary Gaussian exponent (Eq. (10)), evaluates the Gaussian integral, simplifies the matrix algebra (Eqs. (12)-(13)), and finally extends by continuity to all symmetric S. The note also connects loop hafnians to Gaussian moments (Remark 1) and discusses odd-dimensional matrices (Remark 2).","tokens_in":6497,"tokens_out":17898,"duration_ms":184838,"significance":"If correct, the result removes the quantum-Gaussian-state restrictions of the earlier derivation in [1], making the loop-hafnian master theorem a general identity for arbitrary symmetric complex matrices. The proof is self-contained, elementary, and clearly written; it does not rely on the quantum-optical context and uses only standard Gaussian integration plus a polynomial density argument. This is a useful contribution for Gaussian boson sampling and related combinatorial applications, although the mathematical content is not deep and the final identity is not unexpected given the existing hafnian master theorem.","major_comments":[],"minor_comments":[{"comment":"The sentence 'Let the matrix S^{1/2} be any of its square roots, which is also a diagonalizable and invertible 2m x 2m complex symmetric matrix' is not literally true, since not every square root of a symmetric matrix is symmetric. The argument only needs the existence of a symmetric square root, which follows for diagonalizable invertible S by polynomial interpolation on the spectrum; please rephrase to avoid asserting that every square root has this property.","section":"Proof of the theorem, before Eq. (9)"},{"comment":"The density and continuity extension is compressed into a single sentence. It would be helpful to state explicitly that diagonalizable invertible complex symmetric matrices are dense in the space of all complex symmetric matrices, that for z in a sufficiently small neighborhood of the origin det(1-ZS) is bounded away from zero, and that equality of all z-derivatives at z=0 passes to the limit.","section":"Proof of the theorem, final paragraph"},{"comment":"The notation \\tilde S_{\\{n_j\\},\\{n_j\\}} with a doubled subscript is redundant, since the construction depends only on the single tuple \\{n_j\\}. Using the same notation as in the Lemma (e.g., \\tilde S_{\\{n_j\\}}) would avoid confusion.","section":"Theorem, Eq. (4)"},{"comment":"The text introduces the Fa di Bruno calculation as 'a comment following their arguments,' but the paragraph is a complete proof of the lemma. The wording could be changed to 'proof' or 'self-contained derivation' to reflect what is actually presented.","section":"Lemma proof, Eq. (6)"},{"comment":"The right-hand side of Eq. (4) is an infinite power series. The paper would benefit from a remark that the identity is a formal power series identity, or that for fixed S and sufficiently small |z_j| the series converges and both sides are analytic.","section":"Theorem, Eq. (4)"}],"recommendation":"minor_revision","confidential_remarks":"This is a short, correct note. The main theorem is a natural generalization of the hafnian master theorem and the proof is clean. The only issues are presentation-level, chiefly the inaccurate wording about 'any' square root being symmetric. Once that is fixed and the density/continuity step is spelled out, the manuscript is publishable."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"The one thing you should know: this note proves the loop hafnian generating function of Eq. (4) for all symmetric complex matrices, discarding the quantum-Gaussian-state caveat from Bulmer et al. The proof is sound and the paper does exactly what it claims. The reader's ACCEPT verdict is right, and the stress-test check holds up on reading.\n\nWhat's actually new: the formula was derived in [1] by quantum-optical methods for covariance matrices with special block symmetries, then used outside that class as a numerically-supported assumption. Tarasov turns that assumption into a theorem. The method is not novel—it adapts the hafnian master theorem template—but the result is new and useful. It removes a caveat in an active line of quantum optical simulation work. It does not change complexity results or open new applications, so the significance is real but contained.\n\nThe paper does well: the proof is self-contained, the Gaussian integration steps are standard and correctly executed, and the extension by density/continuity is valid. The algebra in Eqs. (12)-(13) is correct. The lemma is properly cited and the paper gives a useful probabilistic reading in Remark 1. No circularity: the proof does not rely on the restricted earlier derivation. The references are appropriate, including the author's own hafnian master theorem, which is legitimately the template.\n\nSoft spots are minor. The proof starts by assuming S is diagonalizable and invertible with a symmetric square root; the existence of such a root is not proved or cited. It does exist (a polynomial in S can interpolate a square root on the spectrum), so this is a harmless omission. The text says 'any of its square roots, which is also symmetric,' which is slightly careless—not every square root is symmetric—but the proof only needs one, and existence is enough. The analytic continuation step is stated briefly but is standard: both sides are continuous in S and v for small z near the origin, and the derivatives at z=0 pass to the limit. These are wording issues, not mathematical gaps. The odd-dimensional case is handled by a padding trick in Remark 2, which is fine.\n\nWho is this for? Anyone implementing loop hafnian algorithms or GBS simulations who wants a rigorous justification for using the generating function beyond the quantum covariance class. The note is short and clearly written. It deserves a serious referee; the referee's job would be to tighten the square-root wording and the continuity argument, not to doubt the core. I'd bring it to the reading group, and I'd cite it if I were writing on Gaussian boson sampling. Recommend peer review.","headline":"A short, clean proof that removes a known restriction on the loop hafnian generating function; worth a serious referee but not a paradigm shift.","tokens_in":6989,"tokens_out":1618,"would_cite":true,"duration_ms":17881,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":["15A15","05A15"],"pacs":[],"model":"deepseek-v4-flash","headline":"For every symmetric complex matrix, the loop hafnian generating function previously tied to quantum Gaussian states follows from Gaussian integration alone.","keywords":["loop hafnian","generating function","symmetric complex matrix","Gaussian integration","hafnian master theorem","quantum Gaussian states","matrix moments"],"falsifier":"Take the $2\\times 2$ non-diagonalizable complex symmetric matrix $S=\\begin{pmatrix} i & 1\\\\ 1 & -i\\end{pmatrix}$, a generic vector $v$, and expand the left side of Eq. (4) through degree two in $z_1$; compute the corresponding loop hafnians of the extended matrix directly from Definition 2.2. A mismatch between the two coefficient lists would refute the theorem, while agreement at this singular example would support the extension beyond the density argument.","tokens_in":6049,"feed_emoji":"🧮","tokens_out":10607,"duration_ms":107953,"temperature":0.7,"pith_summary":"Loop hafnians are polynomial sums over pairings and singletons of a symmetric matrix's entries; they appear in counting and quantum-optics problems and are hard to compute in general. This paper proves that the exponential expression in Eq. (4) is their generating function for any even-size symmetric complex matrix and any complex vector, not just for matrices descending from quantum Gaussian states. The earlier restricted version came from photon-number probability sums; the proof here is Gaussian integration plus a derivative identity. If the theorem is right, the formula can be used broadly in simulations and combinatorial calculations without checking quantum-state symmetries.","feed_headline":"Loop hafnian formula proven for all symmetric matrices","feed_subtitle":"A quantum-optics identity formerly tied to Gaussian states now follows from Gaussian integration alone.","key_machinery":"The load-bearing machinery is the shifted Gaussian-integral representation $$g(x)=\\exp\\left(\\tfrac{1}{2}$x^{{T}}$Sx+$v^{{T}}$x\\right)=\\exp\\left(-\\tfrac{1}{2}$v^{{T}}$$S^{{-1}}$v\\right)(2\\pi)^{-m}\\int_{\\mathbb{R}^{2m}}\\exp\\left(-\\tfrac{1}{2}\\$xi^{{T}}$\\xi+$v^{{T}}$$S^{{-1/2}}$\\xi+$x^{{T}}$$S^{{1/2}}$\\xi\\right)$d^{{2m}}$\\xi,$$ combined with the derivative lemma (Eq. (5)) that expresses every loop hafnian as mixed derivatives of $g$ at $x=0$. Inserting the block counter-diagonal matrix $Z=\\begin{pmatrix}0&\\operatorname{diag}\\{z_j\\}\\\\ \\operatorname{diag}\\{z_j\\}&0\\end{pmatrix}$ converts those derivatives into derivatives with respect to generating variables $z_j$, so the whole expression becomes an evaluable Gaussian integral. Continuity of both sides near $z=0$ then carries the identity from invertible diagonalizable $S$ to all symmetric $2m\\times 2m$ matrices.","core_discovery":"The central claim is the loop hafnian master theorem, Eq. (4): for every symmetric $2m\\times 2m$ complex matrix $S=S^{T}$ and every $2m$-dimensional complex vector $v$, with $Z=\\begin{pmatrix}0&\\operatorname{diag}\\{z_j\\}\\\\ \\operatorname{diag}\\{z_j\\}&0\\end{pmatrix}$, the identity $$\\frac{\\exp\\left(\\frac{1}{2}$v^{{T}}$(1-ZS)^{-1}Zv\\right)}{\\sqrt{\\det(1-ZS)}}=\\sum_{\\{n_j\\}}\\operatorname{lhaf}\\left(\\tilde{S}_{\\{n_j\\},\\{n_j\\}};\\tilde{v}_{\\{n_j\\},\\{n_j\\}}\\right)\\prod_{j=1}^{m}\\frac{$z_j^{{n_j}}$}{n_j!}$$ holds as an exponential generating function in the variables $z_j$. The earlier quantum-optical derivation was limited to matrices with the block symmetries of Gaussian-state covariance matrices; here that restriction is shown to be unnecessary. The proof replaces the quantum specificity by a shifted Gaussian integral and ends with a continuity argument that reaches every symmetric even-size complex matrix.","pith_inferences":["Inference: Because the coefficients are polynomial in $S$ and $v$, Eq. (4) should hold as an identity of formal power series with no convergence or positivity hypotheses; the paper's analytic proof and continuity extension suggest but do not formulate this.","Inference: A numerical check on a non-diagonalizable symmetric matrix such as $S=\\begin{pmatrix} i&1\\\\ 1&-i\\end{pmatrix}$ would isolate whether the continuity extension is doing the work; the paper does not perform such a check.","Inference: The derivative machinery connecting loop hafnians to Gaussian exponentials could be reused to derive recurrences for fast loop-hafnian evaluation, though no algorithm is proposed here."],"forward_implications":["Any use of the generating function in algorithms that simulate lossy or partially distinguishable optical circuits is now justified for arbitrary symmetric matrices, removing the need to verify Gaussian-state block symmetries or to treat the formula as a numerically supported assumption.","Loop hafnians of odd-size matrices are covered by the same generating function through the relation $\\operatorname{lhaf} S_{2n-1}=\\operatorname{lhaf}$ of the block matrix with a leading 1.","For real positive definite $S$, the loop hafnian $\\operatorname{lhaf}(S,v)$ equals the joint non-centered moment $\\mathbb{E}[X_1\\cdots X_\\mu]$ of Gaussian variables with covariance $S$ and mean $v$.","Both sides of Eq. (4) depend continuously on the entries of $S$ and $v$ near $z=0$, so coefficient extraction remains well-defined even for singular or non-diagonalizable matrices."],"supporting_citations":[{"why":"introduced the loop-hafnian generating function in a quantum-optical setting for restricted covariance matrices; the paper proves its unrestricted validity.","marker":"[1]"},{"why":"supplies the derivative lemma identifying loop hafnians with mixed derivatives of the Gaussian exponential, which anchors the proof.","marker":"[3]"},{"why":"gives the multivariate Faa di Bruno formula used to evaluate the derivatives and obtain the combinatorial loop-hafnian sum.","marker":"[6]"},{"why":"provides the hafnian master theorem whose Gaussian-integration proof is adapted here to include the linear shift $v^T x$.","marker":"[7]"}],"fun_headline_variants":["Pure Gaussian integration extends loop hafnian formula to all symmetric matrices","Loop hafnian identity now free from quantum-optical restrictions","No quantum states needed: loop hafnian generating function for all symmetric matrices","Gaussian integration proves loop hafnian formula for any symmetric matrix","All symmetric matrices: loop hafnian generating function proof"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The proof writes down the Gaussian integral under the assumption that $S$ is invertible and diagonalizable with a symmetric square root; the step from there to every symmetric matrix relies on continuity of both sides near $z=0$.","fun_headline_variants_meta":{"raw":{"variants":["Pure Gaussian integration extends loop hafnian formula to all symmetric matrices","Loop hafnian identity now free from quantum-optical restrictions","No quantum states needed: loop hafnian generating function for all symmetric matrices","Gaussian integration proves loop hafnian formula for any symmetric matrix","All symmetric matrices: loop hafnian generating function proof"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000913,"raw_usage":{"total_tokens":3859,"prompt_tokens":823,"completion_tokens":3036,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":439,"completion_tokens_details":{"reasoning_tokens":2946}},"tokens_in":439,"tokens_out":3036,"duration_ms":22334,"temperature":1.0,"reasoning_tokens":2946,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-06T15:18:34.674400+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Take the $2\\times 2$ non-diagonalizable complex symmetric matrix $S=\\begin{pmatrix} i & 1\\\\ 1 & -i\\end{pmatrix}$, a generic vector $v$, and expand the left side of Eq. (4) through degree two in $z_1$; compute the corresponding loop hafnians of the extended matrix directly from Definition 2.2. A mismatch between the two coefficient lists would refute the theorem, while agreement at this singular example would support the extension beyond the density argument.","supporting_citations":[{"cited_title":"Simulating lossy and partially distinguishable quantum optical circuits: theory, algorithms and applications to experiment validation and state preparation","cited_arxiv_id":"2412.17742","evidence_quote":"introduced the loop-hafnian generating function in a quantum-optical setting for restricted covariance matrices; the paper proves its unrestricted validity."},{"cited_title":"Quesada, L","cited_arxiv_id":null,"evidence_quote":"supplies the derivative lemma identifying loop hafnians with mixed derivatives of the Gaussian exponential, which anchors the proof."},{"cited_title":"Combinatorics of Partial Derivatives","cited_arxiv_id":"math/0601149","evidence_quote":"gives the multivariate Faa di Bruno formula used to evaluate the derivatives and obtain the combinatorial loop-hafnian sum."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"provides the hafnian master theorem whose Gaussian-integration proof is adapted here to include the linear shift $v^T x$."}],"review_version":1}