Skip to content

Add (fast) full update #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

Yue-Zhengyuan
Copy link
Collaborator

This PR tries again to add the fast full update algorithm (arXiv 1503.05345) (see also discussion in the old PR #106).

The performance of FU is benchmarked with the real-time evolution of the transverse field Ising model (TFIM) (see test/timeevol/tf_ising_fu.jl), which calculates the magnetization in the x-direction after the infinite transverse field is reduced to a finite value.

In addition, I added the option to use pseudo-inverse to solve linear equations in ALSTruncation. Otherwise the test on TFIM will fail (but FullEnvTruncation is still fine with KrylovKit.linsolve).

Limitations:

  • The pipelines for imaginary time evolution (ground state search), real time evolution and finite temperature calculation are quite different. In addition, it's difficult to set a convergence criterion for ground state search for FU. Therefore only the iteration functions fu_iter, fu_iter2 are exported, and I deliberately did not add a fullupdate function that wraps up everything. It's left to the users to decide how to assemble a complete FU program.
  • Current implementation does not support bipartite unit cell structure. We can try it later after proposals in [ENH] CTMRG arbitrary unit cell #207 are implemented.
  • Only nearest neighbor Hamiltonians are supported (in principle it can be done; see arXiv 1711.07584).

@Yue-Zhengyuan
Copy link
Collaborator Author

@ogauthe You can now try the full update on models you are interested in. You can know the basic usage of the related functions from the test file test/timeevol/tf_ising_fu.jl.

Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/PEPSKit.jl 100.00% <ø> (ø)
src/algorithms/contractions/bondenv/als_solve.jl 100.00% <100.00%> (ø)
src/algorithms/ctmrg/sequential.jl 98.52% <100.00%> (+0.11%) ⬆️
src/algorithms/time_evolution/evoltools.jl 95.52% <ø> (-0.07%) ⬇️
src/algorithms/time_evolution/fullupdate.jl 100.00% <100.00%> (ø)
src/algorithms/truncation/bond_truncation.jl 97.22% <100.00%> (+0.20%) ⬆️
src/utility/svd.jl 87.12% <100.00%> (+0.16%) ⬆️

... and 4 files with indirect coverage changes

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

@ogauthe
Copy link
Contributor

ogauthe commented Jun 16, 2025

Thank you! I will have a look.

@lkdvos
Copy link
Member

lkdvos commented Jun 25, 2025

@Yue-Zhengyuan , can you let me know what the status is on this (or other) PRs, and which ones should be reviewed/merged? I would like to consider releasing a new version of PEPSKit somewhere in the week of July 7th.

@Yue-Zhengyuan
Copy link
Collaborator Author

@lkdvos Right now we only have Sander's #184 and this one. #184 has been stagnated for quite a while, and maybe needs to be addressed first.

Fast full update is also ready for review actually. I'm just waiting for @ogauthe's feedback on whether it can provide enough improvement over SU for finite-T calculations.

@ogauthe
Copy link
Contributor

ogauthe commented Jun 27, 2025

I checked the finite temperature results obtained with full update as compared to simple update. See https://github.com/ogauthe/BenchmarkPEPS/blob/main/run/run_heisenberg_fullupdate.jl for the script.

I confirm I get the correct results with the full update. I find a slightly lower energy with the full update as compared to the simple update. Assuming energy(FU) = energy(SU) for beta < beta1 then energy(FU) < energy(SU) for beta > beta1 corresponds to a lower free energy, therefore a better approximation of the exact thermal density matrix. Congrat @Yue-Zhengyuan !

In terms of interface, I think ψ, env, = fu_iter2(fu_hamilt, ψ, env, fu_alg) can be improved. The function name could be more explicit and the interface (argument order) closer to simpleupdate. What about

simpleupdate(wpeps, hamilt, su_alg)
fullupdate(ψ, env, hamilt, fu_alg)

or

evolve_simpleupdate(wpeps, hamilt, su_alg)
evolve_fullupdate(ψ, env, hamilt, fu_alg)

or maybe

time_evolve(wpeps, hamilt, su_alg)
time_evolve(ψ, env, hamilt, fu_alg)

using dispatch on algorithm?

@Yue-Zhengyuan
Copy link
Collaborator Author

Yue-Zhengyuan commented Jun 27, 2025

TL;DR: the name fu_iter2 can be improved, but I don't have the energy to unify the interface of FU, SU right now. SU can be completely revamped after belief propagation is implemented.


time_evolve(wpeps, hamilt, su_alg)
time_evolve(ψ, env, hamilt, fu_alg)

This can be a good improvement for future work. YASTN started on time evolution earlier than us and they have a unified interface for different algorithms. I didn't use it mainly because I'm more familiar with how TensorKit handles fermions. But currently I really don't have the energy for interface revamps to catch up with them...

In particular, fu_iter2 does not have an SU counterpart: it packs several FU steps together, because in fast FU we don't want to reconverge the CTMRG environment after every fu_iter.

Also, FU uses the usual InfinitePEPS, but SU uses InfiniteWeightPEPS. I actually regret writing SU in this way. Looking back on it, I only need to introduce SUWeight, which can later be generalized to BPEnv (#223). SU is actually FU with the bond environment given by the weights instead of the CTM tensors. After BPEnv is finished, we can unify SU, FU interface to

time_evolve(ψ::InfinitePEPS, env::BPEnv, H, alg::SimpleUpdate)
time_evolve(ψ::InfinitePEPS, env::CTMRGEnv, H, alg::FullUpdate)

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