-
Notifications
You must be signed in to change notification settings - Fork 23
Use @preserve_graph ingauge_edge(Algorithm::"orthogonalize", tn::AbstractITensorNetwork, edge, ...) and truncate(tn::AbstractITensorNetwork, edge, ...)
#237
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
Conversation
|
Makes sense to me, I think it is fair to assume they preserve the graph. The only case I could imagine is if the edge isn't actually in the graph originally. It would be strange to gauge along a non-existent edge, so probably we should check for that case in those functions and users will have to manually add edges they want to gauge/truncate along if they don't exist yet. Can you add a check in those functions you modified that the edge exists in the graph? |
|
Agreed it would be strange to gauge on a non-existing edge. I added a check based on the neighbors of |
I think if you use |
|
I changed it to |
Thanks for checking, good to know. Graphs.jl can make |
This PR changes
gauge_edge(Algorithm::"orthogonalize", tn::AbstractITensorNetwork, edge, ...)andtruncate(tn::AbstractITensorNetwork, edge, ...)to use graph preserving updates of thetn::AbstractITensorNetworkto improve their efficiency.The current use of
orthogonalize(...)inalternating_update(nowsweep_solverinNetworkSolvers) involves rechecking the graph structure every timegauge_edgeis called and thus invokes anO(L)time complexity call in a step that should beO(1)whereLis the system-size.It is not clear to me there is a case where these operations should re-check the graph structure as they implicitly conserve it from the looks of things provided the factorization is done correctly...
@emstoudenmire @mtfishman