Skip to content

Update sector tests - #44

Merged
lkdvos merged 12 commits into
mainfrom
bd/update-tests
Oct 29, 2026
Merged

lkdvos merged 12 commits into
mainfrom
bd/update-tests

Conversation

@borisdevos

@borisdevos borisdevos commented Mar 16, 2026 •

Copy link
Copy Markdown
Member

Use the sector testsuite from TensorKitSectors.

  • The sector tests run SectorTestSuite.test_sector for SU3Irrep, SU4Irrep, SU5Irrep and SU3Irrep ⊠ SU3Irrep; test/sectors.jl keeps only the SU(N)-specific checks.
  • The F-, R-, A- and B-symbols are computed by specialising the *_from_fusiontensor methods of TensorKitSectors (avoiding views); SUN_Fsymbol and SUN_Rsymbol stay cached and call these.
  • isone → isunit in SUN_CGC.

Artin braid / hexagon failures

The failures for higher-dimensional irreps were a bug in TensorKitSectors' hexagon_equation: the underbraiding used conj(R) instead of the adjoint, which only matters for non-symmetric R-symbols such as SU(3) with fusion multiplicities. This is fixed in TensorKitSectors v0.3.12 (QuantumKitHub/TensorKitSectors.jl#119), which is now the lower compat bound.

Keeping the tests within CI limits

The pentagon test scales steeply with the dimensions of the irreps, and the intermediate CGCs filled up the RAM caches (> 140 GB with the previous sets). Therefore:

  • smallset is reduced to 5 SU(3) irreps of dim ≤ 11, 4 SU(4) irreps of dim ≤ 16, 3 SU(5) irreps of dim ≤ 16, and 5 products of dim ≤ 30 for SU(3) ⊠ SU(3). Each sector takes about 25–50 s and at most ~2.5 GiB.
  • During the tests the RAM caches are bounded in bytes (1 GiB for the CGCs, 256 MiB for the F-symbols, 64 MiB for the R-symbols).
  • The CGC disk-cache test now also empties the RAM cache first, since CGCs left in RAM by the sector tests would otherwise not be written to disk.
  • The fusion tree tests draw their sectors from the 5 smallest nontrivial irreps, as before. The testsuite's randsector draws from the larger smallset above, and trees of five such irreps made these tests exceed the CI time limit.

@codecov

codecov Bot commented Mar 16, 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%> (ø)
src/sector.jl 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lkdvos

lkdvos commented Mar 16, 2026

Copy link
Copy Markdown
Member

When you say these tests fail, do you mean the tolerance is just set too high? Because that might be fair for higher-dimensional irreps

@borisdevos

Copy link
Copy Markdown
Member Author

No, it can already mismatch at the 2nd decimal. Here a quick example:
isapprox([0.49357987913169243; 0.3608970552458627; 0.12256062712019984;;;;], [0.4796164601864595; 0.3801689443717772; 0.11970177000507069;;;;]; atol = 1.0e-12, rtol = 1.0e-12)
As far as I've seen it's also always the underbraiding path which fails. I'm curious if this also gets picked up in the fusion tree braid tests

@lkdvos

lkdvos commented Oct 27, 2026

Copy link
Copy Markdown
Member

possibly related to failures: #61

The sector tests no longer empty the RAM caches, so the CGCs computed there
would not be written to the emptied disk cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lkdvos
lkdvos previously approved these changes Oct 29, 2026
The testsuite's `randsector` draws from the larger `smallset` of the sector
tests, which made the fusion tree tests exceed the CI time limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lkdvos
lkdvos enabled auto-merge (squash) October 29, 2026 20:33
@lkdvos
lkdvos merged commit cae5c36 into main Oct 29, 2026
4 checks passed
@lkdvos
lkdvos deleted the bd/update-tests branch October 29, 2026 20:34
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.

2 participants