VMPS++
Loading...
Searching...
No Matches
MpoTerms< Symmetry, Scalar > Class Template Reference

Detailed Description

template<typename Symmetry, typename Scalar>
class MpoTerms< Symmetry, Scalar >

Definition at line 34 of file MpoTerms.h.

#include <MpoTerms.h>

Inheritance diagram for MpoTerms< Symmetry, Scalar >:

Classes

struct  reversedData
 

Public Types

typedef SiteOperator< Symmetry, Scalar > OperatorType
 
typedef Symmetry::qType qType
 
typedef Eigen::SparseMatrix< Scalar, Eigen::ColMajor, EIGEN_DEFAULT_SPARSE_INDEX_TYPEMatrixType
 

Public Member Functions

void reconstruct (const std::vector< std::map< std::array< qType, 2 >, std::vector< std::vector< std::map< qType, OperatorType > > > > > &O_in, const std::vector< Qbasis< Symmetry > > &qAux_in, const std::vector< std::vector< qType > > &qPhys_in, const bool FINALIZED_IN, const BC boundary_condition_in, const qType &qTot_in=Symmetry::qvacuum())
 
 MpoTerms (const std::size_t L=0, const BC boundary_condition_in=BC::OPEN, const qType &qTot_in=Symmetry::qvacuum(), const DMRG::VERBOSITY::OPTION &VERB_in=DMRG::VERBOSITY::OPTION::SILENT)
 
void initialize (const std::size_t L, const BC boundary_condition_in, const qType &qTot_in)
 
virtual void push (const std::size_t loc, const std::vector< OperatorType > &opList, const std::vector< qType > &qList, const Scalar lambda=1.0)
 
void push (const std::size_t loc, const std::vector< OperatorType > &opList, const Scalar lambda=1.0)
 
void show () const
 
void save_label (const std::size_t loc, const std::string &info_label)
 
void set_name (const std::string &label_in)
 
const std::string get_name () const
 
std::vector< std::string > get_info () const
 
void scale (const Scalar factor, const Scalar offset=0., const std::size_t power=0ul, const double tolerance=1.e-14)
 
template<typename OtherScalar >
MpoTerms< Symmetry, OtherScalar > cast ()
 
void set_qPhys (const std::size_t loc, const std::vector< qType > &qPhys_in)
 
void finalize (const bool COMPRESS=true, const std::size_t power=1, const double tolerance=::mynumeric_limits< double >::epsilon())
 
void calc (const std::size_t power)
 
bool is_finalized () const
 
const std::vector< std::map< std::array< qType, 2 >, std::vector< std::vector< std::map< qType, OperatorType > > > > > & get_O () const
 
const std::vector< std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > > & get_W () const
 
const std::vector< Qbasis< Symmetry > > & get_qAux () const
 
const std::vector< std::vector< qType > > & get_qOp () const
 
const std::vector< std::vector< qType > > & get_qPhys () const
 
const std::vector< std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > > & get_W_power (std::size_t power) const
 
const std::vector< Qbasis< Symmetry > > & get_qAux_power (std::size_t power) const
 
const std::vector< std::vector< qType > > & get_qOp_power (std::size_t power) const
 
std::size_t get_hilbert_dimension (const std::size_t loc) const
 
BC get_boundary_condition () const
 
const qTypeget_qVac () const
 
const qTypeget_qTot () const
 
const std::size_t get_pos_qTot () const
 
bool check_qPhys () const
 
bool check_power (std::size_t power) const
 
std::size_t maxPower () const
 
std::size_t size () const
 
void transform_base (const qType &qShift, const bool PRINT=false, const int factor=-1, const std::size_t powre=0ul)
 
std::vector< std::vector< TwoSiteData< Symmetry, Scalar > > > calc_TwoSiteData () const
 
std::vector< std::pair< qType, std::size_t > > base_order_IBC (const std::size_t power=1) const
 
double memory (MEMUNIT memunit=kB) const
 
double sparsity (const std::size_t power=1, const bool PER_MATRIX=false) const
 
void set_Identity (const typename Symmetry::qType &Q=Symmetry::qvacuum())
 
void set_Zero ()
 
void set_verbosity (const DMRG::VERBOSITY::OPTION VERB_in)
 
DMRG::VERBOSITY::OPTION get_verbosity () const
 
void save (std::string filename)
 
void load (std::string filename)
 
const std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > & W_at (const std::size_t loc) const
 
const std::vector< std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > > & W_full () const
 
const std::vector< std::vector< qType > > & locBasis () const
 
const std::vector< qType > & locBasis (const std::size_t loc) const
 
const std::vector< Qbasis< Symmetry > > & auxBasis () const
 
const Qbasis< Symmetry > & auxBasis (const std::size_t loc) const
 
const Qbasis< Symmetry > & inBasis (const std::size_t loc) const
 
const Qbasis< Symmetry > & outBasis (const std::size_t loc) const
 
const std::vector< std::vector< qType > > & opBasis () const
 
const std::vector< qType > & opBasis (const std::size_t loc) const
 
const qTypeQtarget () const
 
void setLocBasis (const std::vector< std::vector< qType > > &q)
 
void setLocBasis (const std::vector< qType > &q, std::size_t loc)
 
const std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > & Wsq_at (const std::size_t loc) const
 
const std::vector< qType > & opBasisSq (const std::size_t loc) const
 
const std::vector< std::vector< qType > > & opBasisSq () const
 
const bool check_SQUARE () const
 
double sparsity (bool USE_SQUARE, bool PER_MATRIX) const
 
void setQtarget (const qType &q)
 

Static Public Member Functions

static MpoTerms< Symmetry, Scalar > prod (const MpoTerms< Symmetry, Scalar > &top, const MpoTerms< Symmetry, Scalar > &bottom, const qType &qTot, const double tolerance=::mynumeric_limits< double >::epsilon())
 
static MpoTerms< Symmetry, Scalar > sum (const MpoTerms< Symmetry, Scalar > &top, const MpoTerms< Symmetry, Scalar > &bottom, const double tolerance=::mynumeric_limits< double >::epsilon())
 

Public Attributes

std::vector< std::vector< qType > > qOp
 
std::vector< Qbasis< Symmetry > > qAux
 
std::vector< std::vector< qType > > qPhys
 
std::vector< std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > > W
 
std::vector< std::vector< std::vector< qType > > > qOp_powers
 
std::vector< std::vector< Qbasis< Symmetry > > > qAux_powers
 
std::vector< std::vector< std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > > > W_powers
 
std::size_t N_sites
 
std::size_t N_phys = 0ul
 
reversedData reversed
 
