SyTen
syten::MPS::ParseOperator Namespace Reference

Support classes and functions related to matrix product operator parsing. More...

Classes

class  InvalidExpression
 Thrown when an invalid expression is encountered during MPS::Operator parsing. More...
 
class  NotDefinition
 Thrown when parse() gets a string that is not an operator definition of the form A:O More...
 
struct  StackElement
 One element of the parsing stack. More...
 

Typedefs

typedef void(* StackElementParser) (std::stack< StackElement > &stack, Lattice const &lat, Index const position, bool const truncate)
 Type of a function parsing one element of the supplied stack assuming the supplied lattice. More...
 

Enumerations

enum class  StackElementType { String , Sector , Number , Operator }
 Denotes the type of element stored on the stack. More...
 

Functions

StackElementParser getFunction (std::string const &token)
 Return the function matching the token specified. More...
 
Functions implementing operations on the parsing stack
void 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 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 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 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 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 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 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 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 truncateF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Truncation of an operator. More...
 
void dot_squareF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Squares an operator using dot(). More...
 
void mult_squareF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const truncate)
 Squares an operator using operator*. More...
 
void equiscaleF (std::stack< StackElement > &s, Lattice const &lat, Index const position, bool const)
 Calls equiscale() on a MPO. More...
 

Detailed Description

Support classes and functions related to matrix product operator parsing.