VMPS++
|
Uniform Matrix Product State. Analogue of the Mps class.
Symmetry | : A class providing all relevant functions and infos that are determined by the Symmetry. Click here for more information. |
Scalar | : double or complex<double> |
#include <Umps.h>
Public Member Functions | |
Umps () | |
template<typename Hamiltonian > | |
Umps (const Hamiltonian &H, qarray< Nq > Qtot_input, size_t L_input, size_t Mmax, size_t Nqmax, bool INIT_TO_HALF_INTEGER_SPIN) | |
Umps (const vector< qarray< Symmetry::Nq > > &qloc_input, qarray< Nq > Qtot_input, size_t L_input, size_t Mmax, size_t Nqmax, bool INIT_TO_HALF_INTEGER_SPIN) | |
Umps (const vector< vector< qarray< Symmetry::Nq > > > &qloc_input, qarray< Nq > Qtot_input, size_t L_input, size_t Mmax, size_t Nqmax, bool INIT_TO_HALF_INTEGER_SPIN) | |
string | info () const |
void | graph (string filename) const |
string | test_ortho (double tol=1e-6) const |
void | setRandom () |
void | normalize_C () |
void | resize (size_t Mmax_input, size_t Nqmax_input, bool INIT_TO_HALF_INTEGER_SPIN) |
template<typename OtherMatrixType > | |
void | resize (const Umps< Symmetry, OtherMatrixType > &V) |
void | resize_arrays () |
void | svdDecompose (size_t loc, GAUGE::OPTION gauge=GAUGE::C) |
void | polarDecompose (size_t loc, GAUGE::OPTION gauge=GAUGE::C) |
VectorXd | entropy () const |
vector< map< qarray< Nq >, tuple< ArrayXd, int > > > | entanglementSpectrum () const |
std::pair< vector< qarray< Symmetry::Nq > >, ArrayXd > | entanglementSpectrumLoc (size_t loc) const |
template<typename OtherScalar > | |
Umps< Symmetry, OtherScalar > | cast () const |
Umps< Symmetry, double > | real () const |
vector< qarray< Symmetry::Nq > > | locBasis (size_t loc) const |
vector< vector< qarray< Symmetry::Nq > > > | locBasis () const |
Qbasis< Symmetry > | inBasis (size_t loc) const |
vector< Qbasis< Symmetry > > | inBasis () const |
Qbasis< Symmetry > | outBasis (size_t loc) const |
vector< Qbasis< Symmetry > > | outBasis () const |
size_t | get_frst_rows () const |
size_t | get_last_cols () const |
size_t | length () const |
Scalar | calc_epsLRsq (GAUGE::OPTION gauge, size_t loc) const |
size_t | calc_Mmax () const |
size_t | calc_fullMmax () const |
size_t | calc_Dmax () const |
size_t | calc_Nqmax () const |
double | memory (MEMUNIT memunit) const |
double | dot (const Umps< Symmetry, Scalar > &Vket) const |
const vector< Biped< Symmetry, MatrixType > > & | A_at (GAUGE::OPTION g, size_t loc) const |
qarray< Symmetry::Nq > | Qtop (size_t loc) const |
qarray< Symmetry::Nq > | Qbot (size_t loc) const |
size_t | minus1modL (size_t l) const |
qarray< Nq > | Qtarget () const |
void | calc_N (DMRG::DIRECTION::OPTION DIR, size_t loc, vector< Biped< Symmetry, MatrixType > > &N) const |
void | truncate (bool SET_AC_RANDOM=true) |
void | orthogonalize_left (GAUGE::OPTION g, vector< Biped< Symmetry, MatrixType > > &G_L) |
void | orthogonalize_right (GAUGE::OPTION g, vector< Biped< Symmetry, MatrixType > > &G_R) |
std::pair< complex< double >, Biped< Symmetry, Matrix< complex< double >, Dynamic, Dynamic > > > | calc_dominant_1symm (GAUGE::OPTION g, DMRG::DIRECTION::OPTION DIR, const Mpo< Symmetry, complex< double > > &R, bool TRANSPOSE, bool CONJUGATE) const |
std::pair< complex< double >, Biped< Symmetry, Matrix< complex< double >, Dynamic, Dynamic > > > | calc_dominant_2symm (GAUGE::OPTION g, DMRG::DIRECTION::OPTION DIR, const Mpo< Symmetry, complex< double > > &R1, const Mpo< Symmetry, complex< double > > &R2) const |
vector< std::pair< complex< double >, Biped< Symmetry, Matrix< complex< double >, Dynamic, Dynamic > > > > | calc_dominant (GAUGE::OPTION g=GAUGE::R, DMRG::DIRECTION::OPTION DIR=DMRG::DIRECTION::RIGHT, int N=2, double tol=1e-15, int dimK=-1, qarray< Symmetry::Nq > Qtot=Symmetry::qvacuum(), string label="") const |
template<typename MpoScalar > | |
vector< std::pair< complex< double >, Tripod< Symmetry, Matrix< complex< double >, Dynamic, Dynamic > > > > | calc_dominant_Q (const Mpo< Symmetry, MpoScalar > &O, GAUGE::OPTION g=GAUGE::R, DMRG::DIRECTION::OPTION DIR=DMRG::DIRECTION::RIGHT, int N=2, double tol=1e-15, int dimK=-1, string label="") const |
void | adjustQN (const size_t number_cells) |
void | sort_A (size_t loc, GAUGE::OPTION g, bool SORT_ALL_GAUGES=false) |
void | updateC (size_t loc) |
void | updateAC (size_t loc, GAUGE::OPTION g) |
void | enrich (size_t loc, GAUGE::OPTION g, const vector< Biped< Symmetry, MatrixType > > &P) |
template<typename MpoScalar > | |
ArrayXXcd | intercellSF (const Mpo< Symmetry, MpoScalar > &Oalfa, const Mpo< Symmetry, MpoScalar > &Obeta, int Lx, double kmin=0., double kmax=2.*M_PI, int kpoints=51, DMRG::VERBOSITY::OPTION VERB=DMRG::VERBOSITY::ON_EXIT, double tol=1e-12) |
template<typename MpoScalar > | |
complex< Scalar > | intercellSFpoint (const Mpo< Symmetry, MpoScalar > &Oalfa, const Mpo< Symmetry, MpoScalar > &Obeta, int Lx, double kval, DMRG::VERBOSITY::OPTION VERB=DMRG::VERBOSITY::ON_EXIT) |
template<typename MpoScalar > | |
ArrayXXcd | SF (const ArrayXXcd &cellAvg, const vector< Mpo< Symmetry, MpoScalar > > &Oalfa, const vector< Mpo< Symmetry, MpoScalar > > &Obeta, int Lx, double kmin, double kmax, int kpoints, DMRG::VERBOSITY::OPTION VERB=DMRG::VERBOSITY::ON_EXIT, double tol=1e-12) |
template<typename MpoScalar > | |
complex< Scalar > | SFpoint (const ArrayXXcd &cellAvg, const vector< Mpo< Symmetry, MpoScalar > > &Oalfa, const vector< Mpo< Symmetry, MpoScalar > > &Obeta, int Lx, double kval, DMRG::VERBOSITY::OPTION VERB=DMRG::VERBOSITY::ON_EXIT) |
void | calc_entropy (size_t loc, bool PRINT=false) |
void | calc_entropy (bool PRINT=false) |
void | update_inbase (size_t loc, GAUGE::OPTION g=GAUGE::C) |
void | update_outbase (size_t loc, GAUGE::OPTION g=GAUGE::C) |
void | update_inbase (GAUGE::OPTION g=GAUGE::C) |
void | update_outbase (GAUGE::OPTION g=GAUGE::C) |
Public Attributes | |
size_t | N_sites |
size_t | Mmax |
size_t | Nqmax |
double | eps_svd = 1e-13 |
double | eps_truncWeight = 1e-14 |
size_t | max_Nsv =100000ul |
size_t | min_Nsv =1ul |
int | max_Nrich |
qarray< Nq > | Qtot |
ArrayXd | truncWeight |
vector< vector< qarray< Symmetry::Nq > > > | qloc |
std::array< vector< vector< Biped< Symmetry, MatrixType > > >, 3 > | A |
vector< Biped< Symmetry, MatrixType > > | C |
VectorXd | S |
vector< map< qarray< Nq >, tuple< ArrayXd, int > > > | SVspec |
vector< Qbasis< Symmetry > > | inbase |
vector< Qbasis< Symmetry > > | outbase |
Private Types | |
typedef Matrix< Scalar, Dynamic, Dynamic > | MatrixType |
Static Private Attributes | |
static constexpr size_t | Nq = Symmetry::Nq |
Friends | |
template<typename Symmetry_ , typename MpHamiltonian , typename Scalar_ > | |
class | VumpsSolver |
template<typename Symmetry_ , typename S1 , typename S2 > | |
class | MpsCompressor |
|
private |
|
inline |
void Umps< Symmetry, Scalar >::adjustQN | ( | const size_t | number_cells | ) |
This functions transforms all quantum numbers in the Umps (Umps::qloc and QN in Umps::A) by
number_cells | : ![]() |
size_t Umps< Symmetry, Scalar >::calc_Dmax |
vector< std::pair< complex< double >, Biped< Symmetry, Matrix< complex< double >, Dynamic, Dynamic > > > > Umps< Symmetry, Scalar >::calc_dominant | ( | GAUGE::OPTION | g = GAUGE::R , |
DMRG::DIRECTION::OPTION | DIR = DMRG::DIRECTION::RIGHT , |
||
int | N = 2 , |
||
double | tol = 1e-15 , |
||
int | dimK = -1 , |
||
qarray< Symmetry::Nq > | Qtot = Symmetry::qvacuum() , |
||
string | label = "" |
||
) | const |
std::pair< complex< double >, Biped< Symmetry, Matrix< complex< double >, Dynamic, Dynamic > > > Umps< Symmetry, Scalar >::calc_dominant_1symm | ( | GAUGE::OPTION | g, |
DMRG::DIRECTION::OPTION | DIR, | ||
const Mpo< Symmetry, complex< double > > & | R, | ||
bool | TRANSPOSE, | ||
bool | CONJUGATE | ||
) | const |
std::pair< complex< double >, Biped< Symmetry, Matrix< complex< double >, Dynamic, Dynamic > > > Umps< Symmetry, Scalar >::calc_dominant_2symm | ( | GAUGE::OPTION | g, |
DMRG::DIRECTION::OPTION | DIR, | ||
const Mpo< Symmetry, complex< double > > & | R1, | ||
const Mpo< Symmetry, complex< double > > & | R2 | ||
) | const |
vector< std::pair< complex< double >, Tripod< Symmetry, Matrix< complex< double >, Dynamic, Dynamic > > > > Umps< Symmetry, Scalar >::calc_dominant_Q | ( | const Mpo< Symmetry, MpoScalar > & | O, |
GAUGE::OPTION | g = GAUGE::R , |
||
DMRG::DIRECTION::OPTION | DIR = DMRG::DIRECTION::RIGHT , |
||
int | N = 2 , |
||
double | tol = 1e-15 , |
||
int | dimK = -1 , |
||
string | label = "" |
||
) | const |
|
inline |
void Umps< Symmetry, Scalar >::calc_entropy | ( | size_t | loc, |
bool | PRINT = false |
||
) |
Scalar Umps< Symmetry, Scalar >::calc_epsLRsq | ( | GAUGE::OPTION | gauge, |
size_t | loc | ||
) | const |
std::size_t Umps< Symmetry, Scalar >::calc_fullMmax |
size_t Umps< Symmetry, Scalar >::calc_Mmax |
void Umps< Symmetry, Scalar >::calc_N | ( | DMRG::DIRECTION::OPTION | DIR, |
size_t | loc, | ||
vector< Biped< Symmetry, MatrixType > > & | N | ||
) | const |
size_t Umps< Symmetry, Scalar >::calc_Nqmax |
void Umps< Symmetry, Scalar >::enrich | ( | size_t | loc, |
GAUGE::OPTION | g, | ||
const vector< Biped< Symmetry, MatrixType > > & | P | ||
) |
Enlarges the tensors of the Umps with an enrichment tensor P
and resizes everything necessary with zeros. The tensor P
needs to be calculated in advance. This is done directly in the VumpsSolver.
loc | : location of the site to enrich. |
g | : The gauge to enrich. L means, we need to update site tensor at loc+1 accordingly. R means updating site loc-1 with zeros. |
P | : the tensor with the enrichment. It is calculated after Eq. (A31). |
|
inline |
|
inline |
|
inline |
void Umps< Symmetry, Scalar >::graph | ( | string | filename | ) | const |
Prints a graph. See Mps::graph.
string Umps< Symmetry, Scalar >::info |
ArrayXXcd Umps< Symmetry, Scalar >::intercellSF | ( | const Mpo< Symmetry, MpoScalar > & | Oalfa, |
const Mpo< Symmetry, MpoScalar > & | Obeta, | ||
int | Lx, | ||
double | kmin = 0. , |
||
double | kmax = 2.*M_PI , |
||
int | kpoints = 51 , |
||
DMRG::VERBOSITY::OPTION | VERB = DMRG::VERBOSITY::ON_EXIT , |
||
double | tol = 1e-12 |
||
) |
Calculates the static structure factor between cells according to "Tangent-space methods for uniform matrix product states" (2018), chapter 2.5.
Oalfa
, Obeta
. Oalfa | : first operator of correlation |
Obeta | : second operator of correlation |
Lx | : length of the unit cell in x-direction |
kmin | : start with this k-value |
kmax | : end with this k-value (include it) |
kpoints | : number of equidistant points in interval |
VERB | : how much information to print |
complex< Scalar > Umps< Symmetry, Scalar >::intercellSFpoint | ( | const Mpo< Symmetry, MpoScalar > & | Oalfa, |
const Mpo< Symmetry, MpoScalar > & | Obeta, | ||
int | Lx, | ||
double | kval, | ||
DMRG::VERBOSITY::OPTION | VERB = DMRG::VERBOSITY::ON_EXIT |
||
) |
|
inline |
double Umps< Symmetry, Scalar >::memory | ( | MEMUNIT | memunit | ) | const |
|
inline |
void Umps< Symmetry, Scalar >::normalize_C |
void Umps< Symmetry, Scalar >::orthogonalize_left | ( | GAUGE::OPTION | g, |
vector< Biped< Symmetry, MatrixType > > & | G_L | ||
) |
Orthogonalize the tensor with GAUGE g
to be left-orthonormal using algorithm 2 from https://arxiv.org/abs/1810.07006.
g | : GAUGE to orthogonalize. |
G_L | : Gauge-Transformation which performs the orthogonalization: ![]() |
void Umps< Symmetry, Scalar >::orthogonalize_right | ( | GAUGE::OPTION | g, |
vector< Biped< Symmetry, MatrixType > > & | G_R | ||
) |
Orthogonalize the tensor with GAUGE g
to be right-orthonormal using the analogue to algorithm 2 from https://arxiv.org/abs/1810.07006.
g | : GAUGE to orthogonalize. |
G_R | : Gauge-Transformation which performs the orthogonalization: ![]() |
void Umps< Symmetry, Scalar >::polarDecompose | ( | size_t | loc, |
GAUGE::OPTION | gauge = GAUGE::C |
||
) |
void Umps< Symmetry, Scalar >::resize | ( | size_t | Mmax_input, |
size_t | Nqmax_input, | ||
bool | INIT_TO_HALF_INTEGER_SPIN | ||
) |
void Umps< Symmetry, Scalar >::resize_arrays |
void Umps< Symmetry, Scalar >::setRandom |
ArrayXXcd Umps< Symmetry, Scalar >::SF | ( | const ArrayXXcd & | cellAvg, |
const vector< Mpo< Symmetry, MpoScalar > > & | Oalfa, | ||
const vector< Mpo< Symmetry, MpoScalar > > & | Obeta, | ||
int | Lx, | ||
double | kmin, | ||
double | kmax, | ||
int | kpoints, | ||
DMRG::VERBOSITY::OPTION | VERB = DMRG::VERBOSITY::ON_EXIT , |
||
double | tol = 1e-12 |
||
) |
Calculates the full static structure factor for a range of k-points.
cellAvg | : all expectation values ![]() |
Oalfa | : first operator of correlation at each cell point |
Obeta | : second operator of correlation at each cell point |
Lx | : length of the unit cell in x-direction |
kmin | : start with this k-value |
kmax | : end with this k-value (include it) |
kpoints | : number of equidistant points in interval |
VERB | : how much information to print |
complex< Scalar > Umps< Symmetry, Scalar >::SFpoint | ( | const ArrayXXcd & | cellAvg, |
const vector< Mpo< Symmetry, MpoScalar > > & | Oalfa, | ||
const vector< Mpo< Symmetry, MpoScalar > > & | Obeta, | ||
int | Lx, | ||
double | kval, | ||
DMRG::VERBOSITY::OPTION | VERB = DMRG::VERBOSITY::ON_EXIT |
||
) |
void Umps< Symmetry, Scalar >::sort_A | ( | size_t | loc, |
GAUGE::OPTION | g, | ||
bool | SORT_ALL_GAUGES = false |
||
) |
void Umps< Symmetry, Scalar >::svdDecompose | ( | size_t | loc, |
GAUGE::OPTION | gauge = GAUGE::C |
||
) |
string Umps< Symmetry, Scalar >::test_ortho | ( | double | tol = 1e-6 | ) | const |
void Umps< Symmetry, Scalar >::truncate | ( | bool | SET_AC_RANDOM = true | ) |
Performs a truncation of an Umps by the singular values of the center-matrix C. Updates AL and AR with the truncated isometries from the SVD and reorthogonalize them afterwards.
SET_AC_RANDOM | : bool to decide, whether to set AC to random or to C*AR. Truncation of a converged Umps can be done with SET_AC_RANDOM=false to evaluate e.g. observables after the truncation. Truncation during the variational optimization should be done with SET_AC_RANDOM=true because otherwise this would be a bias. |
|
inline |
void Umps< Symmetry, Scalar >::update_inbase | ( | size_t | loc, |
GAUGE::OPTION | g = GAUGE::C |
||
) |
|
inline |
void Umps< Symmetry, Scalar >::update_outbase | ( | size_t | loc, |
GAUGE::OPTION | g = GAUGE::C |
||
) |
void Umps< Symmetry, Scalar >::updateAC | ( | size_t | loc, |
GAUGE::OPTION | g | ||
) |
void Umps< Symmetry, Scalar >::updateC | ( | size_t | loc | ) |
|
friend |
|
friend |
std::array<vector<vector<Biped<Symmetry,MatrixType> > >,3> Umps< Symmetry, Scalar >::A |
vector<Biped<Symmetry,MatrixType> > Umps< Symmetry, Scalar >::C |
double Umps< Symmetry, Scalar >::eps_svd = 1e-13 |
double Umps< Symmetry, Scalar >::eps_truncWeight = 1e-14 |
int Umps< Symmetry, Scalar >::max_Nrich |
size_t Umps< Symmetry, Scalar >::max_Nsv =100000ul |
size_t Umps< Symmetry, Scalar >::min_Nsv =1ul |
size_t Umps< Symmetry, Scalar >::Mmax |
size_t Umps< Symmetry, Scalar >::N_sites |
|
staticconstexprprivate |
size_t Umps< Symmetry, Scalar >::Nqmax |
VectorXd Umps< Symmetry, Scalar >::S |
ArrayXd Umps< Symmetry, Scalar >::truncWeight |