From fbfb8d6cb817377443307339b08cde56eedb7a71 Mon Sep 17 00:00:00 2001 From: Katharine Hyatt Date: Tue, 20 Oct 2026 14:02:42 +0200 Subject: [PATCH] use tforeach in vomps --- src/algorithms/approximate/vomps.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/algorithms/approximate/vomps.jl b/src/algorithms/approximate/vomps.jl index 361c846cc..adb84f6f0 100644 --- a/src/algorithms/approximate/vomps.jl +++ b/src/algorithms/approximate/vomps.jl @@ -114,8 +114,8 @@ function localupdate_step!( allocator = default_allocator(state.mps, scheduler) tforeach(eachsite(state.mps); scheduler) do site local AC, C - @sync begin - Threads.@spawn begin + tforeach(1:2; scheduler) do half + if isone(half) AC = map(1:size(state.mps, 1)) do row AC_projection( CartesianIndex(row, site), state.mps, state.operator, state.envs; @@ -123,8 +123,7 @@ function localupdate_step!( ) end circshift!(AC, 1) - end - Threads.@spawn begin + else C = map(1:size(state.mps, 1)) do row C_projection( CartesianIndex(row, site), state.mps, state.operator, state.envs;