Skip to content

Changes for non-CPU array support#375

Open
kshyatt wants to merge 2 commits intomainfrom
ksh/cu
Open

Changes for non-CPU array support#375
kshyatt wants to merge 2 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 57.57576% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/states/infinitemps.jl 45.45% 6 Missing ⚠️
src/states/ortho.jl 0.00% 6 Missing ⚠️
src/states/abstractmps.jl 50.00% 5 Missing ⚠️
ext/MPSKitAdaptExt.jl 0.00% 3 Missing ⚠️
src/operators/mpohamiltonian.jl 50.00% 3 Missing ⚠️
src/states/quasiparticle_state.jl 25.00% 3 Missing ⚠️
src/operators/jordanmpotensor.jl 80.00% 1 Missing ⚠️
src/operators/multilinempo.jl 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/algorithms/toolbox.jl 95.08% <100.00%> (-0.07%) ⬇️
src/environments/abstract_envs.jl 93.33% <100.00%> (+1.22%) ⬆️
src/states/orthoview.jl 89.68% <100.00%> (ø)
src/utility/defaults.jl 100.00% <ø> (ø)
src/operators/jordanmpotensor.jl 73.73% <80.00%> (-0.10%) ⬇️
src/operators/multilinempo.jl 28.57% <0.00%> (-1.43%) ⬇️
ext/MPSKitAdaptExt.jl 44.73% <0.00%> (-2.49%) ⬇️
src/operators/mpohamiltonian.jl 53.40% <50.00%> (+0.07%) ⬆️
src/states/quasiparticle_state.jl 80.52% <25.00%> (-0.85%) ⬇️
src/states/abstractmps.jl 51.08% <50.00%> (-2.33%) ⬇️
... and 2 more

... and 1 file 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
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.

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

Comments