Skip to content

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

Open
wants to merge 92 commits into
base: main
Choose a base branch
from
Open

Normalize #192

wants to merge 92 commits into from

Conversation

JoeyT1994
Copy link
Contributor

This PR adds support for normalizing tensor networks with either a BP backend or an exact backend.

Specifically given an ITensorNetwork tn we can call tn_normalized = normalize(tn; alg) to enforce tn_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 on tn_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 the bp_norm more stable.

@mtfishman
Copy link
Member

@JoeyT1994 it looks like the tests are crashing in test_contraction_sequence.jl (since it shows test_contract_deltas.jl passing as the last thing before it crashes). Any idea what's going on there? Maybe we should just disable those tests for now and bring them back once we figure out what's going on.

@JoeyT1994
Copy link
Contributor Author

JoeyT1994 commented Apr 21, 2025

@mtfishman Yeah you're right it is in contraction_sequences.jl because when I comment that all out the tests pass. Let me try to see which backend it is. It might be EinExprs.jl so I am going to uncomment the rest and see if things pass that way.

@JoeyT1994
Copy link
Contributor Author

@mtfishman Yes the source of the failing tests is EinExprs.jl as when I comment out those specific tests and loading of that extension things pass. I will keep them commented out for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants