VMPS++
|
Definition at line 34 of file MpoTerms.h.
#include <MpoTerms.h>
Classes | |
struct | reversedData |
Public Types | |
typedef SiteOperator< Symmetry, Scalar > | OperatorType |
typedef Symmetry::qType | qType |
typedef Eigen::SparseMatrix< Scalar, Eigen::ColMajor, EIGEN_DEFAULT_SPARSE_INDEX_TYPE > | MatrixType |
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 qType & | get_qVac () const |
const qType & | get_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 qType & | Qtarget () 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< qType > | calc_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 |
typedef Eigen::SparseMatrix<Scalar,Eigen::ColMajor,EIGEN_DEFAULT_SPARSE_INDEX_TYPE> MpoTerms< Symmetry, Scalar >::MatrixType |
Definition at line 39 of file MpoTerms.h.
typedef SiteOperator<Symmetry,Scalar> MpoTerms< Symmetry, Scalar >::OperatorType |
Definition at line 37 of file MpoTerms.h.
typedef Symmetry::qType MpoTerms< Symmetry, Scalar >::qType |
Definition at line 38 of file MpoTerms.h.
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)
L | Lattice size |
boundary_condition_in | Boundary condition |
qTot_in | Total quantum number of the MPO |
Definition at line 731 of file MpoTerms.h.
|
protected |
Adds an operator in O
loc | Lattice site |
op | Operator |
qIn | Incoming quantum number block for row |
qOut | Outgoing quantum number block for column |
IndexIn | Row index |
IndexOut | Column index |
Definition at line 2073 of file MpoTerms.h.
|
protected |
Adds a multiple of another column to a certain column
loc | Lattice site |
qOut | Quantum number of the block |
row | Index of the column |
ops | Map {q} -> [row] of the column that shall be added |
factor | Optional factor to scale the added column |
Definition at line 1950 of file MpoTerms.h.
|
protected |
Adds a multiple of another row to a certain row
loc | Lattice site |
qIn | Quantum number of the block |
row | Index of the row |
ops | Map {q} -> [col] of the row that shall be added |
factor | Optional factor to scale the added row |
Definition at line 1911 of file MpoTerms.h.
|
protected |
Checks whether the dimension of an operator matches the local Hilbert space dimension. Sets the latter if it has not been set yet.
loc | Lattice site |
dim | Assumed dimension of local Hilbert space |
Definition at line 2727 of file MpoTerms.h.
|
inline |
Definition at line 705 of file MpoTerms.h.
|
inline |
Definition at line 706 of file MpoTerms.h.
|
inlineprotected |
Calculates the average MPO bond dimension and the maximum MPO bond dimension
Definition at line 4186 of file MpoTerms.h.
std::vector< std::pair< typename Symmetry::qType, std::size_t > > MpoTerms< Symmetry, Scalar >::base_order_IBC | ( | const std::size_t | power = 1 | ) | const |
Definition at line 4053 of file MpoTerms.h.
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.
power | All 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.
|
protected |
Calculates the MPO bond bases by analyzing auxdim. GOT_QAUX is set true.
Definition at line 1264 of file MpoTerms.h.
|
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.
opList | List of local operators |
Definition at line 961 of file MpoTerms.h.
|
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.
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.
|
protected |
Calculates the W matrix. Needs qOp calculated before. GOT_W is set true.
Definition at line 1175 of file MpoTerms.h.
MpoTerms< Symmetry, OtherScalar > MpoTerms< Symmetry, Scalar >::cast |
Definition at line 3075 of file MpoTerms.h.
|
inline |
power | Chosen power of the MPO |
Definition at line 600 of file MpoTerms.h.
bool MpoTerms< Symmetry, Scalar >::check_qPhys |
Definition at line 2842 of file MpoTerms.h.
|
inline |
Definition at line 721 of file MpoTerms.h.
|
protected |
Empties all operator labels in O
Definition at line 4165 of file MpoTerms.h.
|
protected |
Compresses the MpoTerms. Needs FINALIZED Terms.
tolerance | Threshold up to which value linear dependencies shall be removed |
Definition at line 1437 of file MpoTerms.h.
|
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
loc | Lattice site, for BC::OPEN: 0 < loc < N_sites |
q | Quantum number |
Definition at line 2424 of file MpoTerms.h.
|
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.
qIn | Quantum number |
Definition at line 2585 of file MpoTerms.h.
|
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.
qOut | Quantum number |
Definition at line 2642 of file MpoTerms.h.
|
protected |
Deletes a certain column in O. Does not resize O, but shifts the empty column to the right.
loc | Lattice site |
qOut | Quantum number of the block |
col_to_delete | Index of the column |
SAMESITE | If true, then the column with the same quantum number is skipped. Useful for VUMPS compression, when there is only one lattice site. |
Definition at line 2031 of file MpoTerms.h.
|
protected |
Deletes a certain row in O. Does not resize O, but shifts the empty row to the bottom.
loc | Lattice site |
qIn | Quantum number of the block |
row_to_delete | Index of the row |
SAMESITE | If true, then the row with the same quantum number is skipped. Useful for VUMPS compression, when there is only one lattice site. |
Definition at line 1989 of file MpoTerms.h.
|
staticprotected |
For labelling the powers of an MPO, exponentials in the factors' labels are detected and removed
name_w_power | Label of a factor in the product that may contain a superscript exponential |
Definition at line 3616 of file MpoTerms.h.
|
protected |
Checks for linearly dependent columns (including zero columns) within a certain block in O and manages their deletion.
loc | Lattice site |
qOut | Quantum number of the block to check |
tolerance | Threshold up to which value linear dependencies shall be removed |
Definition at line 1751 of file MpoTerms.h.
|
protected |
Checks for linearly dependent rows (including zero rows) within a certain block in O and manages their deletion.
loc | Lattice site |
qIn | Quantum number of the block to check |
Definition at line 1592 of file MpoTerms.h.
|
protected |
Definition at line 4735 of file MpoTerms.h.
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..
COMPRESS | Shall the Terms be compressed? |
power | All W-matrices, qAux-bases and qOp-bases up to this power of the MPO are being calculated. |
tolerance | Tolerance for compression |
Definition at line 1280 of file MpoTerms.h.
|
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]
loc | The auxiliar basis index, i.e. the basis connecting lattice site loc-1 and loc |
q | Quantum number |
Definition at line 2704 of file MpoTerms.h.
|
inline |
Definition at line 574 of file MpoTerms.h.
|
inline |
Definition at line 569 of file MpoTerms.h.
std::vector< std::string > MpoTerms< Symmetry, Scalar >::get_info |
Definition at line 2754 of file MpoTerms.h.
|
inline |
Definition at line 476 of file MpoTerms.h.
|
inline |
Definition at line 526 of file MpoTerms.h.
|
inline |
Definition at line 589 of file MpoTerms.h.
|
inline |
Definition at line 536 of file MpoTerms.h.
const std::vector< Qbasis< Symmetry > > & MpoTerms< Symmetry, Scalar >::get_qAux_power | ( | std::size_t | power | ) | const |
power | Chosen power of the MPO |
Definition at line 2811 of file MpoTerms.h.
|
inline |
Definition at line 541 of file MpoTerms.h.
const std::vector< std::vector< typename Symmetry::qType > > & MpoTerms< Symmetry, Scalar >::get_qOp_power | ( | std::size_t | power | ) | const |
power | Chosen power of the MPO |
Definition at line 2827 of file MpoTerms.h.
|
inline |
Definition at line 546 of file MpoTerms.h.
|
inline |
Definition at line 584 of file MpoTerms.h.
|
inline |
Definition at line 579 of file MpoTerms.h.
|
inline |
Definition at line 693 of file MpoTerms.h.
|
inline |
Definition at line 531 of file MpoTerms.h.
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 |
power | Chosen power of the MPO |
Definition at line 2796 of file MpoTerms.h.
|
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.
|
inline |
Definition at line 707 of file MpoTerms.h.
|
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
loc | Lattice site, for BC::OPEN: 0 < loc < N_sites |
q | Quantum number |
Definition at line 2105 of file MpoTerms.h.
|
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.
qIn | Quantum number |
Definition at line 2302 of file MpoTerms.h.
|
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.
qOut | Quantum number |
Definition at line 2362 of file MpoTerms.h.
|
protected |
Clears all relevant members and sets the right size for them.
Definition at line 741 of file MpoTerms.h.
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
L | Lattice size |
boundary_condition_in | Boundary condition |
qTot_in | Total quantum number of the MPO |
Definition at line 801 of file MpoTerms.h.
|
inline |
Definition at line 521 of file MpoTerms.h.
void MpoTerms< Symmetry, Scalar >::load | ( | std::string | filename | ) |
|
inline |
Definition at line 702 of file MpoTerms.h.
|
inline |
Definition at line 703 of file MpoTerms.h.
|
inline |
Definition at line 605 of file MpoTerms.h.
double MpoTerms< Symmetry, Scalar >::memory | ( | MEMUNIT | memunit = kB | ) | const |
Calculates the approximate amount of memory needed for this MPO
memunit | Unit for the result |
Definition at line 4216 of file MpoTerms.h.
|
inline |
Definition at line 710 of file MpoTerms.h.
|
inline |
Definition at line 711 of file MpoTerms.h.
|
inline |
Definition at line 720 of file MpoTerms.h.
|
inline |
Definition at line 719 of file MpoTerms.h.
|
inline |
Definition at line 708 of file MpoTerms.h.
|
staticprotected |
Converts a number into a superscript for exponentials
power |
Definition at line 3647 of file MpoTerms.h.
|
static |
Calculates the product of two MPOs.
top | MPO that shall be applied second |
bottom | MPO that shall be applied first to the MPS |
qTot | Target quantum number for the product |
tolerance | Tolerance for compression |
Definition at line 3288 of file MpoTerms.h.
|
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.
O_last | O matrix of the product MPO at last lattice site. Will be truncated. |
qAux_last | Auxiliar basis of the product MPO at last lattice site. Will be truncated.. |
qAux_prev | Auxiliar basis of the product MPO at lattice site left to the last one. Will not be modified. |
qTot | Target quantum number of the product MPO. |
col_qTot | Column of the vacuum identity operators for last lattice site |
Definition at line 3895 of file MpoTerms.h.
|
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].
O_out | Operators as created by the prod-method. |
row_qVac | List of the rows of the vacuum identity operators for each lattice site |
col_qVac | List of the columns of the vacuum identity operators for each lattice site |
row_qVac | List of the rows of the target quantum number identity operators for each lattice site |
row_qVac | List of the columns of the target quantum number identity operators for each lattice site |
Definition at line 3921 of file MpoTerms.h.
|
inline |
Push method without explicit quantum number list. Calls the method calc_qList and then redirects to push with that quantum number list.
loc | Lattice site where the interaction starts |
opList | Vector of operators that make up the interaction. opList[i] acts on lattice site loc+i |
lambda | Scalar factor for the interaction |
Definition at line 455 of file MpoTerms.h.
|
virtual |
Pushes an interaction into this instance of MpoTerms.
loc | Lattice site where the interaction starts |
opList | List of operators that make up the interaction. opList[i] acts on lattice site loc+i |
qList | List of quantum numbers. qList[i] is left from lattice site loc+i, qList[i+1] is right from it |
lambda | Scalar factor for the interaction |
Definition at line 892 of file MpoTerms.h.
|
inline |
Definition at line 713 of file MpoTerms.h.
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.
O_in | Operators, are copied into O |
qAux_in | Qbasis from which auxdim is calculated |
FINALIZED_IN | Shall this instance be FINALIZED? |
boundary_condition_in | Boundary condition |
qTot_in | Total quantum number of the MPO |
Definition at line 810 of file MpoTerms.h.
|
protected |
Distributes the total norm of the MPO equally between all lattice sites
Definition at line 4119 of file MpoTerms.h.
void MpoTerms< Symmetry, Scalar >::save | ( | std::string | filename | ) |
void MpoTerms< Symmetry, Scalar >::save_label | ( | const std::size_t | loc, |
const std::string & | info_label | ||
) |
loc | Lattice site |
label | Information |
Definition at line 2744 of file MpoTerms.h.
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).
factor | The factor to scale the interactions with |
offset | The factor all local identity operators are multiplied by |
Definition at line 2856 of file MpoTerms.h.
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.
|
inline |
label_in | Name to be given to this instance of MpoTerms |
Definition at line 471 of file MpoTerms.h.
|
inline |
Sets the basis of a local Hilbert space. Also checks consistency with Hilbert space dimension set before.
loc | Lattice site |
qPhys_in | Vector of quantum numbers that appear in the local Hilbert space |
Definition at line 500 of file MpoTerms.h.
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
VERB_in | Chosen verbosity |
Definition at line 880 of file MpoTerms.h.
void MpoTerms< Symmetry, Scalar >::set_Zero |
Creates a zero MPO with bond dimension 1
Definition at line 4026 of file MpoTerms.h.
|
inline |
Definition at line 716 of file MpoTerms.h.
|
inline |
Definition at line 715 of file MpoTerms.h.
|
inline |
Definition at line 725 of file MpoTerms.h.
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.
|
inline |
Definition at line 610 of file MpoTerms.h.
|
inline |
Definition at line 722 of file MpoTerms.h.
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
power | For which power of the MPO? |
PER_MATRIX | Sparsity related to number of matrices (?) |
Definition at line 4341 of file MpoTerms.h.
|
static |
Calculates the sum of two MPOs. Does not work properly for VUMPS yet.
top | MPO for addition |
bottom | MPO for addition |
tolerance | Tolerance for compression |
Definition at line 3665 of file MpoTerms.h.
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
qShift | Quantum number by which the MPO shall be shifted |
Shall information on the transformation be printed? | |
factor | Additional factor to avoid fractions (Size of unit cell) |
Definition at line 3112 of file MpoTerms.h.
|
inline |
Definition at line 699 of file MpoTerms.h.
|
inline |
Definition at line 700 of file MpoTerms.h.
|
inline |
Definition at line 718 of file MpoTerms.h.
|
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.
|
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.
|
protected |
Stores whether to use open boundary conditions or not (for VUMPS)
Definition at line 80 of file MpoTerms.h.
|
protected |
Stores the highest power of the MPO that has been calculated.
Definition at line 112 of file MpoTerms.h.
|
protected |
Is qAux up to date?
Definition at line 122 of file MpoTerms.h.
|
protected |
Is qOp up to date?
Definition at line 117 of file MpoTerms.h.
|
protected |
Has qPhys been set at a certrain lattice site? Index structure: [Lattice Site]
Definition at line 133 of file MpoTerms.h.
|
protected |
Is W up to date?
Definition at line 127 of file MpoTerms.h.
|
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.
|
protected |
All informations stored about the MpoTerms Index structure [Lattice Site i][Index of information string]
Definition at line 86 of file MpoTerms.h.
std::string MpoTerms< Symmetry, Scalar >::label = "MPO" |
A given name for the MpoTerms, such as Heisenberg
Definition at line 615 of file MpoTerms.h.
std::size_t MpoTerms< Symmetry, Scalar >::N_phys = 0ul |
Physical volume of the system
Definition at line 400 of file MpoTerms.h.
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.
|
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.
|
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.
|
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.
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.
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.
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.
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.
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.
Total quantum number of the MPO. All interactions pushed have to lead to this quantum number.
Definition at line 60 of file MpoTerms.h.
|
protected |
Vacuum quantum number of the MPO.
Definition at line 65 of file MpoTerms.h.
reversedData MpoTerms< Symmetry, Scalar >::reversed |
Definition at line 409 of file MpoTerms.h.
|
protected |
Stores whether the MpoTerms have already been compressed. Afterwards, operators cannot be pushed anymore.
Definition at line 97 of file MpoTerms.h.
|
protected |
Verbosity of the MpoTerms. If greater than SILENT, information will be printed via Logger.
Definition at line 102 of file MpoTerms.h.
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.
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.