1#ifndef VANILLA_VUMPS_TRANSFERMATRIX_STRUCTUREFACTOR
2#define VANILLA_VUMPS_TRANSFERMATRIX_STRUCTUREFACTOR
6template<
typename Symmetry,
typename Scalar>
12 const vector<vector<
Biped<Symmetry,Matrix<Scalar,Dynamic,Dynamic> > > > &Abra_input,
13 const vector<vector<
Biped<Symmetry,Matrix<Scalar,Dynamic,Dynamic> > > > &Aket_input,
14 const Biped<Symmetry,Matrix<complex<Scalar>,Dynamic,Dynamic> > &Leigen_input,
15 const Biped<Symmetry,Matrix<complex<Scalar>,Dynamic,Dynamic> > &Reigen_input,
18 const typename Symmetry::qType& Q = Symmetry::qvacuum())
19 :
DIR(DIR_input),
Abra(Abra_input),
Aket(Aket_input),
20 qloc(qloc_input),
k(k_input)
34 vector<vector<Biped<Symmetry,Matrix<Scalar,Dynamic,Dynamic> > > >
Abra;
35 vector<vector<Biped<Symmetry,Matrix<Scalar,Dynamic,Dynamic> > > >
Aket;
41 vector<vector<qarray<Symmetry::Nq> > >
qloc;
44template<
typename Symmetry,
typename Scalar>
48 size_t Lcell = H.
qloc.size();
57 for (
int l=Lcell-1; l>=0; --l)
71 for (
size_t l=0; l<Lcell; ++l)
82 assert(1==0 and
"Unknown VMPS::DIRECTION::OPTION in TransferMatrixSF!");
94 Vout.data.addScale(-exp(+1.i*H.
k), TxV.template cast<Matrix<complex<Scalar>,Dynamic,Dynamic> >());
97 Vout.data.addScale(+exp(+1.i*H.
k)*LdotV, H.
Reigen);
102 Vout.data.addScale(-exp(-1.i*H.
k), TxV.template cast<Matrix<complex<Scalar>,Dynamic,Dynamic> >());
105 Vout.data.addScale(+exp(-1.i*H.
k)*VdotR, H.
Leigen);
109template<
typename Symmetry,
typename Scalar1,
typename Scalar2>
117template<
typename Symmetry,
typename Scalar>
size_t dim(const TransferMatrixSF< Symmetry, Scalar > &H)
void HxV(const TransferMatrixSF< Symmetry, Scalar > &H, const MpoTransferVector< Symmetry, complex< Scalar > > &Vin, MpoTransferVector< Symmetry, complex< Scalar > > &Vout)
const std::vector< std::vector< std::vector< Biped< Symmetry, MatrixType > > > > & W_at(const std::size_t loc) const
const std::vector< std::vector< qType > > & opBasis() const
Mpo< Symmetry, Scalar > Identity() const
void contract_R(const Tripod< Symmetry, MatrixType2 > &Rold, const vector< Biped< Symmetry, MatrixType > > &Abra, const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &W, const vector< Biped< Symmetry, MatrixType > > &Aket, const vector< qarray< Symmetry::Nq > > &qloc, const vector< qarray< Symmetry::Nq > > &qOp, Tripod< Symmetry, MatrixType2 > &Rnew, bool RANDOMIZE=false, tuple< CONTRACT_LR_MODE, size_t > MODE_input=make_pair(FULL, 0), const std::unordered_map< pair< qarray< Symmetry::Nq >, size_t >, size_t > &basis_order_map={})
void contract_L(const Tripod< Symmetry, MatrixType2 > &Lold, const vector< Biped< Symmetry, MatrixType > > &Abra, const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &W, const vector< Biped< Symmetry, MatrixType > > &Aket, const vector< qarray< Symmetry::Nq > > &qloc, const vector< qarray< Symmetry::Nq > > &qOp, Tripod< Symmetry, MatrixType2 > &Lnew, bool RANDOMIZE=false, tuple< CONTRACT_LR_MODE, size_t > MODE_input=make_pair(FULL, 0), const std::unordered_map< pair< qarray< Symmetry::Nq >, size_t >, size_t > &basis_order_map={})
Scalar contract_LR(const Tripod< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > &L, const vector< Biped< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > > &Abra, const vector< vector< vector< Biped< Symmetry, MpoMatrixType > > > > &W, const vector< Biped< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > > &Aket, const Tripod< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > &R, const vector< qarray< Symmetry::Nq > > &qloc, const vector< qarray< Symmetry::Nq > > &qOp)
vector< vector< Biped< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > > > Abra
VMPS::DIRECTION::OPTION DIR
Tripod< Symmetry, Matrix< complex< Scalar >, Dynamic, Dynamic > > Leigen
vector< vector< Biped< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > > > Aket
TransferMatrixSF(VMPS::DIRECTION::OPTION DIR_input, const vector< vector< Biped< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > > > &Abra_input, const vector< vector< Biped< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > > > &Aket_input, const Biped< Symmetry, Matrix< complex< Scalar >, Dynamic, Dynamic > > &Leigen_input, const Biped< Symmetry, Matrix< complex< Scalar >, Dynamic, Dynamic > > &Reigen_input, const vector< vector< qarray< Symmetry::Nq > > > &qloc_input, double k_input, const typename Symmetry::qType &Q=Symmetry::qvacuum())
Mpo< Symmetry, Scalar > Id
Tripod< Symmetry, Matrix< complex< Scalar >, Dynamic, Dynamic > > Reigen
vector< vector< qarray< Symmetry::Nq > > > qloc