|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
Conversions between basis representations of a Green's function.
Conversions to and from compact basis representations such as Legendre polynomials and the discrete Lehmann representation (DLR).
Functions | |
| void | triqs::gfs::enforce_discontinuity (gf_view< mesh::legendre > gl, nda::array_const_view< double, 2 > disc) |
| Enforce a prescribed jump at \( \tau = 0 \) for a Legendre Green's function. | |
| template<int = 0, typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| double | triqs::gfs::find_w_max (G const &g, double eps=1e-10, bool symmetrize=true, double w_max_init=1.0, double w_max_max=200.0) |
| Find a DLR energy cutoff \( \omega_{\mathrm{max}} \) that reproduces an imfreq Green's function within tolerance eps after a DLR round-trip. | |
| template<int N = 0, int... Ns, typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| auto | triqs::gfs::fit_gf_dlr (G const &g, double w_max, double eps, bool symmetrize=true) |
| Fit an imaginary-time Green's function with a Discrete Lehmann Representation. | |
| template<int N = 0, int... Ns, typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| auto | triqs::gfs::fit_gf_dlr (G const &g, mesh::dlr const &dlr_mesh) |
| Fit an imaginary-time Green's function on a given DLR coefficient mesh. | |
| template<int N = 0, int... Ns, typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| auto | triqs::gfs::make_gf_dlr (G const &g) |
| Transform a DLR imaginary-time or DLR Matsubara Green's function to its DLR-coefficient representation. | |
| template<int N = 0, int... Ns, typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| auto | triqs::gfs::make_gf_dlr_imfreq (G const &g) |
| Build a DLR Matsubara Green's function from a DLR-coefficient or DLR-imaginary-time input. | |
| template<int N = 0, int... Ns, typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| auto | triqs::gfs::make_gf_dlr_imfreq (G const &g, double w_max, double eps, bool symmetrize=true) |
| Sample an imaginary frequency Green's function on the DLR Matsubara frequency nodes defined by (w_max, eps, symmetrize). | |
| template<int N = 0, int... Ns, typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| auto | triqs::gfs::make_gf_dlr_imtime (G const &g) |
| Build a DLR imaginary-time Green's function from a DLR-coefficient or DLR-Matsubara input. | |
| template<int N = 0, int... Ns, typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| auto | triqs::gfs::make_gf_imfreq (G const &g, long n_iw) |
| Build a uniform Matsubara Green's function from any DLR representation. | |
| template<int N = 0, int... Ns, typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| auto | triqs::gfs::make_gf_imtime (G const &g, long n_tau) |
| Build a uniform imaginary-time Green's function from any DLR representation. | |
| template<typename G> requires (MemoryGf<G> or is_block_gf_v<G>) | |
| auto | triqs::gfs::tau_L2_norm (G const &g) |
| Calculate the \( L^2 \) norm of a DLR Green's function. | |
| void triqs::gfs::enforce_discontinuity | ( | gf_view< mesh::legendre > | gl, |
| nda::array_const_view< double, 2 > | disc ) |
#include <triqs/gfs/functions/legendre.cpp>
Enforce a prescribed jump at \( \tau = 0 \) for a Legendre Green's function.
The Legendre coefficients are adjusted in place so that the corresponding imaginary-time Green's function has the specified discontinuity \( G(0^+) - G(0^-) \) at \( \tau = 0 \) (which equals \( -1 \) for a fermionic propagator). Coefficients above the constrained subspace are left unchanged.
| gl | Legendre Green's function modified in place. |
| disc | Target discontinuity at \( \tau = 0 \). |
Definition at line 57 of file legendre.cpp.
| double triqs::gfs::find_w_max | ( | G const & | g, |
| double | eps = 1e-10, | ||
| bool | symmetrize = true, | ||
| double | w_max_init = 1.0, | ||
| double | w_max_max = 200.0 ) |
#include <triqs/gfs/functions/dlr.hpp>
Find a DLR energy cutoff \( \omega_{\mathrm{max}} \) that reproduces an imfreq Green's function within tolerance eps after a DLR round-trip.
Starting from w_max_init, the cutoff is grown by a factor of 1.5 per iteration. For each candidate \( \omega_{\mathrm{max}} \) the function
\[ e = \max_{i\omega_n, \mathrm{indices}} \left| g(i\omega_n) - g_{\mathrm{rec}}(i\omega_n) \right| \;. \]
The smallest \( \omega_{\mathrm{max}} \le \) w_max_max with \( e < \) eps is returned.Candidate cutoffs whose DLR frequency range exceeds the range of the input imfreq mesh of g are skipped (they would produce an invalid DLR mesh).
For a block_gf, the error reported per iteration is the worst-case error across all blocks.
It throws an exception if w_max_init exceeds w_max_max, or if no candidate cutoff \( \le \) w_max_max achieves \( e < \) eps.
| g | Input Green's function on an imfreq mesh. |
| eps | Target DLR accuracy and round-trip error tolerance. |
| symmetrize | If true, use particle-hole symmetric DLR meshes. |
| w_max_init | Initial value of the DLR cutoff to try (must be \( \le \) w_max_max). |
| w_max_max | Maximum DLR cutoff to try before giving up. |
| auto triqs::gfs::fit_gf_dlr | ( | G const & | g, |
| double | w_max, | ||
| double | eps, | ||
| bool | symmetrize = true ) |
#include <triqs/gfs/functions/dlr.hpp>
Fit an imaginary-time Green's function with a Discrete Lehmann Representation.
Builds a DLR coefficient Green's function by least-squares fitting the input Green's function (on a uniform imaginary-time mesh) on a DLR grid specified by the spectral cutoff \( \omega_{\max} \) and tolerance \( \epsilon \).
| N | Index of the mesh component to fit (default \( 0 \)). |
| Ns | Additional mesh component indices for product meshes. |
| G | The type of the input Green's function. |
| g | The imaginary-time Green's function to fit. |
| w_max | Maximum real frequency captured by the DLR basis. |
| eps | Target accuracy of the DLR representation. |
| symmetrize | If true, the DLR grid is symmetric about \( \omega = 0 \). |
| auto triqs::gfs::fit_gf_dlr | ( | G const & | g, |
| mesh::dlr const & | dlr_mesh ) |
#include <triqs/gfs/functions/dlr.hpp>
Fit an imaginary-time Green's function on a given DLR coefficient mesh.
Builds a DLR coefficient Green's function by least-squares fitting the input Green's function (on a uniform imaginary-time mesh) onto the supplied DLR grid dlr_mesh.
| N | Index of the mesh component to fit (default \( 0 \)). |
| Ns | Additional mesh component indices for product meshes. |
| G | The type of the input Green's function. |
| g | The imaginary-time Green's function to fit. |
| dlr_mesh | The DLR coefficient mesh to fit onto. |
| auto triqs::gfs::make_gf_dlr | ( | G const & | g | ) |
#include <triqs/gfs/functions/dlr.hpp>
Transform a DLR imaginary-time or DLR Matsubara Green's function to its DLR-coefficient representation.
The input must live on an imaginary-time or frequency DLR mesh. The output lives on the corresponding DLR (coefficient) mesh.
For block Green's functions the transform is applied block-wise.
| N | Index of the mesh component to transform (default \( 0 \)). |
| Ns | Additional mesh component indices for product meshes. |
| G | The type of the input Green's function. |
| g | The DLR imaginary-time or DLR Matsubara Green's function. |
| auto triqs::gfs::make_gf_dlr_imfreq | ( | G const & | g | ) |
#include <triqs/gfs/functions/dlr.hpp>
Build a DLR Matsubara Green's function from a DLR-coefficient or DLR-imaginary-time input.
The output lives on the Matsubara DLR mesh associated with the input's DLR grid. Block and product meshes are handled recursively.
| N | Index of the mesh component to transform (default \( 0 \)). |
| Ns | Additional mesh component indices for product meshes. |
| G | The type of the input Green's function. |
| g | A Green's function on an imaginary-time or coefficient DLR mesh. |
| auto triqs::gfs::make_gf_dlr_imfreq | ( | G const & | g, |
| double | w_max, | ||
| double | eps, | ||
| bool | symmetrize = true ) |
#include <triqs/gfs/functions/dlr.hpp>
Sample an imaginary frequency Green's function on the DLR Matsubara frequency nodes defined by (w_max, eps, symmetrize).
Constructs a fresh triqs::mesh::dlr_imfreq mesh from w_max, eps and symmetrize (using the same beta and statistic as g) and returns a Gf on that mesh whose values are read off g at the corresponding Matsubara indices.
For a block_gf, the DLR mesh is built once and reused across blocks (the underlying cppdlr SVD is not cheap). For a product mesh, the operation is applied to the imfreq axis selected by the template parameter pack <N, Ns...>.
It throws an exception if the input imfreq mesh of g does not cover the Matsubara frequency range of the constructed DLR mesh.
| N | Index of the imfreq axis to transform when g has a product mesh. Must be 0 for non-product meshes. |
| Ns | Additional axis indices for nested product-mesh transformations. |
| G | A MemoryGf or block_gf type with an imfreq mesh on the selected axis. |
| g | Input Green's function on an imfreq mesh (or product mesh containing one). |
| w_max | DLR energy cutoff used to build the dlr_imfreq mesh. |
| eps | DLR accuracy used to build the dlr_imfreq mesh. |
| symmetrize | If true, build a particle-hole symmetric DLR mesh. |
| auto triqs::gfs::make_gf_dlr_imtime | ( | G const & | g | ) |
#include <triqs/gfs/functions/dlr.hpp>
Build a DLR imaginary-time Green's function from a DLR-coefficient or DLR-Matsubara input.
The output lives on the imaginary-time DLR mesh associated with the input's DLR grid. Block and product meshes are handled recursively.
| N | Index of the mesh component to transform (default \( 0 \)). |
| Ns | Additional mesh component indices for product meshes. |
| G | The type of the input Green's function. |
| g | A Green's function on a Matsubara or coefficient DLR mesh. |
| auto triqs::gfs::make_gf_imfreq | ( | G const & | g, |
| long | n_iw ) |
#include <triqs/gfs/functions/dlr.hpp>
Build a uniform Matsubara Green's function from any DLR representation.
Evaluates the DLR Green's function on a regular Matsubara mesh with \( n_{i\omega} \) positive Matsubara frequencies. Input on imaginary-time or Matsubara DLR meshes are first converted to DLR coefficients internally.
| N | Index of the mesh component to transform (default \( 0 \)). |
| Ns | Additional mesh component indices for product meshes. |
| G | The type of the input Green's function. |
| g | A Green's function on any DLR mesh. |
| n_iw | Number of positive Matsubara frequencies in the output mesh. |
| auto triqs::gfs::make_gf_imtime | ( | G const & | g, |
| long | n_tau ) |
#include <triqs/gfs/functions/dlr.hpp>
Build a uniform imaginary-time Green's function from any DLR representation.
Evaluates the DLR Green's function on a regular imaginary-time mesh of size \( n_{\tau} \). Inputs on imaginary-time or Matsubara DLR meshes are first converted to DLR coefficients internally.
| N | Index of the mesh component to transform (default \( 0 \)). |
| Ns | Additional mesh component indices for product meshes. |
| G | The type of the input Green's function. |
| g | A Green's function on any DLR mesh. |
| n_tau | Number of points of the output imaginary-time mesh. |
| auto triqs::gfs::tau_L2_norm | ( | G const & | g | ) |
#include <triqs/gfs/functions/dlr.hpp>
Calculate the \( L^2 \) norm of a DLR Green's function.
| G | The type of the input Green's function. |
| g | A Green's function on any DLR mesh. |