SyTen
syten::T3N Namespace Reference

Namespace for T3N. More...

Namespaces

namespace  DMRG
 DMRG specific data structures and classes.
 
namespace  Lat
 Contains all lattice generators.
 
namespace  RandomState
 Generators for random states.
 
namespace  RDMs
 A namespace containing reduced density matrices.
 
namespace  TDVP
 T3N TDVP Implementation.
 

Classes

struct  Lattice
 T3N lattice. More...
 
class  MutualInformation
 
class  Operator
 A T3N operator. More...
 
class  QcLatticeGenerator
 
class  State
 
struct  T3NTensor
 Wrapper class for STensor & SBasis. More...
 
class  VarationalTrunc
 Helper to variationally truncate a T3NS. More...
 

Typedefs

using DMRGMode = syten::DMRG::DMRGMode
 
using DMRGStage = syten::DMRG::DMRGStage
 
using IterDirection = syten::T3N::Tree::IterDirection
 
using LegType = syten::T3N::Tree::LegType
 
using NodeType = syten::T3N::Tree::NodeType
 
using SBasis = syten::STensorImpl::SBasis
 
using STensorProxy = STensorImpl::STensorProxy
 
using TransformationType = syten::BasisTransformation::TransformationType
 

Functions

void 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 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 apply_op_itrunc_rec (State &state, State::Ptrc a, Operator::cPtrc op, Truncation const &t)
 Recursive helper function. More...
 
template<typename Iterator = int>
std::tuple< State, SRDefapply_op_orthogonalise_fit (State const &, Operator const &, Truncation const &, SRDef, Index=12, Index=2, State=State(), Iterator=0, Iterator=0)
 Dummy implementation for certain Krylov modes. More...
 
SRDef apply_operator_itrunc (State::Ptrc a, Operator::cPtrc o, Truncation t)
 Applies operator to state and truncates. More...
 
std::vector< SRDefblock_entropies (State &state, bool const, SRDef const alpha=1.)
 SMPS overload, which gives back vector. More...
 
std::map< std::vector< Index >, SRDefblock_entropies (State &state, SRDef const alpha=1.)
 Calculates all block entropies and returns them. More...
 
void block_entropies_rec (std::map< std::vector< Index >, SRDef > &entropies, Vec< Index > &pos, State::Ptrc p, SRDef const &alpha)
 Recursive helper. More...
 
bool checkRank (STensor const &t, Index expected)
 Compares run-time rank to expected. More...
 
bool checkRank (T3NTensor const &t, Index expected)
 Compares run-time rank to expected. More...
 
Operator dagger (Operator const &a)
 Daggers operator. More...
 
void dagger_rec (Operator::Ptr p)
 Recursive helper. More...
 
Operator dot (Operator const &a, Operator const &b, Sector const &target)
 Scalar product of two operators, w/out explicit quantum number declaration. More...
 
void dot_rec (Operator::Ptrc tptr, Operator::cPtrc const bptr, Sector const &target)
 Dot operator recursive helper. More...
 
SRDef entropy (STensor rho)
 Calculates entropy of density matrix. More...
 
SDef expectation (State const &a, Operator const &op)
 Returns the expectation value of an operator wrt a state. More...
 
SDef 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 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...
 
STensor genBranchCmp (SBasis const &a_basis, SBasis const &b_basis, SBasis const &r_basis)
 Generates an local operator in a T3N network matching the specified basis for a branching Node. More...
 
std::tuple< STensor, SBasisIdgenBranchId (SBasis const &a_basis, SBasis const &b_basis)
 Generates an identity local operator in a T3N network for a physical Node. More...
 
Lattice::Types genDMFT_CT3N (Index num_bases, Index const &sites, Index const &bands, std::vector< Index > const &types)
 Creats a multi band forklike T3N DMFT lattice where impurities are on a chain. More...
 
Lattice::Types genDMFT_FT3N (Index num_bases, Index const &sites, Index const &bands, std::vector< Index > const &types)
 Creats a multi band Fork T3N DMFT lattice. More...
 
Lattice::Types genDMFT_FT3N_ph (Index num_bases, Index const &sites, Index const &bands, std::vector< Index > const &types, Index const &particle_num)
 Creats a multi band Fork T3N DMFT lattice with PH split. More...
 
Lattice::Types genDMFT_MT3N (Index num_bases, Index const &sites, Index const &bands, std::vector< Index > const &types, std::vector< Index > const &bath_length)
 Creats a multi band minimal branching node Fork T3N DMFT lattice. More...
 
void genDMFT_rec (Lattice::Phys::Ptr ptr, Index current_imps, Index imp_type, Index const imps, Vec< Index > &currentPosition, Lattice::Translator &trans, Index &currentSite, Index offset)
 Recursive helper for DMFT lattices. More...
 
Lattice::Types genDMFT_SMP (Index num_bases, Index const &sites, Index const &bands, std::vector< Index > const &pos_imp, std::vector< Index > const &types)
 Creats a multi band MP DMFT lattice. More...
 
Lattice::Types genDMFT_T3N (Index num_bases, Index const &sites, Index const &bands, std::vector< Index > const &types)
 Creats a multi band uniform DMFT lattice. More...
 
Lattice::Types genMPS (Index const sites, Index const value=0)
 Generates MPS structure on Tree framework. More...
 
Lattice::Types genPH_split (Index const particle_num, Index const hole_num, Index const value, NodeType nt)
 Generates a PH split MPS like structure on Tree framework. More...
 
