TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
functions2.hpp
#include "../gf/gf.hpp"
#include "../gf/gf_view.hpp"
#include "../block/block_gf.hpp"
#include "../block/map.hpp"
#include "../../utility/exceptions.hpp"
#include <itertools/itertools.hpp>
#include <algorithm>
#include <optional>
#include <utility>
#include <type_traits>
#include <vector>

Detailed Description

Provides tail fitting, slicing, inversion, reality and matrix-multiplication functions for Green's functions.

Definition in file functions2.hpp.

Go to the source code of this file.

Functions

template<typename G>
requires (is_gf_v<G>)
G::regular_type triqs::gfs::conj (G const &g)
 Complex-conjugate a Green's function, returning a new Green's function.
template<int N = 0, typename BG, typename A = std::vector<typename BG::g_t::data_t::regular_type>>
requires (is_block_gf_v<BG, 1>)
std::pair< std::vector< typename BG::g_t::data_t::regular_type >, double > triqs::gfs::fit_hermitian_tail (BG const &bg, A const &known_moments={})
 Fit the high-frequency tail of a block Green's function, imposing hermitian symmetry block by block.
template<int N = 0, typename G, typename A = typename G::data_t>
requires (is_gf_v<G>)
std::pair< typename A::regular_type, double > triqs::gfs::fit_hermitian_tail (G const &g, A const &known_moments={})
 Fit the high-frequency tail of a Green's function, imposing hermitian symmetry on the fitted moments.
template<int N = 0, typename BG, typename BA = std::vector<typename BG::g_t::data_t::regular_type>>
requires (is_block_gf_v<BG, 1>)
std::pair< std::vector< typename BG::g_t::data_t::regular_type >, double > triqs::gfs::fit_tail (BG const &bg, BA const &known_moments={})
 Fit the high-frequency tail of a block Green's function using a least-squares procedure.
template<int N = 0, typename G, typename A = typename G::const_view_type::data_t>
requires (is_gf_v<G>)
std::pair< typename A::regular_type, double > triqs::gfs::fit_tail (G const &g, A const &known_moments={})
 Fit the high-frequency tail of a Green's function using a least-squares procedure.
template<typename G>
requires (is_gf_v<G> or is_block_gf_v<G>)
G::regular_type::real_t triqs::gfs::imag (G const &g)
 Take the imaginary part of a Green's function (no check), returning a new Green's function with a real target.
template<typename M>
gf< M, matrix_valuedtriqs::gfs::inverse (gf< M, matrix_valued > g)
 Return the matrix inverse of a matrix-valued Green's function (inverts the target matrix at each mesh point).
template<typename M>
gf< M, matrix_valuedtriqs::gfs::inverse (gf_const_view< M, matrix_valued > g)
template<typename M>
gf< M, matrix_valuedtriqs::gfs::inverse (gf_view< M, matrix_valued > g)
template<typename M>
void triqs::gfs::invert_in_place (gf_view< M, matrix_valued > g)
 Invert, in place, the target matrix at each mesh point of a matrix-valued Green's function.
template<typename G>
requires (is_block_gf_v<G>)
bool triqs::gfs::is_gf_real (G const &bg, double tolerance=1.e-13)
template<typename G>
requires (is_gf_v<G>)
bool triqs::gfs::is_gf_real (G const &g, double tolerance=1.e-13)
 Test whether a Green's function is real up to a tolerance.
template<typename Gf>
requires (is_gf_v<Gf>)
auto triqs::gfs::make_const_view (Gf const &g)
 Make a const view of a Green's function.
template<int N = 0, typename G>
auto triqs::gfs::make_zero_tail (G const &g, int n_moments=10)
 Create a zero-initialized tail object for a given Green function object.
template<typename M, typename T>
gf< M, matrix_valuedtriqs::gfs::operator* (gf< M, matrix_valued > g, matrix< T > r)
 Right-multiply a matrix-valued Green's function by a matrix at every mesh point.
template<typename M, typename T>
gf< M, matrix_valuedtriqs::gfs::operator* (matrix< T > l, gf< M, matrix_valued > g)
 Left-multiply a matrix-valued Green's function by a matrix at every mesh point.
template<typename G>
requires (is_gf_v<G> or is_block_gf_v<G>)
G::regular_type::real_t triqs::gfs::real (G const &g)
 Take the real part of a Green's function (no check), returning a new Green's function with a real target.
template<typename G, typename... Args>
auto triqs::gfs::reinterpret_scalar_valued_gf_as_matrix_valued (G &&g)
 Reinterpret a scalar-valued Green's function as a 1x1 matrix-valued one.
template<typename G1, typename G2, typename M>
void triqs::gfs::set_from_L_G_R (G1 &g1, M const &l, G2 const &g2, M const &r)
 Set g1 = l * g2 * r at every mesh point (in place, optimized for speed).
template<typename G, typename... Args>
auto triqs::gfs::slice_target (G &&g, Args &&...1)
 Slice the target of a Green's function, keeping the result matrix- (or tensor-) valued.
template<typename G, typename... Args>
auto triqs::gfs::slice_target_to_scalar (G &&g, Args &&...1)
 Slice the target of a matrix-valued Green's function down to a scalar-valued one.
template<typename M>
gf< M, matrix_valuedtriqs::gfs::transpose (gf_view< M, matrix_valued > g)
 Transpose the target matrix of a matrix-valued Green's function, returning a new Green's function.

Function Documentation

◆ is_gf_real()

template<typename G>
requires (is_block_gf_v<G>)
bool triqs::gfs::is_gf_real ( G const & bg,
double tolerance = 1.e-13 )

Block overload of triqs::gfs::is_gf_real (true iff every block is real up to tolerance).

Definition at line 321 of file functions2.hpp.