QRecoupling.jl: numerical and exact computation of classical and quantum recoupling coefficients
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Computer Science. The day in computer science: software, systems and theory on arXiv.
Tom: We're looking at the paper: "QRecoupling.jl: numerical and exact computation of classical and quantum recoupling coefficients".
Jane: Here's the gist of the paper. QRecoupling.jl is a Julia package for numerical, exact and symbolic evaluation of classical and quantum recoupling coefficients and generic finite sums of quantum factorials The package covers Clebsch–Gordan coefficients, 3j and 6j symbols and user-defined sums in the classical limit, at principal unitary levels, and at real or complex deformation Core Problem Addressed The problem addressed is the direct evaluation of recoupling coefficients and related finite sums of factorial products which can overflow or lose accuracy through cancellation These quantities are difficult to evaluate reliably and exactly because their terms can exceed the sum by many orders of magnitude, leading to potential loss of accuracy in floating-point addition Furthermore, quantum factorials at a root of unity introduce a third difficulty because individual factors vanish there and common factors must be cancelled before the formula is specialized Solution Methodology The solution involves using a compact factorial rule that supports classical values, unitary levels, real or complex deformation, and deferred symbolic expressions Numerical kernels employ scaling and compensated arithmetic with adaptive precision to handle large cancellation by repeating evaluation in more accurate arithmetic only when an error estimate is too large Exact values utilize integer arithmetic at q = 1 and real cyclotomic coordinates with explicit radicals at a level Mathematical Framework The package builds on the deferred cyclotomic framework which stores every term of a sum through its cyclotomic exponents The factorial rule is the main mathematical object, determined by four triangle sums and three quadrangle sums for the quantum 6j symbol Prime factorization underlies exact classical evaluation in WIGXJPF and WignerSymbols.jl The exponents of a product R are given by Ed(R) = Xa ca⌊na/d⌋, where the power P(R) of q is read from (17) Performance and Accuracy The package demonstrates high performance, achieving speeds comparable to WIGXJPF at the smallest spins and about 6 and 10 times faster at spin cutoff 500 Under real, root-of-unity and complex deformation, the largest relative error measured against independent high-precision references is 3.5 × 10−14 for spins up to 400 The adaptive evaluation of Algorithm 2 keeps the largest relative error at εrel = 3.4 × 10−14 and preserves nonzero values down to 1.4 × 10−20 for a level-k evaluator User Interface and Targets The user interface allows specification of integer or half-integer spin labels and an evaluation target which dictates the arithmetic but not the convention of the coefficient The targets include Classical, Exact, Level(k), Float64 (at q = e iπ/(k+2)), Exact(k), P(x) R(x) with x = q + q-1, and Generic expression Symbolic Coefficient Representation Coupling and recoupling coefficients are stored as a compact factorial rule to which quantum coupling coefficients add powers of q The 6j symbol is the main worked example, with numerical, exact and symbolic evaluation from the same rule The Racah formula is determined by N 2 = Q4 i=1 Q3 r=1
βr − αi: !
Tom: Q4 i=1
αi + 1: !, which is applied with R0 = N 2, η = 1/2, σ = 1 and ε = 1 Recurrence Relations Coupling coefficients satisfy analogous recurrences in a magnetic label and in the coupled spin For a single 6j symbol it is the stage of Algorithm 2 that follows the two passes, and it is declined when the entry is too small relative to the largest in its column The package uses the recurrence in two ways for a whole fusion matrix (fmatrix) as its primary route Exact Arithmetic and Zero Decisions Exact arithmetic is used only when floating-point evaluation with an error estimate cannot decide The zero query, the exact output and the numerical output agree on every one of the 40754 ordered admissible 6j inputs at levels 1–10 A zero residue proves nothing, because a nonzero value can map to zero modulo the chosen prime Future Work The nearest extension is to higher 3nj symbols, as they can be written as sums of products of 6j symbols The practical next step is to extend the error estimates and exact checks to complete state sums and tensornetwork calculations The study of geometric observables across scales of spin and deformation is another complementary application Software Availability QRecoupling.jl is distributed under the MIT license and requires Julia 1.10 or later Source and issue tracking are at https://github.com/sethkasante/QRecoupling.jl The documentation is at https://sethkasante.github.io/QRecoupling.jl The article describes version 0.5.1, archived at doi:10.5281/zenodo.
Paper summary: Jane: Looking at the overall picture of "QRecoupling.jl: numerical and exact computation of classical and quantum recoupling coefficients," this package seems to be a very comprehensive tool for people working in quantum information or high-energy physics who need these specific mathematical coefficients.
Tom: The authors are basically showing that you don't have to switch between different tools for classical versus quantum recoupling anymore; they’ve unified the interface across those classical limits, principal unitary levels, and real or complex deformation.
Lu: What this means is that instead of having separate methods for 3j and 6j symbols based on whether you are dealing with a simple classical case or a more complex deformed quantum case, you can use this single rule to handle it all <ref:2610.24074#pg1>. It simplifies the mathematical structure significantly by exposing the cancellation patterns through that compact factorial rule.
Meng: From an engineering standpoint, if this package provides high-speed classical evaluation at spin cutoff five hundred while maintaining extremely low relative errors under complex deformation, that's valuable because it means we can get faster approximate values for simulation runs without sacrificing too much precision <ref:2610.24074#pg1>.
Lalam: The implication is that these coefficients, which are central to things like topological quantum field theories and tensor-network algorithms, become much more accessible when you have a reliable way to compute them exactly or with very high certainty.
Jane: It boils down to making these complex calculations practical by giving researchers a robust tool that handles the arithmetic challenges inherent in those sums of quantum factorials without losing accuracy at the precision levels they need.
Conclusion: Tom: So, we’ve been talking about this QRecoupling package that handles those tough recoupling coefficients for classical and quantum systems, right?
Jane: Yeah, it’s a Julia package that lets you calculate things like 6j symbols or 3j symbols exactly <ref:2610.24074#pg1>. The main thing here is dealing with those sums of quantum factorials which usually cause problems because the numbers get way too big or lose their precision.
Lu: The authors are using a compact factorial rule, which they build from some triangle and quadrangle sums to handle everything from classical values to complex deformations. It’s essentially a unified mathematical object for these coefficients.
Meng: From an engineering side, the paper shows they’ve done this fast enough. They hit speeds comparable to other specialized tools at small spins, and about six or ten times faster at spin cutoff five hundred. That’s good for production runs if you need decent speed while keeping things precise.
Lalam: I see the authors are using a very clever arithmetic trick—scaling and compensated arithmetic—to manage those huge cancellations without losing accuracy. They get really tight error estimates, down to about three point five times ten to the negative fourteen for spins up to four hundred when they test it against other high-precision references.
Jane: That level of precision is pretty impressive because when you’re dealing with these kinds of sums, you usually have to choose between speed and accuracy. The paper shows they managed to get both without needing super slow computation.
Tom: It sounds like the core idea is taking a hard-to-calculate quantum problem and making it solvable numerically or exactly across a huge range of conditions, from simple classical physics up into complex quantum territory.
Lu: And the authors are demonstrating that this unified approach works across real numbers, root of unity situations, and even complex deformations. That’s a broad scope for one method to cover so well.
Meng: But I gotta ask about the scaling. How much more memory or time does this compact rule take compared to just using a standard software package we already have? That’s where I get cautious about deploying something new at scale.
Jane: That’s a fair question, Meng, but what they really are showing is that the accuracy gain justifies the complexity of the method they used to pack it all into that rule in the first place.
Tom: Exactly. The title itself says "numerical and exact computation." It’s not just one or the other; it’s a system designed to handle both, which is what makes it so useful for different parts of physics research.
Lu: And for those who want to explore the deeper math, they laid out how the 6j symbol comes from four triangle sums and three quadrangle sums <ref:2610.24074#pg1>. It gives you a clear path on how the structure of these coefficients is built up.
Jane: So, to wrap up, this package gives researchers a single mathematical framework to tackle those tricky recoupling coefficients that usually cause arithmetic headaches and precision issues.
Tom: Right. It’s about making those difficult sums manageable without sacrificing the exact results you need for serious scientific work. This opens up new ways to study quantum interactions across different scales of spin and deformation, which is where we’ll look next.
Seth K. Asante
University of New Brunswick
cs.MS, gr-qc, math-ph, math.MP, physics.comp-ph
Submitted: 2026-10-16
Updated: 2026-11-09
Comments: 21 pages, 4 figures, 5 tables. Software: https://github.com/sethkasante/QRecoupling.jl (v0.6.4, doi:10.5281/zenodo.24027544)
Code: https://github.com/Jutho/W
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 83/100
The gist: QRecoupling.jl is a Julia package for numerical, exact and symbolic evaluation of classical and quantum recoupling coefficients and generic finite sums of quantum factorials The package covers…
Key concepts
- Recoupling Coefficients
- These are mathematical quantities that describe how different ways of coupling angular momenta (spins) relate to each other. They are crucial in quantum mechanics for describing interactions between particles. The package computes these coefficients exactly, even when dealing with complex or deformed systems.
- Factorial Rule
- This is the core mathematical object used by the package to represent and evaluate recoupling coefficients. It's a compact formula that handles classical values, unitary levels, and deformations. By using this rule, the package can manage terms that might otherwise overflow or cause cancellation errors in standard floating-point math.
- Deferred Cyclotomic Framework
- This framework stores every term of a sum using its cyclotomic exponents. This allows the package to keep track of all necessary components for exact evaluation. It is fundamental for handling the structure of sums involving quantum factorials, ensuring that common factors are correctly managed before specialization.
- Adaptive Evaluation
- This numerical technique involves scaling and using compensated arithmetic with precision that adjusts based on error estimates. When a calculation is too uncertain, it re-evaluates in higher precision. This method helps the package maintain extremely high accuracy, even when dealing with very small numbers or complex cancellations.
Terminology
Summary
QRecoupling. p. 0jl is a Julia package for numerical, exact and symbolic evaluation of classical and quantum recoupling coefficients and generic finite sums of quantum factorials The package covers Clebsch–Gordan coefficients, 3j and 6j symbols and user-defined sums in the classical limit, at principal unitary levels, and at real or complex deformation
Core Problem Addressed
The problem addressed is the direct evaluation of recoupling coefficients and related finite sums of factorial products which can overflow or lose accuracy through cancellation These quantities are difficult to evaluate reliably and exactly because their terms can exceed the sum by many orders of magnitude, leading to potential loss of accuracy in floating-point addition Furthermore, quantum factorials at a root of unity introduce a third difficulty because individual factors vanish there and common factors must be cancelled before the formula is specialized
Solution Methodology
The solution involves using a compact factorial rule that supports classical values, unitary levels, real or complex deformation, and deferred symbolic expressions Numerical kernels employ scaling and compensated arithmetic with adaptive precision to handle large cancellation by repeating evaluation in more accurate arithmetic only when an error estimate is too large Exact values utilize integer arithmetic at q = 1 and real cyclotomic coordinates with explicit radicals at a level
Mathematical Framework
The package builds on the deferred cyclotomic framework which stores every term of a sum through its cyclotomic exponents The factorial rule is the main mathematical object, determined by four triangle sums and three quadrangle sums for the quantum 6j symbol Prime factorization underlies exact classical evaluation in WIGXJPF and WignerSymbols.jl The exponents of a product R are given by Ed(R) = Xa ca⌊na/d⌋, where the power P(R) of q is read from (17)
Performance and Accuracy
The package demonstrates high performance, achieving speeds comparable to WIGXJPF at the smallest spins and about 6 and 10 times faster at spin cutoff 500 Under real, root-of-unity and complex deformation, the largest relative error measured against independent high-precision references is 3.5 × 10−14 for spins up to 400 The adaptive evaluation of Algorithm 2 keeps the largest relative error at εrel = 3. p. 74 × 10−14 and preserves nonzero values down to 1. p. 74 × 10−20 for a level-k evaluator
User Interface and Targets
The user interface allows specification of integer or half-integer spin labels and an evaluation target which dictates the arithmetic but not the convention of the coefficient The targets include Classical, Exact, Level(k), Float64 (at q = e iπ/(k+2)), Exact(k), P(x) R(x) with x = q + q-1, and Generic expression Symbolic
Coefficient Representation
Coupling and recoupling coefficients are stored as a compact factorial rule to which quantum coupling coefficients add powers of q The 6j symbol is the main worked example, with numerical, exact and symbolic evaluation from the same rule The Racah formula is determined by N 2 = Q4 i=1 Q3 r=1[βr − αi]! Q4 i=1[αi + 1]! p. 3, which is applied with R0 = N 2, η = 1/2, σ = 1 and ε = 1
Recurrence Relations
Coupling coefficients satisfy analogous recurrences in a magnetic label and in the coupled spin For a single 6j symbol it is the stage of Algorithm 2 that follows the two passes, and it is declined when the entry is too small relative to the largest in its column The package uses the recurrence in two ways for a whole fusion matrix (fmatrix) as its primary route
Exact Arithmetic and Zero Decisions
Exact arithmetic is used only when floating-point evaluation with an error estimate cannot decide The zero query, the exact output and the numerical output agree on every one of the 40754 ordered admissible 6j inputs at levels 1–10 A zero residue proves nothing, because a nonzero value can map to zero modulo the chosen prime
Future Work
The nearest extension is to higher 3nj symbols, as they can be written as sums of products of 6j symbols The practical next step is to extend the error estimates and exact checks to complete state sums and tensornetwork calculations The study of geometric observables across scales of spin and deformation is another complementary application
Software Availability
QRecoupling.jl is distributed under the MIT license and requires Julia 1. p. 010 or later Source and issue tracking are at https://github. p. 1com/sethkasante/QRecoupling. p. 1jl The documentation is at https://sethkasante. p. 1github.io/QRecoupling. p. 0jl The article describes version 0. p. 15.1, archived at doi:10.5281/zenodo.
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Adaptive numerical evaluation for sums can be implemented by using
scaling, compensated arithmetic and adaptive precision
to control range and cancellation, as described in Section 5. -
Exact zero decisions can be made by first testing
structural identities
such asequal terms with opposite signs cancel in pairs
or alevel-reflection identity,
before resorting to evaluation in a finite field. -
The system can compute exact values at a level using the coordinate x = q + q-1, where
[n] is Un−1(x/2), and the result takes the form v = P(xh) / R(xh), where P, R are polynomials in x.
Sources
- 6j symbols for U_q(sl_2) and non-Euclidean tetrahedra
- Deferred Cyclotomic Representation for Stable and Exact Evaluation of q-Hypergeometric Series
- Leonard pairs and the q-Racah polynomials
Related papers
- asdex: Automatic Sparse Differentiation in JAX
- Lord of the Precision, the Two Floats: Double-Word Arithmetic for Complex Numbers
- Streaming Right Multiplication over Grammar-Compressed Matrices: A Memory-Bounded GPU Engine for Genotype and Graph Data
- Improved Scaling for Fast Mode of Ozaki Scheme II
- BF16 Component-Product Emulation of FP32 and FP64 GEMM on Intel AMX
- Finite-Dimensional Type I von Neumann Algebras in PyTorch: A GPU-Accelerated Framework for Random Block-Diagonal Operators