Skip to content

Remove InfiniteWeightPEPS and mirror_antidiag#239

Merged
Yue-Zhengyuan merged 20 commits intoQuantumKitHub:masterfrom
Yue-Zhengyuan:su-overhaul
Aug 27, 2025
Merged

Remove InfiniteWeightPEPS and mirror_antidiag#239
Yue-Zhengyuan merged 20 commits intoQuantumKitHub:masterfrom
Yue-Zhengyuan:su-overhaul

Conversation

@Yue-Zhengyuan
Copy link
Member

This PR is an overhaul of simple update, which removes InfiniteWeightPEPS and mirror_antidiag. The related tests and examples are updated accordingly. I apologize for not planning carefully before and introducing them in the first place.

  • Simple update now works with InfinitePEPS and SUWeight. When a wpeps::InfiniteWeightPEPS was needed before, it is now replaced by peps::InfinitePEPS, env::SUWeight. The tensors in the InfinitePEPS correspond to InfiniteWeightPEPS.vertices with square root of bond weights always absorbed. Then InfiniteWeightPEPS is no longer useful, and we can get rid of its weird behaviors under lattice rotations.

  • env::SUWeight is regarded as the environment for simple update, and hence the file defining it is moved to "environments/suweight.jl". Sometimes when CTMRG is also involved, the variable name is wts::SUWeight, with env reserved for CTMRGEnv.

  • Axis order of SUWeight is no longer always (west, east) and (south, north), depending on the "dual-ness" of the Espaces and Nspaces of the PEPS. E.g. for x-weights, it is either 1 ← x ← 2 or 2 → x → 1. This makes logic in absorb_weight simpler.

  • I added a _su_ybond! to directly update vertical bonds for the 2-site SU, without the need to mirror or rotate the PEPS. Hence mirror_antidiag is no longer needed and removed.

  • I added some tricks in the half-filling Hubbard model SU example to improve convergence of SU and CTMRG (initialize with a small D = 4, then ramp up to a large D = 12, and finally go back to D = 8).

Things deliberately left for future PRs

  • Rename su_iter, simpleupdate to timestep! and time_evolve to match MPSKit.
  • Remember normalization used in each SU iteration. (I hope someone with a concrete use case can do it instead of myself.)

@Yue-Zhengyuan
Copy link
Member Author

I have only updated the source files of the examples. We can regenerate the docs after we decide to merge this PR.

@codecov
Copy link

codecov bot commented Aug 4, 2025

Codecov Report

❌ Patch coverage is 90.10417% with 19 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/environments/suweight.jl 82.69% 18 Missing ⚠️
src/algorithms/time_evolution/evoltools.jl 87.50% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/PEPSKit.jl 100.00% <ø> (ø)
src/algorithms/time_evolution/simpleupdate.jl 100.00% <100.00%> (ø)
src/algorithms/time_evolution/simpleupdate3site.jl 100.00% <100.00%> (ø)
src/algorithms/truncation/truncationschemes.jl 75.00% <ø> (+2.27%) ⬆️
src/networks/tensors.jl 75.00% <ø> (-1.00%) ⬇️
src/operators/localoperator.jl 86.40% <ø> (-0.87%) ⬇️
src/utility/util.jl 58.47% <100.00%> (ø)
src/algorithms/time_evolution/evoltools.jl 97.14% <87.50%> (+1.55%) ⬆️
src/environments/suweight.jl 82.69% <82.69%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

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

Looks like an overall improvement, I like this.
I will try and make some more time to go over this, are you okay with me also pushing some small changes to this branch?

As a sidenote, this is definitely a breaking change, so shall I try and register a new patch version before we try to merge this?

@Yue-Zhengyuan
Copy link
Member Author

@lkdvos Sure, please go ahead to make necessary changes.

We can register v0.6.1 for the current main branch. After this SU overhaul we may go to v0.7.

Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

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

Left some small remarks, otherwise I'm happy to merge this!

@Yue-Zhengyuan
Copy link
Member Author

Reminder: We need to regenerate the docs before merging.

Copy link
Member Author

@Yue-Zhengyuan Yue-Zhengyuan left a comment

Choose a reason for hiding this comment

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

I find some issues when regenerating the docs.

@Yue-Zhengyuan Yue-Zhengyuan merged commit df7a2c5 into QuantumKitHub:master Aug 27, 2025
43 of 45 checks passed
@Yue-Zhengyuan Yue-Zhengyuan deleted the su-overhaul branch August 27, 2025 13:18
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.

3 participants