std::string label = "MPO"
 

Protected Member Functions

void increment_auxdim (const std::size_t loc, const qType &q)
 
void increment_first_auxdim_OBC (const qType &qIn)
 
void increment_last_auxdim_OBC (const qType &qOut)
 
void decrement_auxdim (const std::size_t loc, const qType &q)
 
void decrement_first_auxdim_OBC (const qType &qIn)
 
void decrement_last_auxdim_OBC (const qType &qOut)
 
void add (const std::size_t loc, const OperatorType &op, const qType &qIn, const qType &qOut, const std::size_t IndexIn, const std::size_t IndexOut)
 
std::size_t get_auxdim (const std::size_t loc, const qType &q) const
 
void assert_hilbert (const std::size_t loc, const std::size_t dim)
 
bool eliminate_linearlyDependent_rows (const std::size_t loc, const qType &qIn, const double tolerance)
 
bool eliminate_linearlyDependent_cols (const std::size_t loc, const qType &qOut, const double tolerance)
 
std::map< qType, std::vector< std::map< qType, OperatorType > > > delete_row (const std::size_t loc, const qType &qIn, const std::size_t row_to_delete, const bool SAMESITE)
 
std::map< qType, std::vector< std::map< qType, OperatorType > > > delete_col (const std::size_t loc, const qType &qOut, const std::size_t col_to_delete, const bool SAMESITE)
 
void add_to_row (const std::size_t loc, const qType &qIn, const std::size_t row, const std::map< qType, std::vector< std::map< qType, OperatorType > > > &ops, const Scalar factor)
 
void add_to_col (const std::size_t loc, const qType &qOut, const std::size_t col, const std::map< qType, std::vector< std::map< qType, OperatorType > > > &ops, const Scalar factor)
 
void calc_qOp ()
 
void calc_qAux ()
 
void calc_W ()
 
void got_update ()
 
void initialize ()
 
void compress (const double tolerance)
 
void renormalize ()
 
void clear_opLabels ()
 
std::tuple< std::size_t, std::size_t, std::size_t, std::size_t > auxdim_infos () const
 
std::vector< qTypecalc_qList (const std::vector< OperatorType > &opList)
 
void fill_O_from_W ()
 

Static Protected Member Functions

static void prod_swap_IBC (std::vector< std::map< std::array< qType, 2 >, std::vector< std::vector< std::map< qType, OperatorType > > > > > &O_out, std::vector< std::size_t > &row_qVac, std::vector< std::size_t > &col_qVac, std::vector< std::size_t > &row_qTot, std::vector< std::size_t > &col_qTot)
 
static void prod_delZeroCols_OBC (std::map< std::array< qType, 2 >, std::vector< std::vector< std::map< qType, OperatorType > > > > &O_last, Qbasis< Symmetry > &qAux_last, Qbasis< Symmetry > &qAux_prev, const qType &qTot, const std::size_t col_qTot)
 
static std::string power_to_string (std::size_t power)
 
static std::pair< std::string, std::size_t > detect_and_remove_power (const std::string &name_w_power)
 

Protected Attributes

std::vector< std::map< std::array< qType, 2 >, std::vector< std::vector< std::map< qType, OperatorType > > > > > O
 
std::vector< std::map< qType, std::size_t > > auxdim
 
qType qTot
 
qType qVac = Symmetry::qvacuum()
 
std::size_t pos_qTot
 
std::size_t pos_qVac
 
BC boundary_condition
 
std::vector< std::vector< std::string > > info
 
std::vector< int > hilbert_dimension
 
MPO_STATUS::OPTION status = MPO_STATUS::ALTERABLE
 
DMRG::VERBOSITY::OPTION VERB = DMRG::VERBOSITY::OPTION::SILENT
 
std::string before_verb_set
 
std::size_t current_power = 1
 
bool GOT_QOP = false
 
bool GOT_QAUX = false
 
bool GOT_W = false
 
std::vector< bool > GOT_QPHYS
 

Member Typedef Documentation

◆ MatrixType

template<typename Symmetry , typename Scalar >
typedef Eigen::SparseMatrix<Scalar,Eigen::ColMajor,EIGEN_DEFAULT_SPARSE_INDEX_TYPE> MpoTerms< Symmetry, Scalar >::MatrixType

Definition at line 39 of file MpoTerms.h.

◆ OperatorType

template<typename Symmetry , typename Scalar >
typedef SiteOperator<Symmetry,Scalar> MpoTerms< Symmetry, Scalar >::OperatorType

Definition at line 37 of file MpoTerms.h.

◆ qType

template<typename Symmetry , typename Scalar >
typedef Symmetry::qType MpoTerms< Symmetry, Scalar >::qType

Definition at line 38 of file MpoTerms.h.

Constructor & Destructor Documentation

◆ MpoTerms()

template<typename Symmetry , typename Scalar >
MpoTerms< Symmetry, Scalar >::MpoTerms ( const std::size_t  L = 0,
const BC  boundary_condition_in = BC::OPEN,
const qType qTot_in = Symmetry::qvacuum(),
const DMRG::VERBOSITY::OPTION VERB_in = DMRG::VERBOSITY::OPTION::SILENT 
)

Constructor for an instance of MpoTerms with fixed lattice size (for VUMPS: of the unit cell)

Parameters
LLattice size
boundary_condition_inBoundary condition
qTot_inTotal quantum number of the MPO

Definition at line 731 of file MpoTerms.h.

Member Function Documentation

◆ add()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::add ( const std::size_t  loc,
const OperatorType op,
const qType qIn,
const qType qOut,
const std::size_t  IndexIn,
const std::size_t  IndexOut 
)
protected

Adds an operator in O

Parameters
locLattice site
opOperator
qInIncoming quantum number block for row
qOutOutgoing quantum number block for column
IndexInRow index
IndexOutColumn index

Definition at line 2073 of file MpoTerms.h.

◆ add_to_col()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::add_to_col ( const std::size_t  loc,
const qType qOut,
const std::size_t  col,
const std::map< qType, std::vector< std::map< qType, OperatorType > > > &  ops,
const Scalar  factor 
)
protected

Adds a multiple of another column to a certain column

Parameters
locLattice site
qOutQuantum number of the block
rowIndex of the column
opsMap {q} -> [row] of the column that shall be added
factorOptional factor to scale the added column

Definition at line 1950 of file MpoTerms.h.

◆ add_to_row()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::add_to_row ( const std::size_t  loc,
const qType qIn,
const std::size_t  row,
const std::map< qType, std::vector< std::map< qType, OperatorType > > > &  ops,
const Scalar  factor 
)
protected

