-
Notifications
You must be signed in to change notification settings - Fork 19
Normalize #192
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
Normalize #192
Conversation
@mtfishman Yes the source of the failing tests is |
Co-authored-by: Matt Fishman <[email protected]>
@mtfishman Okay I defined a A We should make a PR to |
I think the reason it wasn't defined in DataGraphs.jl is because ITensorNetworks are quite special, since the vertex metadata (the ITensors) implicitly determine the graph structure. That's not the case for most other data graphs I can think of. For that reason, DataGraphs.jl just assumes mapping/modifying the vertex data doesn't change the graph structure. So, I think it is fine to keep this in ITensorNetworks.jl for now. |
Co-authored-by: Matt Fishman <[email protected]>
This PR adds support for normalizing tensor networks with either a BP backend or an exact backend.
Specifically given an
ITensorNetwork
tn
we can calltn_normalized = normalize(tn; alg)
to enforcetn_normalized * dag(tn_normalized) == 1
within the framework of the desired algorithm.This is particularly useful in the context of
alg = "bp"
as it stabilizes the fixed point of belief propagation such that the norm of the message tensors is stable when running subsequent bp iterations ontn_normalized
.@mtfishman this is a routine that I am calling frequently in
bp_alternating_update
and so I thought I would add it. I also think it is generally useful when doing things like TEBD to keep thebp_norm
more stable.