Tensor Network Theory Library  Beta release 1.2.1
A library of routines for performing TNT-based operations
 All Data Structures Functions Variables Groups Pages
Symmetry information

Detailed Description

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)
 

Function Documentation

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.

Referenced by tntMpsCreateProductMpo().

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.

Returns
Integer array containing quantum numbers for that leg.
Parameters
ANode to get quantum number information from.
legALeg to get quantum number information from.

Definition at line 155 of file tntNodeQN.c.

Referenced by tntMpsCreateConfig(), tntMpsCreateMpo(), tntMpsCreateProductMpo(), tntMpsCreateSymmRandom(), tntMpsCreateTwoSiteOp(), tntMpsMpoMpsInit(), tntMpsMpoMpsInitOrth(), tntMpsOpGetQN(), and tntMpsSelfInit().

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 non-zero 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 non-zero 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.

References tntIntArrayFree().

Referenced by tntMpsCreateConfig(), tntMpsCreateProductMpo(), and tntMpsOpGetQN().

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 block-type form. If this conversion results in values being lost, a warning will be printed.

See Also
Use function tntNodeSetQN_nowarn() instead if you do not wish a warning to be printed when information is discarded on conversion.
Parameters
ANode to set quantum number information to.
legALeg to set quantum number information to.
qvalsAn array containing the quantum number labels. Send NULL to set all QN to zero.
legdirThe direction of the leg.

Definition at line 37 of file tntNodeQN.c.

References systype, and tntNodeGetLegDim().

Referenced by tntMpsCreateBosonOp(), tntMpsCreateConfig(), tntMpsCreateMpo(), tntMpsCreateProductMpo(), tntMpsCreateSpinOp(), tntMpsCreateTwoSiteOp(), tntMpsMpoMpsInit(), tntMpsMpoMpsInitOrth(), tntMpsOpGetQN(), and tntMpsSelfInit().

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.

See Also
See documentation for tntNodeSetQN() for full details.
Parameters
ANode to set quantum number information to.
legALeg to set quantum number information to.
qvalsAn array containing the quantum number labels. Send NULL to set all QN to zero.
legdirThe direction of the leg.

Definition at line 105 of file tntNodeQN.c.

References systype, and tntNodeGetLegDim().

Referenced by tntMpsCreateSymmRandom().