Adds a multiple of another row to a certain row

Parameters
locLattice site
qInQuantum number of the block
rowIndex of the row
opsMap {q} -> [col] of the row that shall be added
factorOptional factor to scale the added row

Definition at line 1911 of file MpoTerms.h.

◆ assert_hilbert()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::assert_hilbert ( const std::size_t  loc,
const std::size_t  dim 
)
protected

Checks whether the dimension of an operator matches the local Hilbert space dimension. Sets the latter if it has not been set yet.

Parameters
locLattice site
dimAssumed dimension of local Hilbert space

Definition at line 2727 of file MpoTerms.h.

◆ auxBasis() [1/2]

template<typename Symmetry , typename Scalar >
const std::vector< Qbasis< Symmetry > > & MpoTerms< Symmetry, Scalar >::auxBasis ( ) const
inline

Definition at line 705 of file MpoTerms.h.

◆ auxBasis() [2/2]

template<typename Symmetry , typename Scalar >
const Qbasis< Symmetry > & MpoTerms< Symmetry, Scalar >::auxBasis ( const std::size_t  loc) const
inline

Definition at line 706 of file MpoTerms.h.

◆ auxdim_infos()

template<typename Symmetry , typename Scalar >
std::tuple< std::size_t, std::size_t, std::size_t, std::size_t > MpoTerms< Symmetry, Scalar >::auxdim_infos
inlineprotected

Calculates the average MPO bond dimension and the maximum MPO bond dimension

Returns
[Average,Maximum]

Definition at line 4186 of file MpoTerms.h.

◆ base_order_IBC()

template<typename Symmetry , typename Scalar >
std::vector< std::pair< typename Symmetry::qType, std::size_t > > MpoTerms< Symmetry, Scalar >::base_order_IBC ( const std::size_t  power = 1) const
Returns
List of quantum numbers and degeneracy indices of the auxiliar basis connecting both edges of the unit cell. Ordered in such a way that a lower triangular matrix can be achieved.

Definition at line 4053 of file MpoTerms.h.

◆ calc()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::calc ( const std::size_t  power)

Calculates auxiliar bases, operator bases and the W matrix (if they are not up to date). Possibility to calculate higher powers of the MPO, filling the auxiliar bases, the operator bases and the W matrix for these.

Parameters
powerAll W-matrices, qAux-bases and qOp-bases up to this power of the MPO are being calculated.

Definition at line 1134 of file MpoTerms.h.

◆ calc_qAux()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::calc_qAux
protected

Calculates the MPO bond bases by analyzing auxdim. GOT_QAUX is set true.

Definition at line 1264 of file MpoTerms.h.

◆ calc_qList()

template<typename Symmetry , typename Scalar >
std::vector< typename Symmetry::qType > MpoTerms< Symmetry, Scalar >::calc_qList ( const std::vector< OperatorType > &  opList)
protected

Generates the branch of MPO auxiliar bases quantum numbers that connects qVac and qTot with respect to a given list of local operators. It is asserted that the quantum number branch is unique.

Parameters
opListList of local operators
Returns
List of corresponding quantum numbers for push-methods.

Definition at line 961 of file MpoTerms.h.

◆ calc_qOp()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::calc_qOp
protected

Calculates all local operator bases by checking which quantum numbers appear in the respective operator set. QOT_QOP is set true.

Definition at line 1235 of file MpoTerms.h.

◆ calc_TwoSiteData()

template<typename Symmetry , typename Scalar >
std::vector< std::vector< TwoSiteData< Symmetry, Scalar > > > MpoTerms< Symmetry, Scalar >::calc_TwoSiteData

Precalcs data for two-site calculations

Definition at line 3195 of file MpoTerms.h.

◆ calc_W()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::calc_W
protected

Calculates the W matrix. Needs qOp calculated before. GOT_W is set true.

Definition at line 1175 of file MpoTerms.h.

◆ cast()

template<typename Symmetry , typename Scalar >
template<typename OtherScalar >
MpoTerms< Symmetry, OtherScalar > MpoTerms< Symmetry, Scalar >::cast
Returns
Cast instance of MpoTerms with another scalar type

Definition at line 3075 of file MpoTerms.h.

◆ check_power()

template<typename Symmetry , typename Scalar >
bool MpoTerms< Symmetry, Scalar >::check_power ( std::size_t  power) const
inline
Returns
Has a given power of the MPO been calculated?
Parameters
powerChosen power of the MPO

Definition at line 600 of file MpoTerms.h.

◆ check_qPhys()

template<typename Symmetry , typename Scalar >
bool MpoTerms< Symmetry, Scalar >::check_qPhys
Returns
Have all physical bases of local Hilbert spaces been set?

Definition at line 2842 of file MpoTerms.h.

◆ check_SQUARE()

template<typename Symmetry , typename Scalar >
const bool MpoTerms< Symmetry, Scalar >::check_SQUARE ( ) const
inline

Definition at line 721 of file MpoTerms.h.

◆ clear_opLabels()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::clear_opLabels
protected

Empties all operator labels in O

Definition at line 4165 of file MpoTerms.h.

◆ compress()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::compress ( const double  tolerance)
protected

Compresses the MpoTerms. Needs FINALIZED Terms.

Parameters
toleranceThreshold up to which value linear dependencies shall be removed

Definition at line 1437 of file MpoTerms.h.

◆ decrement_auxdim()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::decrement_auxdim ( const std::size_t  loc,
const qType q 
)
protected

Decrements the MPO auxiliar basis dimension by one. Also manages reshaping of O. If BC::INFINITE, loc >= N_sites is allowed. In this case, the method decrements qAux[0] and qAux[N_sites] for loc = N_sites

Parameters
locLattice site, for BC::OPEN: 0 < loc < N_sites
qQuantum number

Definition at line 2424 of file MpoTerms.h.

◆ decrement_first_auxdim_OBC()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::decrement_first_auxdim_OBC ( const qType qIn)
protected

Decrements the MPO auxiliar basis dimension connecting legt edge and first lattice site by one, also manages reshaping of O. Just for open boundary condition, when this cannot be done by decrement_auxdim.

Parameters
qInQuantum number

Definition at line 2585 of file MpoTerms.h.

◆ decrement_last_auxdim_OBC()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::decrement_last_auxdim_OBC ( const qType qOut)
protected

Decrements the MPO auxiliar basis dimension connectinglast lattice site and right edge by one, also manages reshaping of O. Just for open boundary condition, when this cannot be done by decrement_auxdim.

Parameters
qOutQuantum number

Definition at line 2642 of file MpoTerms.h.

◆ delete_col()

