Skip to content

Commit

Permalink
improve test stability
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Dec 11, 2024
1 parent ca67022 commit 2cbea3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/algorithms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ verbosity_conv = 1
@testset "DMRG2" begin
ψ₀ = FiniteMPS(randn, ComplexF64, 10, ℙ^2, ℙ^D)
v₀ = variance(ψ₀, H)

trscheme = truncdim(floor(Int, D * 1.5))
# test logging
ψ, envs, δ = find_groundstate(ψ₀, H,
DMRG2(; verbosity=verbosity_full, maxiter=2,
trscheme=truncdim(D)))
trscheme))

ψ, envs, δ = find_groundstate(ψ, H,
DMRG2(; verbosity=verbosity_conv, maxiter=10,
trscheme=truncdim(D)), envs)
trscheme), envs)
v = variance(ψ, H)

# test using low variance
Expand Down Expand Up @@ -216,7 +216,7 @@ end

@testset "DMRG2" begin
# test logging passes
trscheme = truncdim(15)
trscheme = truncdim(floor(Int, D * 1.5))
ψ, envs, δ = find_groundstate(ψ₀, H_lazy,
DMRG2(; tol, verbosity=5, maxiter=1, trscheme))

Expand Down Expand Up @@ -289,7 +289,7 @@ end
H_lazy′ = repeat(H_lazy, 2)
H′ = repeat(H, 2)

trscheme = truncdim(D)
trscheme = truncdim(floor(Int, D * 1.5))
# test logging passes
ψ, envs, δ = find_groundstate(ψ₀′, H_lazy′,
IDMRG2(; tol, verbosity=5, maxiter=2, trscheme))
Expand Down

0 comments on commit 2cbea3d

Please sign in to comment.