Skip to content

More tests for CUDA + MPS#406

Open
kshyatt wants to merge 4 commits into
mainfrom
ksh/cu2
Open

More tests for CUDA + MPS#406
kshyatt wants to merge 4 commits into
mainfrom
ksh/cu2

Conversation

@kshyatt

@kshyatt kshyatt commented Mar 26, 2026

Copy link
Copy Markdown
Member

Revealed a bunch more missing things needing fixes, so I will keep this as draft for now.

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic main) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/operators/abstractmpo.jl b/src/operators/abstractmpo.jl
index d5b0295..d86c48c 100644
--- a/src/operators/abstractmpo.jl
+++ b/src/operators/abstractmpo.jl
@@ -153,7 +153,7 @@ Compute the mpo tensor that arises from multiplying MPOs.
 """
 function fuse_mul_mpo(O1, O2)
     TT = promote_type(scalartype(O1), scalartype(O2))
-    T = TensorKit.promote_storagetype(TT, O1, O2) 
+    T = TensorKit.promote_storagetype(TT, O1, O2)
     F_left = fuser(T, left_virtualspace(O2), left_virtualspace(O1))
     F_right = fuser(T, right_virtualspace(O2), right_virtualspace(O1))
     return _fuse_mpo_mpo(O1, O2, F_left, F_right)

@kshyatt

kshyatt commented May 17, 2026

Copy link
Copy Markdown
Member Author

The algorithms tests are failing as a consequence of QuantumKitHub/BlockTensorKit.jl@677d141, because now JordanMPOTensor needs to accept also Union types in addition to AbstractTensorMap...

Fake news: it's due to git eating part of the changes to main I was rebasing on top of...

Comment thread src/operators/jordanmpotensor.jl Outdated
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/MPSKitAdaptExt.jl 0.00% 2 Missing ⚠️
src/operators/ortho.jl 85.71% 2 Missing ⚠️
src/operators/abstractmpo.jl 66.66% 1 Missing ⚠️
src/operators/jordanmpotensor.jl 66.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/operators/mpo.jl 77.92% <100.00%> (-8.56%) ⬇️
src/operators/mpohamiltonian.jl 89.42% <100.00%> (-0.93%) ⬇️
src/operators/abstractmpo.jl 64.53% <66.66%> (-20.57%) ⬇️
src/operators/jordanmpotensor.jl 74.53% <66.66%> (-5.93%) ⬇️
ext/MPSKitAdaptExt.jl 91.30% <0.00%> (-8.70%) ⬇️
src/operators/ortho.jl 98.26% <85.71%> (-1.74%) ⬇️

... and 59 files with indirect coverage changes

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

@kshyatt kshyatt marked this pull request as ready for review June 10, 2026 10:03
function VectorInterface.scale(mpo::AbstractMPO, α::Number)
T = VectorInterface.promote_scale(scalartype(mpo), scalartype(α))
dst = similar(mpo, T)
dst = similar(mpo, TensorKit.similarstoragetype(storagetype(mpo), T))

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.

It might be better to update similar(mpo, ::Type{<:Number}) to do exactly this, so we automatically have this behavior everywhere similar is used?

Comment thread src/operators/abstractmpo.jl Outdated
Comment on lines +208 to +209
TE = TensorKit.similarstoragetype(TensorKit.storagetype(W), E)
W′ = similar(W, TE)

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.

similar comment here, would it make sense to use similar(W, E) and implement the similar to do the storagetype conversion?

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