pomerol  2.1
Public Member Functions | Protected Attributes | Friends

Part of a monomial quantum operator. More...

#include <MonomialOperatorPart.hpp>

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

Public Member Functions

template<typename ScalarType >
 MonomialOperatorPart (LOperatorType< ScalarType > const &MOp, StatesClassification const &S, HamiltonianPart const &HFrom, HamiltonianPart const &HTo)
 
void compute ()
 Compute and store all matrix elements of \(\hat M\) in the eigenbasis of the Hamiltonian. More...
 
void setFromAdjoint (MonomialOperatorPart const &part)
 
bool isComplex () const
 Is this object storing a complex-valued sparse matrices? More...
 
template<bool C>
RowMajorMatrixType< C > & getRowMajorValue ()
 
template<bool C>
RowMajorMatrixType< C > const & getRowMajorValue () const
 
template<bool C>
ColMajorMatrixType< C > & getColMajorValue ()
 
template<bool C>
ColMajorMatrixType< C > const & getColMajorValue () const
 
BlockNumber getRightIndex () const
 Return the index of the right invariant subspace. More...
 
BlockNumber getLeftIndex () const
 Return the index of the left invariant subspace. More...
 
- Public Member Functions inherited from Pomerol::ComputableObject
 ComputableObject ()=default
 
StatusEnum getStatus () const
 Return the current computation status. More...
 
void setStatus (StatusEnum Status_in)
 

Protected Attributes

std::shared_ptr< void > elementsRowMajor
 
std::shared_ptr< void > elementsColMajor
 
const RealType MatrixElementTolerance = 1e-8
 Matrix elements with the absolute value below this threshold are considered negligible. More...
 
- Protected Attributes inherited from Pomerol::ComputableObject
StatusEnum Status = Constructed
 Current computation status. More...
 

Friends

class FieldOperatorContainer
 
std::ostream & operator<< (std::ostream &os, MonomialOperatorPart const &part)
 

Additional Inherited Members

- Public Types inherited from Pomerol::ComputableObject
enum  StatusEnum { Constructed, Prepared, Computed }
 Computation status of the object. More...
 

Detailed Description

Part of a monomial quantum operator.

This class stores a matrix block of an operator \(\hat M\), which is a monomial, i.e. a product of fermionic and/or bosonic creation/annihilation operators. The matrix is computed in the eigenbasis of the Hamiltonian \(\hat H\) and connects one of its invariant subspaces (right subspace) to another one (left subspace),

\[ \langle {\rm left}|\hat M|{\rm right}\rangle. \]

Definition at line 45 of file MonomialOperatorPart.hpp.

Constructor & Destructor Documentation

◆ MonomialOperatorPart()

template<typename ScalarType >
Pomerol::MonomialOperatorPart::MonomialOperatorPart ( LOperatorType< ScalarType > const &  MOp,
StatesClassification const &  S,
HamiltonianPart const &  HFrom,
HamiltonianPart const &  HTo 
)
inline

Constructor.

Template Parameters
ScalarTypeScalar type (either double or std::complex<double>) of the linear operator MOp.
Parameters
[in]MOpThe linear operator object corresponding to the monomial operator \(\hat M\).
[in]SInformation about invariant subspaces of the Hamiltonian.
[in]HFromDiagonal block of the Hamiltonian corresponding to the right invariant subspace.
[in]HToDiagonal block of the Hamiltonian corresponding to the left invariant subspace.

Definition at line 82 of file MonomialOperatorPart.hpp.

Member Function Documentation

◆ compute()

void Pomerol::MonomialOperatorPart::compute ( )

Compute and store all matrix elements of \(\hat M\) in the eigenbasis of the Hamiltonian.

◆ getColMajorValue() [1/2]

template<bool C>
ColMajorMatrixType<C>& Pomerol::MonomialOperatorPart::getColMajorValue ( )

Return a reference to the stored column-major sparse matrix.

Template Parameters
CRequest a reference to the complex-valued matrix.
Precondition
The compile-time value of C must agree with the result of isComplex().

◆ getColMajorValue() [2/2]

template<bool C>
ColMajorMatrixType<C> const& Pomerol::MonomialOperatorPart::getColMajorValue ( ) const

Return a constant reference to the stored column-major sparse matrix.

Template Parameters
CRequest a reference to the complex-valued matrix.
Precondition
The compile-time value of C must agree with the result of isComplex().

◆ getLeftIndex()

BlockNumber Pomerol::MonomialOperatorPart::getLeftIndex ( ) const
inline

Return the index of the left invariant subspace.

Definition at line 124 of file MonomialOperatorPart.hpp.

◆ getRightIndex()

BlockNumber Pomerol::MonomialOperatorPart::getRightIndex ( ) const
inline

Return the index of the right invariant subspace.

Definition at line 122 of file MonomialOperatorPart.hpp.

◆ getRowMajorValue() [1/2]

template<bool C>
RowMajorMatrixType<C>& Pomerol::MonomialOperatorPart::getRowMajorValue ( )

Return a reference to the stored row-major sparse matrix.

Template Parameters
CRequest a reference to the complex-valued matrix.
Precondition
The compile-time value of C must agree with the result of isComplex().

◆ getRowMajorValue() [2/2]

template<bool C>
RowMajorMatrixType<C> const& Pomerol::MonomialOperatorPart::getRowMajorValue ( ) const

Return a constant reference to the stored row-major sparse matrix.

Template Parameters
CRequest a reference to the complex-valued matrix.
Precondition
The compile-time value of C must agree with the result of isComplex().

◆ isComplex()

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

Is this object storing a complex-valued sparse matrices?

Definition at line 102 of file MonomialOperatorPart.hpp.

◆ setFromAdjoint()

void Pomerol::MonomialOperatorPart::setFromAdjoint ( MonomialOperatorPart const &  part)

Reset the stored sparse matrices to those obtained from \(\langle {\rm right}|\hat M^\dagger|{\rm left}\rangle\).

Parameters
[in]partMonomial operator part \(\langle {\rm right}|\hat M^\dagger|{\rm left}\rangle\).

Friends And Related Function Documentation

◆ FieldOperatorContainer

friend class FieldOperatorContainer
friend

Definition at line 46 of file MonomialOperatorPart.hpp.

◆ operator<<

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

Output stream insertion operator.

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

Definition at line 130 of file MonomialOperatorPart.hpp.

Field Documentation

◆ elementsColMajor

std::shared_ptr<void> Pomerol::MonomialOperatorPart::elementsColMajor
protected

Type-erased real/complex sparse matrix \(\langle {\rm left}|\hat M|{\rm right}\rangle\) stored in the column-major order.

Definition at line 70 of file MonomialOperatorPart.hpp.

◆ elementsRowMajor

std::shared_ptr<void> Pomerol::MonomialOperatorPart::elementsRowMajor
protected

Type-erased real/complex sparse matrix \(\langle {\rm left}|\hat M|{\rm right}\rangle\) stored in the row-major order.

Definition at line 67 of file MonomialOperatorPart.hpp.

◆ MatrixElementTolerance

const RealType Pomerol::MonomialOperatorPart::MatrixElementTolerance = 1e-8
protected

Matrix elements with the absolute value below this threshold are considered negligible.

Definition at line 72 of file MonomialOperatorPart.hpp.


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