Skip to content

Commit 3004d37

Browse files
committed
Add timings to vumps_ising_extended.jl
1 parent e021b56 commit 3004d37

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/vumps/vumps_ising_extended.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ maxdim = 64 # Maximum bond dimension
99
cutoff = 1e-6 # Singular value cutoff when increasing the bond dimension
1010
max_vumps_iters = 100 # Maximum number of iterations of the VUMPS algorithm at each bond dimension
1111
vumps_tol = 1e-6
12-
outer_iters = 4 # Number of times to increase the bond dimension
12+
outer_iters = 10 # Number of times to increase the bond dimension
1313

1414
##############################################################################
1515
# CODE BELOW HERE DOES NOT NEED TO BE MODIFIED
@@ -35,13 +35,13 @@ H = InfiniteSum{MPO}(model, s; J=J, J₂=J₂, h=h);
3535

3636
vumps_kwargs = (tol=vumps_tol, maxiter=max_vumps_iters)
3737
subspace_expansion_kwargs = (cutoff=cutoff, maxdim=maxdim)
38-
ψ_0 = vumps(H, ψ; vumps_kwargs...)
38+
ψ_0 = @time vumps(H, ψ; vumps_kwargs...)
3939

40-
for j in 1:outer_iters
40+
@time for j in 1:outer_iters
4141
println("\nIncrease bond dimension")
42-
ψ_1 = subspace_expansion(ψ_0, H; subspace_expansion_kwargs...)
42+
ψ_1 = @time subspace_expansion(ψ_0, H; subspace_expansion_kwargs...)
4343
println("Run VUMPS with new bond dimension")
44-
global ψ_0 = vumps(H, ψ_1; vumps_kwargs...)
44+
global ψ_0 = @time vumps(H, ψ_1; vumps_kwargs...)
4545
end
4646

4747
Sz = [expect(ψ_0, "Sz", n) for n in 1:N]

0 commit comments

Comments
 (0)