VMPS++
Loading...
Searching...
No Matches
DmrgIndexGymnastics.h File Reference
#include "DmrgTypedefs.h"
#include "tensors/Biped.h"
#include "tensors/Multipede.h"
#include "numeric_limits.h"
Include dependency graph for DmrgIndexGymnastics.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename Symmetry , typename MatrixType , typename MatrixType2 >
bool LAWA (const qarray< Symmetry::Nq > &Lin, const qarray< Symmetry::Nq > &Lout, const qarray< Symmetry::Nq > &Lmid, const qarray< Symmetry::Nq > &qloc1, const qarray< Symmetry::Nq > &qloc2, const qarray< Symmetry::Nq > &qOp, const Biped< Symmetry, MatrixType > &Abra, const Biped< Symmetry, MatrixType > &Aket, const Biped< Symmetry, MatrixType2 > &W, vector< tuple< qarray3< Symmetry::Nq >, size_t, size_t, size_t > > &result)
 
template<typename Symmetry , typename MatrixType , typename MatrixType2 >
bool AWAR (const qarray< Symmetry::Nq > &Rin, const qarray< Symmetry::Nq > &Rout, const qarray< Symmetry::Nq > &Rmid, const qarray< Symmetry::Nq > &qloc1, const qarray< Symmetry::Nq > &qloc2, const qarray< Symmetry::Nq > &qOp, const Biped< Symmetry, MatrixType > &Abra, const Biped< Symmetry, MatrixType > &Aket, const Biped< Symmetry, MatrixType2 > &W, vector< tuple< qarray3< Symmetry::Nq >, size_t, size_t, size_t > > &result)
 
template<typename Symmetry , typename MatrixType >
bool LAA (qarray< Symmetry::Nq > Lin, qarray< Symmetry::Nq > Lout, size_t s, vector< qarray< Symmetry::Nq > > qloc, const vector< Biped< Symmetry, MatrixType > > &Abra, const vector< Biped< Symmetry, MatrixType > > &Aket, vector< tuple< qarray2< Symmetry::Nq >, size_t, size_t > > &result)
 
template<typename Symmetry , typename MatrixType >
bool AAR (qarray< Symmetry::Nq > Rin, qarray< Symmetry::Nq > Rout, size_t s, vector< qarray< Symmetry::Nq > > qloc, const vector< Biped< Symmetry, MatrixType > > &Abra, const vector< Biped< Symmetry, MatrixType > > &Aket, vector< tuple< qarray2< Symmetry::Nq >, size_t, size_t > > &result)
 
template<typename Symmetry , typename MatrixType , typename MpoMatrixType >
bool AAWWAA (const qarray< Symmetry::Nq > &Lin, const qarray< Symmetry::Nq > &Lout, const qarray< Symmetry::Nq > &Lmid, const qarray< Symmetry::Nq > &qOp12, const qarray< Symmetry::Nq > &qOp34, const qarray< Symmetry::Nq > &qmerge13, const qarray< Symmetry::Nq > &qmerge24, const Biped< Symmetry, MatrixType > &AA13, const Biped< Symmetry, MatrixType > &AA24, const Biped< Symmetry, MpoMatrixType > &W12, const Biped< Symmetry, MpoMatrixType > &W34, vector< tuple< qarray3< Symmetry::Nq >, qarray< Symmetry::Nq >, size_t, size_t, size_t, size_t > > &result)
 
template<typename Symmetry , typename Scalar >
vector< qarray< Symmetry::Nq > > calc_qsplit (const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &A1, const vector< qarray< Symmetry::Nq > > &qloc1, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &A2, vector< qarray< Symmetry::Nq > > qloc2, const qarray< Symmetry::Nq > &Qtop, const qarray< Symmetry::Nq > &Qbot)
 
template<typename Symmetry , typename MatrixType >
bool AAAA (qarray< Symmetry::Nq > Lin, qarray< Symmetry::Nq > Lout, size_t s1s2, const qarray< Symmetry::Nq > &qmerge12, const vector< Biped< Symmetry, MatrixType > > &AAbra, const vector< Biped< Symmetry, MatrixType > > &AAket, vector< tuple< qarray2< Symmetry::Nq >, size_t, size_t > > &result)
 
