SyTen
syten::MPS::TDVP::Worker Struct Reference

TDVP worker. More...

#include <tdvp_worker.h>

+ Collaboration diagram for syten::MPS::TDVP::Worker:

Public Member Functions

MemoryUsage::MemorySize allocSize () const
 Returns size. More...
 
MemoryUsage::MemorySize cacheSize () const
 Returns cache size. More...
 
void calcContr (Index startingPosition, bool const verbose=false)
 Calculate full set of contractions, i.e. More...
 
void calcContrL (Index const where, bool initialized_timer)
 Calculate the new left-contraction on the specified site. More...
 
void calcContrR (Index const where, bool initialized_timer)
 Calculate the new right-contraction on the specified site.g It must be right-normalised and contractions to the right must exist. More...
 
bool checkSignals () const
 Return false if we must exit due to having received some signal. More...
 
void clearUnneeded ()
 Destroys unneeded tensors in PTDVP. More...
 
IterativeExit evolveBond (Tensor< 2 > &bond, const SDef prefactor)
 Evolve on a bond, reads/writes to bond argument. More...
 
IterativeExit evolveSite (Index where, SDef const prefactor)
 Evolve a single site, reads/writes to psi directly. More...
 
IterativeExit evolveTwo (Tensor< 4 > &merged, SDef const prefactor, Index const lSite, Index const rSite)
 Evolve two sites, reads/writes to merged argument. More...
 
std::vector< Tensor< 3 > > expand_to_left ()
 Creats subspace expansion tensor for the left bond. More...
 
std::vector< Tensor< 3 > > expand_to_right ()
 Creats subspace expansion tensor for the right bond. More...
 
syten::Vec< Stategse_build_krylov_vectors (bool initialized_timer=true)
 Builds Krylov vectors for subspace expansion. More...
 
Tensor< 3 > gse_create_expanded (syten::Vec< State >const &ancillary_states, Index site)
 Create expanded right-normalized tensor for GSE-TDVP method. More...
 
void gse_enrich_state (bool initialized_timer=true)
 Performs global subspace expansion for GSE-TDVP method. More...
 
Tensor< 2 > gse_expand_bond (syten::Vec< State > &ancillary_states, Index site)
 Perform subspace expansion for a single bond. More...
 
void gse_shift_orth_center (State &state, Tensor< 3 >const &rtensor, Index site, bool is_state=false)
 Shifts orthogonality center for GSE-TDVP method. More...
 
template<class Archive >
void load (Archive &ar, unsigned int const in_version)
 Serialization. More...
 
Tensor< 2 > locally_expand_bond ()
 Returns the locally expanded bond of a site tensor. More...
 
template<typename... Args>
void logTrace (int level, Args &&... data) const
 Log some tracing information. More...
 
Tensor< 2 > normL (Index where)
 Left-normalise tensor on site where and return the left-over bit. More...
 
Tensor< 2 > normR (Index where)
 Right-normalise tensor on site where and return the left-over bit \( \Psi(\textrm{where}) \to U S \Psi(\textrm{where}) \). More...
 
Workeroperator= (Worker &&other)
 Move operator. More...
 
Workeroperator= (Worker const &other)
 Copy operator. More...
 
template<class Archive >
void save (Archive &ar, const unsigned int v) const
 Overload to satisfy boost. More...
 
template<class Archive >
void save (Archive &ar, unsigned int const in_version)
 Serialization. More...
 
void sweep ()
 Runs a sweep in the direction specified by dir. More...
 
void sweepLeft ()
 Runs a left sweep. More...
 
void sweepLeftTwoSite ()
 Runs a left sweep with a two site step. More...
 
void sweepRight ()
 Runs a right sweep. More...
 
void sweepRightTwoSite ()
 Runs a right sweep with a two site step. More...
 
void sync (Tensor< 2 > &connector, Tensor< 3 > &rPsi, std::vector< Tensor< 3 > > const &rContr, std::vector< Tensor< 3 > > &lContr, SRDef const forward_prefactor=1., SRDef const backward_prefactor=1.)
 Syncs between worker segments. More...
 
void sync (Tensor< 2 > &connector, Worker &right, int const numberOfSites)
 Moves boundary of worker to the right by numberOfSites. More...
 
 Worker ()=default
 Default ctor. More...
 
 Worker (std::vector< Operator > &&op_, State &&psi_, Conf &&conf_, Tensor< 2 > &c, Index const lbound, Index const rbound)
 Standard ctor. More...
 
 Worker (Worker &&other)
 Move constructor. More...
 

Public Attributes

Conf conf
 configuration More...
 
std::vector< AsyncCached< std::vector< Tensor< 3 > > > > contrL
 contractions of op and state to the left of the current site More...
 
std::vector< AsyncCached< std::vector< Tensor< 3 > > > > contrR
 contractions of op and state to the right of the currens site More...
 
SweepDirection dir
 current sweeping direction (left/right) More...
 
Errors errs
 Keeping track of all the errors. More...
 
bool gse_above_threshold = false
 whether variational operator application is allowed in the next GSE step More...
 
bool gse_expand = true
 whether to do subspace expansion in the next step in GSE mode More...
 
Index gse_num_saturated = 0
 how many sites have reached the maximum possible/ allowed bond dimension More...
 
Index lbound
 Left most site to be updated. More...
 
std::vector< Indexleft_max_bdim
 left max bdim at site More...
 
Index length
 Total system size. More...
 
std::vector< Operatorops
 Operator H in exp(-i dt H) More...
 
Index position
 the current position More...
 
State psi
 current state More...
 
Index rbound
 Right most site to be updated. More...
 
SweepDirection rel_dir
 current relative sweeping direction (forward/backward) More...
 
std::vector< Indexright_max_bdim
 right max bdim at site More...
 
Timer timer
 Each worker keeps track of its timings. More...
 
SRDef total_norm_change = 1
 Tracks the total norm change. More...
 

Static Public Attributes

static constexpr unsigned int version = 2
 Bump this if the data above changes. More...
 

Detailed Description

TDVP worker.


The documentation for this struct was generated from the following files: