You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 withregion_operator_ttn = TTN([operator(P)[s] for s in sites(P)])
and then determine the order withpost_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 onpost_order_dfs_vertices
, or using a specialized algorithm like 12, and then that functionality could generalize to other graph structures.Footnotes
https://journals.aps.org/pre/abstract/10.1103/PhysRevE.100.043309 ↩
https://arxiv.org/abs/2209.12332 ↩
The text was updated successfully, but these errors were encountered: