Skip to content

Commit 37d16b6

Browse files
committed
Update examples
1 parent 1356ee2 commit 37d16b6

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

examples/heisenberg_su/main.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ nstep = 10000
7979
trunc_peps = truncerror(; atol = 1.0e-10) & truncrank(Dbond)
8080
alg = SimpleUpdate(; trunc = trunc_peps, bipartite = true)
8181
for (dt, tol) in zip(dts, tols)
82-
global peps, wts, = time_evolve(peps, H, dt, nstep, alg, wts; tol, check_interval = 500)
82+
evolver = TimeEvolver(peps, H, dt, nstep, alg, wts)
83+
global peps, wts, = time_evolve(evolver, H; tol, check_interval = 500)
8384
end
8485

8586
md"""

examples/hubbard_su/main.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ maxiter = 20000
6767
for (dt, tol, Dbond) in zip(dts, tols, Ds)
6868
trunc = truncerror(; atol = 1.0e-10) & truncrank(Dbond)
6969
alg = SimpleUpdate(; trunc, bipartite = false)
70-
global peps, wts, = time_evolve(peps, H, dt, maxiter, alg, wts; tol, check_interval = 2000)
70+
evolver = TimeEvolver(peps, H, dt, maxiter, alg, wts)
71+
global peps, wts, = time_evolve(evolver, H; tol, check_interval = 2000)
7172
end
7273

7374
md"""

examples/j1j2_su/main.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ for J2 in 0.1:0.1:0.5
5757
H = real(
5858
j1_j2_model(ComplexF64, symm, InfiniteSquare(Nr, Nc); J1, J2, sublattice = false),
5959
)
60-
global peps, wts, = time_evolve(peps, H, dt, nstep, alg, wts; tol, check_interval)
60+
evolver = TimeEvolver(peps, H, dt, nstep, alg, wts)
61+
global peps, wts, = time_evolve(evolver, H; tol, check_interval)
6162
end
6263

6364
md"""
@@ -70,7 +71,8 @@ tols = [1.0e-9, 1.0e-9]
7071
J2 = 0.5
7172
H = real(j1_j2_model(ComplexF64, symm, InfiniteSquare(Nr, Nc); J1, J2, sublattice = false))
7273
for (dt, tol) in zip(dts, tols)
73-
global peps, wts, = time_evolve(peps, H, dt, nstep, alg, wts; tol)
74+
evolver = TimeEvolver(peps, H, dt, nstep, alg, wts)
75+
global peps, wts, = time_evolve(evolver, H; tol)
7476
end
7577

7678
md"""

0 commit comments

Comments
 (0)