CheMPS2
|
#include <TensorT.h>
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 SyBookkeeper * | gBK () 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. | |
TensorT class.
The TensorT class is a storage and gauge transformation class for MPS tensors.
CheMPS2::TensorT::TensorT | ( | const int | site_index, |
const SyBookkeeper * | denBK | ||
) |
Constructor.
site_index | The site index |
denBK | The symmetry bookkeeper of the MPS |
Definition at line 29 of file TensorT.cpp.
bool CheMPS2::TensorT::CheckLeftNormal | ( | ) | const |
Check whether the TensorT is left-normal.
Definition at line 433 of file TensorT.cpp.
bool CheMPS2::TensorT::CheckRightNormal | ( | ) | const |
Check whether the TensorT is right-normal.
Definition at line 474 of file TensorT.cpp.
const CheMPS2::SyBookkeeper * CheMPS2::TensorT::gBK | ( | ) | const |
Get the pointer to the symmetry bookkeeper.
Definition at line 163 of file TensorT.cpp.
|
virtual |
Get the location index.
Implements CheMPS2::Tensor.
Definition at line 161 of file TensorT.cpp.
|
virtual |
Get the index corresponding to a certain tensor block.
N1 | The left particle number sector |
TwoS1 | The left spin symmetry sector |
I1 | The left irrep sector |
N2 | The right particle number sector |
TwoS2 | The right spin symmetry sector |
I2 | The right irrep sector |
Implements CheMPS2::Tensor.
Definition at line 136 of file TensorT.cpp.
|
virtual |
Get the storage jump corresponding to a certain tensor block.
kappa | The symmetry block |
Implements CheMPS2::Tensor.
Definition at line 151 of file TensorT.cpp.
|
virtual |
Get the number of symmetry blocks.
Implements CheMPS2::Tensor.
Definition at line 132 of file TensorT.cpp.
|
virtual |
Get the pointer to the storage.
return pointer to the storage
Implements CheMPS2::Tensor.
Definition at line 134 of file TensorT.cpp.
|
virtual |
Get the pointer to the storage of a certain tensor block.
N1 | The left particle number sector |
TwoS1 | The left spin symmetry sector |
I1 | The left irrep sector |
N2 | The right particle number sector |
TwoS2 | The right spin symmetry sector |
I2 | The right irrep sector |
Implements CheMPS2::Tensor.
Definition at line 153 of file TensorT.cpp.
void CheMPS2::TensorT::LeftMultiply | ( | Tensor * | Mx | ) |
Multiply at the left with a diagonal TensorOperator.
Mx | The diagonal TensorOperator with which the current TensorT should be multiplied at the left |
Definition at line 391 of file TensorT.cpp.
void CheMPS2::TensorT::LQ | ( | Tensor * | Lstorage | ) |
Right-normalization.
Lstorage | Where the L-part of the LQ-decomposition can be stored (diagonal TensorOperator). |
Definition at line 291 of file TensorT.cpp.
void CheMPS2::TensorT::number_operator | ( | const double | alpha, |
const double | beta | ||
) |
Apply alpha * ( number operator ) + beta to the MPS tensor.
alpha | Prefactor of the number operator |
beta | Constant to be multiplied with the MPS tensor |
Definition at line 175 of file TensorT.cpp.
void CheMPS2::TensorT::QR | ( | Tensor * | Rstorage | ) |
Left-normalization.
Rstorage | Where the R-part of the QR-decomposition can be stored (diagonal TensorOperator). |
Definition at line 188 of file TensorT.cpp.
void CheMPS2::TensorT::RightMultiply | ( | Tensor * | Mx | ) |
Multiply at the right with a diagonal TensorOperator.
Mx | The diagonal TensorOperator with which the current TensorT should be multiplied at the right |
Definition at line 412 of file TensorT.cpp.
void CheMPS2::TensorT::sBK | ( | const SyBookkeeper * | newBK | ) |
Set the pointer to the symmetry bookkeeper.
newBK | The pointer to the symmetry bookkeeper |
Definition at line 165 of file TensorT.cpp.