-
Notifications
You must be signed in to change notification settings - Fork 19
Clean up belief propagation #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…is error in this edge case)
…own to many levels
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #57 +/- ##
==========================================
- Coverage 77.94% 77.73% -0.22%
==========================================
Files 55 55
Lines 2916 2834 -82
==========================================
- Hits 2273 2203 -70
+ Misses 643 631 -12
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Still to do:
Looking at it more closely, I think a function like |
…arse through them
Note I also ran this branch through |
@JoeyT1994 I formatted the package in #61. Could you merge those changes? Hopefully then this PR will only show your own changes and not the formatting changes as well. |
Great, yes I have done that merge. |
This PR introduces significant improvements to the Belief Propagation code within
ITensorNetworks.jl
beliefpropagation.jl
is now completely network agnostic and will simply form message tensors, update them etc... independent of the actual network geometry. All partitioning is handled by the recently addedpartition.jl
interface.beliefpropagation.jl
has had the overly specific expectation value functions removed. Instead these have been replaced byget_environment
andcalculate_contraction
-> which are more general and the workhorses of those functions anyway.subgraph_vertices
inpartition.jl
, which checks if the number of partitions required is 1 (both KaHyPar and Metis error in this case --- although the issue has been raised and is being fixed).unwrap_graph_vertices
has been added topartition.jl
which recursively goes through a datagraph and fetches all the vertex data within each vertex.split_index
has been added toabstractitensornetwork.jl
which splits a series of indexes in a givenitensornetwork
and applies the users choice of mapping to them.