pyUni10.Network¶
-
class
pyUni10.
Network
¶
-
pyUni10.
Network
(filename[, tensors]) Loads the network structure from file.
Parameters: - filename (str) – file where the network structure is stored
- tensors (array of UniTensors) – list of tensors to be put into Network
Returns: a Network object
Return type: Methods
-
Network.
launch
([name])¶ Performs contraction of the tensors in the network, and returns a UniTensor named name (optional).
Parameters: name (str) – name of the output UniTensor Returns: contracted tensor Return type: UniTensor
-
Network.
profile
()¶ Prints the memory usage of Network
Returns: current memory usage of Network Return type: str
-
Network.
putTensor
(idx, T[, force=True])¶
-
Network.
putTensor
(tname, T[, force=True]) Replaces the tensor of index idx / name tname in the network file with T. If the force flag is set, the tensor will be put in the network without reconstructing the pair-wise contraction sequence.
Parameters: - idx (int) – sequential index of a tensor in Network
- name (str) – name of a tensor in Network
- T (UniTensor) – tensor to be put into Network
- force (bool) – if set True, the contraction sequence is not reconstructed
-
Network.
putTensorT
(idx, T[, force=True])¶
-
Network.
putTensorT
(tname, T[, force=True]) Replaces the tensor of index idx / name tname in the network file with the transpose of T. If the force flag is set, the tensor will be put in the network without reconstructing the pair-wise contraction sequence.
Parameters: - idx (int) – sequential index of a tensor in Network
- name (str) – name of a tensor in Network
- T (UniTensor) – tensor to be put into Network
- force (bool) – if set True, the contraction sequence is not reconstructed