CheMPS2
CheMPS2::Sobject Class Reference

#include <Sobject.h>

Public Member Functions

 Sobject (const int index, SyBookkeeper *denBK)
 Constructor. More...
 
virtual ~Sobject ()
 Destructor.
 
int gNKappa () const
 Get the number of symmetry blocks. More...
 
double * gStorage ()
 Get the pointer to the storage. More...
 
int gKappa (const int NL, const int TwoSL, const int IL, const int N1, const int N2, const int TwoJ, const int NR, const int TwoSR, const int IR) const
 Get the index corresponding to a certain symmetry block. More...
 
int gKappa2index (const int kappa) const
 Get the storage jump corresponding to a certain symmetry block. More...
 
double * gStorage (const int NL, const int TwoSL, const int IL, const int N1, const int N2, const int TwoJ, const int NR, const int TwoSR, const int IR)
 Get the pointer to the storage of a certain symmetry block. More...
 
int gIndex () const
 Get the location index. More...
 
void Join (TensorT *Tleft, TensorT *Tright)
 Join two sites to form a composite S-object. More...
 
double Split (TensorT *Tleft, TensorT *Tright, const int virtualdimensionD, const bool movingright, const bool change)
 SVD an S-object into 2 TensorT's. More...
 
void addNoise (const double NoiseLevel)
 Add noise to the current S-object. More...
 
void prog2symm ()
 Convert the storage from diagram convention to symmetric Hamiltonian convention.
 
void symm2prog ()
 Convert the storage from symmetric Hamiltonian convention to diagram convention.
 
int gNL (const int ikappa) const
 Get the left particle number symmetry of block ikappa. More...
 
int gTwoSL (const int ikappa) const
 Get the left spin symmetry of block ikappa. More...
 
int gIL (const int ikappa) const
 Get the left irrep symmetry of block ikappa. More...
 
int gN1 (const int ikappa) const
 Get the left local particle number symmetry of block ikappa. More...
 
int gN2 (const int ikappa) const
 Get the right local particle number symmetry of block ikappa. More...
 
int gTwoJ (const int ikappa) const
 Get the central spin symmetry of block ikappa. More...
 
int gNR (const int ikappa) const
 Get the right particle number symmetry of block ikappa. More...
 
int gTwoSR (const int ikappa) const
 Get the right spin symmetry of block ikappa. More...
 
int gIR (const int ikappa) const
 Get the right irrep symmetry of block ikappa. More...
 
int gReorder (const int ikappa) const
 Get the blocks from large to small: blocksize(reorder[i])>=blocksize(reorder[i+1]) More...
 

Detailed Description

Sobject class.

Author
Sebastian Wouters sebas.nosp@m.tian.nosp@m.woute.nosp@m.rs@g.nosp@m.mail..nosp@m.com
Date
February 18, 2013

Handles the storage of a spin-coupled two-site object, as is needed for the effective Hamiltonian DMRG equations. Extra functionalities are:

  • the formation of an S-object out of two neighbouring TensorT's
  • the decomposition into two TensorT's

Definition at line 34 of file Sobject.h.

Constructor & Destructor Documentation

CheMPS2::Sobject::Sobject ( const int  index,
SyBookkeeper denBK 
)

Constructor.

Parameters
indexThe first index ( S spans index & index + 1 ).
denBKContains the virtual dimensions. Not constant as Sobject is allowed to set the virtual dimensions of symmetry sectors based on the Schmidt spectrum.

Definition at line 36 of file Sobject.cpp.

+ Here is the call graph for this function:

Member Function Documentation

void CheMPS2::Sobject::addNoise ( const double  NoiseLevel)

Add noise to the current S-object.

Parameters
NoiseLevelThe noise added to the S-object is of size (-0.5 < random number < 0.5) * NoiseLevel / infinity-norm(gStorage())

Definition at line 650 of file Sobject.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gIL ( const int  ikappa) const

Get the left irrep symmetry of block ikappa.

Parameters
ikappaThe tensor block number
Returns
the left irrep symmetry of block ikappa

Definition at line 204 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gIndex ( ) const

Get the location index.

Returns
the index

Definition at line 200 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gIR ( const int  ikappa) const

Get the right irrep symmetry of block ikappa.

Parameters
ikappaThe tensor block number
Returns
the right irrep symmetry of block ikappa

Definition at line 210 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gKappa ( const int  NL,
const int  TwoSL,
const int  IL,
const int  N1,
const int  N2,
const int  TwoJ,
const int  NR,
const int  TwoSR,
const int  IR 
) const

Get the index corresponding to a certain symmetry block.

