SyTen

◆ add() [2/3]

void syten::MPS::Lattice::add ( std::string const &  id,
std::string const &  desc,
std::vector< std::vector< Tensor< 4 > > > const &  lI,
std::vector< Tensor< 4 > > const &  op,
std::vector< std::vector< Tensor< 4 > > > const &  rI,
bool const  overwrite = false 
)

Add a single-site operator to any lattice.

Parameters
idkey used in siteOperators, e.g. ch or sz. Stick to lower-case only as a convention.
descfree-form string describing the operator
lIvector of vector of tensors of left-identities. The element lI[t][c] denotes the identity to be used on sites of type c if the active site is of type t.
opvector of tensors of active operator components. The t-th element of this vector is used if the single-site operator is to be constructed on a site of type t.
rIvector of vectors of tensors of right-identities. The element rI[t][c] is the tensor used as the identity on sites of type c if the single-site operator acts on a site of type t.
overwriteset to true if you want to overwrite an existing operator
Remarks
If the single-site operator you add is only valid on a subset of types of sites, you still need lI and rI to cover all sites. For types j on which the operator is invalid, pass an empty tensor in op, i.e. op[j] = Tensor<4>(MPO::Operator::dirs). This is to ensure that external functions don't have to worry about it.