VMPS++
Loading...
Searching...
No Matches
UmpsCompressor< Symmetry, Scalar, MpoScalar > Class Template Reference

Detailed Description

template<typename Symmetry, typename Scalar, typename MpoScalar = double>
class UmpsCompressor< Symmetry, Scalar, MpoScalar >

Compressor for uMPS. Needed to obtain various operations containing uMPSs and MPOs with a variational approach.

Template Parameters
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>
MpoScalar: double or complex<double>
Note
Until now, only support for compressing a state.
Warning
This is class is nearly untested and probably just works for Lcell=1 because the parallel algorithm implemented for Lcell>1 does not work well.
Longterm Todo:
Implemented a sequential algorithm and test the comporession more seriously.

Definition at line 22 of file UmpsCompressor.h.

#include <UmpsCompressor.h>

Public Member Functions

 UmpsCompressor (DMRG::VERBOSITY::OPTION VERBOSITY=DMRG::VERBOSITY::SILENT)
 
string info () const
 
double memory (MEMUNIT memunit=GB) const
 
void stateCompress (const Umps< Symmetry, Scalar > &Vin, Umps< Symmetry, Scalar > &Vout, size_t Dinit_input, size_t Qinit_input, double tol_input, size_t max_iterations=100ul, size_t min_iterations=10ul)
 

Private Member Functions

void optimize_parallel (const Umps< Symmetry, Scalar > &Vin, Umps< Symmetry, Scalar > &Vout)
 
void build_cellEnv (const Umps< Symmetry, Scalar > &Vbra, const Umps< Symmetry, Scalar > &Vket)
 
void build_LR (const Umps< Symmetry, Scalar > &Vbra, const Umps< Symmetry, Scalar > &Vket)
 
void calc_error (const Umps< Symmetry, Scalar > &Vout)
 
size_t minus1modL (size_t l) const
 

Private Attributes

DMRG::VERBOSITY::OPTION CHOSEN_VERBOSITY
 
vector< PivotOverlap1< Symmetry, Scalar > > Env
 
size_t N_sites
 
size_t N_iterations
 
size_t Dinit
 
size_t Qinit
 
double err_var
 
double tol
 
complex< double > lambdaL
 
double t_fixedL
 
double t_fixedR
 

Constructor & Destructor Documentation

◆ UmpsCompressor()

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
UmpsCompressor< Symmetry, Scalar, MpoScalar >::UmpsCompressor ( DMRG::VERBOSITY::OPTION  VERBOSITY = DMRG::VERBOSITY::SILENT)
inline

Definition at line 26 of file UmpsCompressor.h.

Member Function Documentation

◆ build_cellEnv()

template<typename Symmetry , typename Scalar , typename MpoScalar >
void UmpsCompressor< Symmetry, Scalar, MpoScalar >::build_cellEnv ( const Umps< Symmetry, Scalar > &  Vbra,
const Umps< Symmetry, Scalar > &  Vket 
)
private

Definition at line 162 of file UmpsCompressor.h.

◆ build_LR()

template<typename Symmetry , typename Scalar , typename MpoScalar >
void UmpsCompressor< Symmetry, Scalar, MpoScalar >::build_LR ( const Umps< Symmetry, Scalar > &  Vbra,
const Umps< Symmetry, Scalar > &  Vket 
)
private

Definition at line 186 of file UmpsCompressor.h.

◆ calc_error()

template<typename Symmetry , typename Scalar , typename MpoScalar >
void UmpsCompressor< Symmetry, Scalar, MpoScalar >::calc_error ( const Umps< Symmetry, Scalar > &  Vout)
private

Definition at line 260 of file UmpsCompressor.h.

◆ info()

template<typename Symmetry , typename Scalar , typename MpoScalar >
string UmpsCompressor< Symmetry, Scalar, MpoScalar >::info

Prints some info about this class.

Definition at line 84 of file UmpsCompressor.h.

◆ memory()

template<typename Symmetry , typename Scalar , typename MpoScalar >
double UmpsCompressor< Symmetry, Scalar, MpoScalar >::memory ( MEMUNIT  memunit = GB) const

