|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
The many-body operator algebra in second quantization.
This group contains triqs::operators::many_body_operator_generic and its real- and complex-valued aliases. An operator is stored as a map from monomials (triqs::operators::monomial_t, an ordered product of triqs::operators::canonical_ops_t) to scalar coefficients.
In addition the group provides:
Classes | |
| struct | triqs::operators::canonical_ops_t |
| Second quantization creation/annihilation operator. More... | |
| class | triqs::operators::many_body_operator_generic< T > |
| Generic many-body operator. More... | |
Typedefs | |
| using | triqs::operators::indices_t = hilbert_space::fundamental_operator_set::indices_t |
| Elevate triqs::hilbert_space::indices_t to the triqs::operators namespace. | |
| using | triqs::operators::many_body_operator = many_body_operator_generic<real_or_complex> |
| Many-body operator with real or complex coefficients (see triqs::operators::many_body_operator_generic). | |
| using | triqs::operators::many_body_operator_complex = many_body_operator_generic<std::complex<double>> |
| Many-body operator with complex coefficients (see triqs::operators::many_body_operator_generic). | |
| using | triqs::operators::many_body_operator_real = many_body_operator_generic<double> |
| Many-body operator with real coefficients (see triqs::operators::many_body_operator_generic). | |
| using | triqs::operators::monomial_t = std::vector<canonical_ops_t> |
| Type used to represent a monomial of canonical second quantization operators. | |
Functions | |
| template<typename T1, typename T2> | |
| void | triqs::operators::assert_operators_are_close (many_body_operator_generic< T1 > const &op1, many_body_operator_generic< T2 > const &op2, double precision) |
| Assert that two many-body operators are close to each other within a given precision. | |
| template<typename T = real_or_complex, typename... IndexTypes> | |
| many_body_operator_generic< T > | triqs::operators::c (IndexTypes... indices) |
| Create an annihilation operator \( \hat{c}_{\alpha} \). | |
| template<typename T = real_or_complex, typename... IndexTypes> | |
| many_body_operator_generic< T > | triqs::operators::c_dag (IndexTypes... indices) |
| Create a creation operator \( \hat{c}_{\alpha}^{\dagger} \). | |
| template<typename T> | |
| many_body_operator_generic< T > | triqs::operators::imag (many_body_operator_generic< T > const &op) |
| Get a copy of the given operator \( \hat{O} \) with the real parts of all monomial coefficients set to zero. | |
| template<typename T> | |
| bool | triqs::operators::is_op_hermitian (many_body_operator_generic< T > const &op, double tolerance=0.0) |
| Check if a many-body operator is Hermitian within a given precision. | |
| template<typename T = real_or_complex, typename... IndexTypes> | |
| many_body_operator_generic< T > | triqs::operators::n (IndexTypes... indices) |
| Create a number operator \( \hat{n}_{\alpha} = \hat{c}_{\alpha}^{\dagger} \hat{c}_{\alpha} \). | |
| bool | triqs::operators::operator< (monomial_t const &m1, monomial_t const &m2) |
| Less-than comparison operator for triqs::operators::monomial_t. | |
| std::ostream & | triqs::operators::operator<< (std::ostream &os, canonical_ops_t const &op) |
| Write a triqs::operators::canonical_ops_t to a std::ostream. | |
| std::ostream & | triqs::operators::operator<< (std::ostream &os, monomial_t const &m) |
| Write a triqs::operators::monomial_t to a std::ostream. | |
| template<typename T> | |
| many_body_operator_generic< T > | triqs::operators::real (many_body_operator_generic< T > const &op) |
| Get a copy of the given operator \( \hat{O} \) with the imaginary parts of all monomial coefficients set to zero. | |
| using triqs::operators::monomial_t = std::vector<canonical_ops_t> |
#include <triqs/operators/many_body_operator.hpp>
Type used to represent a monomial of canonical second quantization operators.
A monomial \( \hat{m} \) is a product of canonical second quantization operators, i.e.
\[ \hat{m} = \hat{d}_{\alpha_{i_1}} \hat{d}_{\alpha_{i_2}} \dots \hat{d}_{\alpha_{i_n}} \; , \]
where \( \hat{d}_{\alpha_{i_j}} \) is either a fermionic creation \( \hat{c}_{\alpha_{i_j}}^\dagger \) or annihilation operator \( \hat{c}_{\alpha_{i_j}} \) and \( n \) is the total number of operators in the monomial. See also triqs::operators::canonical_ops_t.
The order of the operators in the product matters, due to the fermionic anti-commutation relations.
Definition at line 186 of file many_body_operator.hpp.
| void triqs::operators::assert_operators_are_close | ( | many_body_operator_generic< T1 > const & | op1, |
| many_body_operator_generic< T2 > const & | op2, | ||
| double | precision ) |
#include <triqs/operators/many_body_operator.hpp>
Assert that two many-body operators are close to each other within a given precision.
Checks whether the difference \( \hat{O}_1 - \hat{O}_2 \) is close to zero within the given tolerance \( \epsilon \) using many_body_operator_generic::is_almost_zero(). Throws an exception otherwise.
| T1 | Scalar type of the first many-body operator. |
| T2 | Scalar type of the second many-body operator. |
| op1 | Many-body operator \( \hat{O}_1 \). |
| op2 | Many-body operator \( \hat{O}_2 \). |
| precision | Tolerance \( \epsilon \). |
Definition at line 842 of file many_body_operator.hpp.
| many_body_operator_generic< T > triqs::operators::c | ( | IndexTypes... | indices | ) |
#include <triqs/operators/many_body_operator.hpp>
Create an annihilation operator \( \hat{c}_{\alpha} \).
| T | Scalar type of the many-body operator. |
| IndexTypes | Integer, string or double types. |
| indices | \( \beta_1, \dots, \beta_k \) that form the index \( \alpha \). |
Definition at line 903 of file many_body_operator.hpp.
| many_body_operator_generic< T > triqs::operators::c_dag | ( | IndexTypes... | indices | ) |
#include <triqs/operators/many_body_operator.hpp>
Create a creation operator \( \hat{c}_{\alpha}^{\dagger} \).
| T | Scalar type of the many-body operator. |
| IndexTypes | Integer, string or double types. |
| indices | \( \beta_1, \dots, \beta_k \) that form the index \( \alpha \). |
Definition at line 915 of file many_body_operator.hpp.
| many_body_operator_generic< T > triqs::operators::imag | ( | many_body_operator_generic< T > const & | op | ) |
#include <triqs/operators/many_body_operator.hpp>
Get a copy of the given operator \( \hat{O} \) with the real parts of all monomial coefficients set to zero.
Implemented in terms of transform().
| T | Scalar type of the many-body operator. |
| op | Operator \( \hat{O} \) to be transformed. |
Definition at line 873 of file many_body_operator.hpp.
| bool triqs::operators::is_op_hermitian | ( | many_body_operator_generic< T > const & | op, |
| double | tolerance = 0.0 ) |
#include <triqs/operators/many_body_operator.hpp>
Check if a many-body operator is Hermitian within a given precision.
Checks whether the difference \( \hat{O}^{\dagger} - \hat{O} \) is close to zero within the given tolerance \( \epsilon \).
| T | Scalar type of the many-body operator. |
| op | Many-body operator \( \hat{O} \). |
| tolerance | Tolerance \( \epsilon \). |
Definition at line 891 of file many_body_operator.hpp.
| many_body_operator_generic< T > triqs::operators::n | ( | IndexTypes... | indices | ) |
#include <triqs/operators/many_body_operator.hpp>
Create a number operator \( \hat{n}_{\alpha} = \hat{c}_{\alpha}^{\dagger} \hat{c}_{\alpha} \).
| T | Scalar type of the many-body operator. |
| IndexTypes | Integer, string or double types. |
| indices | \( \beta_1, \dots, \beta_k \) that form the index \( \alpha \). |
Definition at line 927 of file many_body_operator.hpp.
| bool triqs::operators::operator< | ( | monomial_t const & | m1, |
| monomial_t const & | m2 ) |
#include <triqs/operators/many_body_operator.cpp>
Less-than comparison operator for triqs::operators::monomial_t.
The ordering is defined as follows:
| m1 | Left hand side monomial \( \hat{m}_1 \). |
| m2 | Right hand side monomial \( \hat{m}_2 \). |
Definition at line 58 of file many_body_operator.cpp.
| std::ostream & triqs::operators::operator<< | ( | std::ostream & | os, |
| canonical_ops_t const & | op ) |
#include <triqs/operators/many_body_operator.cpp>
Write a triqs::operators::canonical_ops_t to a std::ostream.
| os | std::ostream object. |
| op | Operator to be written. |
Definition at line 52 of file many_body_operator.cpp.
| std::ostream & triqs::operators::operator<< | ( | std::ostream & | os, |
| monomial_t const & | m ) |
#include <triqs/operators/many_body_operator.cpp>
Write a triqs::operators::monomial_t to a std::ostream.
| os | std::ostream object. |
| m | Monomial to be written. |
Definition at line 62 of file many_body_operator.cpp.
| many_body_operator_generic< T > triqs::operators::real | ( | many_body_operator_generic< T > const & | op | ) |
#include <triqs/operators/many_body_operator.hpp>
Get a copy of the given operator \( \hat{O} \) with the imaginary parts of all monomial coefficients set to zero.
Implemented in terms of transform().
| T | Scalar type of the many-body operator. |
| op | Operator \( \hat{O} \) to be transformed. |
Definition at line 856 of file many_body_operator.hpp.