IntegrateUnitary.jl: A Julia package for symbolic integration over Haar measures
Pith reviewed 2026-06-30 15:55 UTC · model grok-4.3
The pith
A new Julia package computes exact symbolic integrals of polynomials over Haar measures on compact groups.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The package supplies a fully open-source realization of Weingarten calculus and Wick contractions that handles symbolic-d entry-wise and trace-polynomial integrals over U(d), O(d), Sp(d), SU(d) for balanced polynomials, circular and Gaussian ensembles, Ginibre ensembles, permutation groups, random pure states, and unitary t-designs, using the Murnaghan-Nakayama rule and symplectic-orthogonal duality together with a high-level trace interface and an ITensors.jl bridge.
What carries the argument
Weingarten calculus realized via the Murnaghan-Nakayama rule and symplectic-orthogonal duality, which reconstructs integration graphs from index-free expressions and performs the required contractions over the Haar measure.
Load-bearing premise
The concrete implementation of the Murnaghan-Nakayama rule, symplectic-orthogonal duality, and Wick contractions inside the package correctly reproduces the known integrals for all claimed groups, ensembles, and polynomial degrees.
What would settle it
Evaluating a standard integral such as the expectation of |tr(U)|^4 over U(d) for symbolic d and obtaining a result that differs from the established closed-form expression would show the implementation does not match known results.
Figures
read the original abstract
Symbolic integration over the Haar measure of compact groups is a computational cornerstone in quantum information science and random matrix theory. We present \texttt{IntegrateUnitary.jl}, a comprehensive Julia package for computing exact expectations of polynomial functions over a wide range of compact groups ($U(d)$, $O(d)$, $Sp(d)$, and $SU(d)$ for balanced polynomials), circular and Gaussian ensembles, Ginibre ensembles, permutation groups, random pure states, and unitary $t$-designs. The package provides a fully open-source implementation of the Weingarten calculus and Wick contractions with broad symbolic-$d$ support for entry-wise and trace-polynomial integrals, while selected workflows currently require concrete integer dimensions (including higher pure trace moments $|\mathrm{tr}(U)|^{2k}$ for $k > 1$ and HCIZ with \texttt{SymbolicMatrix} inputs, and direct matrix-valued integration of \texttt{SymbolicMatrix}/\texttt{SymbolicMatrixProduct} expressions), automatic asymptotic expansions, a high-level symbolic trace interface that reconstructs Weingarten graphs from index-free expressions, and a bridge to \texttt{ITensors.jl} for tensor network averaging. We discuss the underlying algorithms, including the Murnaghan-Nakayama rule and symplectic-orthogonal duality, and demonstrate that the package efficiently handles high-degree moments and quantum information metrics.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents IntegrateUnitary.jl, a Julia package implementing symbolic integration over Haar measures for compact groups (U(d), O(d), Sp(d), SU(d)) and ensembles (circular, Gaussian, Ginibre, permutation, random pure states, unitary t-designs). It realizes Weingarten calculus and Wick contractions with symbolic-d support for entry-wise and trace-polynomial integrals, includes the Murnaghan-Nakayama rule and symplectic-orthogonal duality, offers a high-level trace interface, automatic asymptotics, and an ITensors.jl bridge, while noting that some workflows require concrete integer dimensions.
Significance. If the implementation is verified correct, the package would supply a valuable open-source tool automating previously manual Weingarten and Wick calculations across a wide range of groups and polynomial degrees, with symbolic-d support and tensor-network integration; this directly addresses computational needs in quantum information and random matrix theory. The work ships reproducible code as a public Julia package implementing published algorithms, which is a concrete strength.
major comments (1)
- [Abstract] Abstract and manuscript body: the central claim that the package supplies a 'correct' implementation of Weingarten calculus, Wick contractions, Murnaghan-Nakayama rule, and symplectic-orthogonal duality for all listed groups, ensembles, and polynomial degrees is load-bearing, yet the text supplies no explicit verification examples (e.g., side-by-side comparison against known closed-form values of the Weingarten function for small partitions or the integral ∫|tr(U)|^{2k} dμ for k>1).
Simulated Author's Rebuttal
We thank the referee for their careful review and constructive feedback. We address the major comment below and will revise the manuscript to incorporate explicit verification examples as suggested.
read point-by-point responses
-
Referee: [Abstract] Abstract and manuscript body: the central claim that the package supplies a 'correct' implementation of Weingarten calculus, Wick contractions, Murnaghan-Nakayama rule, and symplectic-orthogonal duality for all listed groups, ensembles, and polynomial degrees is load-bearing, yet the text supplies no explicit verification examples (e.g., side-by-side comparison against known closed-form values of the Weingarten function for small partitions or the integral ∫|tr(U)|^{2k} dμ for k>1).
Authors: We agree that the absence of explicit verification examples weakens the manuscript's support for the central correctness claims. In the revised version we will add a new subsection (likely in Section 3 or 4) containing side-by-side comparisons. These will include: (i) Weingarten function values Wg(λ,d) for small partitions such as λ=(2), (1,1), (3), (2,1) against the closed-form expressions tabulated in the literature (e.g., Collins et al.); (ii) explicit symbolic results for ∫|tr(U)|^{2k} dμ for k=2 and k=3 together with the corresponding known formulas or numerical cross-checks; and (iii) brief checks for the Murnaghan-Nakayama rule and symplectic-orthogonal duality on low-degree cases. The examples will be presented both symbolically and, where feasible, with concrete integer d to allow direct numerical verification. This addition directly substantiates the implementation claims without altering the package itself. revision: yes
Circularity Check
No circularity: paper describes software implementation of prior algorithms
full rationale
The manuscript is a software paper presenting IntegrateUnitary.jl. It implements Weingarten calculus, Wick contractions, Murnaghan-Nakayama rule, and symplectic-orthogonal duality for Haar integrals over listed groups and ensembles. No new mathematical derivation or prediction is offered; the text discusses high-level interfaces and algorithms drawn from existing literature. No self-definitional steps, fitted inputs renamed as predictions, or load-bearing self-citations that reduce the central claim to its own inputs appear. The package's correctness is an implementation detail outside the scope of derivation circularity analysis.
Axiom & Free-Parameter Ledger
Reference graph
Works this paper leans on
-
[1]
Sylvester’s identity and multistep integer-preserving Gaussian elimination.Math. Comp.22, 103 (1968), 565–578. https: //doi.org/10.1090/S0025-5718-1968-0226829-0 Ingemar Bengtsson and Karol Życzkowski. 2017.Geometry of quantum states: an introduction to quantum entanglement(2 ed.). Cambridge University Press. Jeff Bezanson, Alan Edelman, Stefan Karpinski,...
-
[2]
Julia: A fresh approach to numerical computing.SIAM review59, 1 (2017), 65–98. https://doi.org/10.1137/141000671 Fernando GSL Brandao, Aram W Harrow, and Michał Horodecki
-
[3]
https://doi.org/10.1007/s00220-016-2706-8 Yanic Cardin, Hubert de Guise, and Nicolás Quesada
Local random quantum circuits are approximate polynomial-designs.Communica- tions in Mathematical Physics346, 2 (2016), 397–434. https://doi.org/10.1007/s00220-016-2706-8 Yanic Cardin, Hubert de Guise, and Nicolás Quesada
-
[4]
International Mathematics Research Notices2003, 17 (2003), 953–982
Moments and cumulants of polynomial random variables on unitary groups, the Itzykson-Zuber integral, and free probability. International Mathematics Research Notices2003, 17 (2003), 953–982. https://doi.org/10.1155/S107379280320917X Benoît Collins and Piotr Śniady
-
[5]
Integration with respect to the Haar measure on unitary, orthogonal and symplectic groups.Communications in Mathematical Physics264, 3 (2006), 773–795. https://doi.org/10.1007/s00220-006-1554-3 Christoph Dankert, Richard Cleve, Joseph Emerson, and Etera Livine
-
[6]
Exact and approximate unitary 2-designs and their application to fidelity estimation.Physical Review A80, 1 (2009), 012304. https://doi.org/10.1103/PhysRevA.80.012304 Manuscript submitted to ACM 26 Pawela and Puchała Alan Edelman, Tomás A Arias, and Steven T Smith
-
[7]
https://doi.org/10.1137/S089547989833276X Matthew Fishman, Steven R
The geometry of algorithms with orthogonality constraints.SIAM journal on Matrix Analysis and Applications20, 2 (1998), 303–353. https://doi.org/10.1137/S089547989833276X Matthew Fishman, Steven R. White, and E. Miles Stoudenmire
-
[8]
Codebases(2022),
The ITensor Software Library for Tensor Network Calculations.SciPost Phys. Codebases(2022),
2022
-
[9]
https://doi.org/10.21468/SciPostPhysCodeb.4 Peter J Forrester. 2010.Log-Gases and Random Matrices (LMS-34). Princeton University Press. Motohisa Fukuda, Robert König, and Ion Nechita
-
[10]
https://doi.org/10.1088/1751-8121/ab434b Jean Ginibre
RTNI—A symbolic integrator for Haar-random tensor networks.Journal of Physics A: Mathematical and Theoretical52, 42 (2019), 425303. https://doi.org/10.1088/1751-8121/ab434b Jean Ginibre
-
[11]
Statistical ensembles of complex, quaternion, and real matrices.J. Math. Phys.6, 3 (1965), 440–449. https://doi.org/10.1063/1.1704292 Shashi Gowda, Yingbo Ma, Alessandro Cheli, Maja Gwóźzdź, Viral B. Shah, Alan Edelman, and Christopher Rackauckas
-
[12]
https://doi.org/10.1145/3511528.3511535 David Gross, Koenraad Audenaert, and Jens Eisert
High-Performance Symbolic-Numerics via Multiple Dispatch.ACM Communications in Computer Algebra55, 3 (2022), 92–96. https://doi.org/10.1145/3511528.3511535 David Gross, Koenraad Audenaert, and Jens Eisert
-
[13]
Evenly distributed unitaries: On the structure of unitary designs.J. Math. Phys.48, 5 (2007), 052104. https://doi.org/10.1063/1.2716992 Harish-Chandra
-
[14]
https://doi.org/10.2307/ 2372786 Claude Itzykson and Jean-Bernard Zuber
Spherical Functions on a Semisimple Lie Group, I.American Journal of Mathematics80, 2 (1958), 241–310. https://doi.org/10.2307/ 2372786 Claude Itzykson and Jean-Bernard Zuber
1958
-
[15]
The planar approximation. II.J. Math. Phys.21, 3 (1980), 411–421. https://doi.org/10.1063/1.524438 Giacomo Livan, Marcel Novaes, and Pierpaolo Vivo. 2018.Introduction to Random Matrices: Theory and Practice. SpringerBriefs in Mathematical Physics, Vol
-
[16]
https://doi.org/10.1007/978-3-319-70885-0 Madan Lal Mehta
Springer. https://doi.org/10.1007/978-3-319-70885-0 Madan Lal Mehta. 2004.Random matrices. Elsevier. Michael A Nielsen and Isaac L Chuang. 2010.Quantum computation and quantum information. Cambridge University Press. Don N Page
-
[17]
https://doi.org/10.1103/PhysRevLett.71.1291 Zbigniew Puchała and Jarosław Adam Miszczak
Average entropy of a subsystem.Physical Review Letters71, 9 (1993), 1291–1294. https://doi.org/10.1103/PhysRevLett.71.1291 Zbigniew Puchała and Jarosław Adam Miszczak
-
[18]
https://doi.org/10.1515/bpasts-2017-0003 John Watrous
Symbolic integration with respect to the Haar measure on the unitary group.Bulletin of the Polish Academy of Sciences: Technical Sciences65, 1 (2017), 21–27. https://doi.org/10.1515/bpasts-2017-0003 John Watrous. 2018.The theory of quantum information. Cambridge University Press. Don Weingarten
-
[19]
Asymptotic behavior of group integrals in the limit of infinite rank.J. Math. Phys.19, 5 (1978), 999–1001. https://doi.org/10.1063/ 1.523807 Gian Carlo Wick
1978
-
[20]
https://doi.org/10.1103/PhysRev.80.268 Karol Życzkowski and Hans-Jürgen Sommers
The evaluation of the collision matrix.Physical Review80, 2 (1950), 268–272. https://doi.org/10.1103/PhysRev.80.268 Karol Życzkowski and Hans-Jürgen Sommers
-
[21]
https://doi.org/10.1088/0305-4470/34/35/335 Manuscript submitted to ACM
Induced measures in the space of mixed quantum states.Journal of Physics A: Mathematical and General34, 35 (2001), 7111–7125. https://doi.org/10.1088/0305-4470/34/35/335 Manuscript submitted to ACM
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.