mpqc::PrimitiveOperator< Nc, Na, Index1 > Class Template Reference
Documentation
template<size_t Nc, size_t Na, typename Index1>
class mpqc::PrimitiveOperator< Nc, Na, Index1 >
basic non-conserving operator in sp representation
- Template Parameters
-
Nc number of created particles Na number of annihilated particles
Public Types | |
using | state_index_type = Index1 |
Public Member Functions | |
PrimitiveOperator ()=default | |
template<typename Int = state_index_type> | |
PrimitiveOperator (const std::array< Int, Nc > &t, const std::array< Int, Na > &f) | |
const std::array< state_index_type, Nc > & | cre () const |
const std::array< state_index_type, Na > & | ann () const |
PrimitiveOperator< Na, Nc > | adjoint () const |
template<typename String > | |
void | apply_to (String &os) const |
template<typename String > | |
void | apply_to_unsafe (String &os) const |
template<typename String > | |
std::decay_t< String > | apply (String &&os) const |
template<typename String > | |
std::decay_t< String > | apply_unsafe (String &&os) const |
template<typename FString > | |
bool | sign (const FString &s) const |
template<typename FString > | |
bool | sign_apply_to (FString &os) const |
template<typename FString > | |
std::pair< bool, std::decay_t< FString > > | operator() (FString &&os) const |
Member Typedef Documentation
◆ state_index_type
template<size_t Nc, size_t Na, typename Index1 >
using mpqc::PrimitiveOperator< Nc, Na, Index1 >::state_index_type = Index1 |
Constructor & Destructor Documentation
◆ PrimitiveOperator() [1/2]
template<size_t Nc, size_t Na, typename Index1 >
|
default |
◆ PrimitiveOperator() [2/2]
template<size_t Nc, size_t Na, typename Index1 >
template<typename Int = state_index_type>
|
inline |
Member Function Documentation
◆ adjoint()
template<size_t Nc, size_t Na, typename Index1 >
|
inline |
- Returns
- the adjoint of this operator
◆ ann()
template<size_t Nc, size_t Na, typename Index1 >
|
inline |
reports the states in which particles are annihilated
- Returns
- the states in which particles are annihilated
◆ apply()
template<size_t Nc, size_t Na, typename Index1 >
template<typename String >
|
inline |
applies this operator to string os
and returns the result. Unsafe, but fast.
- Parameters
-
[in,out] os the String object
- Returns
- string obtained by removing a particle from_ from_ and adding a particle to to_.
◆ apply_to()
template<size_t Nc, size_t Na, typename Index1 >
template<typename String >
|
inline |
applies this operator to string os
in-place.
- Parameters
-
[in,out] os the String object
◆ apply_to_unsafe()
template<size_t Nc, size_t Na, typename Index1 >
template<typename String >
|
inline |
applies this operator to string os
in-place.
- Parameters
-
[in,out] os the String object
- Warning
- unsafe, fast
◆ apply_unsafe()
template<size_t Nc, size_t Na, typename Index1 >
template<typename String >
|
inline |
applies this operator to string os
and returns the result. Unsafe, but fast.
- Parameters
-
[in,out] os the String object
- Returns
- string obtained by removing a particle from_ from_ and adding a particle to to_.
◆ cre()
template<size_t Nc, size_t Na, typename Index1 >
|
inline |
reports the states in which particles are created
- Returns
- the states in which particles are created
◆ operator()()
template<size_t Nc, size_t Na, typename Index1 >
template<typename FString >
|
inline |
similar to sign_apply_to(), but nonmutating
- Parameters
-
[in] os the input FString object
- Returns
- new pair[sign_change,FString]
◆ sign()
template<size_t Nc, size_t Na, typename Index1 >
template<typename FString >
|
inline |
reports whether application of this operator to fermionic string str
changes the sign
- Note
- the sign changes if the number of occupied states "crossed" by the operator is odd
- Parameters
-
[in] s the FString object
- Returns
- true is the sign of the state changes
◆ sign_apply_to()
template<size_t Nc, size_t Na, typename Index1 >
template<typename FString >
|
inline |
same as apply_to(), but returns whether application operator changes the sign of the state for a fermionic string; the sign changes if the number of occupied states "crossed" by the operator is odd
- Parameters
-
[in,out] os the FString object
- Returns
- true is the sign of the state changes
The documentation for this class was generated from the following files: