Skip to content

Allow BraidingTensor to have a custom storage type#393

Merged
kshyatt merged 10 commits into
mainfrom
ksh/cubt
Apr 24, 2026
Merged

Allow BraidingTensor to have a custom storage type#393
kshyatt merged 10 commits into
mainfrom
ksh/cubt

Conversation

@kshyatt

@kshyatt kshyatt commented Apr 3, 2026

Copy link
Copy Markdown
Member

This is probably the nicest way to unblock the various MPSKit changes. I found the similarmatrixtype approach the least gross looking way to achieve this, but open to other ideas.

@kshyatt kshyatt requested review from Jutho and borisdevos April 3, 2026 09:27
@kshyatt

kshyatt commented Apr 6, 2026

Copy link
Copy Markdown
Member Author

The only thing missing here is the parser preprocessing for @planar, where we need to extract the storagetype to hand it over to the BraidingTensor constructor.

@Jutho

Jutho commented Apr 7, 2026

Copy link
Copy Markdown
Member

I will try to review asap, but I first have to catch up on the latest status of the treetransform stuff, as I never managed to review that part of the vectorize fusiontrees PR.

@codecov

codecov Bot commented Apr 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/tensors/braidingtensor.jl 88.00% 6 Missing ⚠️
src/planar/preprocessors.jl 95.65% 1 Missing ⚠️
Files with missing lines Coverage Δ
ext/TensorKitAdaptExt.jl 61.53% <100.00%> (+11.53%) ⬆️
ext/TensorKitCUDAExt/TensorKitCUDAExt.jl 100.00% <100.00%> (ø)
ext/TensorKitCUDAExt/cutensormap.jl 74.66% <100.00%> (+0.69%) ⬆️
src/planar/preprocessors.jl 87.52% <95.65%> (+0.44%) ⬆️
src/tensors/braidingtensor.jl 70.39% <88.00%> (+0.91%) ⬆️

... and 3 files with indirect coverage changes

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

Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl
@kshyatt

kshyatt commented Apr 15, 2026

Copy link
Copy Markdown
Member Author

Anything more need doing here or is this ready to go after #389?

@kshyatt kshyatt marked this pull request as ready for review April 15, 2026 13:09
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread test/cuda/planar.jl Outdated
Comment thread Project.toml Outdated
Comment thread ext/TensorKitCUDAExt/cutensormap.jl
@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Your PR no longer requires formatting changes. Thank you for your contribution!

@kshyatt kshyatt force-pushed the ksh/cubt branch 2 times, most recently from f787d47 to e7361df Compare April 17, 2026 10:02

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the main thing missing is still the @planar changes... I will try to find some time, but I seem to be having a million things 🙃

Comment thread ext/TensorKitCUDAExt/cutensormap.jl
Comment thread ext/TensorKitCUDAExt/TensorKitCUDAExt.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
@kshyatt

kshyatt commented Apr 17, 2026

Copy link
Copy Markdown
Member Author

I'll work on the preprocessor, don't worry about it! But my solution might be a bit ugly...

Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
@kshyatt

kshyatt commented Apr 20, 2026

Copy link
Copy Markdown
Member Author

OK, a lot of comments resolved (hopefully!)

@kshyatt kshyatt marked this pull request as draft April 20, 2026 12:41
@kshyatt

kshyatt commented Apr 20, 2026

Copy link
Copy Markdown
Member Author

CUDA test fail here seems unrelated, I'm running locally to see if I can repro

@kshyatt

kshyatt commented Apr 20, 2026

Copy link
Copy Markdown
Member Author

Aaaaaand I can't repro locally!

Comment thread ext/TensorKitAdaptExt.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
Comment thread src/tensors/braidingtensor.jl Outdated
@kshyatt

kshyatt commented Apr 24, 2026

Copy link
Copy Markdown
Member Author

I've run the MPSKit tests that aren't already failing on QuantumKitHub/MPSKit.jl#416 against this branch, everything but Aqua passes. I'm running the algorithms tests in detail just to make sure as I suspect that's where any problem would surface.

@kshyatt

kshyatt commented Apr 24, 2026

Copy link
Copy Markdown
Member Author

Figured out one last MPSKit failure that was related -- an extension of braidingtensortype is needed at BlockTensorKit.jl, I'll make that PR once this is merged

Comment thread src/tensors/braidingtensor.jl Outdated
@Jutho

Jutho commented Apr 24, 2026

Copy link
Copy Markdown
Member

One final suggestion from my side, but this definitely looks great, so feel free to merge with or without that.

kshyatt and others added 9 commits April 24, 2026 16:14
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
Co-authored-by: Jutho <Jutho@users.noreply.github.com>

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too, could you already increase the version to 0.17? Since this is breaking, we will have to do that anyways, so might as well and then start adding the other breaking stuff in too (CUDA etc)

bump minor version
@kshyatt

kshyatt commented Apr 24, 2026

Copy link
Copy Markdown
Member Author

Done! They're calling it the end of Friday snipe commit of the century

@kshyatt kshyatt enabled auto-merge (squash) April 24, 2026 14:28
@kshyatt kshyatt merged commit 518cb2a into main Apr 24, 2026
61 of 62 checks passed
@kshyatt kshyatt deleted the ksh/cubt branch April 24, 2026 21:02
@lkdvos lkdvos mentioned this pull request Jun 3, 2026
Jutho referenced this pull request Jun 5, 2026
* Update changelog for v0.17.0

* Update CITATION.cff for v0.17.0

* Add #438 documentation to v0.17.0 changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants