Skip to content

Conversation

@Yue-Zhengyuan
Copy link
Member

@Yue-Zhengyuan Yue-Zhengyuan commented Jun 13, 2025

This PR tries again to add the fast full update algorithm (arXiv 1503.05345) (see also discussion in the old PR #106). It uses the unified interface for time evolution algorithms introduced in #280.

The performance of FU is benchmarked with the real-time evolution of the transverse field Ising model (TFIM) (see test/timeevol/tf_ising_realtime.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:

  • 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. But it won't work for finite-T calculations anyway (?), so maybe it's not quite worth it...
  • Only nearest neighbor Hamiltonians are supported (in principle support for next-nearest neighbor terms can be added; see arXiv 1711.07584).

To do later:

  • Add support for PEPO evolution (the purification approach only).

@Yue-Zhengyuan
Copy link
Member 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.

@codecov
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

❌ Patch coverage is 18.21862% with 202 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/algorithms/time_evolution/fullupdate.jl 0.00% 178 Missing ⚠️
src/algorithms/ctmrg/sequential.jl 0.00% 15 Missing ⚠️
src/algorithms/contractions/bondenv/gaugefix.jl 0.00% 4 Missing ⚠️
src/algorithms/truncation/bond_truncation.jl 88.88% 3 Missing ⚠️
src/environments/ctmrg_environments.jl 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
src/PEPSKit.jl 100.00% <ø> (ø)
src/algorithms/contractions/bondenv/als_solve.jl 100.00% <100.00%> (ø)
src/algorithms/contractions/bondenv/benv_ctm.jl 100.00% <100.00%> (ø)
src/algorithms/truncation/fullenv_truncation.jl 97.01% <100.00%> (+0.04%) ⬆️
src/utility/svd.jl 87.69% <100.00%> (+0.19%) ⬆️
src/environments/ctmrg_environments.jl 71.89% <0.00%> (-0.79%) ⬇️
src/algorithms/truncation/bond_truncation.jl 95.18% <88.88%> (-1.84%) ⬇️
src/algorithms/contractions/bondenv/gaugefix.jl 87.50% <0.00%> (-12.50%) ⬇️
src/algorithms/ctmrg/sequential.jl 79.48% <0.00%> (-18.93%) ⬇️
src/algorithms/time_evolution/fullupdate.jl 0.00% <0.00%> (ø)

... and 7 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
Member 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
Member 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)

@Yue-Zhengyuan
Copy link
Member Author

Figured out what happened. Before adding the normalization, the fullinf env has a small norm. Since I use atol in truncerror, the resulting CTMRG bond dimension after truncation is smaller than it should be. This smaller bond dimension makes convergence of the environment easier and faster.

@Yue-Zhengyuan Yue-Zhengyuan self-assigned this Nov 12, 2025
@Yue-Zhengyuan
Copy link
Member Author

Commit history is becoming messy... Close this PR now and try again later.

@Yue-Zhengyuan Yue-Zhengyuan deleted the fullupdate branch November 18, 2025 06:47
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