Parameters
NLThe left particle number sector
TwoSLThe left spin symmetry sector
ILThe left irrep sector
N1The first site particle number sector
N2The second site particle number sector
TwoJThe recoupled two-site spin symmetry sector
NRThe right particle number sector
TwoSRThe right spin symmetry sector
IRThe right irrep sector
Returns
The kappa corresponding to the input parameters; -1 means no such block

Definition at line 172 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gKappa2index ( const int  kappa) const

Get the storage jump corresponding to a certain symmetry block.

Parameters
kappaThe symmetry block
Returns
kappa2index[kappa], the memory jumper to a certain block

Definition at line 190 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gN1 ( const int  ikappa) const

Get the left local particle number symmetry of block ikappa.

Parameters
ikappaThe tensor block number
Returns
the left local particle number symmetry of block ikappa

Definition at line 205 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gN2 ( const int  ikappa) const

Get the right local particle number symmetry of block ikappa.

Parameters
ikappaThe tensor block number
Returns
the right local particle number symmetry of block ikappa

Definition at line 206 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gNKappa ( ) const

Get the number of symmetry blocks.

Returns
The number of symmetry blocks

Definition at line 166 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gNL ( const int  ikappa) const

Get the left particle number symmetry of block ikappa.

Parameters
ikappaThe tensor block number
Returns
the left particle number symmetry of block ikappa

Definition at line 202 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gNR ( const int  ikappa) const

Get the right particle number symmetry of block ikappa.

Parameters
ikappaThe tensor block number
Returns
the right particle number symmetry of block ikappa

Definition at line 208 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gReorder ( const int  ikappa) const

Get the blocks from large to small: blocksize(reorder[i])>=blocksize(reorder[i+1])

Parameters
ikappaThe index which counts from large to small
Returns
The original block index

Definition at line 170 of file Sobject.cpp.

+ Here is the caller graph for this function:

double * CheMPS2::Sobject::gStorage ( )

Get the pointer to the storage.

return pointer to the storage

Definition at line 168 of file Sobject.cpp.

+ Here is the caller graph for this function:

double * CheMPS2::Sobject::gStorage ( const int  NL,
const int  TwoSL,
const int  IL,
const int  N1,
const int  N2,
const int  TwoJ,
const int  NR,
const int  TwoSR,
const int  IR 
)

Get the pointer to the storage of a certain symmetry block.

Parameters
NLThe left particle number sector
TwoSLThe left spin symmetry sector
ILThe left irrep sector
N1The first site particle number sector
N2The second site particle number sector
TwoJThe recoupled two-site spin symmetry sector
NRThe right particle number sector
TwoSRThe right spin symmetry sector
IRThe right irrep sector
Returns
Pointer to the requested block; NULL means no such block ( kappa == -1 )

Definition at line 192 of file Sobject.cpp.

+ Here is the call graph for this function:

int CheMPS2::Sobject::gTwoJ ( const int  ikappa) const

Get the central spin symmetry of block ikappa.

Parameters
ikappaThe tensor block number
Returns
the central spin symmetry of block ikappa

Definition at line 207 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gTwoSL ( const int  ikappa) const

Get the left spin symmetry of block ikappa.

Parameters
ikappaThe tensor block number
Returns
the left spin symmetry of block ikappa

Definition at line 203 of file Sobject.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Sobject::gTwoSR ( const int  ikappa) const

Get the right spin symmetry of block ikappa.

Parameters
ikappaThe tensor block number
Returns
the right spin symmetry of block ikappa

Definition at line 209 of file Sobject.cpp.

+ Here is the caller graph for this function:

void CheMPS2::Sobject::Join ( TensorT Tleft,
TensorT Tright 
)

Join two sites to form a composite S-object.

Parameters
TleftLeft TensorT to form the composite S-object
TrightRight TensorT to form the composite S-object

Definition at line 212 of file Sobject.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CheMPS2::Sobject::Split ( TensorT Tleft,
TensorT Tright,
const int  virtualdimensionD,
const bool  movingright,
const bool  change 
)

SVD an S-object into 2 TensorT's.

Parameters
TleftLeft TensorT storage space. At output left normalized.
TrightRight TensorT storage space. At output right normalized.
virtualdimensionDThe virtual dimension which is partitioned over the different symmetry blocks based on the Schmidt spectrum
movingrightWhen true, the singular values are multiplied into V^T, when false, into U.
changeWhether or not the symmetry virtual dimensions are allowed to change (when false: D doesn't matter)
Returns
the discarded weight if change==true ; else 0.0

Definition at line 260 of file Sobject.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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