CheMPS2
CheMPS2::TensorT Class Reference

#include <TensorT.h>

+ Inheritance diagram for CheMPS2::TensorT:
+ Collaboration diagram for CheMPS2::TensorT:

Public Member Functions

 TensorT (const int site_index, const SyBookkeeper *denBK)
 Constructor. More...
 
virtual ~TensorT ()
 Destructor.
 
int gNKappa () const
 Get the number of symmetry blocks. More...
 
double * gStorage ()
 Get the pointer to the storage. More...
 
int gKappa (const int N1, const int TwoS1, const int I1, const int N2, const int TwoS2, const int I2) const
 Get the index corresponding to a certain tensor block. More...
 
int gKappa2index (const int kappa) const
 Get the storage jump corresponding to a certain tensor block. More...
 
double * gStorage (const int N1, const int TwoS1, const int I1, const int N2, const int TwoS2, const int I2)
 Get the pointer to the storage of a certain tensor block. More...
 
int gIndex () const
 Get the location index. More...
 
const SyBookkeepergBK () const
 Get the pointer to the symmetry bookkeeper. More...
 
void sBK (const SyBookkeeper *newBK)
 Set the pointer to the symmetry bookkeeper. More...
 
void random ()
 Fill storage with random numbers 0 < val < 1.
 
void number_operator (const double alpha, const double beta)
 Apply alpha * ( number operator ) + beta to the MPS tensor. More...
 
void QR (Tensor *Rstorage)
 Left-normalization. More...
 
void LQ (Tensor *Lstorage)
 Right-normalization. More...
 
void LeftMultiply (Tensor *Mx)
 Multiply at the left with a diagonal TensorOperator. More...
 
void RightMultiply (Tensor *Mx)
 Multiply at the right with a diagonal TensorOperator. More...
 
void Reset ()
 Reset the TensorT (if virtual dimensions are changed)
 
bool CheckLeftNormal () const
 Check whether the TensorT is left-normal. More...
 
bool CheckRightNormal () const
 Check whether the TensorT is right-normal. More...
 

Additional Inherited Members

- Protected Attributes inherited from CheMPS2::Tensor
int index
 Index of the Tensor object. For TensorT: a site index; for other tensors: a boundary index.
 
double * storage
 The actual variables. Tensor block kappa begins at storage+kappa2index[kappa] and ends at storage+kappa2index[kappa+1].
 
int nKappa
 Number of Tensor blocks.
 
int * kappa2index
 kappa2index[kappa] indicates the start of tensor block kappa in storage. kappa2index[nKappa] gives the size of storage.
 

Detailed Description

TensorT 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

The TensorT class is a storage and gauge transformation class for MPS tensors.

Definition at line 32 of file TensorT.h.

Constructor & Destructor Documentation

CheMPS2::TensorT::TensorT ( const int  site_index,
const SyBookkeeper denBK 
)

Constructor.

Parameters
site_indexThe site index
denBKThe symmetry bookkeeper of the MPS

Definition at line 29 of file TensorT.cpp.

+ Here is the call graph for this function:

Member Function Documentation

bool CheMPS2::TensorT::CheckLeftNormal ( ) const

Check whether the TensorT is left-normal.

Returns
Whether TensorT is left-normal

Definition at line 433 of file TensorT.cpp.

+ Here is the call graph for this function:

bool CheMPS2::TensorT::CheckRightNormal ( ) const

Check whether the TensorT is right-normal.

Returns
Whether TensorT is right-normal

Definition at line 474 of file TensorT.cpp.

+ Here is the call graph for this function:

const CheMPS2::SyBookkeeper * CheMPS2::TensorT::gBK ( ) const

Get the pointer to the symmetry bookkeeper.

Returns
the pointer to the symmetry bookkeeper

Definition at line 163 of file TensorT.cpp.

+ Here is the caller graph for this function:

int CheMPS2::TensorT::gIndex ( ) const
virtual

Get the location index.

Returns
the index

Implements CheMPS2::Tensor.

Definition at line 161 of file TensorT.cpp.

+ Here is the caller graph for this function:

int CheMPS2::TensorT::gKappa ( const int  N1,
const int  TwoS1,
const int  I1,
const int  N2,
const int  TwoS2,
const int  I2 
) const
virtual

Get the index corresponding to a certain tensor block.

Parameters
N1The left particle number sector
TwoS1The left spin symmetry sector
I1The left irrep sector
N2The right particle number sector
TwoS2The right spin symmetry sector
I2The right irrep sector
Returns
The kappa corresponding to the input parameters; -1 means no such block

Implements CheMPS2::Tensor.

Definition at line 136 of file TensorT.cpp.

+ Here is the caller graph for this function:

int CheMPS2::TensorT::gKappa2index ( const int  kappa) const
virtual

Get the storage jump corresponding to a certain tensor block.

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

Implements CheMPS2::Tensor.

Definition at line 151 of file TensorT.cpp.

+ Here is the caller graph for this function:

int CheMPS2::TensorT::gNKappa ( ) const
virtual

Get the number of symmetry blocks.

Returns
The number of symmetry blocks

Implements CheMPS2::Tensor.

Definition at line 132 of file TensorT.cpp.

double * CheMPS2::TensorT::gStorage ( )
virtual

Get the pointer to the storage.

return pointer to the storage

Implements CheMPS2::Tensor.

Definition at line 134 of file TensorT.cpp.

+ Here is the caller graph for this function:

double * CheMPS2::TensorT::gStorage ( const int  N1,
const int  TwoS1,
const int  I1,
const int  N2,
const int  TwoS2,
const int  I2 
)
virtual

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

Parameters
N1The left particle number sector
TwoS1The left spin symmetry sector
I1The left irrep sector
N2The right particle number sector
TwoS2The right spin symmetry sector
I2The right irrep sector
Returns
Pointer to the storage of the specified tensor block; NULL means no such block

Implements CheMPS2::Tensor.

Definition at line 153 of file TensorT.cpp.

+ Here is the call graph for this function:

void CheMPS2::TensorT::LeftMultiply ( Tensor Mx)

Multiply at the left with a diagonal TensorOperator.

Parameters
MxThe diagonal TensorOperator with which the current TensorT should be multiplied at the left

Definition at line 391 of file TensorT.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CheMPS2::TensorT::LQ ( Tensor Lstorage)

Right-normalization.

Parameters
LstorageWhere the L-part of the LQ-decomposition can be stored (diagonal TensorOperator).

Definition at line 291 of file TensorT.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CheMPS2::TensorT::number_operator ( const double  alpha,
const double  beta 
)

Apply alpha * ( number operator ) + beta to the MPS tensor.

Parameters
alphaPrefactor of the number operator
betaConstant to be multiplied with the MPS tensor

Definition at line 175 of file TensorT.cpp.

+ Here is the caller graph for this function:

void CheMPS2::TensorT::QR ( Tensor Rstorage)

Left-normalization.

Parameters
RstorageWhere the R-part of the QR-decomposition can be stored (diagonal TensorOperator).

Definition at line 188 of file TensorT.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CheMPS2::TensorT::RightMultiply ( Tensor Mx)

Multiply at the right with a diagonal TensorOperator.

Parameters
MxThe diagonal TensorOperator with which the current TensorT should be multiplied at the right

Definition at line 412 of file TensorT.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CheMPS2::TensorT::sBK ( const SyBookkeeper newBK)

Set the pointer to the symmetry bookkeeper.

Parameters
newBKThe pointer to the symmetry bookkeeper

Definition at line 165 of file TensorT.cpp.

+ Here is the caller graph for this function:


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