Skip to content

Cover force_mpo in simple update test#350

Merged
leburgel merged 3 commits intoQuantumKitHub:masterfrom
Yue-Zhengyuan:su-bipartite
Apr 10, 2026
Merged

Cover force_mpo in simple update test#350
leburgel merged 3 commits intoQuantumKitHub:masterfrom
Yue-Zhengyuan:su-bipartite

Conversation

@Yue-Zhengyuan
Copy link
Copy Markdown
Member

@Yue-Zhengyuan Yue-Zhengyuan commented Apr 8, 2026

This PR removes an error that will never be raised.

elseif length(sites) == 2
(d, r, c), = _nn_bondrev(sites..., (Nr, Nc))
if alg.bipartite
length(sites) > 2 && error("Multi-site MPO gates are not compatible with bipartite states.")
r > 1 && continue
end

As length(sites) == 2, the error will not be raised and is redundant.

It also updated the finite-T SU test with transverse field Ising model to test force_mpo = true, i.e. applying a nearest neighbor 2-site gate as an MPO (instead of a rank-4 TensorMap) on an iPEPO.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/algorithms/time_evolution/simpleupdate.jl 95.12% <100.00%> (-0.08%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread test/timeevol/tf_ising_finiteT.jl
@Yue-Zhengyuan Yue-Zhengyuan marked this pull request as ready for review April 10, 2026 08:50
@Yue-Zhengyuan Yue-Zhengyuan changed the title Remove bipartite state restriction on 2-site MPO gate Cover force_mpo in simple update test Apr 10, 2026
@Yue-Zhengyuan Yue-Zhengyuan requested a review from leburgel April 10, 2026 12:53
@leburgel
Copy link
Copy Markdown
Member

I'll merge as is. The example test failure should be fixed by #353, and the gradient test timeout will require more work to sort out.

@leburgel leburgel merged commit 236673c into QuantumKitHub:master Apr 10, 2026
61 of 64 checks passed
@Yue-Zhengyuan Yue-Zhengyuan deleted the su-bipartite branch April 10, 2026 23:12
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