Reintroduce minimal AbstractNetworkIterator interface code to express BP #15
Draft
jack-dunham wants to merge 13 commits intoITensor:BeliefPropagationfrom
Draft
Reintroduce minimal AbstractNetworkIterator interface code to express BP #15jack-dunham wants to merge 13 commits intoITensor:BeliefPropagationfrom
AbstractNetworkIterator interface code to express BP #15jack-dunham wants to merge 13 commits intoITensor:BeliefPropagationfrom
Conversation
…at) (ITensor#4) Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org> Co-authored-by: Matt Fishman <mtfishman@users.noreply.github.com>
Co-authored-by: mtfishman <7855256+mtfishman@users.noreply.github.com> Co-authored-by: mtfishman <mfishman@flatironinstitute.org> Co-authored-by: Matt Fishman <mtfishman@users.noreply.github.com>
Member
|
Very interesting, I had vaguely wondered if the sweep_solve code could be used to help implement BP. Curious to hear more about it. |
Introduce `BeliefPropagationProblem` wrapper to hold the cache and the error `diff` field. Also simplifies some kwargs wrangling.
ff18fa3 to
013b8b4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR expresses the BP code in terms of the
SweepIteratorandRegionIteratorinterface. It also defines a subtype ofAbstractProblemto host the BP relevant data structures (the cache and the diff).The
set_default_kwargssystem has also been simplified, instead being defined in terms of a singledefault_algorithmfunction.I think certain aspects could be improved depending on how "radical" we wish to be; this was sort of a "minimal viable example" of putting BP in
SweepIterator. For example, theAlgorithm"bp"type seems a bit redundant/is not used to its full potential.The first BP test (on MPS) passes always, but the test on the comb fails as the difference between the two values is sometimes slightly more than the tolerance
1e-14(tensors used are random). This should be exact to machine precision after a single iteration, no?