Skip to content

Share recoupling matrices through a scalar factor instead of by value - #634

Draft
Jutho wants to merge 2 commits into
mainfrom
factored-recoupling
Draft

Jutho wants to merge 2 commits into
mainfrom
factored-recoupling

Conversation

@Jutho

@Jutho Jutho commented Nov 23, 2026

Copy link
Copy Markdown
Member

Tree transformers store every block as (coeff, U, inds_dst, inds_src), where U is the matrix held by the caches of the fusion tree block transforms, shared by identity, and coeff is applied with α in the kernel. For product sectors with UniqueFusion factors, U is the cached matrix of the other factors and coeff that of the UniqueFusion tree pair, so no product matrix is assembled and thrown away; twists and single-tree blocks only change coeff. Products of several non-abelian factors are cached by productbraid and producttranspose. This removes recouplingmatrix, which looked up equal matrices by value, and bounds the block caches by memory size.

Tree transformers store every block as `(coeff, U, inds_dst, inds_src)`, where
`U` is the matrix held by the caches of the fusion tree block transforms, shared
by identity, and `coeff` is applied with `α` in the kernel. For product sectors
with `UniqueFusion` factors, `U` is the cached matrix of the other factors and
`coeff` that of the `UniqueFusion` tree pair, so no product matrix is assembled
and thrown away; twists and single-tree blocks only change `coeff`. Products of
several non-abelian factors are cached by `productbraid` and `producttranspose`.
This removes `recouplingmatrix`, which looked up equal matrices by value, and
bounds the block caches by memory size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jutho
Jutho marked this pull request as draft November 23, 2026 14:43
…sectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.41176% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/tensors/treetransformers.jl 66.66% 6 Missing ⚠️
ext/TensorKitEnzymeExt/utility.jl 0.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
ext/TensorKitGPUArraysExt.jl 96.96% <100.00%> (ø)
src/fusiontrees/braiding_manipulations.jl 96.12% <100.00%> (+0.17%) ⬆️
src/fusiontrees/duality_manipulations.jl 98.72% <100.00%> (+0.04%) ⬆️
src/fusiontrees/fusiontrees.jl 95.23% <ø> (-0.54%) ⬇️
src/fusiontrees/producttrees.jl 75.51% <100.00%> (-11.59%) ⬇️
src/tensors/indexmanipulations.jl 91.85% <100.00%> (+0.09%) ⬆️
ext/TensorKitEnzymeExt/utility.jl 0.00% <0.00%> (ø)
src/tensors/treetransformers.jl 93.78% <66.66%> (-3.07%) ⬇️

... and 4 files with indirect coverage changes

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

This branch has not been deployed

No deployments
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