Skip to content

Commit

Permalink
test up to L=10^4, normalize_eachmatrix! not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
stecrotti committed May 14, 2024
1 parent fbd435c commit a0fffc4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/abstract_tensor_train.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ Compute the normalization of ``Z=\\sum_{x^1,\\ldots,x^L} A^1(x^1)\\cdots A^L(x^L
Return the natural logarithm of the absolute normalization ``\\log|Z|``
"""
function LinearAlgebra.normalize!(A::AbstractTensorTrain)
# normalize_eachmatrix!(A)
absZ = abs(accumulate_L(A)[2])
L = length(A)
x = exp(1/L * log(absZ))
Expand Down
2 changes: 1 addition & 1 deletion test/periodic_tensor_train.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@testset "Long tensor trains" begin
rng = MersenneTwister(0)
qs = (2, 2)
L = 2000
L = 10000

# overflow
A = rand_periodic_tt( [1; rand(rng, 10:15, L-1); 1], qs... )
Expand Down
2 changes: 1 addition & 1 deletion test/tensor_train.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ end
@testset "Long tensor trains" begin
rng = MersenneTwister(0)
qs = (2, 2)
L = 2000
L = 10000

# overflow
A = rand_tt( [1; rand(rng, 10:15, L-1); 1], qs... )
Expand Down

0 comments on commit a0fffc4

Please sign in to comment.