Skip to content

Commit 6184954

Browse files
authored
Properly normalize truncation error in compute_projector (#206)
- Fixed wrong `@set` in `compute_projector` by replacing with `@reset` - Closes #204
1 parent cd7ee2c commit 6184954

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/algorithms/ctmrg/projectors.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function compute_projector(enlarged_corners, coordinate, alg::HalfInfiniteProjec
170170
end
171171
end
172172

173-
@set info.truncation_error = info.truncation_error / norm(S) # normalize truncation error
173+
@reset info.truncation_error = info.truncation_error / norm(S) # normalize truncation error
174174
P_left, P_right = contract_projectors(U, S, V, enlarged_corners...)
175175
return (P_left, P_right), (; U, S, V, info...)
176176
end
@@ -191,7 +191,7 @@ function compute_projector(enlarged_corners, coordinate, alg::FullInfiniteProjec
191191
end
192192
end
193193

194-
@set info.truncation_error = info.truncation_error / norm(S) # normalize truncation error
194+
@reset info.truncation_error = info.truncation_error / norm(S) # normalize truncation error
195195
P_left, P_right = contract_projectors(U, S, V, halfinf_left, halfinf_right)
196196
return (P_left, P_right), (; U, S, V, info...)
197197
end

0 commit comments

Comments
 (0)