Skip to content

Commit

Permalink
Imported Algorithmn from ITensors
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Nov 9, 2023
1 parent fe06b39 commit b21f629
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/belief_propagation/bpsequences.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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): ")
Expand Down
5 changes: 1 addition & 4 deletions examples/gauging/gauging_itns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/beliefpropagation/beliefpropagation_schedule.jl
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/imports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ import ITensors:
scalartype,
#adding
add
#Algorithm
Algorithm

using ITensors.ContractionSequenceOptimization: deepmap

Expand Down

0 comments on commit b21f629

Please sign in to comment.