TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
GF tail fitting

Detailed Description

Fitting and manipulation of the high-frequency tail of a Green's function.

Tools to extract the high-frequency moments of a Green's function (triqs::gfs::fit_tail, triqs::gfs::fit_hermitian_tail) and to construct or substitute tails.

Functions

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<template< typename, typename... > typename G, typename T>
auto triqs::gfs::fit_hermitian_tail_on_window (G< mesh::imfreq, T > const &g, int n_min, int n_max, array_const_view< dcomplex, 3 > known_moments, int n_tail_max, int expansion_order)
 Fit the high-frequency tail on a restricted window, imposing hermitian moment matrices.
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<template< typename, typename, typename... > typename G, typename T>
auto triqs::gfs::fit_tail_on_window (G< mesh::imfreq, T > const &g, int n_min, int n_max, array_const_view< dcomplex, 3 > known_moments, int n_tail_max, int expansion_order)
 Fit the high-frequency tail of a Matsubara Green's function on a restricted frequency window.
array< dcomplex, 3 > triqs::gfs::get_tail (gf_const_view< mesh::legendre > gl)
 Extract the leading high-frequency moments of a Legendre 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 T>
void triqs::gfs::replace_by_tail (gf_view< mesh::imfreq, T > g, array_const_view< dcomplex, 1+T::rank > tail, int n_min)
 Overwrite the high-frequency tail of a Matsubara Green's function.
template<typename T>
void triqs::gfs::replace_by_tail_in_fit_window (gf_view< mesh::imfreq, T > g, array_const_view< dcomplex, 1+T::rank > tail)
 Overwrite the high-frequency portion of a Matsubara Green's function with the tail expansion.

Function Documentation

◆ fit_hermitian_tail() [1/2]

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 = {} )

#include <triqs/gfs/functions/functions2.hpp>

Fit the high-frequency tail of a block Green's function, imposing hermitian symmetry block by block.

The symmetry constraint is \( G_{i,j}(i\omega) = G_{j,i}^*(-i\omega) \).

Each block is fitted independently with the same symmetry constraint. The returned error is the maximum across blocks.

Template Parameters
NPosition of the frequency mesh in a product mesh (default \( 0 \)).
BGThe type of the block Green's function.
AThe type of the per-block known-moment array.
Parameters
bgThe block Green's function whose tail is to be fitted.
known_momentsPer-block array of known high-frequency moments.
Returns
A pair containing the per-block fitted tail moments and the worst-block fitting error.

Definition at line 161 of file functions2.hpp.

◆ fit_hermitian_tail() [2/2]

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 = {} )

#include <triqs/gfs/functions/functions2.hpp>

Fit the high-frequency tail of a Green's function, imposing hermitian symmetry on the fitted moments.

The symmetry constraint is \( G_{i,j}(i\omega) = G_{j,i}^*(-i\omega) \).

Template Parameters
NPosition of the frequency mesh in a product mesh (default \( 0 \)).
GThe type of the Green's function.
AThe type of the array of known high-frequency moments.
Parameters
gThe Green's function whose tail is to be fitted.
known_momentsArray of known high-frequency moments to constrain the fit.
Returns
A pair containing the fitted tail moments and the fitting error.

Definition at line 127 of file functions2.hpp.

◆ fit_hermitian_tail_on_window()

template<template< typename, typename... > typename G, typename T>
auto triqs::gfs::fit_hermitian_tail_on_window ( G< mesh::imfreq, T > const & g,
int n_min,
int n_max,
array_const_view< dcomplex, 3 > known_moments,
int n_tail_max,
int expansion_order )

#include <triqs/gfs/functions/imfreq.hpp>

Fit the high-frequency tail on a restricted window, imposing hermitian moment matrices.

Behaves like fit_tail_on_window but enforces the symmetry \( G_{i,j}(i\omega) = G_{j,i}^*(-i\omega) \) on the fitted moments.

Template Parameters
GThe Green's function container template.
TThe target type of the Green's function.
Parameters
gThe Matsubara Green's function whose tail is to be fitted.
n_minMinimum Matsubara index of the fit window.
n_maxMaximum Matsubara index of the fit window ( \( -1 \) means use the last index of the mesh).
known_momentsArray of known high-frequency moments to constrain the fit.
n_tail_maxMaximum frequency index used internally by the tail fitter.
expansion_orderOrder of the tail expansion to fit.
Returns
A pair containing the fitted tail moments and the fitting error.

Definition at line 442 of file imfreq.hpp.

◆ fit_tail() [1/2]

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 = {} )

#include <triqs/gfs/functions/functions2.hpp>

Fit the high-frequency tail of a block Green's function using a least-squares procedure.

Each block is fitted independently using fit_tail. The returned error is the maximum across blocks.

