pomerol  2.1
Public Member Functions | Friends

Part of a Hamiltonian of a quantum system. More...

#include <HamiltonianPart.hpp>

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

Public Member Functions

template<typename ScalarType >
 HamiltonianPart (LOperatorType< ScalarType > const &HOp, StatesClassification const &S, BlockNumber Block)
 
void prepare ()
 Fill the matrix with elements. More...
 
void compute ()
 
bool reduce (RealType Cutoff)
 
bool isComplex () const
 Is this object storing a complex-valued matrix? More...
 
BlockNumber getBlockNumber () const
 Return the index of the block (invariant subspace) this part corresponds to. More...
 
InnerQuantumState getSize () const
 Return dimension of the respective invariant subspace. More...
 
RealVectorType const & getEigenValues () const
 
RealType getEigenValue (InnerQuantumState State) const
 
template<bool Complex>
MatrixType< Complex > const & getMatrix () const
 
template<bool Complex>
MatrixType< Complex > & getMatrix ()
 
RealType getMinimumEigenvalue () const
 
template<bool Complex>
VectorType< Complex > getEigenState (InnerQuantumState State) const
 
- Public Member Functions inherited from Pomerol::ComputableObject
 ComputableObject ()=default
 
StatusEnum getStatus () const
 Return the current computation status. More...
 
void setStatus (StatusEnum Status_in)
 

Friends

class Hamiltonian
 
std::ostream & operator<< (std::ostream &os, HamiltonianPart const &part)
 

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

Part of a Hamiltonian of a quantum system.

This class stores and diagonalizes a single block of the Hamiltonian matrix, which corresponds to a single invariant subspace of the Hamiltonian.

Definition at line 40 of file HamiltonianPart.hpp.

Constructor & Destructor Documentation

◆ HamiltonianPart()

template<typename ScalarType >
Pomerol::HamiltonianPart::HamiltonianPart ( LOperatorType< ScalarType > const &  HOp,
StatesClassification const &  S,
BlockNumber  Block 
)
inline

Constructor.

Template Parameters
ScalarTypeScalar type (either double or std::complex<double>) of the linear operator HOp.
Parameters
[in]HOpThe linear operator object corresponding to the Hamiltonian.
[in]SInformation about invariant subspaces of the Hamiltonian.
[in]BlockIndex of the block (invariant subspace) this part corresponds to.

Definition at line 69 of file HamiltonianPart.hpp.

Member Function Documentation

◆ compute()

void Pomerol::HamiltonianPart::compute ( )

Diagonalize the matrix.

Precondition
prepare() has been called.

◆ getBlockNumber()

BlockNumber Pomerol::HamiltonianPart::getBlockNumber ( ) const
inline

Return the index of the block (invariant subspace) this part corresponds to.

Definition at line 89 of file HamiltonianPart.hpp.

◆ getEigenState()

template<bool Complex>
VectorType<Complex> Pomerol::HamiltonianPart::getEigenState ( InnerQuantumState  State) const

Return a single eigenstate.

Template Parameters
ComplexRequest a reference to a complex-valued eigenvector.
Parameters
[in]StateIndex of the eigenstate.
Precondition
The compile-time value of Complex must agree with the result of isComplex().

◆ getEigenValue()

RealType Pomerol::HamiltonianPart::getEigenValue ( InnerQuantumState  State) const

Access a single eigenvalue.

Parameters
[in]StateIndex of the eigenvalue.
Precondition
compute() has been called.

◆ getEigenValues()

RealVectorType const& Pomerol::HamiltonianPart::getEigenValues ( ) const

Access eigenvalues of the matrix.

Precondition
compute() has been called.

◆ getMatrix() [1/2]

template<bool Complex>
MatrixType<Complex>& Pomerol::HamiltonianPart::getMatrix ( )

Return a reference to the stored matrix.

Template Parameters
ComplexRequest a reference to a complex-valued matrix.
Precondition
prepare() has been called.
The compile-time value of Complex must agree with the result of isComplex().

◆ getMatrix() [2/2]

template<bool Complex>
MatrixType<Complex> const& Pomerol::HamiltonianPart::getMatrix ( ) const

Return a constant reference to the stored matrix.

Template Parameters
ComplexRequest a reference to a complex-valued matrix.
Precondition
prepare() has been called.
The compile-time value of Complex must agree with the result of isComplex().

◆ getMinimumEigenvalue()

RealType Pomerol::HamiltonianPart::getMinimumEigenvalue ( ) const

Return the lowest eigenvalue.

Precondition
compute() has been called.

◆ getSize()

InnerQuantumState Pomerol::HamiltonianPart::getSize ( ) const

Return dimension of the respective invariant subspace.

◆ isComplex()

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

Is this object storing a complex-valued matrix?

Definition at line 86 of file HamiltonianPart.hpp.

◆ prepare()

void Pomerol::HamiltonianPart::prepare ( )

Fill the matrix with elements.

◆ reduce()

bool Pomerol::HamiltonianPart::reduce ( RealType  Cutoff)

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

Parameters
[in]CutoffMaximum allowed value of the energy.
Precondition
compute() has been called.

Friends And Related Function Documentation

◆ Hamiltonian

friend class Hamiltonian
friend

Definition at line 60 of file HamiltonianPart.hpp.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
HamiltonianPart const &  part 
)
friend

Output stream insertion operator.

Parameters
[out]osOutput stream.
[in]partHamiltonianPart to be inserted.
Returns
Reference to the output stream.

Definition at line 128 of file HamiltonianPart.hpp.


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