pytreenet.time_evolution.time_evo_util package¶
Submodules¶
pytreenet.time_evolution.time_evo_util.update_path module¶
Module to find the update path of a TDVP algorithm.
- class pytreenet.time_evolution.time_evo_util.update_path.TDVPUpdatePathFinder(state: TreeStructure)¶
Bases:
objectConstructs the update path of a TDVP algorithm.
The update path should minimise the number of orthogonalisations, i.e. QR-decompositions, during the time-evolution. To this end the start and end node are chosen to be the two leafs which are furthest away from each other.
- state¶
The tree topology to find the update path on.
- Type:
- main_path¶
The main path, i.e. the longest path in the tree along which to run. For an MPS this would be the only path.
- Type:
List[str]
- find_furthest_non_visited_leaf(path: List[str]) str¶
Finds the leaf that is furthest from the origin once and was not yet visited.
- Parameters:
path (List[sr]) – A list of all node_ids already visited.
- Returns:
- The identifier of the leaf which is furthest away from the
main path and has not been visited yet.
- Return type:
str
- find_main_path_down_from_root(path: List[str]) List[str]¶
Finds the main path which to traverse from the root to the last leaf.
- Parameters:
path (List[str]) – The path already traversed.
- Returns:
- Main path from the root to the last leaf.
[root, node, node, … , leaf]
- Return type:
List[str]
- find_path() List[str]¶
Finds the complete update path for a TDVP along a main path.
All nodes in branches are added before the branch origin in the main path.
- find_start_node_id() str¶
Finds the node id at which to start the TDVP update.
This would be the initial orthogonalisation center of the state that is to be time-evolved. Currently, we assume this site is the leaf furthest away from the root. # TODO: Allow option to find the leaves furthest away from one another.
- Returns:
The node_id at which to start the update.
- Return type:
str
- path_down_from_root(path: List[str]) List[str]¶
Finds the complete path from the root to the last leaf.
- Parameters:
path (List[str]) – The path that was already traversed.
- Returns:
- The complete path from the root to the last leaf.
[root, node, node, … , leaf]
- Return type:
List[str]
- path_for_branch(branch_origin: str) List[str]¶
Finds the node_ids that need to be visited after the last main path node and before branch_origin.
- Parameters:
branch_origin (str) – The identifier of the node in the main path which has the branch as a subtree.
- Returns:
- The desired path. The children appear before their
parent.
- Return type:
List[str]