Tensor Network Theory Library
Beta release 1.1.1
A library of routines for performing TNTbased operations

These functions are used to examine and manipulate the quantum number symmetry information of the node. These quantum numbers are used for keeping track of global symmetries in the system.
Functions  
void  tntNodeClearQN (tntNode A) 
tntIntArray  tntNodeGetQN (tntNode A, tntLegLabel legA) 
void  tntNodeMakeCovariantQN (tntNode A) 
void  tntNodeSetQN (tntNode A, tntLegLabel legA, tntIntArray *qvals, int legdir) 
void  tntNodeSetQN_nowarn (tntNode A, tntLegLabel legA, tntIntArray *qvals, int legdir) 
void tntNodeClearQN  (  tntNode  A  ) 
Clears all quantum number information from the legs of node , and converts it to an unsymmetric form rather than a blocked form. If there is no quantum number information assigned to the node, then this function will not have any effect.
Definition at line 182 of file tntNodeQN.c.
tntIntArray tntNodeGetQN  (  tntNode  A, 
tntLegLabel  legA  
) 
Gets quantum number information of the given leg of a node \(A\), returning the information in an integer array. If there are no quantum numbers set simply returns an empty array of length zero.
A  Node to get quantum number information from. 
legA  Leg to get quantum number information from. 
Definition at line 155 of file tntNodeQN.c.
void tntNodeMakeCovariantQN  (  tntNode  A  ) 
Requires as an input a node \(A\) with quantum numbers set on all indices apart from a singleton leg. The function then sets the quantum number label for the singleton leg of \(A\) such that at least one nonzero block sized block is formed. If the tensor is covariant there is one quantum number label for which no tensor elements are discarded. The tensor can then be made invariant by setting the leg to have this quantum number. The leg is set to be an outgoing leg.
Note that if the tensor is not convariant, there is no choice of quantum number label for the singleton leg that will result in all tensor elements being kept. A choice of quantum number will be made that results in a nonzero norm, and some information will be discarded.
If the node is not in the correct form calling this function will stop execution and print an error.
Definition at line 204 of file tntNodeQN.c.
void tntNodeSetQN  (  tntNode  A, 
tntLegLabel  legA,  
tntIntArray *  qvals,  
int  legdir  
) 
Sets quantum number information to the given leg of the node \(A\). The number of quantum number labels required is symm_num_qn
multiplied by the dimension of the specified leg, where symm_num_qn
is the number of quantum numbers required for each quantum number label. The values should be provided in an integer array of at least this length, where only the first symm_num_qn*legdim
values are used. Note if all quantum numbers are required to be zero, then NULL can be used instead of sending an array containing zeros.
The direction of the leg indicates whether the quantum numbers on the index add or subtract to the total number of the network. Incoming legs should be TNT_QN_IN, outgoing legs TNT_QN_OUT.
Once quantum number information has been set to all the legs, the node will automatically be converted to symmetric blocktype form. If this conversion results in values being lost, a warning will be printed.
A  Node to set quantum number information to. 
legA  Leg to set quantum number information to. 
qvals  An array containing the quantum number labels. Send NULL to set all QN to zero. 
legdir  The direction of the leg. 
Definition at line 37 of file tntNodeQN.c.
void tntNodeSetQN_nowarn  (  tntNode  A, 
tntLegLabel  legA,  
tntIntArray *  qvals,  
int  legdir  
) 
This function is identical to tntNodeSetQN() however will not print a warning if information is discarded on changing to a covariant node. Use this is if you know information will be discarded e.g. when putting random blocks in covariant form.
A  Node to set quantum number information to. 
legA  Leg to set quantum number information to. 
qvals  An array containing the quantum number labels. Send NULL to set all QN to zero. 
legdir  The direction of the leg. 
Definition at line 105 of file tntNodeQN.c.