Lattice::Types genPhys (std::string_view const skelleton_, Lattice::Translator translator_, Index const value=0)
 Builds BasisTree from skelleton and Basis. More...
 
STensor genPhysCmp (SBasis const &p_basis, SBasis const &a_basis, SBasis const &r_basis)
 Generates an local operator in a T3N network matching the specified basis for a physical Node. More...
 
Tensor< 4 > genPhysId (Basis const &p_basis, Basis const &a_basis)
 Overload for Tensor. More...
 
std::tuple< STensor, SBasisIdgenPhysId (SBasis const &p_basis, SBasis const &a_basis)
 Generates an identity local operator in a T3N network for a physical Node. More...
 
Lattice::Types genStandard (Index const layers, Index const value=0, NodeType nt=NodeType::Physical)
 Generates a standard (translationary invariant) basis tree with a Physical Node followed by a Branching Node, followed by two Physical Nodes, etc. More...
 
void genStandard_rec (Lattice::Types::Ptr ptr, Index const currentLayer, Index const layers, Vec< Index > &currentPosition, Lattice::Translator &trans, Index &currentSite, Index const &value)
 Recursive helper. More...
 
Lattice::Types genUniformPhys (Index const sites, Index const value=0, NodeType nt=NodeType::Physical)
 Generates the same for number of nodes. More...
 
Index invert (Lattice::Translator const &trans, Tree::Position const &pos)
 Searches for the Index when given the position. More...
 
SRDef norm (Operator const &op)
 Computes norm of operator. More...
 
SRDef norm (State const &a)
 Returns the norm \( \sqrt{\langle a | a \rangle}\) of a state. More...
 
SRDef normSqd (State const &a)
 Returns the squared norm \( \langle a | a \rangle\) of a state. More...
 
SRDef oneSiteEntropy (State &state, Index const site)
 Calculates single-site entropy. More...
 
Operator operator* (Operator const &a, Operator const &b)
 Product of two T3NO, \( \hat r = \hat b \hat a \), i.e. b is applied after a if r is applied to a state. More...
 
Operator operator* (Operator const &a, SDef const b)
 Scale a T3NO by a scalar, \( \hat r = b \hat a \). More...
 
Operator operator* (SDef const b, Operator const &a)
 Scale a T3NO by a scalar, \( \hat r = b \hat a \)
More...
 
State operator* (SDef const c, State const &s)
 Multiplies const and state. More...
 
State operator* (State const &s, SDef const c)
 Multiplies state and const. More...
 
State operator* (State const &state, Operator const &op)
 Acts w/ op on state. More...
 
Operatoroperator*= (Operator &o, SDef const c)
 Product of a scalar and an operator, \( c \hat O \). More...
 
Stateoperator*= (State &s, SDef const c)
 Multiplies s by the scalar c More...
 
Operator operator+ (Operator const &a, Operator const &b)
 Sum of two T3NO, \( \hat r = \hat b + \hat a \)
More...
 
State operator+ (State const &a, State const &b)
 Sum of two T3NS, \( |r\rangle = |b\rangle + |a\rangle \)
More...
 
Operator operator- (Operator const &a, Operator const &b)
 Difference of two operators, \( \hat r = \hat a - \hat b \). More...
 
State operator- (State const &a, State const &b)
 Negates state. More...
 
Operator operator/ (Operator const &op, SDef const c)
 Divides by a const. More...
 
State operator/ (State const &s, SDef const c)
 Divides by const. More...
 
Operatoroperator/= (Operator &op, SDef const c)
 Divides by a const. More...
 
Stateoperator/= (State &s, SDef const c)
 Divides by const. More...
 
std::ostreamoperator<< (std::ostream &out, Lattice const &l)
 Output for a lattice. More...
 
std::ostreamoperator<< (std::ostream &out, Operator const &op)
 
std::ostreamoperator<< (std::ostream &out, T3N::State const &state)
 Output a T3NS. More...
 
std::ostreamoperator<< (std::ostream &out, T3NTensor const &t)
 
template<typename It >
SRDef orthogonalise_variational (State &, It, It)
 Dummy implementation for certain Krylov modes. More...
 
template<typename It >
SRDef orthogonalise_variational_two_site (State &, It, It, Truncation const &)
 Dummy implementation for certain Krylov modes. More...
 
SDef overlap (Operator const &a, Operator const &b)
 Computes the overlap of two operators. More...
 
SDef overlap (State const &b, State const &a)
 Returns the overlap \( \langle a | b \rangle \) between two states. More...
 
STensor overlap_rec (Operator::cPtrc a, Operator::cPtrc b)
 Helper function for overlap. More...
 
STensor 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...
 
Operator parse (Lattice const &lat, std::string const &desc, bool const truncate=false)
 Dummy implementation. More...
 
T3N::Operator translate (MPS::Operator const &mpo, Vec< SBasisId > const &phys_ids)
 Takes an MPO as input and produces an T3NO w/ the T3NO STensor structure. More...
 
T3N::State translate (MPS::State const &mps, Vec< SBasisId > const &phys_ids={})
 Takes an MPS as input and produces an T3NS w/ the T3NS STensor structure. More...
 
SRDef twoSiteEntropy (State &state, Index const i, Index const j)
 Calculates two-site entropy. More...
 
SDef variance (T3N::State const &a, T3N::Operator const &op, bool const truncateIntermediate=true, Truncation const trunc=Truncation())
 Calculates the variance. More...
 

Detailed Description

Namespace for T3N.

T3N toolkit.