Skip to content

Support TensorKit v0.17.4 by introducing blockwise permute_twist! - #92

Open
borisdevos wants to merge 3 commits into
mainfrom
bd/permute-twist
Open

borisdevos wants to merge 3 commits into
mainfrom
bd/permute-twist

Conversation

@borisdevos

Copy link
Copy Markdown
Member

This PR adds permute_twist! for block tensors. I kind of just mimicked what's going on in the TO.tensoradd! methods as well as QuantumKitHub/TensorKit.jl#612, especially with the VI alphas and betas, so please check those. If I understand them correctly, they're probably correct 😄

Locally, this seemed to fix where it failed, namely a selfdual space like the cartesian one, so that's in the added test. Also added a case where permute_twist! actually has a twist mask. For cases where it already worked, I guess the fallback within TensorKit was just extremely slow, since I do see a speedup as well. This seemed to also fix the current failing test locally in MPSKit's clusterexpansion.jl:107 where cartesian spaces were used.

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/tensors/tensoroperations.jl 92.16% <100.00%> (+1.19%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@borisdevos
borisdevos requested a review from lkdvos November 25, 2026 13:53

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