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

Use inds_network in PEPS constructor #11

Open
mtfishman opened this issue Jul 16, 2021 · 0 comments
Open

Use inds_network in PEPS constructor #11

mtfishman opened this issue Jul 16, 2021 · 0 comments

Comments

@mtfishman
Copy link
Member

mtfishman commented Jul 16, 2021

The PEPS constructor can be simplified with the inds_network function, like is shown here:

function peps_tensor(; linkdim, sitedim)
# left, right, top, bottom, site
return randn(linkdim, linkdim, linkdim, linkdim, sitedim)
end
N = (3, 4)
ndims = length(N)
site_inds = siteinds("S=1/2", N...)
link_space = 2
inds_net = inds_network(site_inds; linkdims=link_space)
A = peps_tensor(; linkdim=link_space, sitedim=dim(first(site_inds)))
ψ = itensor.((A,), inds_net)
# Project periodic boundary indices
# onto the 1 state
state = 1
ψ = project_boundary(ψ, state)

Cross reference: #10 (comment)_

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

1 participant