QRecoupling.jl
Quantum recoupling, from fast numerical coefficients to readable exact formulas.
QRecoupling evaluates classical and quantum Clebsch–Gordan coefficients, 3j and 6j symbols, fusion and braiding data, and finite sums of symmetric q-factorials. Use the same labels at the classical limit, at a root of unity, or at a real or complex deformation parameter. Retain exact level values or generic formulas in quantum integers, and request polynomial or radical views when needed.
The package supplies local coefficients and change-of-basis matrices for angular-momentum calculations, spin networks, Turaev–Viro models, and fusion-based tensor networks. It does not assemble a triangulation or contract a complete tensor network for you.
Nemo is optional. Numerical calculations, exact level values, zero and equality tests, and unweighted level arithmetic work without it. Install and load Nemo for nested radicals and expanded polynomials.
Start with one symbol
using QRecoupling
classical_value = q6j(1, 1, 1, 1, 1, 1)
level = q6j(Level(10), 1, 1, 1, 1, 1, 1)
exact = q6j(Exact(10), 1, 1, 1, 1, 1, 1)
exact([5] − 1)/[4]! (k = 10)An exact value is written in quantum integers [n], from the formula itself. With Nemo loaded, radical(exact) gives (2√3 − 3)/3.
using Nemo # optional polynomial backend
symbolic = q6j(Symbolic(), 1, 1, 1, 1, 1, 1)
xform(symbolic)(x² − 3)/(x⁴ − 3x² + 2) (x = q + q⁻¹)Symbolic() writes the formula in quantum integers without carrying out its sum, and xform(symbolic) explicitly expands it in x, which needs Nemo.
Choose the calculation
| Task | Interface | Result |
|---|---|---|
| Classical angular momentum | q6j(js...) | Numerical q = 1 value |
| Exact classical value | q6j(Exact(), js...) | A sign and a rational under a root |
| Root of unity | q6j(Level(k), js...) | Numerical q = exp(iπ/(k+2)) value |
| Exact level value | q6j(Exact(k), js...) | Quantum integers, with zeros and equality proved |
| Real or complex deformation | q6j(At(q), js...) | Adaptive numerical evaluation |
| Formula at every q | q6j(Symbolic(), js...) | Quantum integers; f(q) evaluates it, and xform expands it with Nemo |
| Whole fusion transformation | fmatrix(Level(k), a,b,c,d) | Matrix and its row/column labels |
| Finite factorial series | FactorialSum(...), qeval(...) | The same evaluation targets |
Quantum CG and 3j coefficients support numerical, exact and symbolic targets. Their formulas carry powers of q; zero and equality tests are supported, but arithmetic on their weighted level forms is not yet available.
Why use it?
- One mathematical rule, several evaluations. Compact factorial rules feed direct numerical and exact calculations, avoiding large symbolic expansions on the numerical path.
- Shared work for related symbols. Batches reuse tables; F matrices share recurrence coefficients across columns instead of evaluating every entry as an independent sum.
- Exact formulas you can inspect. Level and generic forms retain their factorial rules and display quantum integers. Zero and equality decisions do not require polynomial expansion.
- Control over expensive work. Reuse workspaces, choose numerical precision, and request symbolic expansion or radical extraction explicitly.
See Accuracy and performance for the numerical contracts and current limitations, including the distinction between approximate checks and exact proofs.
Install and learn
Julia 1.10 or later is supported. In Julia's package manager:
pkg> add QRecouplingTo update an existing installation to the latest release, use pkg> up QRecoupling, and check the installed version with pkg> status QRecoupling. The stable documentation follows the latest release; the development documentation follows main. See Migration for changes between versions.
- Getting started: labels, targets, and first calculations.
- Recoupling symbols: normalization, dimensions, and phases.
- Tensor networks and modular data: fusion bases and braiding.
- TensorKit sectors: SU(2) at a level or at real q as tensor symmetries.
- Exact forms and identity checks.
- Finite series and factorial-rule architecture.
- Applications: research workflows built from these components.
Citation
To cite the package, use Seth K. Asante, QRecoupling.jl: numerical and exact computation of classical and quantum recoupling coefficients, arXiv:2610.24074 (2026).
@article{Asanteqrecoupling,
title={QRecoupling.jl: numerical and exact computation of classical and quantum recoupling coefficients},
author={Asante, Seth K.},
year={2026},
doi={10.48550/arXiv.2610.24074},
eprint={2610.24074},
archivePrefix={arXiv},
primaryClass={cs.MS}
}