|
pomerol
2.2
|
Monomial quantum operator. More...
#include <MonomialOperator.hpp>


Public Types | |
| using | BlocksBimap = boost::bimaps::bimap< boost::bimaps::set_of< BlockNumber >, boost::bimaps::set_of< BlockNumber > > |
| A bi-map container for connections between invariant subspaces established by a monomial operator. More... | |
| using | BlockMapping = BlocksBimap::value_type |
| A single subspace-to-subspace connection established by a monomial operator. More... | |
Public Types inherited from Pomerol::ComputableObject | |
| enum | StatusEnum { Constructed , Prepared , Computed } |
| Computation status of the object. More... | |
Public Member Functions | |
| template<typename ScalarType , typename... IndexTypes> | |
| MonomialOperator (libcommute::expression< ScalarType, IndexTypes... > const &MO, HilbertSpace< IndexTypes... > const &HS, StatesClassification const &S, Hamiltonian const &H) | |
| bool | isComplex () const |
| Is the monomial operator a complex-valued matrix? More... | |
| MonomialOperatorPart & | getPartFromLeftIndex (BlockNumber LeftIndex) |
| MonomialOperatorPart const & | getPartFromLeftIndex (BlockNumber LeftIndex) const |
| MonomialOperatorPart & | getPartFromRightIndex (BlockNumber RightIndex) |
| MonomialOperatorPart const & | getPartFromRightIndex (BlockNumber RightIndex) const |
| BlockNumber | getLeftIndex (BlockNumber RightIndex) const |
| BlockNumber | getRightIndex (BlockNumber LeftIndex) const |
| BlocksBimap const & | getBlockMapping () const |
| template<typename... IndexTypes> | |
| void | prepare (HilbertSpace< IndexTypes... > const &HS) |
| void | compute (RealType Tolerance=1e-8, MPI_Comm const &comm=MPI_COMM_WORLD) |
Public Member Functions inherited from Pomerol::ComputableObject | |
| ComputableObject ()=default | |
| StatusEnum | getStatus () const |
| Return the current computation status. More... | |
| void | setStatus (StatusEnum Status_in) |
Protected Member Functions | |
| template<bool Complex> | |
| LOperatorTypeRC< Complex > const & | getMOp () const |
Protected Attributes | |
| bool | MOpComplex |
| Whether the MOp object is complex-valued. More... | |
| std::shared_ptr< void > | MOp |
A type-erased real/complex-valued libcommute::loperator object. More... | |
| bool | Complex |
| Whether the stored parts are complex-valued. More... | |
| StatesClassification const & | S |
| Information about invariant subspaces of the Hamiltonian. More... | |
| Hamiltonian const & | H |
| The Hamiltonian. More... | |
| std::unordered_map< std::size_t, BlockNumber > | mapPartsFromRight |
| A map between positions of parts in the parts list and the respective right subspace indices. More... | |
| std::unordered_map< std::size_t, BlockNumber > | mapPartsFromLeft |
| A map between positions of parts in the parts list and the respective left subspace indices. More... | |
| BlocksBimap | LeftRightBlocks |
| Left-to-right connections between invariant subspaces established by this monomial operator. More... | |
| std::vector< MonomialOperatorPart > | parts |
| List of parts (matrix blocks). More... | |
Protected Attributes inherited from Pomerol::ComputableObject | |
| StatusEnum | Status = Constructed |
| Current computation status. More... | |
Friends | |
| class | FieldOperatorContainer |
Monomial quantum operator.
This class stores an operator \(\hat M\), which is a monomial, i.e. a product of fermionic and/or bosonic creation/annihilation operators. The operator is stored as a list of matrix blocks (MonomialOperatorPart), each connecting a pair of invariant subspaces of the Hamiltonian. For a given right invariant subspace, there exists at most one part connecting it to a left subspace (and the other way around).
Definition at line 57 of file MonomialOperator.hpp.
| using Pomerol::MonomialOperator::BlockMapping = BlocksBimap::value_type |
A single subspace-to-subspace connection established by a monomial operator.
Definition at line 62 of file MonomialOperator.hpp.
| using Pomerol::MonomialOperator::BlocksBimap = boost::bimaps::bimap<boost::bimaps::set_of<BlockNumber>, boost::bimaps::set_of<BlockNumber> > |
A bi-map container for connections between invariant subspaces established by a monomial operator.
Definition at line 60 of file MonomialOperator.hpp.
|
inline |
Constructor.
| ScalarType | Scalar type (either double or std::complex<double>) of the expression MO. |
| IndexTypes | Types of indices carried by operators in the expression MO. |
| [in] | MO | Expression of the monomial operator \(\hat M\). |
| [in] | HS | Hilbert space. |
| [in] | S | Information about invariant subspaces of the Hamiltonian. |
| [in] | H | The Hamiltonian. |
MO is a monomial operator. Definition at line 109 of file MonomialOperator.hpp.
| void Pomerol::MonomialOperator::compute | ( | RealType | Tolerance = 1e-8, |
| MPI_Comm const & | comm = MPI_COMM_WORLD |
||
| ) |
Compute matrix elements of all parts in parallel.
| [in] | Tolerance | Matrix elements with the absolute value equal or below this threshold are considered negligible. |
| [in] | comm | MPI communicator used to parallelize the computation. |
| BlocksBimap const& Pomerol::MonomialOperator::getBlockMapping | ( | ) | const |
Return a constant reference to the left-to-right connection map.
| BlockNumber Pomerol::MonomialOperator::getLeftIndex | ( | BlockNumber | RightIndex | ) | const |
For a given right invariant subspace, return the corresponding left invariant subspace.
| [in] | RightIndex | Index of the right subspace. |
|
inlineprotected |
Return a constant reference to the stored libcommute::loperator object.
| Complex | Request a reference to the complex-valued linear operator. |
Definition at line 75 of file MonomialOperator.hpp.
| MonomialOperatorPart& Pomerol::MonomialOperator::getPartFromLeftIndex | ( | BlockNumber | LeftIndex | ) |
Return a reference to the part by a given left invariant subspace.
| [in] | LeftIndex | Index of the left invariant subspace |
| MonomialOperatorPart const& Pomerol::MonomialOperator::getPartFromLeftIndex | ( | BlockNumber | LeftIndex | ) | const |
Return a constant reference to the part by a given left invariant subspace.
| [in] | LeftIndex | Index of the left invariant subspace |
| MonomialOperatorPart& Pomerol::MonomialOperator::getPartFromRightIndex | ( | BlockNumber | RightIndex | ) |
Return a reference to the part by a given right invariant subspace.
| [in] | RightIndex | Index of the right invariant subspace |
| MonomialOperatorPart const& Pomerol::MonomialOperator::getPartFromRightIndex | ( | BlockNumber | RightIndex | ) | const |
Return a constant reference to the part by a given right invariant subspace.
| [in] | RightIndex | Index of the right invariant subspace |
| BlockNumber Pomerol::MonomialOperator::getRightIndex | ( | BlockNumber | LeftIndex | ) | const |
For a given left invariant subspace, return the corresponding right invariant subspace.
| [in] | LeftIndex | Index of the left subspace. |
|
inline |
Is the monomial operator a complex-valued matrix?
Definition at line 123 of file MonomialOperator.hpp.
|
inline |
Allocate memory for all parts.
| IndexTypes | Types of indices carried by operators acting in the Hilbert space HS. |
| [in] | HS | The Hilbert space. |
Definition at line 160 of file MonomialOperator.hpp.
|
friend |
Definition at line 65 of file MonomialOperator.hpp.
|
protected |
Whether the stored parts are complex-valued.
Definition at line 81 of file MonomialOperator.hpp.
|
protected |
The Hamiltonian.
Definition at line 86 of file MonomialOperator.hpp.
|
protected |
Left-to-right connections between invariant subspaces established by this monomial operator.
Definition at line 94 of file MonomialOperator.hpp.
|
protected |
A map between positions of parts in the parts list and the respective left subspace indices.
Definition at line 91 of file MonomialOperator.hpp.
|
protected |
A map between positions of parts in the parts list and the respective right subspace indices.
Definition at line 89 of file MonomialOperator.hpp.
|
protected |
A type-erased real/complex-valued libcommute::loperator object.
Definition at line 70 of file MonomialOperator.hpp.
|
protected |
Whether the MOp object is complex-valued.
Definition at line 68 of file MonomialOperator.hpp.
|
protected |
List of parts (matrix blocks).
Definition at line 97 of file MonomialOperator.hpp.
|
protected |
Information about invariant subspaces of the Hamiltonian.
Definition at line 84 of file MonomialOperator.hpp.