Skip to content
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

SimpleUpdate and FullUpdate for MPS #211

Open
gerardPlanella opened this issue Nov 22, 2023 · 1 comment
Open

SimpleUpdate and FullUpdate for MPS #211

gerardPlanella opened this issue Nov 22, 2023 · 1 comment

Comments

@gerardPlanella
Copy link

gerardPlanella commented Nov 22, 2023

What is your issue?

Even though the SimpleUpdate algorithm is specified for 2D systems in Quimb. It should theoretically work for MPS and 3D PEPS systems too. I am trying to run SimpleUpdate for an MPS but It does not run. For the local Hamiltonians, I tried to use a 2D Hamiltonian and a 1D Hamiltonian but did not work. Furthermore, I tried to randomly initialise my state for the algorithm using a random PEPS and MPS but none worked. Is this an expected behaviour or is there a way to run SimpleUpdate and FullUpdate on an MPS?

I know for MPS you can use TEBD but I am trying to perform a comparison between SImpleUpdate, FullUpdate and other methods.

@jcmgray
Copy link
Owner

jcmgray commented Dec 1, 2023

Hi @gerardPlanella,

Indeed quimb does have a "general" geometry simple update implementation, here's an example for a PBC 1D system:

import quimb as qu
import quimb.tensor as qtn

L = 7

# define any geometry here
edges = [
    (i, (i + 1) % L)
    for i in range(L)
]
ham = qtn.tensor_arbgeom_tebd.LocalHamGen({
    edge: qu.ham_heis(2).real
    for edge in edges
})

psi = qtn.TN_from_edges_rand(edges, D=4, phys_dim=2)

su = qtn.SimpleUpdateGen(psi, ham)
su.evolve(30, tau=0.3)
su.evolve(30, tau=0.1)
su.evolve(30, tau=0.001)

su.state.compute_local_expectation_exact(ham)
# n=30, tau=0.3000, energy~-2.914756: 100%|#######################################| 30/30 [00:00<00:00, 213.66it/s]
# n=60, tau=0.1000, energy~-2.911364: 100%|#######################################| 30/30 [00:00<00:00, 242.94it/s]
# n=90, tau=0.0010, energy~-2.930085: 100%|#######################################| 30/30 [00:00<00:00, 245.04it/s]
# -2.8500343553935306

In 1D with OBC, simple update, tebd and full update are really all equivalent. For PBC one could imagine a full update giving slightly better results, but probably best to just use DMRG or global optimization there.

SimpleUpdateGen works well in 3D as well (its used here). An important caveat is that the built-in/default method of computing the energy just uses local clusters gauged with the simple update weights, which is not very accurate and should only be treated as a rough guide. In general computing the energy approximately is expensive and not very established beyond 2D.

Full Update is a tricky method to efficiently generalize beyond 2D since, like accurately evaluating the energy, you need a manual boundary contraction method or similar. I don't have any plans for this currently.

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

No branches or pull requests

2 participants