Author: Arcticoder
This repository contains research material and code exploring a generating functional for SU(2) 3nj recoupling coefficients. The contents are intended to document derivations, numerical experiments, and reproducible scripts for evaluation and limited validation; they are not intended as production-ready software.
Under the assumptions described in the paper and scripts, a convenient representation of the generating functional is
where
For the 6-j case (
Analogous determinant representations are used for 9-j, 15-j and related symbols; see the scripts for concrete matrix constructions and the assumptions required to reach the determinant form.
This repository provides scripts for symbolic and numeric exploration, test cases, and basic uncertainty-quantification (UQ) checks:
scripts/compute_G_xy_series_coefficients.py
: Computes series coefficients of the generating function for 6-j symbols.scripts/compute_hilbert_series_coefficients_n2_6.py
: Computes Hilbert series coefficients for n=2..6.scripts/test_15j_generating_function.py
: Tests selected terms of the 15-j generating function against known identities.scripts/uq_determinant_stability.py
: Evaluates numerical sensitivity and conditioning of determinant-based evaluations of G.scripts/uq_3nj_sensitivity.py
: Performs local sensitivity analyses for small perturbations of spin inputs.scripts/uq_compare_rational_vs_numeric.py
: Compares symbolic (rational) and floating-point numeric evaluations for benchmark inputs.- CI workflow: Selected algebraic identities (e.g. the Biedenharn–Elliott pentagon relation) are checked in CI for the test inputs defined in the repository; CI does not exhaustively validate all parameter ranges.
The repository includes CSV outputs from the scripts for reference and reproducibility of the experiments performed during development:
data/series_coefficients_G_xy_up_to2.csv
data/hilbert_series_coeffs_n2_6.csv
data/15j_generating_function_tests.csv
data/uq_determinant_stability.csv
data/uq_3nj_sensitivity.csv
data/uq_compare_rational_vs_numeric.csv
- Scope: The work focuses on analytic expressions and computational checks for SU(2) 3nj recoupling coefficients in the regimes explored by the included scripts and data. It is primarily exploratory and aimed at readers familiar with recoupling theory and symbolic/numeric computation.
- Validation: The repository contains unit-style checks and CI validations for specific identities and selected parameter sets (see
scripts/
and.github/workflows/
). Theuq_...
scripts quantify numerical sensitivity and compare rational vs numeric results for chosen benchmarks. - Limitations: The determinant-based expression can be ill-conditioned for parameter values near singularities of the underlying matrix (leading to large numerical error or spurious results). The included tests and CI cover limited inputs and do not guarantee correctness outside those ranges.
- Reproducibility: To reproduce the numeric experiments, create an isolated Python environment (e.g.
python -m venv .venv && source .venv/bin/activate
) and install the requirements listed inrequirements.txt
(if provided) or installnumpy
,sympy
,scipy
, andpandas
. - Deterministic runs: Many scripts accept fixed seeds or can be modified to set deterministic arithmetic modes; symbolic (rational) computations via
sympy.Rational
are available inuq_compare_rational_vs_numeric.py
for cross-checks. - Stability checks: Use
scripts/uq_determinant_stability.py
to explore conditioning across parameter sweeps; increase working precision (e.g.mpmath
orsympy
with increased precision) when determinant conditioning is poor. - Benchmarking: The
data/
CSV files provide the specific inputs used in the repository experiments. Re-run tests with the same input files for reproducible results.
- When adding numeric experiments, include explicit parameter ranges, numeric tolerances, and a short description of expected behavior in the test case.
- Avoid extrapolating conclusions beyond the parameter regions covered by tests and UQ scripts.
The repository is provided for research and educational purposes. For questions or clarifications, open an issue or contact the author.