1#ifndef STRAWBERRY_DMRG_HEFF_STUFF_0SITE_WITH_Q
2#define STRAWBERRY_DMRG_HEFF_STUFF_0SITE_WITH_Q
10template<
typename Symmetry,
typename Scalar,
typename MpoScalar=
double>
16 const Tripod<Symmetry,Matrix<Scalar,Dynamic,Dynamic> > &R_input)
17 :
L(L_input),
R(R_input)
21 :
L(H.Terms[0].
L),
R(H.Terms[0].
R)
31template<
typename Symmetry,
typename Scalar,
typename MpoScalar>
35 Vout.
data[0].setZero();
37 for (
size_t qL=0; qL<H.
L.dim; ++qL)
40 auto qR = H.
R.dict.find(qupleR);
42 if (qR != H.
R.dict.end())
45 auto qAin = Vin.
data[0].dict.find(qupleAin);
47 if (qAin != Vin.
data[0].dict.end())
50 auto qAout = Vout.
data[0].dict.find(qupleAout);
52 if (qAout != Vout.
data[0].dict.end())
54 assert(H.
L.block[qL].shape()[0] == H.
R.block[qR->second].shape()[0]);
55 for (
size_t a=0; a<H.
L.block[qL].shape()[0]; ++a)
57 Matrix<Scalar,Dynamic,Dynamic> Mtmp;
59 if (H.
L.block[qL][a][0].size() != 0 and
60 H.
R.block[qR->second][a][0].size() !=0)
67 Vin.
data[0].block[qAin->second],
68 H.
R.block[qR->second][a][0],
80 if (Vout.
data[0].block[qAout->second].size() != 0)
83 Vout.
data[0].block[qAout->second] += Mtmp;
88 Vout.
data[0].block[qAout->second] = Mtmp;
98template<
typename Symmetry,
typename Scalar,
typename MpoScalar>
106template<
typename Symmetry,
typename Scalar,
typename MpoScalar>
113template<
typename Symmetry,
typename Scalar,
typename MpoScalar>
void optimal_multiply(Scalar alpha, const MatrixTypeA &A, const MatrixTypeB &B, const MatrixTypeC &C, MatrixTypeR &result, bool DEBUG=false)
double norm(const PivotMatrix0< Symmetry, Scalar, MpoScalar > &H)
void HxV(const PivotMatrix0< Symmetry, Scalar, MpoScalar > &H, const PivotVector< Symmetry, Scalar > &Vin, PivotVector< Symmetry, Scalar > &Vout)
size_t dim(const PivotMatrix0< Symmetry, Scalar, MpoScalar > &H)
std::array< qarray< Nq >, 2 > qarray2
std::array< qarray< Nq >, 3 > qarray3
Tripod< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > R
PivotMatrix0(const Tripod< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > &L_input, const Tripod< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > &R_input)
PivotMatrix0(const PivotMatrix1< Symmetry, Scalar, MpoScalar > &H)
Tripod< Symmetry, Matrix< Scalar, Dynamic, Dynamic > > L
void outerResize(const PivotVector &Vrhs)
vector< Biped< Symmetry, Matrix< Scalar_, Dynamic, Dynamic > > > data