pomerol
2.1
|
Part of a monomial quantum operator. More...
#include <MonomialOperatorPart.hpp>
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... | |
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.
|
inline |
Constructor.
ScalarType | Scalar type (either double or std::complex<double>) of the linear operator MOp . |
[in] | MOp | The linear operator object corresponding to the monomial operator \(\hat M\). |
[in] | S | Information about invariant subspaces of the Hamiltonian. |
[in] | HFrom | Diagonal block of the Hamiltonian corresponding to the right invariant subspace. |
[in] | HTo | Diagonal block of the Hamiltonian corresponding to the left invariant subspace. |
Definition at line 82 of file MonomialOperatorPart.hpp.
void Pomerol::MonomialOperatorPart::compute | ( | ) |
Compute and store all matrix elements of \(\hat M\) in the eigenbasis of the Hamiltonian.
ColMajorMatrixType<C>& Pomerol::MonomialOperatorPart::getColMajorValue | ( | ) |
Return a reference to the stored column-major sparse matrix.
C | Request a reference to the complex-valued matrix. |
C
must agree with the result of isComplex(). ColMajorMatrixType<C> const& Pomerol::MonomialOperatorPart::getColMajorValue | ( | ) | const |
Return a constant reference to the stored column-major sparse matrix.
C | Request a reference to the complex-valued matrix. |
C
must agree with the result of isComplex().
|
inline |
Return the index of the left invariant subspace.
Definition at line 124 of file MonomialOperatorPart.hpp.
|
inline |
Return the index of the right invariant subspace.
Definition at line 122 of file MonomialOperatorPart.hpp.
RowMajorMatrixType<C>& Pomerol::MonomialOperatorPart::getRowMajorValue | ( | ) |
Return a reference to the stored row-major sparse matrix.
C | Request a reference to the complex-valued matrix. |
C
must agree with the result of isComplex(). RowMajorMatrixType<C> const& Pomerol::MonomialOperatorPart::getRowMajorValue | ( | ) | const |
Return a constant reference to the stored row-major sparse matrix.
C | Request a reference to the complex-valued matrix. |
C
must agree with the result of isComplex().
|
inline |
Is this object storing a complex-valued sparse matrices?
Definition at line 102 of file MonomialOperatorPart.hpp.
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\).
[in] | part | Monomial operator part \(\langle {\rm right}|\hat M^\dagger|{\rm left}\rangle\). |
|
friend |
Definition at line 46 of file MonomialOperatorPart.hpp.
|
friend |
Output stream insertion operator.
[out] | os | Output stream. |
[in] | part | MonomialOperatorPart to be inserted. |
Definition at line 130 of file MonomialOperatorPart.hpp.
|
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.
|
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.
|
protected |
Matrix elements with the absolute value below this threshold are considered negligible.
Definition at line 72 of file MonomialOperatorPart.hpp.