Skip to content

Commit 40f9228

Browse files
committed
Remove vs to rescale from exact function
1 parent 05d2e73 commit 40f9228

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/normalize.jl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ function rescale(tn::AbstractITensorNetwork; alg="exact", kwargs...)
44
return rescale(Algorithm(alg), tn; kwargs...)
55
end
66

7-
function rescale(
8-
alg::Algorithm"exact",
9-
tn::AbstractITensorNetwork;
10-
verts_to_rescale=collect(vertices(tn)),
11-
kwargs...,
12-
)
7+
function rescale(alg::Algorithm"exact", tn::AbstractITensorNetwork; kwargs...)
138
logn = logscalar(alg, tn; kwargs...)
14-
c = inv(exp(logn / length(verts_to_rescale)))
9+
vs = collect(vertices(tn))
10+
c = inv(exp(logn / length(vs)))
1511
tn = copy(tn)
16-
for v in verts_to_rescale
12+
for v in vs
1713
tn[v] *= c
1814
end
1915
return tn

0 commit comments

Comments
 (0)