Skip to content

Commit 714ed1e

Browse files
committed
formatting
1 parent f7d597f commit 714ed1e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/algorithms/grassmann.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function ManifoldPoint(state::Union{InfiniteMPS,FiniteMPS}, envs)
7474
al_d[i] = MPSKit.∂∂AC(i, state, O, envs) * state.AC[i]
7575
end
7676
g = Grassmann.project.(al_d, state.AL)
77-
77+
7878
Rhoreg = Vector{eltype(state.C)}(undef, length(state))
7979
δmin = sqrt(eps(real(scalartype(state))))
8080
@static if MPSKit.Defaults.parallelize_sites
@@ -86,7 +86,7 @@ function ManifoldPoint(state::Union{InfiniteMPS,FiniteMPS}, envs)
8686
else
8787
for i in 1:length(state)
8888
Rhoreg[i] = regularize(state.C[i], max(norm(g[i]) / 10, δmin))
89-
end
89+
end
9090
end
9191

9292
return ManifoldPoint(state, envs, g, Rhoreg)
@@ -216,7 +216,7 @@ function retract(x::ManifoldPoint{<:FiniteMPS}, g, alpha)
216216

217217
y = copy(state) # The end-point
218218
h = similar(g) # The tangent at the end-point
219-
for i in 1:length(g)
219+
for i in 1:length(g)
220220
yal, th = Grassmann.retract(state.AL[i], g[i].Pg, alpha)
221221
h[i] = PrecGrad(th)
222222
y.AC[i] = (yal, state.C[i])
@@ -236,13 +236,14 @@ function transport!(h, x, g, alpha, xp)
236236
@static if MPSKit.Defaults.parallelize_sites
237237
@sync for i in 1:length(h)
238238
Threads.@spawn begin
239-
h[i] = PrecGrad(Grassmann.transport!(h[i].Pg, x.state.AL[i], g[i].Pg, alpha, xp.state.AL[i]))
239+
h[i] = PrecGrad(Grassmann.transport!(h[i].Pg, x.state.AL[i], g[i].Pg, alpha,
240+
xp.state.AL[i]))
240241
end
241242
end
242243
else
243244
for i in 1:length(h)
244245
h[i] = PrecGrad(Grassmann.transport!(h[i].Pg, x.state.AL[i], g[i].Pg, alpha,
245-
xp.state.AL[i]))
246+
xp.state.AL[i]))
246247
end
247248
end
248249
return h

0 commit comments

Comments
 (0)