template<typename Symmetry , typename MatrixType , typename MpoMatrixType >
bool AWWA (qarray< Symmetry::Nq > Lin, qarray< Symmetry::Nq > Lout, qarray< Symmetry::Nq > Lbot, qarray< Symmetry::Nq > Ltop, qarray< Symmetry::Nq > qloc1, qarray< Symmetry::Nq > qloc2, qarray< Symmetry::Nq > qloc3, qarray< Symmetry::Nq > qOpBot, qarray< Symmetry::Nq > qOpTop, const Biped< Symmetry, MatrixType > &Abra, const Biped< Symmetry, MatrixType > &Aket, const Biped< Symmetry, MpoMatrixType > &Wbot, const Biped< Symmetry, MpoMatrixType > &Wtop, tuple< qarray4< Symmetry::Nq >, size_t, size_t, size_t, size_t > &result)
 
template<typename Symmetry , typename Scalar >
void updateInset (const std::vector< std::array< typename Symmetry::qType, 3 > > &insetOld, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Abra, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Aket, const vector< qarray< Symmetry::Nq > > &qloc, const vector< qarray< Symmetry::Nq > > &qOp, std::vector< std::array< typename Symmetry::qType, 3 > > &insetNew)
 
template<typename Symmetry , typename Scalar , typename MpoMatrixType >
void precalc_blockStructure (const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &L, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Abra, const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &W, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Aket, const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &R, const vector< qarray< Symmetry::Nq > > &qloc, const vector< qarray< Symmetry::Nq > > &qOp, vector< std::array< size_t, 2 > > &qlhs, vector< vector< std::array< size_t, 6 > > > &qrhs, vector< vector< Scalar > > &factor_cgcs)
 
template<typename Symmetry , typename Scalar , typename MpoMatrixType >
void precalc_blockStructure (const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &L, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Abra, const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &W12, const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &W34, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Aket, const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &R, const vector< qarray< Symmetry::Nq > > &qloc12, const vector< qarray< Symmetry::Nq > > &qloc34, const vector< qarray< Symmetry::Nq > > &qOp12, const vector< qarray< Symmetry::Nq > > &qOp34, const vector< TwoSiteData< Symmetry, typename MpoMatrixType::Scalar > > &TSD, vector< std::array< size_t, 2 > > &qlhs, vector< vector< std::array< size_t, 12 > > > &qrhs, vector< vector< Scalar > > &factor_cgcs)
 
template<typename Symmetry , typename Scalar , typename MpoMatrixType >
void precalc_blockStructure (const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &L, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Abra, const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &W12, const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &W34, const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &Aket, const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &R, const vector< qarray< Symmetry::Nq > > &qloc12, const vector< qarray< Symmetry::Nq > > &qloc34, const vector< qarray< Symmetry::Nq > > &qOp12, const vector< qarray< Symmetry::Nq > > &qOp34, vector< std::array< size_t, 2 > > &qlhs, vector< vector< std::array< size_t, 12 > > > &qrhs, vector< vector< Scalar > > &factor_cgcs)
 

Function Documentation

◆ AAAA()

template<typename Symmetry , typename MatrixType >
bool AAAA ( qarray< Symmetry::Nq >  Lin,
qarray< Symmetry::Nq >  Lout,
size_t  s1s2,
const qarray< Symmetry::Nq > &  qmerge12,
const vector< Biped< Symmetry, MatrixType > > &  AAbra,
const vector< Biped< Symmetry, MatrixType > > &  AAket,
vector< tuple< qarray2< Symmetry::Nq >, size_t, size_t > > &  result 
)

Definition at line 326 of file DmrgIndexGymnastics.h.

◆ AAR()

template<typename Symmetry , typename MatrixType >
bool AAR ( qarray< Symmetry::Nq >  Rin,
qarray< Symmetry::Nq >  Rout,
size_t  s,
vector< qarray< Symmetry::Nq > >  qloc,
const vector< Biped< Symmetry, MatrixType > > &  Abra,
const vector< Biped< Symmetry, MatrixType > > &  Aket,
vector< tuple< qarray2< Symmetry::Nq >, size_t, size_t > > &  result 
)

Definition at line 163 of file DmrgIndexGymnastics.h.

◆ AAWWAA()

