Skip to content

Commit 32186f9

Browse files
committed
Remove bond s normalization in FET
1 parent 446ae38 commit 32186f9

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/algorithms/truncation/fullenv_truncation.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ function fullenv_truncate(
230230
# initialize u, s, vh with truncated or untruncated SVD
231231
u, s, vh = svd_trunc(b0; trunc = (alg.trunc_init ? alg.trunc : notrunc()))
232232
b1 = similar(b0)
233-
# normalize `s` (bond matrices can always be normalized)
234-
s /= norm(s, Inf)
235233
s0 = deepcopy(s)
236234
Δfid, Δs, fid, fid0 = NaN, NaN, 0.0, 0.0
237235
for iter in 1:(alg.maxiter)
@@ -245,7 +243,6 @@ function fullenv_truncate(
245243
r, info_r = linsolve(Base.Fix1(*, B), p, r, 0, 1)
246244
@tensor b1[-1; -2] = u[-1; 1] * r[1 -2]
247245
u, s, vh = svd_trunc(b1; trunc = alg.trunc)
248-
s /= norm(s, Inf)
249246
# update `- l ← = - u ← s ←`
250247
@tensor l[-1 -2] := u[-1; 1] * s[1; -2]
251248
@tensor p[-1 -2] := conj(vh[-2; 2]) * benv[-1 2; 3 4] * b0[3; 4]
@@ -257,9 +254,9 @@ function fullenv_truncate(
257254
@tensor b1[-1; -2] = l[-1 1] * vh[1; -2]
258255
fid = fidelity(benv, b0, b1)
259256
u, s, vh = svd_trunc!(b1; trunc = alg.trunc)
260-
s /= norm(s, Inf)
261257
# determine convergence
262-
Δs = (space(s) == space(s0)) ? _singular_value_distance((s, s0)) : NaN
258+
Δs = (space(s) == space(s0)) ?
259+
_singular_value_distance((normalize(s, Inf), normalize(s0, Inf))) : NaN
263260
Δfid = fid - fid0
264261
s0 = deepcopy(s)
265262
fid0 = fid

test/bondenv/bond_truncate.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using LinearAlgebra
77
using KrylovKit
88

99
Random.seed!(0)
10-
maxiter = 500
10+
maxiter = 600
1111
check_interval = 20
1212
trunc = truncerror(; atol = 1.0e-10) & truncrank(8)
1313
Vext = Vect[FermionParity](0 => 100, 1 => 100)
@@ -39,5 +39,5 @@ for Vbondl in (Vint, Vint'), Vbondr in (Vint, Vint')
3939
@test info.fid ≈ PEPSKit.fidelity(benv, PEPSKit._combine_ab(a1, b1), a2b2)
4040
@test info.fid > fid0
4141
end
42-
@test isapprox(normalize(ss["ALS"], Inf), ss["FET"], atol = 1.0e-3)
42+
@test isapprox(ss["ALS"], ss["FET"], atol = 1.0e-3)
4343
end

0 commit comments

Comments
 (0)