-
Notifications
You must be signed in to change notification settings - Fork 17
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
base: main
Are you sure you want to change the base?
Normalize #192
Conversation
Co-authored-by: Matt Fishman <[email protected]>
Co-authored-by: Matt Fishman <[email protected]>
@JoeyT1994 it looks like the tests are crashing in |
@mtfishman Yeah you're right it is in |
@mtfishman Yes the source of the failing tests is |
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.