diff --git a/examples/belief_propagation/bpsequences.jl b/examples/belief_propagation/bpsequences.jl index cbdf7148..456e96c7 100644 --- a/examples/belief_propagation/bpsequences.jl +++ b/examples/belief_propagation/bpsequences.jl @@ -53,7 +53,7 @@ function main() contract_kwargs=(; alg="exact"), target_precision=1e-10, niters=100, - edges=edge_sequence(mts_init; alg=ITensors.Algorithm("Parallel")), + edges=edge_sequence(mts_init; alg="parallel"), verbose=true, ) print("Sequential updates (sequence is default edge list of the message tensors): ") diff --git a/examples/gauging/gauging_itns.jl b/examples/gauging/gauging_itns.jl index 0cf10931..0246e443 100644 --- a/examples/gauging/gauging_itns.jl +++ b/examples/gauging/gauging_itns.jl @@ -75,10 +75,7 @@ function benchmark_state_gauging( ) else times_iters[i] = @elapsed mts, _ = belief_propagation_iteration( - ψψ, - mts; - contract_kwargs=(; alg="exact"), - edges=edge_sequence(mts; alg=ITensors.Algorithm("Parallel")), + ψψ, mts; contract_kwargs=(; alg="exact"), edges=edge_sequence(mts; alg="parallel") ) end diff --git a/src/beliefpropagation/beliefpropagation_schedule.jl b/src/beliefpropagation/beliefpropagation_schedule.jl index 53113d44..a4f5eb84 100644 --- a/src/beliefpropagation/beliefpropagation_schedule.jl +++ b/src/beliefpropagation/beliefpropagation_schedule.jl @@ -1,4 +1,4 @@ -default_edge_sequence_alg() = Algorithm("ForestCover") +default_edge_sequence_alg() = "forest_cover" default_bp_niters(g::NamedGraph) = is_tree(g) ? 1 : nothing function default_bp_niters(g::AbstractGraph) diff --git a/src/imports.jl b/src/imports.jl index 3186de4d..71406878 100644 --- a/src/imports.jl +++ b/src/imports.jl @@ -96,6 +96,8 @@ import ITensors: scalartype, #adding add +#Algorithm +Algorithm using ITensors.ContractionSequenceOptimization: deepmap