pomerol  2.1
Public Member Functions

Hamiltonian of a quantum system. More...

#include <Hamiltonian.hpp>

Inheritance diagram for Pomerol::Hamiltonian:
Inheritance graph
[legend]
Collaboration diagram for Pomerol::Hamiltonian:
Collaboration graph
[legend]

Public Member Functions

 Hamiltonian (StatesClassification const &S)
 
template<typename ScalarType , typename... IndexTypes>
void prepare (Operators::expression< ScalarType, IndexTypes... > const &H, HilbertSpace< IndexTypes... > const &HS, MPI_Comm const &comm=MPI_COMM_WORLD)
 
void compute (MPI_Comm const &comm=MPI_COMM_WORLD)
 
void reduce (RealType Cutoff)
 
bool isComplex () const
 Is the Hamiltonian a complex-valued matrix? More...
 
HamiltonianPart const & getPart (BlockNumber Block) const
 
InnerQuantumState getBlockSize (BlockNumber Block) const
 
RealType getEigenValue (QuantumState state) const
 
RealVectorType const & getEigenValues (BlockNumber Block) const
 
RealVectorType getEigenValues () const
 
RealType getGroundEnergy () const
 
- Public Member Functions inherited from Pomerol::ComputableObject
 ComputableObject ()=default
 
StatusEnum getStatus () const
 Return the current computation status. More...
 
void setStatus (StatusEnum Status_in)
 

Additional Inherited Members

- Public Types inherited from Pomerol::ComputableObject
enum  StatusEnum { Constructed, Prepared, Computed }
 Computation status of the object. More...
 
- Protected Attributes inherited from Pomerol::ComputableObject
StatusEnum Status = Constructed
 Current computation status. More...
 

Detailed Description

Hamiltonian of a quantum system.

This class represents a Hamiltonian as a block-diagonal matrix with blocks corresponding to distinct invariant subspaces. The blocks are stored as a list of HamiltonianPart objects. The main purpose of this class is MPI-parallelized diagonalization of the entire Hamiltonian matrix.

Definition at line 43 of file Hamiltonian.hpp.

Constructor & Destructor Documentation

◆ Hamiltonian()

Pomerol::Hamiltonian::Hamiltonian ( StatesClassification const &  S)
inlineexplicit

Constructor.

Parameters
[in]SInformation about invariant subspaces of the Hamiltonian.

Definition at line 60 of file Hamiltonian.hpp.

Member Function Documentation

◆ compute()

void Pomerol::Hamiltonian::compute ( MPI_Comm const &  comm = MPI_COMM_WORLD)

Diagonalize matrices of all diagonal blocks in parallel.

Parameters
[in]commMPI communicator used to parallelize the computation.
Precondition
prepare() has been called.

◆ getBlockSize()

InnerQuantumState Pomerol::Hamiltonian::getBlockSize ( BlockNumber  Block) const

Return size of a part (dimension of a diagonal block).

Parameters
[in]BlockIndex of the diagonal block.
Precondition
prepare() has been called.

◆ getEigenValue()

RealType Pomerol::Hamiltonian::getEigenValue ( QuantumState  state) const

Return a single eigenvalue of the Hamiltonian.

Parameters
[in]stateIndex of the eigenvalue within the full diagonalized matrix of the Hamiltonian.
Precondition
compute() has been called.

◆ getEigenValues() [1/2]

RealVectorType Pomerol::Hamiltonian::getEigenValues ( ) const

Return a list of all eigenvalues of the Hamiltonian.

Precondition
compute() has been called.

◆ getEigenValues() [2/2]

RealVectorType const& Pomerol::Hamiltonian::getEigenValues ( BlockNumber  Block) const

Return a list of eigenvalues of the Hamiltonian within a block.

Parameters
[in]BlockIndex of the diagonal block.
Precondition
compute() has been called.

◆ getGroundEnergy()

RealType Pomerol::Hamiltonian::getGroundEnergy ( ) const
inline

Return the ground state energy.

Precondition
compute() has been called.

Definition at line 113 of file Hamiltonian.hpp.

◆ getPart()

HamiltonianPart const& Pomerol::Hamiltonian::getPart ( BlockNumber  Block) const
inline

Access a part (diagonal block) of the Hamiltonian.

Parameters
[in]BlockIndex of the diagonal block.
Precondition
prepare() has been called.

Definition at line 90 of file Hamiltonian.hpp.

◆ isComplex()

bool Pomerol::Hamiltonian::isComplex ( ) const
inline

Is the Hamiltonian a complex-valued matrix?

Definition at line 85 of file Hamiltonian.hpp.

◆ reduce()

void Pomerol::Hamiltonian::reduce ( RealType  Cutoff)

Discard all eigenvalues exceeding a given cutoff and truncate the size of all diagonalized blocks accordingly.

Parameters
[in]CutoffMaximum allowed excitation energy (energy level calculated w.r.t. the ground state energy).
Precondition
compute() has been called.

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