Skip to content

Commit 534a0af

Browse files
committed
Test cleanup
1 parent e73ece0 commit 534a0af

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensorNetworks"
22
uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7"
33
authors = ["Matthew Fishman <[email protected]>, Joseph Tindall <[email protected]> and contributors"]
4-
version = "0.15.0"
4+
version = "0.15.1"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"

test/solvers/test_fitting.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ using ITensorNetworks: ITensorNetwork, siteinds, ttn, random_tensornetwork
33
using ITensorNetworks.ModelHamiltonians: heisenberg
44
using NamedGraphs.NamedGraphGenerators: named_comb_tree
55
using Test: @test, @testset
6-
using Printf
76
using StableRNGs: StableRNG
87
using TensorOperations: TensorOperations #For contraction order finding
98

109
@testset "Fitting Tests" begin
11-
outputlevel = 1
1210
for elt in (Float32, Float64, Complex{Float32}, Complex{Float64})
1311
(outputlevel >= 1) && println("\nFitting tests with elt = ", elt)
1412
g = named_comb_tree((3, 2))
@@ -22,7 +20,6 @@ using TensorOperations: TensorOperations #For contraction order finding
2220
#f =
2321
# inner(a, b; alg="exact") /
2422
# sqrt(inner(a, a; alg="exact") * inner(b, b; alg="exact"))
25-
#(outputlevel >= 1) && @printf("One-site truncation. Fidelity = %s\n", f)
2623
#@test abs(abs(f) - 1.0) <= 10*eps(real(elt))
2724

2825
##Two-site truncation
@@ -31,23 +28,20 @@ using TensorOperations: TensorOperations #For contraction order finding
3128
#f =
3229
# inner(a, b; alg="exact") /
3330
# sqrt(inner(a, a; alg="exact") * inner(b, b; alg="exact"))
34-
#(outputlevel >= 1) && @printf("Two-site truncation. Fidelity = %s\n", f)
3531
#@test abs(abs(f) - 1.0) <= 10*eps(real(elt))
3632

3733
# #One-site apply (no normalization)
3834
a = random_tensornetwork(rng, elt, s; link_space = 2)
3935
H = ITensorNetwork(ttn(heisenberg(g), s))
4036
Ha = apply(H, a; maxdim = 4, nsites = 1, normalize = false)
4137
f = inner(Ha, a; alg = "exact") / inner(a, H, a; alg = "exact")
42-
(outputlevel >= 1) && @printf("One-site apply. Fidelity = %s\n", f)
4338
@test abs(f - 1.0) <= 500 * eps(real(elt))
4439

4540
# #Two-site apply (no normalization)
4641
a = random_tensornetwork(rng, elt, s; link_space = 2)
4742
H = ITensorNetwork(ttn(heisenberg(g), s))
4843
Ha = apply(H, a; maxdim = 4, cutoff = 1.0e-16, nsites = 2, normalize = false)
4944
f = inner(Ha, a; alg = "exact") / inner(a, H, a; alg = "exact")
50-
(outputlevel >= 1) && @printf("Two-site apply. Fidelity = %s\n", f)
5145
@test abs(f - 1.0) <= 500 * eps(real(elt))
5246
end
5347
end

0 commit comments

Comments
 (0)