Skip to content

Commit 4e184cd

Browse files
committed
improve test stability
1 parent 64168be commit 4e184cd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/algorithms.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ verbosity_conv = 1
4343
@testset "DMRG2" begin
4444
ψ₀ = FiniteMPS(randn, ComplexF64, 10, ℙ^2, ℙ^D)
4545
v₀ = variance(ψ₀, H)
46-
46+
trscheme = truncdim(floor(Int, D * 1.5))
4747
# test logging
4848
ψ, envs, δ = find_groundstate(ψ₀, H,
4949
DMRG2(; verbosity=verbosity_full, maxiter=2,
50-
trscheme=truncdim(D)))
50+
trscheme))
5151

5252
ψ, envs, δ = find_groundstate(ψ, H,
5353
DMRG2(; verbosity=verbosity_conv, maxiter=10,
54-
trscheme=truncdim(D)), envs)
54+
trscheme), envs)
5555
v = variance(ψ, H)
5656

5757
# test using low variance
@@ -216,7 +216,7 @@ end
216216

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

@@ -289,7 +289,7 @@ end
289289
H_lazy′ = repeat(H_lazy, 2)
290290
H′ = repeat(H, 2)
291291

292-
trscheme = truncdim(D)
292+
trscheme = truncdim(floor(Int, D * 1.5))
293293
# test logging passes
294294
ψ, envs, δ = find_groundstate(ψ₀′, H_lazy′,
295295
IDMRG2(; tol, verbosity=5, maxiter=2, trscheme))

0 commit comments

Comments
 (0)