Skip to content

Changes for non-CPU array support#375

Draft
kshyatt wants to merge 8 commits intomainfrom
ksh/cu
Draft

Changes for non-CPU array support#375
kshyatt wants to merge 8 commits intomainfrom
ksh/cu

Conversation

@kshyatt
Copy link
Member

@kshyatt kshyatt commented Feb 6, 2026

Mostly allowing passing an array type instead of just an element type to allow GPU arrays to back MPS tensors

@kshyatt kshyatt requested a review from lkdvos February 6, 2026 10:32
)
# left to middle
U = ones(scalartype(H), left_virtualspace(H, 1))
U = ones(storagetype(H), left_virtualspace(H, 1))
Copy link
Member

Choose a reason for hiding this comment

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

I think here we should actually call removeunit instead of writing this as a contraction. This is both more efficient and avoids having to deal with storagetype altogether.
Let me know if you need help with this though

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 53.84615% with 36 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/MPSKitAdaptExt.jl 0.00% 11 Missing ⚠️
src/states/abstractmps.jl 30.00% 7 Missing ⚠️
src/states/infinitemps.jl 45.45% 6 Missing ⚠️
src/states/ortho.jl 0.00% 6 Missing ⚠️
src/states/quasiparticle_state.jl 25.00% 3 Missing ⚠️
src/operators/jordanmpotensor.jl 88.88% 1 Missing ⚠️
src/operators/mpohamiltonian.jl 83.33% 1 Missing ⚠️
src/operators/multilinempo.jl 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/algorithms/toolbox.jl 96.01% <100.00%> (-0.49%) ⬇️
src/environments/abstract_envs.jl 93.33% <100.00%> (+1.22%) ⬆️
src/states/orthoview.jl 88.09% <100.00%> (-1.59%) ⬇️
src/utility/defaults.jl 100.00% <ø> (ø)
src/operators/jordanmpotensor.jl 80.64% <88.88%> (-3.47%) ⬇️
src/operators/mpohamiltonian.jl 90.23% <83.33%> (-1.80%) ⬇️
src/operators/multilinempo.jl 28.57% <0.00%> (-1.43%) ⬇️
src/states/quasiparticle_state.jl 78.65% <25.00%> (-2.72%) ⬇️
src/states/infinitemps.jl 75.52% <45.45%> (-3.89%) ⬇️
src/states/ortho.jl 79.08% <0.00%> (-4.59%) ⬇️
... and 2 more

... and 32 files with indirect coverage changes

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

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

@kshyatt kshyatt force-pushed the ksh/cu branch 4 times, most recently from 046f4d0 to 44d6fe6 Compare February 11, 2026 13:57
@kshyatt kshyatt force-pushed the ksh/cu branch 2 times, most recently from 11674d6 to d4e1a03 Compare February 18, 2026 12:47
@kshyatt
Copy link
Member Author

kshyatt commented Feb 18, 2026

Had to rebase on top of main which introduced many conflicts, most of the examples but for 2 are now working. The problem with examples cu_quantum1d/ no.s 2 & 3 is some very annoying conversion from BlockTensorMap slamming into TensorKit's conversion rules.

@lkdvos lkdvos marked this pull request as draft February 26, 2026 18:15
@lkdvos
Copy link
Member

lkdvos commented Feb 26, 2026

(just converted to draft to avoid rerunning all the tests for the various rebases)

@kshyatt
Copy link
Member Author

kshyatt commented Feb 26, 2026

(just converted to draft to avoid rerunning all the tests for the various rebases)

Oh good call, thank you!

@lkdvos lkdvos mentioned this pull request Feb 27, 2026
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.

2 participants