Template Parameters
NPosition of the frequency mesh in a product mesh (default \( 0 \)).
BGThe type of the block Green's function.
BAThe type of the per-block known-moment array.
Parameters
bgThe block Green's function whose tail is to be fitted.
known_momentsPer-block array of known high-frequency moments.
Returns
A pair containing the per-block fitted tail moments and the worst-block fitting error.

Definition at line 100 of file functions2.hpp.

◆ fit_tail() [2/2]

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 = {} )

#include <triqs/gfs/functions/functions2.hpp>

Fit the high-frequency tail of a Green's function using a least-squares procedure.

The result is the set of expansion moments that best reproduces the high-frequency behavior of \( G \) on the configured tail-fit window. Known moments, when provided, are treated as exact constraints on the fit.

Template Parameters
NPosition of the frequency mesh in a product mesh (default \( 0 \)).
GThe type of the Green's function.
AThe type of the array of known high-frequency moments.
Parameters
gThe Green's function whose tail is to be fitted.
known_momentsArray of known high-frequency moments to constrain the fit.
Returns
A pair containing the fitted tail moments and the fitting error.

Definition at line 79 of file functions2.hpp.

◆ fit_tail_on_window()

template<template< typename, typename, typename... > typename G, typename T>
auto triqs::gfs::fit_tail_on_window ( G< mesh::imfreq, T > const & g,
int n_min,
int n_max,
array_const_view< dcomplex, 3 > known_moments,
int n_tail_max,
int expansion_order )

#include <triqs/gfs/functions/imfreq.hpp>

Fit the high-frequency tail of a Matsubara Green's function on a restricted frequency window.

The fit is performed on the window \( [n_{\min}, n_{\max}] \) of the Matsubara mesh ( \( n_{\max} = -1 \) selects the last index of the mesh). The tail fitter is configured from n_tail_max and expansion_order, and the fit is delegated to fit_tail.

Template Parameters
GThe Green's function container template.
TThe target type of the Green's function.
Parameters
gThe Matsubara Green's function whose tail is to be fitted.
n_minMinimum Matsubara index of the fit window.
n_maxMaximum Matsubara index of the fit window ( \( -1 \) means use the last index of the mesh).
known_momentsArray of known high-frequency moments to constrain the fit.
n_tail_maxMaximum frequency index used internally by the tail fitter.
expansion_orderOrder of the tail expansion to fit.
Returns
A pair containing the fitted tail moments and the fitting error.

Definition at line 415 of file imfreq.hpp.

◆ get_tail()

array< dcomplex, 3 > triqs::gfs::get_tail ( gf_const_view< mesh::legendre > gl)

#include <triqs/gfs/functions/legendre.hpp>

Extract the leading high-frequency moments of a Legendre Green's function.

Returns the array of moments \( c_n \) such that the corresponding Matsubara Green's function behaves as \( G(i\omega) \sim \sum_n c_n / (i\omega)^n \) at large frequency.

Parameters
glThe Legendre Green's function.
Returns
An array of high-frequency moments.

◆ make_zero_tail()

template<int N = 0, typename G>
auto triqs::gfs::make_zero_tail ( G const & g,
int n_moments = 10 )

#include <triqs/gfs/functions/functions2.hpp>

Create a zero-initialized tail object for a given Green function object.

Template Parameters
NThe mesh position of the frequency or time mesh [default: 0].
GThe type of the Green function (gf, gf_view, block_gf, ...).
Parameters
gThe Green function object to create the tail object for.
n_momentsThe number of high-frequency moments to provide (including the zeroth moment).

Definition at line 191 of file functions2.hpp.

◆ replace_by_tail()

template<typename T>
void triqs::gfs::replace_by_tail ( gf_view< mesh::imfreq, T > g,
array_const_view< dcomplex, 1+T::rank > tail,
int n_min )

#include <triqs/gfs/functions/imfreq.hpp>

Overwrite the high-frequency tail of a Matsubara Green's function.

For every Matsubara index with \( |n| \geq n_{\min} \), the value of the Green's function is replaced by the tail expansion evaluated at that frequency. Values at lower indices are left unchanged.

Template Parameters
TThe target type of the Green's function.
Parameters
gThe Matsubara Green's function to modify in place.
tailThe high-frequency moments used to build the tail.
n_minMinimum absolute Matsubara index from which to apply the tail.

Definition at line 374 of file imfreq.hpp.

◆ replace_by_tail_in_fit_window()

template<typename T>
void triqs::gfs::replace_by_tail_in_fit_window ( gf_view< mesh::imfreq, T > g,
array_const_view< dcomplex, 1+T::rank > tail )

#include <triqs/gfs/functions/imfreq.hpp>

Overwrite the high-frequency portion of a Matsubara Green's function with the tail expansion.

The cutoff \( n_{\min} \) is first set automatically from the tail-fit window of the mesh. Then the function delegates to replace_by_tail.

Template Parameters
TThe target type of the Green's function.
Parameters
gThe Matsubara Green's function to modify in place.
tailThe high-frequency moments used to build the tail.

Definition at line 390 of file imfreq.hpp.