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

Detailed Description

Functions for loading and setting up the system from the command line or from a MATLAB file. Different input formats will later be added.

Functions

void tntComplexArraysLoad (const char *loadname, tntComplexArray arrA, tntComplexArray arrB, tntComplexArray arrC, tntComplexArray arrD, tntComplexArray arrE)
 
void tntComplexParamsLoad (const char *loadname, tntComplex varA, tntComplex varB, tntComplex varC, tntComplex varD, tntComplex varE)
 
void tntDoubleArraysLoad (const char *loadname, tntDoubleArray arrA, tntDoubleArray arrB, tntDoubleArray arrC, tntDoubleArray arrD, tntDoubleArray arrE)
 
void tntDoubleParamsLoad (const char *loadname, double varA, double varB, double varC, double varD, double varE)
 
void tntExOpsLoad (const char *loadname, tntExOp varA, tntExOp varB, tntExOp varC, tntExOp varD, tntExOp varE)
 
void tntIntArraysLoad (const char *loadname, tntIntArray arrA, tntIntArray arrB, tntIntArray arrC, tntIntArray arrD, tntIntArray arrE)
 
void tntIntParamsLoad (const char *loadname, int varA, int varB, int varC, int varD, int varE)
 
void tntNetworksLoad (const char *loadname, tntNetwork varA, tntNetwork varB, tntNetwork varC, tntNetwork varD, tntNetwork varE)
 
void tntNodeArraysLoad (const char *loadname, tntNodeArray arrA, tntNodeArray arrB, tntNodeArray arrC, tntNodeArray arrD, tntNodeArray arrE)
 
void tntNodesLoad (const char *loadname, tntNode varA, tntNode varB, tntNode varC, tntNode varD, tntNode varE)
 
void tntProcessCLOptions (int argc, char **argv, char *loadname, char *loadname_op, char *saveprefix, int *chi, int *outputState)
 
void tntStringsLoad (const char *loadname, char *varA, char *varB, char *varC, char *varD, char *varE)
 

Function Documentation

void tntComplexArraysLoad ( const char *  loadname,
tntComplexArray  arrA,
tntComplexArray  arrB,
tntComplexArray  arrC,
tntComplexArray  arrD,
tntComplexArray  arrE 
)

Loads complex arrays from the file at loadname into the passed arrays. The arrays should have the same variable name in file as the name passed as an argument At least one array must be passed, and a maximum of 5 arrays can be passed with each function call.

Parameters
loadnamePath of the input file
arrAArray to load
arrBArray to load (optional argument)
arrCArray to load (optional argument)
arrDArray to load (optional argument)
arrEArray to load (optional argument)

Definition at line 241 of file tntLoad.c.

void tntComplexParamsLoad ( const char *  loadname,
tntComplex  varA,
tntComplex  varB,
tntComplex  varC,
tntComplex  varD,
tntComplex  varE 
)

Loads complex scalar variables from the file at loadname into the passed variables. The variables should have the same variable name in file as the name passed as an argument At least one variable must be passed, and a maximum of 5 variables can be passed with each function call.

Parameters
loadnamePath of the input file
varAVariable to load
varBVariable to load (optional argument)
varCVariable to load (optional argument)
varDVariable to load (optional argument)
varEVariable to load (optional argument)
Examples:
tntEvolve_if.c.

Definition at line 98 of file tntLoad.c.

void tntDoubleArraysLoad ( const char *  loadname,
tntDoubleArray  arrA,
tntDoubleArray  arrB,
tntDoubleArray  arrC,
tntDoubleArray  arrD,
tntDoubleArray  arrE 
)

Loads double arrays from the file at loadname into the passed arrays. The arrays should have the same variable name in file as the name passed as an argument At least one array must be passed, and a maximum of 5 arrays can be passed with each function call.

Parameters
loadnamePath of the input file
arrAArray to load
arrBArray to load (optional argument)
arrCArray to load (optional argument)
arrDArray to load (optional argument)
arrEArray to load (optional argument)

