SyTen
syten::Krylov::StateWrapper< StateT, TruncT > Class Template Reference

The StateWrapper class wraps a MPS/BTT-state to provide an interface complying to exponentialLanczos template. More...

#include <state_wrappers.h>

+ Inheritance diagram for syten::Krylov::StateWrapper< StateT, TruncT >:

Public Types

using is_StateWrapper = std::true_type
 type trait, to identify that we are dealing with a StateWrapper More...
 
using State_t = std::decay_t< StateT >
 the type of the underlying state, cv-qualifiers and reference removed More...
 
using Trunc_t = std::decay_t< TruncT >
 the type of the truncation, cv-qualifiers and reference removed More...
 
using type = StateWrapper< StateT, TruncT >
 the type of *this More...
 

Public Member Functions

SRDef _norm () const
 norm the norm of the underlying state More...
 
MemoryUsage::MemorySize allocSize () const
 allocSize() support More...
 
template<typename ... Ts>
void history (Ts &&...ts) const
 history add an element to the history More...
 
void normalise () const
 normalise underlying state More...
 
 operator State_t & () &
 operator State_t cast to the underlyinig state; lvalue overload More...
 
 operator State_t && () &&
 operator State_t cast to the underlying state; rvalue overload More...
 
 operator State_t const & () const &
 operator State_t cast to the underlyinig state; const lvalue overload More...
 
type operator* (SDef prefactor) &&
 operator * multiplication by scalar; the rvalue version More...
 
type operator* (SDef prefactor) const &
 operator * multiplication by scalar; the lvalue version More...
 
typeoperator*= (SDef prefactor)
 operator *= multiplication assignment (scalar version) More...
 
type operator+ (type const &snd) &&
 operator + add a state and an rvalue *this More...
 
type operator+ (type snd) const &
 operator + addition of two statewrappers; lvalue-*this overload More...
 
typeoperator+= (type const &rhs)
 operator += addition assignment, defaulted More...
 
typeoperator-= (type rhs)
 operator -= subtraction assignment; More...
 
type operator/ (SDef divisor) &&
 operator / division by scalar; rvalue overload More...
 
type operator/ (SDef divisor) const &
 operator / division by scalar; lvalue overload More...
 
typeoperator/= (SDef divisor)
 operator /= division assignment by scalar More...
 
typeoperator= (type &&rhs)=default
 operator = move assignment operator More...
 
typeoperator= (type const &rhs)=default
 operator = copy assignment operator, defaulted More...
 
void save (std::string const &s) const
 save save underlying state More...
 
 StateWrapper ()=default
 the default constructor, with empty state and default truncation More...
 
 StateWrapper (State_t s, Trunc_t trunc)
 StateWrapper constructor from an underlying state and eventually a truncation specification. More...
 
 StateWrapper (State_t s, Trunc_t trunc, int)
 StateWrapper ctor from an underlying state and truncation specification, but without an additional truncation. More...
 
 StateWrapper (StateWrapper &&)=default
 StateWrapper move constructor. More...
 
 StateWrapper (StateWrapper const &)=default
 
SRDef truncateKeepNorm (Truncation const &trunc)
 truncates the state as specified by the argument, not by the stored Truncation struct More...
 
Trunc_t const & truncator () const
 Returns the stored truncation object. More...
 

Private Attributes

State_t state
 state the state that is wrapped. mutable so that we can use const StateWrappers and cache/uncache the state at the same time More...
 
Trunc_t truncate
 truncate a functor providing operator () for truncation after addition/subtraction More...
 

Friends

template<typename Op >
class OperatorWrapper
 

Detailed Description

template<typename StateT, typename TruncT = Truncation>
class syten::Krylov::StateWrapper< StateT, TruncT >

The StateWrapper class wraps a MPS/BTT-state to provide an interface complying to exponentialLanczos template.


The documentation for this class was generated from the following file: