Skip to content
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

Simplify projected_operator_tensors by using post_order_dfs_vertices #133

Open
mtfishman opened this issue Feb 1, 2024 · 0 comments
Open

Comments

@mtfishman
Copy link
Member

In #132, the function projected_operator_tensors is introduced to get the tensors that constitute the tree tensor network operator being projected onto a region of the network, which is then used to apply the projected operator as a map to perform algorithms like DMRG.

The ordering of the tensors determines the contraction order in contract, but the code logic for determining the ordering is quite complicated right now. Since the projected TTNO should just be a smaller TTNO on the region of the network (including caps that are the environments/message tensors entering the region), it seems like a simpler way to write it would be to collect the tensors as a TTN with region_operator_ttn = TTN([operator(P)[s] for s in sites(P)]) and then determine the order with post_order_dfs_vertices(region_operator_ttn).

Even better would be to use the function contraction_sequence and detect if the input is a TTN and then use a sequence based on post_order_dfs_vertices, or using a specialized algorithm like 12, and then that functionality could generalize to other graph structures.

Footnotes

  1. https://journals.aps.org/pre/abstract/10.1103/PhysRevE.100.043309

  2. https://arxiv.org/abs/2209.12332

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

No branches or pull requests

1 participant