template<typename Symmetry , typename MatrixType , typename MpoMatrixType >
bool AAWWAA ( const qarray< Symmetry::Nq > &  Lin,
const qarray< Symmetry::Nq > &  Lout,
const qarray< Symmetry::Nq > &  Lmid,
const qarray< Symmetry::Nq > &  qOp12,
const qarray< Symmetry::Nq > &  qOp34,
const qarray< Symmetry::Nq > &  qmerge13,
const qarray< Symmetry::Nq > &  qmerge24,
const Biped< Symmetry, MatrixType > &  AA13,
const Biped< Symmetry, MatrixType > &  AA24,
const Biped< Symmetry, MpoMatrixType > &  W12,
const Biped< Symmetry, MpoMatrixType > &  W34,
vector< tuple< qarray3< Symmetry::Nq >, qarray< Symmetry::Nq >, size_t, size_t, size_t, size_t > > &  result 
)

Definition at line 199 of file DmrgIndexGymnastics.h.

◆ AWAR()

template<typename Symmetry , typename MatrixType , typename MatrixType2 >
bool AWAR ( const qarray< Symmetry::Nq > &  Rin,
const qarray< Symmetry::Nq > &  Rout,
const qarray< Symmetry::Nq > &  Rmid,
const qarray< Symmetry::Nq > &  qloc1,
const qarray< Symmetry::Nq > &  qloc2,
const qarray< Symmetry::Nq > &  qOp,
const Biped< Symmetry, MatrixType > &  Abra,
const Biped< Symmetry, MatrixType > &  Aket,
const Biped< Symmetry, MatrixType2 > &  W,
vector< tuple< qarray3< Symmetry::Nq >, size_t, size_t, size_t > > &  result 
)

Definition at line 80 of file DmrgIndexGymnastics.h.

◆ AWWA()

template<typename Symmetry , typename MatrixType , typename MpoMatrixType >
bool AWWA ( qarray< Symmetry::Nq >  Lin,
qarray< Symmetry::Nq >  Lout,
qarray< Symmetry::Nq >  Lbot,
qarray< Symmetry::Nq >  Ltop,
qarray< Symmetry::Nq >  qloc1,
qarray< Symmetry::Nq >  qloc2,
qarray< Symmetry::Nq >  qloc3,
qarray< Symmetry::Nq >  qOpBot,
qarray< Symmetry::Nq >  qOpTop,
const Biped< Symmetry, MatrixType > &  Abra,
const Biped< Symmetry, MatrixType > &  Aket,
const Biped< Symmetry, MpoMatrixType > &  Wbot,
const Biped< Symmetry, MpoMatrixType > &  Wtop,
tuple< qarray4< Symmetry::Nq >, size_t, size_t, size_t, size_t > &  result 
)

Calculates the matching right indices when contracting a left transfer matrix with two MpsQ and two MpoQ.

dot_AWWA.png

Parameters
Lin
Lout
Lbot
Ltop
s1
s2
s3
qloc: local basis
k1
qOpBot: operator basis of bottom operator
k2
qOpTop: operator basis of top operator
Abra
Aket
result: tuple of: an array with Rin, Rout, Rbot, Rtop; block index of Abra; block index of Aket
Returns
true if a match is found, false if not
Warning
When using this function to create the left block on the next site, one needs to swap Rin and Rout.

Definition at line 387 of file DmrgIndexGymnastics.h.

◆ calc_qsplit()

template<typename Symmetry , typename Scalar >
vector< qarray< Symmetry::Nq > > calc_qsplit ( const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  A1,
const vector< qarray< Symmetry::Nq > > &  qloc1,
const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  A2,
vector< qarray< Symmetry::Nq > >  qloc2,
const qarray< Symmetry::Nq > &  Qtop,
const qarray< Symmetry::Nq > &  Qbot 
)

Definition at line 265 of file DmrgIndexGymnastics.h.

◆ LAA()

template<typename Symmetry , typename MatrixType >
bool LAA ( qarray< Symmetry::Nq >  Lin,
qarray< Symmetry::Nq >  Lout,
size_t  s,
vector< qarray< Symmetry::Nq > >  qloc,
const vector< Biped< Symmetry, MatrixType > > &  Abra,
const vector< Biped< Symmetry, MatrixType > > &  Aket,
vector< tuple< qarray2< Symmetry::Nq >, size_t, size_t > > &  result 
)

Definition at line 127 of file DmrgIndexGymnastics.h.

◆ LAWA()

template<typename Symmetry , typename MatrixType , typename MatrixType2 >
bool LAWA ( const qarray< Symmetry::Nq > &  Lin,
const qarray< Symmetry::Nq > &  Lout,
const qarray< Symmetry::Nq > &  Lmid,
const qarray< Symmetry::Nq > &  qloc1,
const qarray< Symmetry::Nq > &  qloc2,
const qarray< Symmetry::Nq > &  qOp,
const Biped< Symmetry, MatrixType > &  Abra,
const Biped< Symmetry, MatrixType > &  Aket,
const Biped< Symmetry, MatrixType2 > &  W,
vector< tuple< qarray3< Symmetry::Nq >, size_t, size_t, size_t > > &  result 
)

