From 534a0af7d92c1d4bf521d2e39a94054715d998fe Mon Sep 17 00:00:00 2001 From: mtfishman Date: Sat, 25 Oct 2025 17:30:14 -0400 Subject: [PATCH] Test cleanup --- Project.toml | 2 +- test/solvers/test_fitting.jl | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index a4808985..0a8e3193 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ITensorNetworks" uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7" authors = ["Matthew Fishman , Joseph Tindall and contributors"] -version = "0.15.0" +version = "0.15.1" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" diff --git a/test/solvers/test_fitting.jl b/test/solvers/test_fitting.jl index 416401e7..593784fd 100644 --- a/test/solvers/test_fitting.jl +++ b/test/solvers/test_fitting.jl @@ -3,12 +3,10 @@ using ITensorNetworks: ITensorNetwork, siteinds, ttn, random_tensornetwork using ITensorNetworks.ModelHamiltonians: heisenberg using NamedGraphs.NamedGraphGenerators: named_comb_tree using Test: @test, @testset -using Printf using StableRNGs: StableRNG using TensorOperations: TensorOperations #For contraction order finding @testset "Fitting Tests" begin - outputlevel = 1 for elt in (Float32, Float64, Complex{Float32}, Complex{Float64}) (outputlevel >= 1) && println("\nFitting tests with elt = ", elt) g = named_comb_tree((3, 2)) @@ -22,7 +20,6 @@ using TensorOperations: TensorOperations #For contraction order finding #f = # inner(a, b; alg="exact") / # sqrt(inner(a, a; alg="exact") * inner(b, b; alg="exact")) - #(outputlevel >= 1) && @printf("One-site truncation. Fidelity = %s\n", f) #@test abs(abs(f) - 1.0) <= 10*eps(real(elt)) ##Two-site truncation @@ -31,7 +28,6 @@ using TensorOperations: TensorOperations #For contraction order finding #f = # inner(a, b; alg="exact") / # sqrt(inner(a, a; alg="exact") * inner(b, b; alg="exact")) - #(outputlevel >= 1) && @printf("Two-site truncation. Fidelity = %s\n", f) #@test abs(abs(f) - 1.0) <= 10*eps(real(elt)) # #One-site apply (no normalization) @@ -39,7 +35,6 @@ using TensorOperations: TensorOperations #For contraction order finding H = ITensorNetwork(ttn(heisenberg(g), s)) Ha = apply(H, a; maxdim = 4, nsites = 1, normalize = false) f = inner(Ha, a; alg = "exact") / inner(a, H, a; alg = "exact") - (outputlevel >= 1) && @printf("One-site apply. Fidelity = %s\n", f) @test abs(f - 1.0) <= 500 * eps(real(elt)) # #Two-site apply (no normalization) @@ -47,7 +42,6 @@ using TensorOperations: TensorOperations #For contraction order finding H = ITensorNetwork(ttn(heisenberg(g), s)) Ha = apply(H, a; maxdim = 4, cutoff = 1.0e-16, nsites = 2, normalize = false) f = inner(Ha, a; alg = "exact") / inner(a, H, a; alg = "exact") - (outputlevel >= 1) && @printf("Two-site apply. Fidelity = %s\n", f) @test abs(f - 1.0) <= 500 * eps(real(elt)) end end