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.
id | key used in siteOperators, e.g. ch or sz . Stick to lower-case only as a convention. |
desc | free-form string describing the operator |
lI | vector 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. |
op | vector 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 . |
rI | vector 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. |
overwrite | set to true if you want to overwrite an existing operator |
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. References syten::RepRegister::id(), std::make_pair(), std::move(), siteOperators, and SYTEN_ASSERT_DEBUG.