template<typename Symmetry , typename Scalar >
std::map< typename Symmetry::qType, std::vector< std::map< typename Symmetry::qType, SiteOperator< Symmetry, Scalar > > > > MpoTerms< Symmetry, Scalar >::delete_col ( const std::size_t  loc,
const qType qOut,
const std::size_t  col_to_delete,
const bool  SAMESITE 
)
protected

Deletes a certain column in O. Does not resize O, but shifts the empty column to the right.

Parameters
locLattice site
qOutQuantum number of the block
col_to_deleteIndex of the column
SAMESITEIf true, then the column with the same quantum number is skipped. Useful for VUMPS compression, when there is only one lattice site.
Returns
Deleted column as a map {q} -> [row]

Definition at line 2031 of file MpoTerms.h.

◆ delete_row()

template<typename Symmetry , typename Scalar >
std::map< typename Symmetry::qType, std::vector< std::map< typename Symmetry::qType, SiteOperator< Symmetry, Scalar > > > > MpoTerms< Symmetry, Scalar >::delete_row ( const std::size_t  loc,
const qType qIn,
const std::size_t  row_to_delete,
const bool  SAMESITE 
)
protected

Deletes a certain row in O. Does not resize O, but shifts the empty row to the bottom.

Parameters
locLattice site
qInQuantum number of the block
row_to_deleteIndex of the row
SAMESITEIf true, then the row with the same quantum number is skipped. Useful for VUMPS compression, when there is only one lattice site.
Returns
Deleted row as a map {q} -> [col]

Definition at line 1989 of file MpoTerms.h.

◆ detect_and_remove_power()

template<typename Symmetry , typename Scalar >
std::pair< std::string, std::size_t > MpoTerms< Symmetry, Scalar >::detect_and_remove_power ( const std::string &  name_w_power)
staticprotected

For labelling the powers of an MPO, exponentials in the factors' labels are detected and removed

Parameters
name_w_powerLabel of a factor in the product that may contain a superscript exponential
Returns
[Base label = first power without superscript,removed power]

Definition at line 3616 of file MpoTerms.h.

◆ eliminate_linearlyDependent_cols()

template<typename Symmetry , typename Scalar >
bool MpoTerms< Symmetry, Scalar >::eliminate_linearlyDependent_cols ( const std::size_t  loc,
const qType qOut,
const double  tolerance 
)
protected

Checks for linearly dependent columns (including zero columns) within a certain block in O and manages their deletion.

Parameters
locLattice site
qOutQuantum number of the block to check
toleranceThreshold up to which value linear dependencies shall be removed

Definition at line 1751 of file MpoTerms.h.

◆ eliminate_linearlyDependent_rows()

template<typename Symmetry , typename Scalar >
bool MpoTerms< Symmetry, Scalar >::eliminate_linearlyDependent_rows ( const std::size_t  loc,
const qType qIn,
const double  tolerance 
)
protected

Checks for linearly dependent rows (including zero rows) within a certain block in O and manages their deletion.

Parameters
locLattice site
qInQuantum number of the block to check

Definition at line 1592 of file MpoTerms.h.

◆ fill_O_from_W()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::fill_O_from_W
protected

Definition at line 4735 of file MpoTerms.h.

◆ finalize()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::finalize ( const bool  COMPRESS = true,
const std::size_t  power = 1,
const double  tolerance = ::mynumeric_limits<double>::epsilon() 
)

Finalizes the MpoTerms by cutting the row of right unity (qTot, pos_qTot) at the first and the column of left unity (Symmetry::qvacuum(), pos_qVac) at the last lattice site. Also calculates the operator bases. Afterwards, operators cannot be pushed anymore. status is set to FINALIZED..

Parameters
COMPRESSShall the Terms be compressed?
powerAll W-matrices, qAux-bases and qOp-bases up to this power of the MPO are being calculated.
toleranceTolerance for compression

Definition at line 1280 of file MpoTerms.h.

◆ get_auxdim()

template<typename Symmetry , typename Scalar >
std::size_t MpoTerms< Symmetry, Scalar >::get_auxdim ( const std::size_t  loc,
const qType q 
) const
protected

Calculates the dimension of the MPO auxiliar basis. If BC::INFINITE, loc >= N_sites is allowed. In this case qAux[0] = qAux[N_sites]

Parameters
locThe auxiliar basis index, i.e. the basis connecting lattice site loc-1 and loc
qQuantum number
Returns
Dimension of auxiliar basis

Definition at line 2704 of file MpoTerms.h.

◆ get_boundary_condition()

template<typename Symmetry , typename Scalar >
BC MpoTerms< Symmetry, Scalar >::get_boundary_condition ( ) const
inline
Returns
Boundary condition. False, if infinite boundary conditions (for VUMPS).

Definition at line 574 of file MpoTerms.h.

◆ get_hilbert_dimension()

template<typename Symmetry , typename Scalar >
std::size_t MpoTerms< Symmetry, Scalar >::get_hilbert_dimension ( const std::size_t  loc) const
inline
Returns
Dimension of local Hilbert space. 0, if dimension has not been set.

Definition at line 569 of file MpoTerms.h.

◆ get_info()

template<typename Symmetry , typename Scalar >
std::vector< std::string > MpoTerms< Symmetry, Scalar >::get_info
Returns
A vector of formatted strings that contain information about the MpoTerms. Zeroth entry = name.

Definition at line 2754 of file MpoTerms.h.

◆ get_name()

template<typename Symmetry , typename Scalar >
const std::string MpoTerms< Symmetry, Scalar >::get_name ( ) const
inline
Returns
Name of this instance of MpoTerms

Definition at line 476 of file MpoTerms.h.

◆ get_O()

template<typename Symmetry , typename Scalar >
const std::vector< std::map< std::array< qType, 2 >, std::vector< std::vector< std::map< qType, OperatorType > > > > > & MpoTerms< Symmetry, Scalar >::get_O ( ) const
inline
Returns
All operators that make up the W matrix

Definition at line 526 of file MpoTerms.h.

◆ get_pos_qTot()

template<typename Symmetry , typename Scalar >
const std::size_t MpoTerms< Symmetry, Scalar >::get_pos_qTot ( ) const
inline
Returns
Position of the total quantum number in its quantum number block.

Definition at line 589 of file MpoTerms.h.

◆ get_qAux()

template<typename Symmetry , typename Scalar >
const std::vector< Qbasis< Symmetry > > & MpoTerms< Symmetry, Scalar >::get_qAux ( ) const
inline
Returns
Auxiliar bases between all lattice sites

Definition at line 536 of file MpoTerms.h.

◆ get_qAux_power()