Calculates the matching right indices when contracting a left transfer matrix with two MpsQ and an MpoQ.

dot_AWA.png

Parameters
Lin
Lout
Lmid
s1
s2
qloc: local basis
k
qOp: operator basis
Abra
Aket
result: tuple of: an array with Rin, Rout, Rmid; block index of Abra; block index of Aket
IS_HAMILTONIAN: If the Mpo is a Hamiltonian, the calculation can be optimized
Returns
true if a match is found, false if not
Warning
When using this function to create the left block on the next site, one needs to swap Rin and Rout.

Definition at line 33 of file DmrgIndexGymnastics.h.

◆ precalc_blockStructure() [1/3]

template<typename Symmetry , typename Scalar , typename MpoMatrixType >
void precalc_blockStructure ( const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &  L,
const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  Abra,
const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &  W,
const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  Aket,
const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &  R,
const vector< qarray< Symmetry::Nq > > &  qloc,
const vector< qarray< Symmetry::Nq > > &  qOp,
vector< std::array< size_t, 2 > > &  qlhs,
vector< vector< std::array< size_t, 6 > > > &  qrhs,
vector< vector< Scalar > > &  factor_cgcs 
)

Prepares a PivotMatrix by filling PivotMatrix::qlhs and PivotMatrix::qrhs with the corresponding subspace indices. Uses OpenMP.

Definition at line 488 of file DmrgIndexGymnastics.h.

◆ precalc_blockStructure() [2/3]

template<typename Symmetry , typename Scalar , typename MpoMatrixType >
void precalc_blockStructure ( const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &  L,
const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  Abra,
const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &  W12,
const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &  W34,
const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  Aket,
const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &  R,
const vector< qarray< Symmetry::Nq > > &  qloc12,
const vector< qarray< Symmetry::Nq > > &  qloc34,
const vector< qarray< Symmetry::Nq > > &  qOp12,
const vector< qarray< Symmetry::Nq > > &  qOp34,
const vector< TwoSiteData< Symmetry, typename MpoMatrixType::Scalar > > &  TSD,
vector< std::array< size_t, 2 > > &  qlhs,
vector< vector< std::array< size_t, 12 > > > &  qrhs,
vector< vector< Scalar > > &  factor_cgcs 
)

Prepares a PivotMatrix2 by filling PivotMatrix::qlhs and PivotMatrix::qrhs with the corresponding subspace indices.

Definition at line 594 of file DmrgIndexGymnastics.h.

◆ precalc_blockStructure() [3/3]

template<typename Symmetry , typename Scalar , typename MpoMatrixType >
void precalc_blockStructure ( const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &  L,
const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  Abra,
const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &  W12,
const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &  W34,
const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  Aket,
const Tripod< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > &  R,
const vector< qarray< Symmetry::Nq > > &  qloc12,
const vector< qarray< Symmetry::Nq > > &  qloc34,
const vector< qarray< Symmetry::Nq > > &  qOp12,
const vector< qarray< Symmetry::Nq > > &  qOp34,
vector< std::array< size_t, 2 > > &  qlhs,
vector< vector< std::array< size_t, 12 > > > &  qrhs,
vector< vector< Scalar > > &  factor_cgcs 
)

Prepares a PivotMatrix2 by filling PivotMatrix::qlhs and PivotMatrix::qrhs with the corresponding subspace indices.

Definition at line 700 of file DmrgIndexGymnastics.h.

◆ updateInset()

template<typename Symmetry , typename Scalar >
void updateInset ( const std::vector< std::array< typename Symmetry::qType, 3 > > &  insetOld,
const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  Abra,
const vector< Biped< Symmetry, Eigen::Matrix< Scalar, Dynamic, Dynamic > > > &  Aket,
const vector< qarray< Symmetry::Nq > > &  qloc,
const vector< qarray< Symmetry::Nq > > &  qOp,
std::vector< std::array< typename Symmetry::qType, 3 > > &  insetNew 
)

Updates the quantum Numbers of a right environment when a new site with quantum numbers qloc and qOp is added.

Definition at line 429 of file DmrgIndexGymnastics.h.