SyTen
parse_operator.cpp File Reference

Implementation for inc/mps/parse_operator.h. More...

+ Include dependency graph for parse_operator.cpp:

Namespaces

namespace  syten
 Syten namespace.
 
namespace  syten::MPS
 The namespace containing all MPS-related tools, classes and objects.
 
namespace  syten::MPS::ParseOperator
 Support classes and functions related to matrix product operator parsing.
 

Functions

StackElementParser syten::MPS::ParseOperator::getFunction (std::string const &token)
 Return the function matching the token specified. More...
 
Operator syten::MPS::parse (Lattice const &lat, std::string const &desc, bool truncate=true)
 Parse an operator description. More...
 
Operator syten::MPS::parse (std::string const &desc, bool const truncate=true)
 Parse a lattice:operator description. More...
 
Functions implementing operations on the parsing stack
void syten::MPS::ParseOperator::addF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Addition of two operators or two numbers: a_num b_num → a+b | a_opr b_opr → a+b More...
 
void syten::MPS::ParseOperator::distributeF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Distributes the absolute value of a number evenly over the system size, multiplied into the identity operator. More...
 
void syten::MPS::ParseOperator::dot_squareF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Squares an operator using dot(). More...
 
void syten::MPS::ParseOperator::dotF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Scalar product of two operators in the vacuum quantum number sector: a_opr b_opr _dot → dot(a,b), calls dotqF() if top of stack is sector. More...
 
void syten::MPS::ParseOperator::dotqF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Scalar product of two operators in the specified quantum number sector: a_opr b_opr q_sec → dot(a,b,q) More...
 
void syten::MPS::ParseOperator::equiscaleF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const)
 Calls equiscale() on a MPO. More...
 
void syten::MPS::ParseOperator::mult_squareF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Squares an operator using operator*. More...
 
void syten::MPS::ParseOperator::multF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Multiply the two topmost elements: a_opr|a_num b_opr|b_num → a * b, a is applied first. More...
 
void syten::MPS::ParseOperator::operatorF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Create a global operator from the topmost element: x_str|x_num|x_opr _o → x_opr More...
 
void syten::MPS::ParseOperator::sectorF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Create a sector from the topmost element: x_str → x_sec More...
 
void syten::MPS::ParseOperator::siteF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Create a single-site operator from the two topmost elements: a_str b_num _s → opr(a_b) More...
 
void syten::MPS::ParseOperator::truncateF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Truncation of an operator. More...
 

Detailed Description

Implementation for inc/mps/parse_operator.h.