template<typename Symmetry , typename Scalar >
const std::vector< Qbasis< Symmetry > > & MpoTerms< Symmetry, Scalar >::get_qAux_power ( std::size_t  power) const
Returns
Auxiliar bases between all lattice sites for a given power of the MPO
Parameters
powerChosen power of the MPO

Definition at line 2811 of file MpoTerms.h.

◆ get_qOp()

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< qType > > & MpoTerms< Symmetry, Scalar >::get_qOp ( ) const
inline
Returns
Bases of local operators

Definition at line 541 of file MpoTerms.h.

◆ get_qOp_power()

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< typename Symmetry::qType > > & MpoTerms< Symmetry, Scalar >::get_qOp_power ( std::size_t  power) const
Returns
Bases of local operators for a given power of the MPO
Parameters
powerChosen power of the MPO

Definition at line 2827 of file MpoTerms.h.

◆ get_qPhys()

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< qType > > & MpoTerms< Symmetry, Scalar >::get_qPhys ( ) const
inline
Returns
Bases of local physical Hilbert spaces

Definition at line 546 of file MpoTerms.h.

◆ get_qTot()

template<typename Symmetry , typename Scalar >
const qType & MpoTerms< Symmetry, Scalar >::get_qTot ( ) const
inline
Returns
Total MPO quantum number

Definition at line 584 of file MpoTerms.h.

◆ get_qVac()

template<typename Symmetry , typename Scalar >
const qType & MpoTerms< Symmetry, Scalar >::get_qVac ( ) const
inline
Returns
Vacuum MPO quantum number

Definition at line 579 of file MpoTerms.h.

◆ get_verbosity()

template<typename Symmetry , typename Scalar >
DMRG::VERBOSITY::OPTION MpoTerms< Symmetry, Scalar >::get_verbosity ( ) const
inline
Returns
Verbosity of these MpoTerms.

Definition at line 693 of file MpoTerms.h.

◆ get_W()

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > > & MpoTerms< Symmetry, Scalar >::get_W ( ) const
inline
Returns
W matrix

Definition at line 531 of file MpoTerms.h.

◆ get_W_power()

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< std::vector< std::vector< Biped< Symmetry, Eigen::SparseMatrix< Scalar, Eigen::ColMajor, EIGEN_DEFAULT_SPARSE_INDEX_TYPE > > > > > > & MpoTerms< Symmetry, Scalar >::get_W_power ( std::size_t  power) const
Returns
W matrix of a given power of the MPO
Parameters
powerChosen power of the MPO

Definition at line 2796 of file MpoTerms.h.

◆ got_update()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::got_update
inlineprotected

Sets GOT_QAUX, GOT_QOP and GOT_W to false, sets current_power to 1. Called whenever something is changed.

Definition at line 3279 of file MpoTerms.h.

◆ inBasis()

template<typename Symmetry , typename Scalar >
const Qbasis< Symmetry > & MpoTerms< Symmetry, Scalar >::inBasis ( const std::size_t  loc) const
inline

Definition at line 707 of file MpoTerms.h.

◆ increment_auxdim()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::increment_auxdim ( const std::size_t  loc,
const qType q 
)
protected

Increments the MPO auxiliar basis dimension by one. Also manages allocation of O. If BC::INFINITE, loc >= N_sites is allowed. In this case, the method increments qAux[0] and qAux[N_sites] for loc = N_sites

Parameters
locLattice site, for BC::OPEN: 0 < loc < N_sites
qQuantum number

Definition at line 2105 of file MpoTerms.h.

◆ increment_first_auxdim_OBC()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::increment_first_auxdim_OBC ( const qType qIn)
protected

Increments the MPO auxiliar basis dimension connecting legt edge and first lattice site by one, also manages allocation of O. Just for open boundary condition, when this cannot be done by increment_auxdim.

Parameters
qInQuantum number

Definition at line 2302 of file MpoTerms.h.

◆ increment_last_auxdim_OBC()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::increment_last_auxdim_OBC ( const qType qOut)
protected

Increments the MPO auxiliar basis dimension connectinglast lattice site and right edge by one, also manages allocation of O. Just for open boundary condition, when this cannot be done by increment_auxdim.

Parameters
qOutQuantum number

Definition at line 2362 of file MpoTerms.h.

◆ initialize() [1/2]

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::initialize
protected

Clears all relevant members and sets the right size for them.

Definition at line 741 of file MpoTerms.h.

◆ initialize() [2/2]

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::initialize ( const std::size_t  L,
const BC  boundary_condition_in,
const qType qTot_in 
)

Same as initialize, but allows to set a new combination of lattice size, total MPO quantum number and boundary condition

Parameters
LLattice size
boundary_condition_inBoundary condition
qTot_inTotal quantum number of the MPO

Definition at line 801 of file MpoTerms.h.

◆ is_finalized()

template<typename Symmetry , typename Scalar >
bool MpoTerms< Symmetry, Scalar >::is_finalized ( ) const
inline
Returns
True, if this instance of MpoTerms has already been finalized.

Definition at line 521 of file MpoTerms.h.

◆ load()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::load ( std::string  filename)

◆ locBasis() [1/2]

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< qType > > & MpoTerms< Symmetry, Scalar >::locBasis ( ) const
inline

Definition at line 702 of file MpoTerms.h.

◆ locBasis() [2/2]

template<typename Symmetry , typename Scalar >
const std::vector< qType > & MpoTerms< Symmetry, Scalar >::locBasis ( const std::size_t  loc) const
inline

Definition at line 703 of file MpoTerms.h.

◆ maxPower()

template<typename Symmetry , typename Scalar >
std::size_t MpoTerms< Symmetry, Scalar >::maxPower ( ) const
inline
Returns
The highest power of the MPO which is currently computed.

Definition at line 605 of file MpoTerms.h.

◆ memory()

template<typename Symmetry , typename Scalar >
double MpoTerms< Symmetry, Scalar >::memory ( MEMUNIT  memunit = kB) const

Calculates the approximate amount of memory needed for this MPO

Parameters
memunitUnit for the result
Returns
Memory used

Definition at line 4216 of file MpoTerms.h.

◆ opBasis() [1/2]

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< qType > > & MpoTerms< Symmetry, Scalar >::opBasis ( ) const
inline

Definition at line 710 of file MpoTerms.h.

◆ opBasis() [2/2]

template<typename Symmetry , typename Scalar >
const std::vector< qType > & MpoTerms< Symmetry, Scalar >::opBasis ( const std::size_t  loc) const
inline

Definition at line 711 of file MpoTerms.h.

