-
Notifications
You must be signed in to change notification settings - Fork 13
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
Belief Propagation Version 3 #85
Belief Propagation Version 3 #85
Conversation
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 #85 +/- ##
==========================================
+ Coverage 77.75% 77.94% +0.18%
==========================================
Files 62 62
Lines 3273 3287 +14
==========================================
+ Hits 2545 2562 +17
+ Misses 728 725 -3
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@JoeyT1994 besides the function renaming I raised in the comments above, over all it looks good! Nice to see it involves pretty minimal changes. Is there anything in particular you think I should look at? |
No I think it all seems straightforward and there is nothing else in particular for you to look at. Just let me know what you want to do with the output type of |
…exibility in Message Tensor Initialisation
Okay I think I have made the belief propagation interface much simpler following your suggestions. Initialisation now always gives a rank 1 MPS with the on-site tensor constructor specificable by the user. |
Looks great, thanks! |
This PR introduces a more generalized version of belief propagation where the message tensors are now ITensorNetworks whose structure can be specified by the user.
Message tensor updates therefore can utilize the
approx_itensornetwork()
function and thus there is a new degree of freedom one can utilise for belief propagation. Default behaviour (not specifying contraction arguments forupdate_mt()
) is to have the message tensors take the form of anITensorNetwork
containing a singleITensor
Corresponding tests and examples have been updated to reflect these changes.
Within
beliefpropagation.jl
, thecalculate_contraction
function has been replaced withcalculate_contraction_network
and it is then up to the user to decide how to contract the resulting network to obtain, e.g., an expectation value.I have also defined
ITensorNetwork(t::ITensor)
to default toITensorNetwork(ITensor[t])