Skip to content

Commit f7d597f

Browse files
committed
Workign version
1 parent ca6ee91 commit f7d597f

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/algorithms/grassmann.jl

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,10 @@ end
7070
function ManifoldPoint(state::Union{InfiniteMPS,FiniteMPS}, envs)
7171
al_d = similar(state.AL)
7272
O = envs.operator
73-
@static if MPSKit.Defaults.parallelize_sites
74-
@sync for i in 1:length(state)
75-
Threads.@spawn begin
76-
al_d[i] = MPSKit.∂∂AC(i, state, O, envs) * state.AC[i]
77-
end
78-
end
79-
g = fetch.(map(CartesianIndices(state.AL)) do I
80-
return Threads.@spawn Grassmann.project(al_d[I], state.AL[I])
81-
end)
82-
else
83-
for i in 1:length(state)
84-
al_d[i] = MPSKit.∂∂AC(i, state, O, envs) * state.AC[i]
85-
end
86-
g = Grassmann.project.(al_d, state.AL)
73+
for i in 1:length(state)
74+
al_d[i] = MPSKit.∂∂AC(i, state, O, envs) * state.AC[i]
8775
end
76+
g = Grassmann.project.(al_d, state.AL)
8877

8978
Rhoreg = Vector{eltype(state.C)}(undef, length(state))
9079
δmin = sqrt(eps(real(scalartype(state))))

0 commit comments

Comments
 (0)