◆ opBasisSq() [1/2]

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< qType > > & MpoTerms< Symmetry, Scalar >::opBasisSq ( ) const
inline

Definition at line 720 of file MpoTerms.h.

◆ opBasisSq() [2/2]

template<typename Symmetry , typename Scalar >
const std::vector< qType > & MpoTerms< Symmetry, Scalar >::opBasisSq ( const std::size_t  loc) const
inline

Definition at line 719 of file MpoTerms.h.

◆ outBasis()

template<typename Symmetry , typename Scalar >
const Qbasis< Symmetry > & MpoTerms< Symmetry, Scalar >::outBasis ( const std::size_t  loc) const
inline

Definition at line 708 of file MpoTerms.h.

◆ power_to_string()

template<typename Symmetry , typename Scalar >
std::string MpoTerms< Symmetry, Scalar >::power_to_string ( std::size_t  power)
staticprotected

Converts a number into a superscript for exponentials

Parameters
power
Returns
Superscript exponential as string

Definition at line 3647 of file MpoTerms.h.

◆ prod()

template<typename Symmetry , typename Scalar >
MpoTerms< Symmetry, Scalar > MpoTerms< Symmetry, Scalar >::prod ( const MpoTerms< Symmetry, Scalar > &  top,
const MpoTerms< Symmetry, Scalar > &  bottom,
const qType qTot,
const double  tolerance = ::mynumeric_limits<double>::epsilon() 
)
static

Calculates the product of two MPOs.

Parameters
topMPO that shall be applied second
bottomMPO that shall be applied first to the MPS
qTotTarget quantum number for the product
toleranceTolerance for compression
Returns
Product of both MPOs.

Definition at line 3288 of file MpoTerms.h.

◆ prod_delZeroCols_OBC()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::prod_delZeroCols_OBC ( std::map< std::array< qType, 2 >, std::vector< std::vector< std::map< qType, OperatorType > > > > &  O_last,
Qbasis< Symmetry > &  qAux_last,
Qbasis< Symmetry > &  qAux_prev,
const qType qTot,
const std::size_t  col_qTot 
)
staticprotected

Deletes zero columns at the last lattice site after calculating the product of two MPOs when the combination of twice the target quantum number is not unique.

Parameters
O_lastO matrix of the product MPO at last lattice site. Will be truncated.
qAux_lastAuxiliar basis of the product MPO at last lattice site. Will be truncated..
qAux_prevAuxiliar basis of the product MPO at lattice site left to the last one. Will not be modified.
qTotTarget quantum number of the product MPO.
col_qTotColumn of the vacuum identity operators for last lattice site

Definition at line 3895 of file MpoTerms.h.

◆ prod_swap_IBC()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::prod_swap_IBC ( std::vector< std::map< std::array< qType, 2 >, std::vector< std::vector< std::map< qType, OperatorType > > > > > &  O_out,
std::vector< std::size_t > &  row_qVac,
std::vector< std::size_t > &  col_qVac,
std::vector< std::size_t > &  row_qTot,
std::vector< std::size_t > &  col_qTot 
)
staticprotected

Swaps rows and columns after calculating the product of two MPOs for VUMPS. Ensures that the identity operator that connects the vacua at each lattice site appear at position [0|0] and the identity connecting the target quantum number (for VUMPS vacuum) at position [1|1].

Parameters
O_outOperators as created by the prod-method.
row_qVacList of the rows of the vacuum identity operators for each lattice site
col_qVacList of the columns of the vacuum identity operators for each lattice site
row_qVacList of the rows of the target quantum number identity operators for each lattice site
row_qVacList of the columns of the target quantum number identity operators for each lattice site

Definition at line 3921 of file MpoTerms.h.

◆ push() [1/2]

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::push ( const std::size_t  loc,
const std::vector< OperatorType > &  opList,
const Scalar  lambda = 1.0 
)
inline

Push method without explicit quantum number list. Calls the method calc_qList and then redirects to push with that quantum number list.

Parameters
locLattice site where the interaction starts
opListVector of operators that make up the interaction. opList[i] acts on lattice site loc+i
lambdaScalar factor for the interaction

Definition at line 455 of file MpoTerms.h.

◆ push() [2/2]

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::push ( const std::size_t  loc,
const std::vector< OperatorType > &  opList,
const std::vector< qType > &  qList,
const Scalar  lambda = 1.0 
)
virtual

Pushes an interaction into this instance of MpoTerms.

Parameters
locLattice site where the interaction starts
opListList of operators that make up the interaction. opList[i] acts on lattice site loc+i
qListList of quantum numbers. qList[i] is left from lattice site loc+i, qList[i+1] is right from it
lambdaScalar factor for the interaction

Definition at line 892 of file MpoTerms.h.

◆ Qtarget()

template<typename Symmetry , typename Scalar >
const qType & MpoTerms< Symmetry, Scalar >::Qtarget ( ) const
inline

Definition at line 713 of file MpoTerms.h.

◆ reconstruct()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::reconstruct ( const std::vector< std::map< std::array< qType, 2 >, std::vector< std::vector< std::map< qType, OperatorType > > > > > &  O_in,
const std::vector< Qbasis< Symmetry > > &  qAux_in,
const std::vector< std::vector< qType > > &  qPhys_in,
const bool  FINALIZED_IN,
const BC  boundary_condition_in,
const qType qTot_in = Symmetry::qvacuum() 
)

Allows to reconstruct an instance of MpoTerms with preset data.

Parameters
O_inOperators, are copied into O
qAux_inQbasis from which auxdim is calculated
FINALIZED_INShall this instance be FINALIZED?
boundary_condition_inBoundary condition
qTot_inTotal quantum number of the MPO

Definition at line 810 of file MpoTerms.h.

◆ renormalize()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::renormalize
protected

Distributes the total norm of the MPO equally between all lattice sites

Definition at line 4119 of file MpoTerms.h.

◆ save()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::save ( std::string  filename)

◆ save_label()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::save_label ( const std::size_t  loc,
const std::string &  info_label 
)
Parameters
locLattice site
labelInformation

Definition at line 2744 of file MpoTerms.h.

◆ scale()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::scale ( const Scalar  factor,
const Scalar  offset = 0.,
const std::size_t  power = 0ul,
const double  tolerance = 1.e-14 
)

Scales all interactions by a given factor and adds a local term as offset (afterwards).

Parameters
factorThe factor to scale the interactions with
offsetThe factor all local identity operators are multiplied by

Definition at line 2856 of file MpoTerms.h.

◆ set_Identity()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::set_Identity ( const typename Symmetry::qType &  Q = Symmetry::qvacuum())

Creates an identity MPO with bond dimension 1