Calculates the (theoretically) allocated memory (note: by default in GB).

Definition at line 110 of file UmpsCompressor.h.

◆ minus1modL()

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
size_t UmpsCompressor< Symmetry, Scalar, MpoScalar >::minus1modL ( size_t  l) const
inlineprivate

Safely calculates $l-1 mod L$ without overflow for size_t.

Definition at line 72 of file UmpsCompressor.h.

◆ optimize_parallel()

template<typename Symmetry , typename Scalar , typename MpoScalar >
void UmpsCompressor< Symmetry, Scalar, MpoScalar >::optimize_parallel ( const Umps< Symmetry, Scalar > &  Vin,
Umps< Symmetry, Scalar > &  Vout 
)
private

Definition at line 218 of file UmpsCompressor.h.

◆ stateCompress()

template<typename Symmetry , typename Scalar , typename MpoScalar >
void UmpsCompressor< Symmetry, Scalar, MpoScalar >::stateCompress ( const Umps< Symmetry, Scalar > &  Vin,
Umps< Symmetry, Scalar > &  Vout,
size_t  Dinit_input,
size_t  Qinit_input,
double  tol_input,
size_t  max_iterations = 100ul,
size_t  min_iterations = 10ul 
)

Compresses a given uMps $V_{out} \approx V_{in}$.

Parameters
[in]Vin: input state to be compressed
[out]Vout: compressed output state
[in]Dinit_input: matrix size cutoff per site and subspace for Vout
[in]Qinit_input: symmetry block cutoff per site for Vout
[in]tol_input: tolerance for the variational error
[in]max_iterations: maximal amount of iterations; break if exceeded
[in]min_iterations: minimal amount of iterations

Definition at line 128 of file UmpsCompressor.h.

Member Data Documentation

◆ CHOSEN_VERBOSITY

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
DMRG::VERBOSITY::OPTION UmpsCompressor< Symmetry, Scalar, MpoScalar >::CHOSEN_VERBOSITY
private

Definition at line 59 of file UmpsCompressor.h.

◆ Dinit

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
size_t UmpsCompressor< Symmetry, Scalar, MpoScalar >::Dinit
private

Definition at line 76 of file UmpsCompressor.h.

◆ Env

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
vector<PivotOverlap1<Symmetry,Scalar> > UmpsCompressor< Symmetry, Scalar, MpoScalar >::Env
private

Definition at line 62 of file UmpsCompressor.h.

◆ err_var

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
double UmpsCompressor< Symmetry, Scalar, MpoScalar >::err_var
private

Definition at line 77 of file UmpsCompressor.h.

◆ lambdaL

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
complex<double> UmpsCompressor< Symmetry, Scalar, MpoScalar >::lambdaL
private

Definition at line 78 of file UmpsCompressor.h.

◆ N_iterations

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
size_t UmpsCompressor< Symmetry, Scalar, MpoScalar >::N_iterations
private

Definition at line 75 of file UmpsCompressor.h.

◆ N_sites

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
size_t UmpsCompressor< Symmetry, Scalar, MpoScalar >::N_sites
private

Definition at line 74 of file UmpsCompressor.h.

◆ Qinit

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
size_t UmpsCompressor< Symmetry, Scalar, MpoScalar >::Qinit
private

Definition at line 76 of file UmpsCompressor.h.

◆ t_fixedL

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
double UmpsCompressor< Symmetry, Scalar, MpoScalar >::t_fixedL
private

Definition at line 79 of file UmpsCompressor.h.

◆ t_fixedR

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
double UmpsCompressor< Symmetry, Scalar, MpoScalar >::t_fixedR
private

Definition at line 80 of file UmpsCompressor.h.

◆ tol

template<typename Symmetry , typename Scalar , typename MpoScalar = double>
double UmpsCompressor< Symmetry, Scalar, MpoScalar >::tol
private

Definition at line 77 of file UmpsCompressor.h.


The documentation for this class was generated from the following file: