@@ -90,31 +90,6 @@ function approximate!(ψ::MultilineMPS, toapprox::Tuple{<:MultilineMPO,<:Multili
9090
9191 normalize! (envs, ψ, toapprox)
9292
93- # update the edge
94- site = size (ψ, 2 )
95- for row in 1 : size (ψ, 1 )
96- ψ. AL[row, site] = ψ. AC[row, site] / ψ. C[row, site]
97- ψ. AC[row, 1 ] = _mul_tail (ψ. AL[row, 1 ], ψ. C[row, 1 ])
98- AC2′ = AC2_projection (CartesianIndex (row, site), ψ, toapprox, envs;
99- kind= :ALAC )
100- al, c, ar, = tsvd! (AC2′; trunc= alg. trscheme, alg= alg. alg_svd)
101- normalize! (c)
102-
103- ψ. AL[row + 1 , site] = al
104- ψ. C[row + 1 , site] = complex (c)
105- ψ. AR[row + 1 , site + 1 ] = _transpose_front (ar)
106-
107- ψ. AC[row + 1 , site] = _mul_tail (al, c)
108- ψ. AC[row + 1 , 1 ] = _transpose_front (c * ar)
109- ψ. AL[row + 1 , 1 ] = ψ. AC[row + 1 , 1 ] / ψ. C[row + 1 , 1 ]
110- end
111-
112- # TODO : decide if we should compare at the half-sweep level?
113- # C_current = ψ.C[:, site]
114-
115- transfer_leftenv! (envs, ψ, toapprox, 1 )
116- transfer_rightenv! (envs, ψ, toapprox, 0 )
117-
11893 # sweep from right to left
11994 for site in reverse (1 : (size (ψ, 2 ) - 1 ))
12095 for row in 1 : size (ψ, 1 )
@@ -134,27 +109,6 @@ function approximate!(ψ::MultilineMPS, toapprox::Tuple{<:MultilineMPO,<:Multili
134109
135110 normalize! (envs, ψ, toapprox)
136111
137- # update the edge
138- for row in 1 : size (ψ, 1 )
139- ψ. AC[row, end ] = _mul_front (ψ. C[row, end - 1 ], ψ. AR[row, end ])
140- ψ. AR[row, 1 ] = _transpose_front (ψ. C[row, end ] \
141- _transpose_tail (ψ. AC[row, 1 ]))
142- AC2′ = AC2_projection (CartesianIndex (row, 0 ), ψ, toapprox, envs; kind= :ACAR )
143- al, c, ar, = tsvd! (AC2′; trunc= alg. trscheme, alg= alg. alg_svd)
144- normalize! (c)
145-
146- ψ. AL[row + 1 , end ] = al
147- ψ. C[row + 1 , end ] = complex (c)
148- ψ. AR[row + 1 , 1 ] = _transpose_front (ar)
149-
150- ψ. AR[row + 1 , end ] = _transpose_front (ψ. C[row + 1 , end - 1 ] \
151- _transpose_tail (al * c))
152- ψ. AC[row + 1 , 1 ] = _transpose_front (c * ar)
153- end
154-
155- transfer_leftenv! (envs, ψ, toapprox, 1 )
156- transfer_rightenv! (envs, ψ, toapprox, 0 )
157-
158112 # update error
159113 ϵ = sum (zip (C_current, ψ. C[:, 0 ])) do (c1, c2)
160114 smallest = infimum (_firstspace (c1), _firstspace (c2))
0 commit comments