Repository navigation
Conversation
`WignerSymbols.racahW` takes the exact 6j symbol from a global cache behind two lock acquisitions and converts it from `Rational{BigInt}` at every call, which dominates and serializes fusion tree manipulations with many SU2 sectors. The F-symbols are now cached as floating-point numbers in a `SnapshotCache`, which is read without locking.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Member
Author
|
Confirmed that this is superseded by Jutho/WignerSymbols.jl#19, so closing here in favor of waiting for that update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a draft illustrating some potential performance improvements; the actual implementations are
very much up for discussion. Follow-up to QuantumKitHub/TensorKit.jl#580 and QuantumKitHub/TensorKit.jl#581.
Fsymbol(::SU2Irrep, ...)callsWignerSymbols.racahW, which takes twoSpinLocks and converts aRational{BigInt}on every call, so threaded fusion tree manipulations serialize on it. TheF-symbols are now cached as
Float64in a lock-freeSnapshotCache(internal; as inQuantumKitHub/SUNRepresentations.jl#57): lookups read an immutable
Dictsnapshot, insertions copy itunder a lock. A full CTMRG iteration of a fℤ₂ × U(1) × SU(2) × U(1) PEPS needs only 107–180 distinct
F-symbols, so the copies are negligible.
Cold construction of the recoupling data for one permutation of a tensor from a PEPS CTMRG step
(script below), with the two TensorKit PRs applied, median of 4 rounds:
TensorKit main (ae8abfc) with both TensorKit PRs, Julia 1.12.5; shared 80-core machine at load 12–29, rounds
vary by up to 35 %.
fℤ₂ × U(1) × SU(2) × U(1) reproducer (
julia -t8)🤖 Generated with Claude Code