Skip to content

Keep small highest-weight CGCs in gaugefix! - #66

Merged
lkdvos merged 1 commit into
mainfrom
claude/gaugefix-small-entries
Oct 28, 2026
Merged

lkdvos merged 1 commit into
mainfrom
claude/gaugefix-small-entries

Conversation

@lkdvos

@lkdvos lkdvos commented Oct 28, 2026

Copy link
Copy Markdown
Member

highest_weight_CGC gauge-fixes the null space with gaugefix! (cref! followed by qrpos!). For rows that are not used as pivots, cref! set the entries below TOL_GAUGE = 1e-11 to exactly zero, so that its column operations only had to update the rows below the current pivot. That zeroing is the one operation that is not a column operation, and it also discarded genuine CGCs below 1e-11. These occur for large irreps: e.g. SU(2) (200,0)³ has a highest-weight CGC of 3.8e-12, which came out as 0.

The stable lower-weight solve (#61) repairs this at all lower weights, but not at the highest weight itself.

This PR keeps those entries and applies the column operations of cref! to all rows instead. The pivot selection is unchanged, and hence so is the gauge.

Checks

  • Largest error of the full CGCs compared with the exact SU(2) values:

    case main this PR
    (200,0)³ 3.8e-12 1.1e-15
    (250,0)³ 4.5e-12 5.5e-15
    (250,0) ⊗ (120,0) → (200,0) 6.8e-12 8.5e-15

    The first and last cases are added to the SU(2) test, which fails on main with its 1e-12 tolerance.

  • The gauge is unchanged: for 396 SU(3) and SU(4) couplings, including outer multiplicities up to 4, the CGCs agree with main to within 7e-16.

  • The full test suite passes.

The disk-cache version is not bumped: cached CGCs only differ in entries below 1e-11, and are in the same gauge.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/clebschgordan.jl 97.89% <100.00%> (-0.02%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

`cref!` set entries below the tolerance to zero in rows that are not used
as pivots, such that it only had to apply its column operations to the
rows below the current pivot. This also discarded genuine CGCs below
`TOL_GAUGE`: e.g. the highest-weight CGCs of SU(2) (200,0)³ were off by
3.8e-12. The column operations are now applied to all rows instead, such
that the columns keep spanning the null space and no entries are lost.
The pivots, and hence the gauge, are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lkdvos
lkdvos force-pushed the claude/gaugefix-small-entries branch from f7e903c to e602390 Compare October 28, 2026 21:48
@lkdvos
lkdvos merged commit 4786dba into main Oct 28, 2026
6 of 7 checks passed
@lkdvos
lkdvos deleted the claude/gaugefix-small-entries branch October 28, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant