Detailed Description

Calculates the sum of the Kronecker product of operators on two blocks following the terms of a Hamiltonian.

This routine treats the right block in inverted order. For example, given a left block of 5 sites and a right block of 3 sites, the interpretation of the output block is as follows:

L0 L1 L2 L3 L4 R2 R1 R0

Iterates through a range of basis states represented in the KronBlocks object

Definition at line 501 of file DMRGKron.hpp.

#include <DMRGKron.hpp>

Collaboration diagram for KronBlocksIterator:

Public Types

typedef KronBlocksIterator Self_t
 

Public Member Functions

 KronBlocksIterator (const KronBlocks_t &KronBlocks, const PetscInt &GlobIdxStart, const PetscInt &GlobIdxEnd)
 Initialize an iterator through a range of indices. More...
 
PetscInt IdxStart () const
 Gets the first quantum number block index. More...
 
PetscInt IdxEnd () const
 Gets the first quantum number block index. More...
 
PetscInt Idx () const
 Gets the current state index. More...
 
PetscInt BlockIdx () const
 Gets the current quantum number block index. More...
 
PetscInt LocIdx () const
 Gets the current local index in the quantum number block. More...
 
PetscInt BlockStartIdx (const PetscInt &BlockShift) const
 Gets the column index of the starting block with a shift. More...
 
PetscInt BlockSize (const PetscInt &BlockShift) const
 Gets the size of the block with a shift. More...
 
bool Loop () const
 Determines whether the end of the range has not yet been reached. More...
 
PetscInt Steps () const
 Gets the number of steps incremented from the starting index. More...
 
Self_t operator++ ()
 Overloading the ++ increment. More...
 
PetscInt BlockIdxLeft () const
 Gets the block index for the left side. More...
 
PetscInt LocIdxLeft () const
 Gets the local index for the left side. More...
 
PetscInt NumStatesRight () const
 Gets the number of states for the right block. More...
 
PetscInt BlockIdxRight () const
 Gets the block index for the right side. More...
 
PetscInt LocIdxRight () const
 Gets the local index for the right side. More...
 
PetscInt GlobalIdxLeft () const
 
PetscInt GlobalIdxRight () const
 
PetscBool UpdatedBlock () const
 Gets the update state of the block index from the previous increment. More...
 

Private Attributes

const KronBlocks_tKronBlocks
 Reference to the KronBlocks object on which this iterator is based on. More...
 
PetscInt istart_ = 0
 Starting index in the range [Istart, Iend) More...
 
PetscInt iend_ = 0
 The final excluded index of the range [Istart, Iend) More...
 
PetscInt idx_ = 0
 Stores the value of the current index. More...
 
PetscInt blockidx_ = -1
 The block index associated with Idx. More...
 
PetscInt locidx_ = 0
 The local index in the block associated with Idx. More...
 
std::vector< PetscInt > kb_size
 Number of states in each quantum number block. More...
 
std::vector< PetscInt > kb_offset
 Offset for each quantum number block. More...
 
PetscInt num_states = 0
 Total number of states. More...
 
PetscBool updated_block = PETSC_TRUE
 Whether block was updated during the previous increment. More...
 

The documentation for this class was generated from the following file:
This site was generated by Sphinx using Doxygen with a customized theme from doxygen-bootstrapped.