Skip to content

Commit

Permalink
Merge pull request #15 from JoeyT1994/laplace_ex
Browse files Browse the repository at this point in the history
Fix for latest ITensorNetworks version
  • Loading branch information
JoeyT1994 authored Apr 9, 2024
2 parents 1f7ec43 + 9abc48a commit d5d9007
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/2d_laplace_solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using NamedGraphs:
random_bfs_tree,
undirected_graph
using ITensors: ITensors, Index, siteinds, dim, tags, replaceprime!, MPO, MPS, inner
using ITensorNetworks: ITensorNetwork, dmrg, TTN, maxlinkdim
using ITensorNetworks: ITensorNetwork, dmrg, ttn, maxlinkdim
using Dictionaries: Dictionary
using SplitApplyCombine: group
using Random: seed!
Expand All @@ -35,10 +35,10 @@ bit_map = BitMap(vertex_to_bit_map, vertex_to_dimension_map)
@show maxlinkdim(∇)

dmrg_kwargs = (nsweeps=25, normalize=true, maxdim=20, cutoff=1e-12, outputlevel=1, nsites=2)
ϕ_fxy = dmrg(∇, TTN(itensornetwork(ψ_fxy)); dmrg_kwargs...)
ϕ_fxy = dmrg(∇, ttn(itensornetwork(ψ_fxy)); dmrg_kwargs...)
ϕ_fxy = ITensorNetworkFunction(ITensorNetwork(ϕ_fxy), bit_map)

final_energy = inner(TTN(itensornetwork(ϕ_fxy))', ∇, TTN(itensornetwork(ϕ_fxy)))
final_energy = inner(ttn(itensornetwork(ϕ_fxy))', ∇, ttn(itensornetwork(ϕ_fxy)))
#Smallest eigenvalue in this case should be -8
@show final_energy

Expand Down

0 comments on commit d5d9007

Please sign in to comment.