Skip to content

Add dedicated cached treebraider for AdjointTensorMap - #519

Open
leburgel wants to merge 2 commits into
mainfrom
lb/adjoint_treebraider_treetransposer
Open

Add dedicated cached treebraider for AdjointTensorMap#519
leburgel wants to merge 2 commits into
mainfrom
lb/adjoint_treebraider_treetransposer

Conversation

@leburgel

@leburgel leburgel commented Aug 27, 2026

Copy link
Copy Markdown
Member

One option for a proper fix for #516, adding a dedicated cached conj_treebraider to handle permutations and transposes of AdjointTensorMaps with a plain TensorMap parent using the same infrastructure as the pure TensorMap path.

Some timings based on the reproducer of #516:

permute! — adjoint source vs plain TensorMap:

sector type before after plain ratio before ratio after speedup
fℤ₂ 0.0730 ms 0.0790 ms 0.0620 ms 1.32× 1.27× 0.92×
fℤ₂ ⊠ U(1) 0.1295 ms 0.0367 ms 0.0345 ms 3.78× 1.06× 3.53×
U(1) 0.1012 ms 0.0302 ms 0.0278 ms 3.64× 1.09× 3.35×
SU(2) 2.5470 ms 0.3867 ms 0.3621 ms 7.26× 1.07× 6.59×
fℤ₂ ⊠ U(1) ⊠ SU(3) 3.9624 ms 0.0499 ms 0.0500 ms 78.78× 1.00× 79.4×

Allocations for the adjoint path drop to exactly the plain path's: 794→310, 662→310, 26 883→2840, 42 653→645.

@leburgel leburgel changed the title Add dedicated cached treebraider and treetransposer for AdjointTensorMap Add dedicated cached treebraider for AdjointTensorMap Aug 27, 2026
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/spaces/homspace.jl 91.83% <100.00%> (+0.46%) ⬆️
src/tensors/indexmanipulations.jl 88.44% <100.00%> (+0.09%) ⬆️
src/tensors/treetransformers.jl 82.40% <100.00%> (-0.12%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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