Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensorNetworks"
uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7"
authors = ["Matthew Fishman <[email protected]>, Joseph Tindall <[email protected]> and contributors"]
version = "0.15.0"
version = "0.15.1"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
6 changes: 0 additions & 6 deletions test/solvers/test_fitting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
Expand All @@ -31,23 +28,20 @@ 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)
a = random_tensornetwork(rng, elt, s; link_space = 2)
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)
a = random_tensornetwork(rng, elt, s; link_space = 2)
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
Loading