Definition at line 3999 of file MpoTerms.h.

◆ set_name()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::set_name ( const std::string &  label_in)
inline
Parameters
label_inName to be given to this instance of MpoTerms

Definition at line 471 of file MpoTerms.h.

◆ set_qPhys()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::set_qPhys ( const std::size_t  loc,
const std::vector< qType > &  qPhys_in 
)
inline

Sets the basis of a local Hilbert space. Also checks consistency with Hilbert space dimension set before.

Parameters
locLattice site
qPhys_inVector of quantum numbers that appear in the local Hilbert space

Definition at line 500 of file MpoTerms.h.

◆ set_verbosity()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::set_verbosity ( const DMRG::VERBOSITY::OPTION  VERB_in)

Sets verbosity for these MpoTerms. If greater than SILENT, information will be printed via Logger

Parameters
VERB_inChosen verbosity

Definition at line 880 of file MpoTerms.h.

◆ set_Zero()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::set_Zero

Creates a zero MPO with bond dimension 1

Definition at line 4026 of file MpoTerms.h.

◆ setLocBasis() [1/2]

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::setLocBasis ( const std::vector< qType > &  q,
std::size_t  loc 
)
inline

Definition at line 716 of file MpoTerms.h.

◆ setLocBasis() [2/2]

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::setLocBasis ( const std::vector< std::vector< qType > > &  q)
inline

Definition at line 715 of file MpoTerms.h.

◆ setQtarget()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::setQtarget ( const qType q)
inline

Definition at line 725 of file MpoTerms.h.

◆ show()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::show

Prints information about the current state of operators and MPO auxiliar basis.

Definition at line 1033 of file MpoTerms.h.

◆ size()

template<typename Symmetry , typename Scalar >
std::size_t MpoTerms< Symmetry, Scalar >::size ( ) const
inline
Returns
Size of the lattice (for VUMPS: unit cell)

Definition at line 610 of file MpoTerms.h.

◆ sparsity() [1/2]

template<typename Symmetry , typename Scalar >
double MpoTerms< Symmetry, Scalar >::sparsity ( bool  USE_SQUARE,
bool  PER_MATRIX 
) const
inline

Definition at line 722 of file MpoTerms.h.

◆ sparsity() [2/2]

template<typename Symmetry , typename Scalar >
double MpoTerms< Symmetry, Scalar >::sparsity ( const std::size_t  power = 1,
const bool  PER_MATRIX = false 
) const

Calculates the sparsity of the MPO or a certain power

Parameters
powerFor which power of the MPO?
PER_MATRIXSparsity related to number of matrices (?)
Returns
Sparsity

Definition at line 4341 of file MpoTerms.h.

◆ sum()

template<typename Symmetry , typename Scalar >
MpoTerms< Symmetry, Scalar > MpoTerms< Symmetry, Scalar >::sum ( const MpoTerms< Symmetry, Scalar > &  top,
const MpoTerms< Symmetry, Scalar > &  bottom,
const double  tolerance = ::mynumeric_limits<double>::epsilon() 
)
static

Calculates the sum of two MPOs. Does not work properly for VUMPS yet.

Parameters
topMPO for addition
bottomMPO for addition
toleranceTolerance for compression
Returns
Sum of both MPOs.

Definition at line 3665 of file MpoTerms.h.

◆ transform_base()

template<typename Symmetry , typename Scalar >
void MpoTerms< Symmetry, Scalar >::transform_base ( const qType qShift,
const bool  PRINT = false,
const int  factor = -1,
const std::size_t  powre = 0ul 
)

Transforms the auxiliar bases, the operator bases and the physical bases as follows: qPhys -> (qPhys - qShift) * factor qAux -> qAux * factor qOp -> qOp * factor qTot -> qTot * factor Attention: qAux, qOp and qTot are not shifted, this happens just for the physical bases

Parameters
qShiftQuantum number by which the MPO shall be shifted
PRINTShall information on the transformation be printed?
factorAdditional factor to avoid fractions (Size of unit cell)

Definition at line 3112 of file MpoTerms.h.

◆ W_at()

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > & MpoTerms< Symmetry, Scalar >::W_at ( const std::size_t  loc) const
inline

Definition at line 699 of file MpoTerms.h.

◆ W_full()

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > > & MpoTerms< Symmetry, Scalar >::W_full ( ) const
inline

Definition at line 700 of file MpoTerms.h.

◆ Wsq_at()

template<typename Symmetry , typename Scalar >
const std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > & MpoTerms< Symmetry, Scalar >::Wsq_at ( const std::size_t  loc) const
inline

Definition at line 718 of file MpoTerms.h.

Member Data Documentation

◆ auxdim

template<typename Symmetry , typename Scalar >
std::vector<std::map<qType, std::size_t> > MpoTerms< Symmetry, Scalar >::auxdim
protected

Dimension of the auxiliar MPO basis Index i extends from 0 to N_sites, auxdim[i] connects lattice site i-1 and lattice site i Index structure: [i] Map: {q} -> value

Definition at line 55 of file MpoTerms.h.

◆ before_verb_set

template<typename Symmetry , typename Scalar >
std::string MpoTerms< Symmetry, Scalar >::before_verb_set
protected

String that stores relevant information tduring construction hat would have been logged. Is printed via Logger when verbosity is set to a value greater than SILENT.

Definition at line 107 of file MpoTerms.h.

◆ boundary_condition

template<typename Symmetry , typename Scalar >
BC MpoTerms< Symmetry, Scalar >::boundary_condition
protected

Stores whether to use open boundary conditions or not (for VUMPS)

Definition at line 80 of file MpoTerms.h.

◆ current_power

template<typename Symmetry , typename Scalar >
std::size_t MpoTerms< Symmetry, Scalar >::current_power = 1
protected

Stores the highest power of the MPO that has been calculated.

Definition at line 112 of file MpoTerms.h.

◆ GOT_QAUX

template<typename Symmetry , typename Scalar >
bool MpoTerms< Symmetry, Scalar >::GOT_QAUX = false
protected

Is qAux up to date?

Definition at line 122 of file MpoTerms.h.

◆ GOT_QOP

template<typename Symmetry , typename Scalar >
bool MpoTerms< Symmetry, Scalar >::GOT_QOP = false
protected

Is qOp up to date?

Definition at line 117 of file MpoTerms.h.

◆ GOT_QPHYS

template<typename Symmetry , typename Scalar >
std::vector<bool> MpoTerms< Symmetry, Scalar >::GOT_QPHYS
protected

Has qPhys been set at a certrain lattice site? Index structure: [Lattice Site]