Definition at line 205 of file tntLoad.c.

void tntDoubleParamsLoad ( const char *  loadname,
double  varA,
double  varB,
double  varC,
double  varD,
double  varE 
)

Loads double scalar variables from the file at loadname into the passed variables. The variables should have the same variable name in file as the name passed as an argument At least one variable must be passed, and a maximum of 5 variables can be passed with each function call.

Parameters
loadnamePath of the input file
varAVariable to load
varBVariable to load (optional argument)
varCVariable to load (optional argument)
varDVariable to load (optional argument)
varEVariable to load (optional argument)
Examples:
tntEvolve_if.c.

Definition at line 61 of file tntLoad.c.

void tntExOpsLoad ( const char *  loadname,
tntExOp  varA,
tntExOp  varB,
tntExOp  varC,
tntExOp  varD,
tntExOp  varE 
)

Loads networks from the file at loadname into the passed variables. The variables should have the same variable name in file as the name passed as an argument At least one variable must be passed, and a maximum of 5 variables can be passed with each function call.

Parameters
loadnamePath of the input file
varAExpectation operators to load
varBExpectation operators to load (optional argument)
varCExpectation operators to load (optional argument)
varDExpectation operators to load (optional argument)
varEExpectation operators to load (optional argument)
Examples:
tntEvolve_if.c.

Definition at line 346 of file tntLoad.c.

void tntIntArraysLoad ( const char *  loadname,
tntIntArray  arrA,
tntIntArray  arrB,
tntIntArray  arrC,
tntIntArray  arrD,
tntIntArray  arrE 
)

Loads integer arrays from the file at loadname into the passed arrays. The arrays should have the same variable name in file as the name passed as an argument At least one array must be passed, and a maximum of 5 arrays can be passed with each function call.

Parameters
loadnamePath of the input file
arrAArray to load
arrBArray to load (optional argument)
arrCArray to load (optional argument)
arrDArray to load (optional argument)
arrEArray to load (optional argument)
Examples:
tntEvolve_if.c.

Definition at line 169 of file tntLoad.c.

void tntIntParamsLoad ( const char *  loadname,
int  varA,
int  varB,
int  varC,
int  varD,
int  varE 
)

Loads integer scalar variables from the file at loadname into the passed variables. The variables should have the same variable name in file as the name passed as an argument At least one variable must be passed, and a maximum of 5 variables can be passed with each function call.

Parameters
loadnamePath of the input file
varAVariable to load
varBVariable to load (optional argument)
varCVariable to load (optional argument)
varDVariable to load (optional argument)
varEVariable to load (optional argument)
Examples:
tntEvolve_if.c.

Definition at line 25 of file tntLoad.c.

void tntNetworksLoad ( const char *  loadname,
tntNetwork  varA,
tntNetwork  varB,
tntNetwork  varC,
tntNetwork  varD,
tntNetwork  varE 
)

Loads networks from the file at loadname into the passed variables. The variables should have the same variable name in file as the name passed as an argument At least one variable must be passed, and a maximum of 5 variables can be passed with each function call.

Parameters
loadnamePath of the input file
varANetwork to load
varBNetwork to load (optional argument)
varCNetwork to load (optional argument)
varDNetwork to load (optional argument)
varENetwork to load (optional argument)
Examples:
tntEvolve_if.c.

Definition at line 381 of file tntLoad.c.

void tntNodeArraysLoad ( const char *  loadname,
tntNodeArray  arrA,
tntNodeArray  arrB,
tntNodeArray  arrC,
tntNodeArray  arrD,
tntNodeArray  arrE 
)

Loads node arrays from the file at loadname into the passed arrays. The arrays should have the same variable name in file as the name passed as an argument At least one array must be passed, and a maximum of 5 arrays can be passed with each function call.

Parameters
loadnamePath of the input file
arrAArray to load
arrBArray to load (optional argument)
arrCArray to load (optional argument)
arrDArray to load (optional argument)
arrEArray to load (optional argument)

