-
Notifications
You must be signed in to change notification settings - Fork 25
Simple update for PEPO #250
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
Simple update for PEPO #250
Conversation
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Here are benchmark results on the transverse field Ising model (J = 1 and g = 2), using PEPO D = 8 and CTMRG χ = 16, and evolution time step dt = 0.001. The non-purified approach smears out the transition compared to HOTRG, and produce a smaller x-magnetization in the high-T phase, so it is indeed bad as mentioned by @sanderdemeyer in #247. But the smearing out is much reduced after purification.
I still need to compare with TeNeS (which also uses simple update) to see if they also suffer. |
|
Using parameters given in 2501.07777, I can reproduce x-magnetization for transverse field Ising model obtained by TeNeS. They match really well:
Note that they use S = σ/2 in the Hamiltonian, and varied |
lkdvos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for the work!
I left some comments throughout, but there are some additional things I'm not fully convinced about that we could discuss:
I'm not super convinced by the gate_side keyword arguments.
It's a bit strange to me to use a symbol at the top level, and then suddenly change it to an integer a bit further down the callstack. In this case, it might make more sense to have either the symbols all the way through, or @enum GateSide left right both if you prefer to work with integers to begin with. There should probably also be some checking that the symbol is one of the allowed symbols to begin with, since this sometimes gets the compiler confused about return types because in principle neither of the branches could be chosen, and this is easy to have subtle type stability bugs.
Additionally, some of these functions to me feel a bit like they are better left as separate functions, rather than using a keyword to distinguish between them (especially the lower down functions). This might be a bit subjective though, feel free to disagree!
Am I correct in assuming that :domain and :codomain side could also be implemented by correctly permuting the PEPO/gate, so really there is only one of them that is relevant?
Additionally, for the :both option, it might be more efficient to really map it to a PEPS and do the update there, as this would require less overhead from the permutations etc? The interesting part is that this would really apply both at the same time, rather than sequentially.
Overall, this definitely looks great and I think the results are as expected from simple update results for finite temperature. It woudl definitely be nice to have the expectation values/reduced density matrices working in the near future as well, and have some tests for fermionic systems, but I'm okay with adding that in later.
| env::SUWeight; | ||
| bipartite::Bool = false, | ||
| state::InfinitePEPS, gate::LocalOperator, alg::SimpleUpdate, env::SUWeight; | ||
| bipartite::Bool = false, gate_side::Symbol = :both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to have the default gate_side be :both? I might be mistaken but I think that one is the least common approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the next fix I shall temporarily set it to :codomain before we finally decide on the interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I changed it to gate_bothsides::Bool, which defaults to true (following TeNeS). A side effect is that :domain mode is removed. For InfinitePEPS I just further set it to false inside the SU function, which does not look very elegant. Is there a better way to make this kwarg applicable to InfinitePEPO only?
src/operators/ancilla.jl
Outdated
| """ | ||
| Attach the ancilla space to all terms in the LocalOperator `O` | ||
| """ | ||
| function attach_ancilla(O::LocalOperator; Va0 = nothing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this function is, if I'm not mistaken, equivalent to
PEPSKit.jl/src/operators/localoperator.jl
Line 192 in df7a2c5
| function _fuse_ids(op::AbstractTensorMap{T, S, N, N}, Ps::NTuple{N, S}) where {T, S, N} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a version of it without Ps. In this case Ps is set to the domain of op (converted to a tuple). I removed attach_ancilla for LocalOperators, though.
Their difference lies in which physical axis of the PEPO tensor is transferred to the "reduced tensor" when performing QR/LQ in
I did consider applying the gate on both sides at the same time. But in this way to bond dimension truncation will be from |
|
The test on transverse field Ising model is now updated to use the new |
lkdvos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm okay with your proposed interface, I can't really come up with something better myself right now either, so I think this is just what it has to be
lkdvos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check if the following works in the type domain?
Co-authored-by: Lukas Devos <ldevos98@gmail.com>



This PR adds the ability of simple update to evolve a PEPO. The most well-known application is calculating exp(-βH) at finite temperature.
Overloaded
MPSKit.infinite_temperature_density_matrixto creates the trivial PEPO (i.e. ρ = exp(-βH) at infinite temperature) given a Hamiltonian (as a LocalOperator).simpleupdategets a new kwarggate_bothsides::Bool, controlling how the evolution of PEPO is done:true: (default) exp(-H dt/2) ρ exp(-H dt/2). This is also how TeNeS does it.false: exp(-H dt) ρ (corresponding to the purified approach, without fusing the physical and the ancilla spaces)The total evolution time β is always
maxiter * alg.dt. In the former (default) approach the time slice for each Trotter gate is actuallydt / 2. This kwarg has no effect for PEPS evolution.The kwarg
bipartitedoes not apply to finite temperature evolution.Things to do in follow-up PRs
reduced_densitymatrixandexpectation_valuesupport for calculating tr(ρΟ) / tr(ρ). (Done in Add double-layer-pepo reduced densitymatrix #252 and Add single-layer-pepo reduced densitymatrix #254)