Definition at line 133 of file MpoTerms.h.

◆ GOT_W

template<typename Symmetry , typename Scalar >
bool MpoTerms< Symmetry, Scalar >::GOT_W = false
protected

Is W up to date?

Definition at line 127 of file MpoTerms.h.

◆ hilbert_dimension

template<typename Symmetry , typename Scalar >
std::vector<int> MpoTerms< Symmetry, Scalar >::hilbert_dimension
protected

Local hilbert space dimensions. Initialized with 0 and set whenever an operator is added at a given site Index structure: [Lattice Site]

Definition at line 92 of file MpoTerms.h.

◆ info

template<typename Symmetry , typename Scalar >
std::vector<std::vector<std::string> > MpoTerms< Symmetry, Scalar >::info
protected

All informations stored about the MpoTerms Index structure [Lattice Site i][Index of information string]

Definition at line 86 of file MpoTerms.h.

◆ label

template<typename Symmetry , typename Scalar >
std::string MpoTerms< Symmetry, Scalar >::label = "MPO"

A given name for the MpoTerms, such as Heisenberg

Definition at line 615 of file MpoTerms.h.

◆ N_phys

template<typename Symmetry , typename Scalar >
std::size_t MpoTerms< Symmetry, Scalar >::N_phys = 0ul

Physical volume of the system

Definition at line 400 of file MpoTerms.h.

◆ N_sites

template<typename Symmetry , typename Scalar >
std::size_t MpoTerms< Symmetry, Scalar >::N_sites

Number of lattice sites (for VUMPS: in the unit cell)

Definition at line 395 of file MpoTerms.h.

◆ O

template<typename Symmetry , typename Scalar >
std::vector<std::map<std::array<qType, 2>,std::vector<std::vector<std::map<qType,OperatorType> > > > > MpoTerms< Symmetry, Scalar >::O
protected

Operators that have been pushed into this instance of MpoTerms. Index structure: [Lattice site] Map: {qIn, qOut} -> [row][column]

Definition at line 47 of file MpoTerms.h.

◆ pos_qTot

template<typename Symmetry , typename Scalar >
std::size_t MpoTerms< Symmetry, Scalar >::pos_qTot
protected

Index of right unity operator (operator thas is right to any local operators) in the quantum number block qTot. Equals 1, if qTot=qVac, and 0 else.

Definition at line 70 of file MpoTerms.h.

◆ pos_qVac

template<typename Symmetry , typename Scalar >
std::size_t MpoTerms< Symmetry, Scalar >::pos_qVac
protected

Index of left unity operator (operator that is left to any local operators) in the quantum number block Symmetry::qvacuum(). Equals 0.

Definition at line 75 of file MpoTerms.h.

◆ qAux

template<typename Symmetry , typename Scalar >
std::vector<Qbasis<Symmetry> > MpoTerms< Symmetry, Scalar >::qAux

MPO bases. After calculation this encodes the same information as auxdim, but in a convenient way. Index structure: [Lattice site]

Definition at line 360 of file MpoTerms.h.

◆ qAux_powers

template<typename Symmetry , typename Scalar >
std::vector<std::vector<Qbasis<Symmetry> > > MpoTerms< Symmetry, Scalar >::qAux_powers

MPO bases of the higher powers Index structure: [Power-2][Lattice site]

Definition at line 384 of file MpoTerms.h.

◆ qOp

template<typename Symmetry , typename Scalar >
std::vector<std::vector<qType> > MpoTerms< Symmetry, Scalar >::qOp

Local operator bases. Index structure: [Lattice Site][Index of quantum number]

Definition at line 354 of file MpoTerms.h.

◆ qOp_powers

template<typename Symmetry , typename Scalar >
std::vector<std::vector<std::vector<qType> > > MpoTerms< Symmetry, Scalar >::qOp_powers

Operator bases of the higher powers Index structure: [Power-2][Lattice Site][Index of quantum number]

Definition at line 378 of file MpoTerms.h.

◆ qPhys

template<typename Symmetry , typename Scalar >
std::vector<std::vector<qType> > MpoTerms< Symmetry, Scalar >::qPhys

Bases of local Hilbert spaces. Index structure: [Lattice Site][Index of quantum number]

Definition at line 366 of file MpoTerms.h.

◆ qTot

template<typename Symmetry , typename Scalar >
qType MpoTerms< Symmetry, Scalar >::qTot
protected

Total quantum number of the MPO. All interactions pushed have to lead to this quantum number.

Definition at line 60 of file MpoTerms.h.

◆ qVac

template<typename Symmetry , typename Scalar >
qType MpoTerms< Symmetry, Scalar >::qVac = Symmetry::qvacuum()
protected

Vacuum quantum number of the MPO.

Definition at line 65 of file MpoTerms.h.

◆ reversed

template<typename Symmetry , typename Scalar >
reversedData MpoTerms< Symmetry, Scalar >::reversed

Definition at line 409 of file MpoTerms.h.

◆ status

template<typename Symmetry , typename Scalar >
MPO_STATUS::OPTION MpoTerms< Symmetry, Scalar >::status = MPO_STATUS::ALTERABLE
protected

Stores whether the MpoTerms have already been compressed. Afterwards, operators cannot be pushed anymore.

Definition at line 97 of file MpoTerms.h.

◆ VERB

template<typename Symmetry , typename Scalar >
DMRG::VERBOSITY::OPTION MpoTerms< Symmetry, Scalar >::VERB = DMRG::VERBOSITY::OPTION::SILENT
protected

Verbosity of the MpoTerms. If greater than SILENT, information will be printed via Logger.

Definition at line 102 of file MpoTerms.h.

◆ W

template<typename Symmetry , typename Scalar >
std::vector<std::vector<std::vector<std::vector<Biped<Symmetry, MatrixType> > > > > MpoTerms< Symmetry, Scalar >::W

W matrix that stores the MPO in a convenient way. Index structure: [Lattice site][Upper Hilbert space basis entry][Lower Hilbert space basis entry][Quantum number of operators] Biped: {qIn,qOut} -> Matrix [row][column]

Definition at line 372 of file MpoTerms.h.

◆ W_powers

template<typename Symmetry , typename Scalar >
std::vector<std::vector<std::vector<std::vector<std::vector<Biped<Symmetry, MatrixType> > > > > > MpoTerms< Symmetry, Scalar >::W_powers

W matrix of the higher powers Index structure: [Power-2][Lattice site][Upper Hilbert space basis entry][Lower Hilbert space basis entry][Quantum number of operators] Biped: {qIn,qOut} -> Matrix [row][column]

Definition at line 390 of file MpoTerms.h.


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