Skip to content

Commit

Permalink
Simplify example
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Jan 10, 2024
1 parent 8554c5e commit 27dd2aa
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions examples/peps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,11 @@ using NamedGraphs
using ITensorNetworks
using ITensorUnicodePlots

function heisenberg(g::AbstractGraph)
# TODO: os = Sum{Op}()
os = OpSum()
for e in edges(g)
os += 1 / 2, "S⁺", src(e), "S⁻", dst(e)
os += 1 / 2, "S⁺", src(e), "S⁻", dst(e)
os += "Sᶻ", src(e), "Sᶻ", dst(e)
end
return os
end

system_dims = (3, 3)
g = named_grid(system_dims)
s = siteinds("S=1/2", g)

= heisenberg(g)
= ITensorNetworks.heisenberg(g)

χ = 5
ψ = ITensorNetwork(s; link_space=χ)
Expand Down

0 comments on commit 27dd2aa

Please sign in to comment.