CheMPS2
CheMPS2::TensorQ Class Reference

#include <TensorQ.h>

+ Inheritance diagram for CheMPS2::TensorQ:
+ Collaboration diagram for CheMPS2::TensorQ:

Public Member Functions

 TensorQ (const int boundary_index, const int Idiff, const bool moving_right, const SyBookkeeper *denBK, const Problem *Prob, const int site)
 Constructor. More...
 
virtual ~TensorQ ()
 Destructor.
 
void AddTermSimple (TensorT *denT)
 Add terms after update/clear without previous tensors. More...
 
void AddTermsL (TensorL **Ltensors, TensorT *denT, double *workmem, double *workmem2)
 Add terms after update/clear with previous TensorL's. More...
 
void AddTermsAB (TensorOperator *denA, TensorOperator *denB, TensorT *denT, double *workmem, double *workmem2)
 Add terms after update/clear with previous A-tensors and B-tensors. More...
 
void AddTermsCD (TensorOperator *denC, TensorOperator *denD, TensorT *denT, double *workmem, double *workmem2)
 Add terms after update/clear with previous C-tensors and D-tensors. More...
 
- Public Member Functions inherited from CheMPS2::TensorOperator
 TensorOperator (const int boundary_index, const int two_j, const int n_elec, const int n_irrep, const bool moving_right, const bool prime_last, const bool jw_phase, const SyBookkeeper *bk_up, const SyBookkeeper *bk_down)
 Constructor. More...
 
virtual ~TensorOperator ()
 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 boundary index. More...
 
int get_2j () const
 Get twice the spin of the tensor operator. More...
 
int get_nelec () const
 Get how many electrons there are more in the symmetry sector of the lower leg compared to the upper leg. More...
 
int get_irrep () const
 Get the (real-valued abelian) point group irrep difference between the symmetry sectors of the lower and upper legs (see Irreps.h) More...
 
void update (TensorOperator *previous, TensorT *mps_tensor_up, TensorT *mps_tensor_down, double *workmem)
 Clear and update. More...
 
void daxpy (double alpha, TensorOperator *to_add)
 daxpy for TensorOperator More...
 
void daxpy_transpose_tensorCD (const double alpha, TensorOperator *to_add)
 daxpy_transpose for C- and D-tensors (with special spin-dependent factors) More...
 
void clear ()
 Set all storage variables to 0.0.
 
double inproduct (TensorOperator *buddy, const char trans) const
 Make the in-product of two TensorOperator. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CheMPS2::TensorOperator
void update_moving_right (const int ikappa, TensorOperator *previous, TensorT *mps_tensor_up, TensorT *mps_tensor_down, double *workmem)
 Update moving right. More...
 
void update_moving_left (const int ikappa, TensorOperator *previous, TensorT *mps_tensor_up, TensorT *mps_tensor_down, double *workmem)
 Update moving left. More...
 
- Protected Attributes inherited from CheMPS2::TensorOperator
const SyBookkeeperbk_up
 The bookkeeper of the upper MPS.
 
const SyBookkeeperbk_down
 The bookkeeper of the lower MPS.
 
int two_j
 Twice the spin of the tensor operator.
 
int n_elec
 How many electrons there are more in the symmetry sector of the lower leg compared to the upper leg.
 
int n_irrep
 The (real-valued abelian) point group irrep difference between the symmetry sectors of the lower and upper legs (see Irreps.h)
 
bool moving_right
 Whether or not moving right.
 
int * sector_nelec_up
 The up particle number sector.
 
int * sector_irrep_up
 The up spin symmetry sector.
 
int * sector_spin_up
 The up spin symmetry sector.
 
int * sector_spin_down
 The down spin symmetry sector (pointer points to sectorTwoS1 if two_j == 0)
 
bool prime_last
 Convention in which the tensor operator is stored (see class information)
 
bool jw_phase
 Whether or not to include a Jordan-Wigner phase due to the fermion anti-commutation relations.
 
- 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

TensorQ class.

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

The TensorQ class is a storage and manipulation class for the complementary operator of three contracted creators/annihilitors.

Definition at line 37 of file TensorQ.h.

Constructor & Destructor Documentation

CheMPS2::TensorQ::TensorQ ( const int  boundary_index,
const int  Idiff,
const bool  moving_right,
const SyBookkeeper denBK,
const Problem Prob,
const int  site 
)

Constructor.

Parameters
boundary_indexThe boundary index
IdiffThe irrep of the one creator ( sandwiched if TensorL ; to sandwich if TensorQ )
moving_rightIf true: sweep from left to right. If false: sweep from right to left
denBKSymmetry bookkeeper of the problem at hand
ProbProblem containing the matrix elements
siteThe site on which the last crea/annih should work

Definition at line 27 of file TensorQ.cpp.

Member Function Documentation

void CheMPS2::TensorQ::AddTermsAB ( TensorOperator denA,
TensorOperator denB,
TensorT denT,
double *  workmem,
double *  workmem2 
)

Add terms after update/clear with previous A-tensors and B-tensors.

Parameters
denAThe A-tensor to construct the Q-term
denBThe B-tensor to construct the Q-term
denTTensorT to construct the Q-term with previous TensorL's
workmemWork memory
workmem2Work memory

Definition at line 386 of file TensorQ.cpp.

+ Here is the call graph for this function:

void CheMPS2::TensorQ::AddTermsCD ( TensorOperator denC,
TensorOperator denD,
TensorT denT,
double *  workmem,
double *  workmem2 
)

Add terms after update/clear with previous C-tensors and D-tensors.

Parameters
denCThe C-tensor to construct the Q-term
denDThe D-tensor to construct the Q-term
denTTensorT to construct the Q-term with previous TensorL's
workmemWork memory
workmem2Work memory

Definition at line 601 of file TensorQ.cpp.

+ Here is the call graph for this function:

void CheMPS2::TensorQ::AddTermSimple ( TensorT denT)

Add terms after update/clear without previous tensors.

Parameters
denTTensorT to construct the Q-term without previous tensors

Definition at line 45 of file TensorQ.cpp.

+ Here is the call graph for this function:

void CheMPS2::TensorQ::AddTermsL ( TensorL **  Ltensors,
TensorT denT,
double *  workmem,
double *  workmem2 
)

Add terms after update/clear with previous TensorL's.

Parameters
LtensorsThe TensorL's to construct the Q-term
denTTensorT to construct the Q-term with previous TensorL's
workmemWork memory
workmem2Work memory

Definition at line 106 of file TensorQ.cpp.

+ Here is the call graph for this function:


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