SyTen
state.cpp File Reference

Implementation for state.h. More...

+ Include dependency graph for state.cpp:

Namespaces

namespace  syten
 Syten namespace.
 
namespace  syten::T3N
 Namespace for T3N.
 

Typedefs

using syten::T3N::SBasis = syten::STensorImpl::SBasis
 

Functions

void syten::T3N::addScaled (State &a, State const &b, SDef const s)
 Adds a T3NS b, scaled by the scalar prefactor s to a T3NS a. More...
 
SRDef syten::T3N::apply_op_itrunc (State &a, Operator const &op, Truncation const &trunc)
 Applied the T3NO op to the T3NS a and immediately truncates during application. More...
 
SRDef syten::T3N::apply_op_itrunc_rec (State &state, State::Ptrc a, Operator::cPtrc op, Truncation const &t)
 Recursive helper function. More...
 
SRDef syten::T3N::apply_operator_itrunc (State::Ptrc a, Operator::cPtrc o, Truncation t)
 Applies operator to state and truncates. More...
 
std::vector< SRDef > syten::T3N::block_entropies (State &state, bool const, SRDef const alpha=1.)
 SMPS overload, which gives back vector. More...
 
std::map< std::vector< Index >, SRDef > syten::T3N::block_entropies (State &state, SRDef const alpha=1.)
 Calculates all block entropies and returns them. More...
 
void syten::T3N::block_entropies_rec (std::map< std::vector< Index >, SRDef > &entropies, Vec< Index > &pos, State::Ptrc p, SRDef const &alpha)
 Recursive helper. More...
 
SDef syten::T3N::expectation (State const &a, Operator const &op)
 Returns the expectation value of an operator wrt a state. More...
 
SDef syten::T3N::expectation (State const &a, Operator const &op, State const &b)
 Returns the expectation value of an operator between two states as \( \langle b | \left( \hat O | a \rangle \right) \). More...
 
STensor syten::T3N::expectation_rec (State::cPtrc const aptr, Operator::cPtrc const optr, State::cPtrc const bptr)
 Returns the partial contraction of tensors below (and including) the supplied pointers. More...
 
SRDef syten::T3N::norm (State const &a)
 Returns the norm \( \sqrt{\langle a | a \rangle}\) of a state. More...
 
SRDef syten::T3N::normSqd (State const &a)
 Returns the squared norm \( \langle a | a \rangle\) of a state. More...
 
State syten::T3N::operator* (State const &s, SDef const c)
 Multiplies state and const. More...
 
State syten::T3N::operator* (State const &state, Operator const &op)
 Acts w/ op on state. More...
 
State & syten::T3N::operator*= (State &s, SDef const c)
 Multiplies s by the scalar c More...
 
State syten::T3N::operator+ (State const &a, State const &b)
 Sum of two T3NS, \( |r\rangle = |b\rangle + |a\rangle \)
More...
 
State syten::T3N::operator- (State const &a, State const &b)
 Negates state. More...
 
State syten::T3N::operator/ (State const &s, SDef const c)
 Divides by const. More...
 
State & syten::T3N::operator/= (State &s, SDef const c)
 Divides by const. More...
 
std::ostreamsyten::T3N::operator<< (std::ostream &out, T3N::State const &state)
 Output a T3NS. More...
 
SDef syten::T3N::overlap (State const &b, State const &a)
 Returns the overlap \( \langle a | b \rangle \) between two states. More...
 
STensor syten::T3N::overlap_rec (State::cPtrc a, State::cPtrc b, bool const cache)
 Recursively returns the partial contraction of tensors below (and including) pointers a and b. More...
 
SDef syten::T3N::variance (T3N::State const &a, T3N::Operator const &op, bool const truncateIntermediate=true, Truncation const trunc=Truncation())
 Calculates the variance. More...
 

Detailed Description

Implementation for state.h.