Definition at line 311 of file tntLoad.c.

void tntNodesLoad ( const char *  loadname,
tntNode  varA,
tntNode  varB,
tntNode  varC,
tntNode  varD,
tntNode  varE 
)

Loads nodes from the file at loadname into the passed variables. The variables should have the same variable name in file as the name passed as an argument At least one variable must be passed, and a maximum of 5 variables can be passed with each function call.

Parameters
loadnamePath of the input file
varANode to load
varBNode to load (optional argument)
varCNode to load (optional argument)
varDNode to load (optional argument)
varENode to load (optional argument)

Definition at line 276 of file tntLoad.c.

void tntProcessCLOptions ( int  argc,
char **  argv,
char *  loadname,
char *  loadname_op,
char *  saveprefix,
int *  chi,
int *  outputState 
)

Function that loads input command line parameters and uses them to set variables passes as an argument and system parameters.

Command line options:

Long nameShort nameDescription
--help-h print this help.
--input <file> -i <file> Input checkpoint. This file contains the networks and paramaters that change during the algorithm. Required.
--operators <file> -o <file> Input operators. This file contains operators which are not changed during the algorthim. Required.
--directory <dir> -d <dir> Output directory and prefix for the output files (which may later be used as input checkpoints). If not given no output will be saved.
--chi <n>-c <n> The maximum internal dimension \(\chi\) of nodes in the network. If not given it is set to -1 meaning no truncation will be performed.
--TOL <val>-T <val> Tolerance for zeroing matrix values in SVD. See tntSVDTolSet() for more information. If not given default of 1e-14 will be used.
--abstrunc <val>-a <val> Absolute value to truncate all singular values to in SVD. If not given a value of -1 (i.e. no truncation) will be used.
--reltrunc <val>-r <val> Relative value to truncate all singular values to in SVD. If not given a default value of 1e-16 will be used
--truncerrbound <val>-E <val> Value of truncation error per SVD to truncate all singular values to in SVD. If not given a default value of -1 (i.e. no truncation) will be used
--svdtype <val>-s (sdd|svd) The default SVD routine is sdd but can occasionally fail. The other option is svd for the standard and more stable SVD.
--seed <val>-e <n> Random number seed for the calculation. If zero or no argument is given the current time will be used as a seed.
--quietTurns quiet mode on, so that the only library output printed is warning and error messages.
--no-output -q No output files written.

Note that, with the exception of --TOL which calls the function tntSVDTolSet() to set the tolerance, this function just sets the required variables. The way these variables will be used is implementation dependent. If any of the variables are not required or should not be allowed to be set from the command line for your implementation, simply pass the NULL pointer in place of that argument. Passing NULL instead of a pointer to the variable will over-ride the 'Required' status for the command line option.

Returns
No return value.
Parameters
argcInput argument count
argvInput arguments
loadnameName of network file to be loaded
loadname_opName of operator file to be loaded
saveprefixDirectory and prefix for saving results
chiInitial chi value
outputStateFlag for enabling output
Examples:
tntEvolve_cl.c, tntEvolve_if.c, tntGS_cl.c, and tntThermal_cl.c.

Definition at line 486 of file tntLoad.c.

References tntFinalize(), tntSVDRelTruncTolSet(), tntSVDRoutineSet(), tntSVDTolSet(), tntSVDTruncErrTolSet(), and tntSVDTruncTolSet().

void tntStringsLoad ( const char *  loadname,
char *  varA,
char *  varB,
char *  varC,
char *  varD,
char *  varE 
)

Loads strings from the file at loadname into the passed variables. The variables should have the same variable name in file as the name passed as an argument At least one variable must be passed, and a maximum of 5 variables can be passed with each function call.

Parameters
loadnamePath of the input file
varAString to load
varBString to load (optional argument)
varCString to load (optional argument)
varDString to load (optional argument)
varEString to load (optional argument)

Definition at line 133 of file tntLoad.c.