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
tntMatCreateFunctionalOp.m
1 %======================================================================
2 %> @ingroup matscripts
3 %> Turns a cell array of operators into a functional node representing a
4 %> sinlge site MPS operator. Once loaded into the TNT library, parameters on
5 %> the node can be set to change the final value.
6 %>
7 %> @param ops A cell array of the matrix operators.
8 %>
9 %> @param func A string representing the function for the node - either
10 %> 'sum' or 'exp' are currently supported.
11 %>
12 %> @retval node A structure representing the functional node.
13 %======================================================================
14 function node = tntMatCreateFunctionalOp(ops,func)
15 
16 tensor.elems_type = 'params';
17 tensor.elems.function = func;
18 tensor.elems.operators = ops;
19 tensor.dims = size(ops{1});
20 tensor.qn_info.qn_dir = [0,0];
21 tensor.qn_info.qn_index = {[],[]};
22 node.tensor = tensor;
23 node.ids = 'DU';
24 node.indices = {0,1};
25 
26 end
function tntMatCreateFunctionalOp(in ops, in func)