From a9501bc6698bdd748fb9be024cc7e92de097437d Mon Sep 17 00:00:00 2001 From: Miles Date: Tue, 11 Jun 2024 21:31:10 -0400 Subject: [PATCH] copy the state at the beginning of default_inserter (#190) --- src/solvers/insert/insert.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/solvers/insert/insert.jl b/src/solvers/insert/insert.jl index a0250c95..11aed223 100644 --- a/src/solvers/insert/insert.jl +++ b/src/solvers/insert/insert.jl @@ -14,6 +14,7 @@ function default_inserter( cutoff=nothing, internal_kwargs, ) + state = copy(state) spec = nothing other_vertex = setdiff(support(region), [ortho_vert]) if !isempty(other_vertex) @@ -37,10 +38,10 @@ function default_inserter( phi::ITensor, region::NamedEdge, ortho; - normalize=false, + cutoff=nothing, maxdim=nothing, mindim=nothing, - cutoff=nothing, + normalize=false, internal_kwargs, ) v = only(setdiff(support(region), [ortho]))