From cfc40861c5ca7426e306970abe26fabb466094ca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 14 Apr 2024 17:43:19 -0400 Subject: [PATCH 1/2] CompatHelper: bump compat for KrylovKit to 0.7, (keep existing compat) (#64) --- Project.toml | 2 +- test/test_contract_mpo.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 29971f7..55e2040 100644 --- a/Project.toml +++ b/Project.toml @@ -13,7 +13,7 @@ TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" [compat] ITensors = "0.3.58" -KrylovKit = "0.6" +KrylovKit = "0.6, 0.7" Observers = "0.2" TimerOutputs = "0.5" julia = "1.6" diff --git a/test/test_contract_mpo.jl b/test/test_contract_mpo.jl index a93cd46..fc4023e 100644 --- a/test/test_contract_mpo.jl +++ b/test/test_contract_mpo.jl @@ -58,7 +58,7 @@ using Test: @test, @testset Hpsi = apply(H, psi; alg="fit", init_mps=Hpsi_guess, nsite=1, nsweeps=2) @test ITensors.scalartype(Hpsi) == elt scale(::Type{Float32}) = 10^2 - scale(::Type{Float64}) = 10^6 + scale(::Type{Float64}) = 5 * 10^5 @test inner(psit, Hpsi) ≈ inner(psit, H, psi) rtol = √eps(real(elt)) * scale(real(elt)) end end From 43195aefeb8c73d0b98c5da3b9bb74ff62c931c9 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Sun, 14 Apr 2024 20:38:50 -0400 Subject: [PATCH 2/2] Loosen test bounds --- test/test_contract_mpo.jl | 2 +- test/test_tdvp.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_contract_mpo.jl b/test/test_contract_mpo.jl index fc4023e..a93cd46 100644 --- a/test/test_contract_mpo.jl +++ b/test/test_contract_mpo.jl @@ -58,7 +58,7 @@ using Test: @test, @testset Hpsi = apply(H, psi; alg="fit", init_mps=Hpsi_guess, nsite=1, nsweeps=2) @test ITensors.scalartype(Hpsi) == elt scale(::Type{Float32}) = 10^2 - scale(::Type{Float64}) = 5 * 10^5 + scale(::Type{Float64}) = 10^6 @test inner(psit, Hpsi) ≈ inner(psit, H, psi) rtol = √eps(real(elt)) * scale(real(elt)) end end diff --git a/test/test_tdvp.jl b/test/test_tdvp.jl index 46b27da..2645672 100644 --- a/test/test_tdvp.jl +++ b/test/test_tdvp.jl @@ -47,7 +47,7 @@ using Test: @test, @testset ## Should lose fidelity: #@test abs(inner(ψ0,ψ1)) < 0.9 # Average energy should be conserved: - @test real(inner(ψ1', H, ψ1)) ≈ inner(ψ0', H, ψ0) + @test real(inner(ψ1', H, ψ1)) ≈ inner(ψ0', H, ψ0) rtol = √eps(real(elt)) # Time evolve backwards: ψ2 = tdvp(H, time_step, ψ1; nsweeps=1, cutoff) @test ITensors.scalartype(ψ2) == complex(elt)