Abstract class for variational TNS-addition. More...
#include <variational_add.h>
Public Member Functions | |
Adder ()=delete | |
Default ctor deleted. More... | |
Adder (Adder &&)=default | |
Move ctor defaulted. More... | |
Adder (Adder const &)=delete | |
Copy ctor deleted. More... | |
template<typename... Params> | |
Adder (Truncation _trunc, Conf _conf, Params &&... _workspace_params) | |
std::pair< IterativeExit, StateType > | execute () |
Adder & | operator= (Adder &&)=default |
Move assignment op defaulted. More... | |
Adder & | operator= (Adder const &)=delete |
Copy assignment op deleted. More... | |
Protected Member Functions | |
std::string | gen_log (const IterativeExit _exitcode) |
std::string | gen_log_header () |
Private Types | |
typedef Workspace::ScalarType | ScalarType |
typedef Workspace::StateType | StateType |
Private Member Functions | |
bool | abort (const IterativeExit &_exitcode) |
void | check_converged (IterativeExit &_exitcode, const std::vector< SRDef > &_norms) |
bool | converged (const IterativeExit &_exitcode) |
Private Attributes | |
Conf | conf |
Truncation | trunc |
Abstract class for variational TNS-addition.
Explicit implementation of tensor contractions and handling of states and coefficients is done in workspace. Workspace must implement:
init_workspace : create left and right environment tensors, init parallelization, etc., returns IterativeExitReason (custom if no error occured) gen_log_header : set header for output gen_log : create output string prepare_sweep : prepare workspace for next sweep sweep_complete : returns true if a sweep is completed expand : expand current, active site tensor, takes truncation object as input argument update : update current site tensor(s) step_next : move orthogonality center to next site finish_sweep : finish workspace after sweep, return current norm pop_result : move result state