From 9201bac71424de05d78e530765058aa504fb8234 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Thu, 28 Mar 2024 15:05:09 -0400 Subject: [PATCH] Try fixing tests --- src/apply.jl | 2 +- src/solvers/alternating_update/alternating_update.jl | 4 +++- src/solvers/alternating_update/region_update.jl | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/apply.jl b/src/apply.jl index 1201cbb7..163c7454 100644 --- a/src/apply.jl +++ b/src/apply.jl @@ -20,7 +20,7 @@ using ITensors.ContractionSequenceOptimization: optimal_contraction_sequence using ITensors.ITensorMPS: siteinds using LinearAlgebra: eigen, norm, svd using NamedGraphs: NamedEdge -using Observers: insert_function! +using Observers: Observers function sqrt_and_inv_sqrt( A::ITensor; ishermitian=false, cutoff=nothing, regularization=nothing diff --git a/src/solvers/alternating_update/alternating_update.jl b/src/solvers/alternating_update/alternating_update.jl index 7c423b0c..6d419366 100644 --- a/src/solvers/alternating_update/alternating_update.jl +++ b/src/solvers/alternating_update/alternating_update.jl @@ -1,3 +1,5 @@ +using Observers: Observers + function alternating_update( operator, init_state::AbstractTTN; @@ -77,7 +79,7 @@ function alternating_update( end end - update!(sweep_observer!; state, which_sweep, sweep_time, outputlevel, sweep_plans) + Observers.update!(sweep_observer!; state, which_sweep, sweep_time, outputlevel, sweep_plans) !isnothing(sweep_printer) && sweep_printer(; state, which_sweep, sweep_time, outputlevel, sweep_plans) checkdone(; diff --git a/src/solvers/alternating_update/region_update.jl b/src/solvers/alternating_update/region_update.jl index 1085fa0a..ae2b2d78 100644 --- a/src/solvers/alternating_update/region_update.jl +++ b/src/solvers/alternating_update/region_update.jl @@ -1,3 +1,5 @@ +using Observers: Observers + #ToDo: generalize beyond 2-site #ToDo: remove concept of orthogonality center for generality function current_ortho(sweep_plan, which_region_update) @@ -122,7 +124,7 @@ function region_update( region_kwargs..., internal_kwargs..., ) - update!(region_observer!; all_kwargs...) + Observers.update!(region_observer!; all_kwargs...) !(isnothing(region_printer)) && region_printer(; all_kwargs...) return state, projected_operator