Skip to content

Fix FixedSpaceTruncation for simple update#360

Open
Yue-Zhengyuan wants to merge 13 commits intoQuantumKitHub:masterfrom
Yue-Zhengyuan:su-fixedspacetrunc
Open

Fix FixedSpaceTruncation for simple update#360
Yue-Zhengyuan wants to merge 13 commits intoQuantumKitHub:masterfrom
Yue-Zhengyuan:su-fixedspacetrunc

Conversation

@Yue-Zhengyuan
Copy link
Copy Markdown
Member

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

This PR mainly fixes FixedSpaceTruncation for Simple Update, which was broken after generalizing it for arbitrary MPO gates in #339. This introduces some breaking changes for SiteDependentTruncation as well:

  • I restricted its use to InfinitePEPS/PEPO, so the size of the first dimension must be 2 (horizontal & vertical).
  • truncs[1, :, :] now refers to horizontal (instead of NORTH/vertical) truncations, following the convention of SUWeight.
  • Rotation is removed, since it is currently no longer used anywhere.

For bipartite state tests, I refactored the function _is_bipartite that checks whether the input object matches the bipartite lattice structure.

Finally, in SU for the ground state, I now also output the energy estimated with SUWeight (equivalently BPEnv). But convergence is still determined from the change in SUWeight (instead of energy).

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 96.70330% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/algorithms/time_evolution/simpleupdate.jl 95.45% 2 Missing ⚠️
src/algorithms/time_evolution/gaugefix_su.jl 83.33% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/PEPSKit.jl 100.00% <ø> (ø)
src/algorithms/bp/beliefpropagation.jl 96.96% <100.00%> (ø)
src/algorithms/bp/gaugefix.jl 97.53% <100.00%> (+0.93%) ⬆️
src/algorithms/time_evolution/apply_gate.jl 92.85% <ø> (-0.48%) ⬇️
src/algorithms/time_evolution/apply_mpo.jl 100.00% <100.00%> (ø)
src/algorithms/time_evolution/simpleupdate3site.jl 93.96% <100.00%> (+1.96%) ⬆️
src/algorithms/time_evolution/time_evolve.jl 91.89% <100.00%> (-0.61%) ⬇️
src/algorithms/time_evolution/trotter_gate.jl 100.00% <ø> (ø)
src/algorithms/truncation/truncationschemes.jl 100.00% <100.00%> (+58.33%) ⬆️
src/environments/bp_environments.jl 89.42% <100.00%> (+1.66%) ⬆️
... and 4 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Yue-Zhengyuan Yue-Zhengyuan requested a review from lkdvos April 16, 2026 14:00
Yue-Zhengyuan added a commit to Yue-Zhengyuan/PEPSKit.jl that referenced this pull request Apr 17, 2026
@Yue-Zhengyuan
Copy link
Copy Markdown
Member Author

Yue-Zhengyuan commented Apr 18, 2026

Just realized that SiteDependentTruncation containing truncspace may not work correctly for sectors with different dual and flip. I'll try to fix it in this PR as well. I plan to first convert FixedSpaceTruncation to a SiteDependentTruncation with truncspaces when constructing the TimeEvolver. Then I can also unify the test for SiteDependentTruncation and FixedSpaceTruncation.

@Yue-Zhengyuan Yue-Zhengyuan removed the request for review from lkdvos April 18, 2026 10:52
@Yue-Zhengyuan Yue-Zhengyuan marked this pull request as draft April 18, 2026 10:52
@Yue-Zhengyuan Yue-Zhengyuan marked this pull request as ready for review April 19, 2026 07:48
Comment thread test/timeevol/sitedep_truncation.jl
Comment thread test/timeevol/sitedep_truncation.jl
Copy link
Copy Markdown
Contributor

@sanderdemeyer sanderdemeyer left a comment

Choose a reason for hiding this comment

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

Apart from the 2 small comments above, this looks good to me.

@Yue-Zhengyuan
Copy link
Copy Markdown
Member Author

@lkdvos Hope to get this merged soon so we can continue with #361.

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