TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
GF reality and hermiticity

Detailed Description

Reality and hermiticity checks and operations on Green's functions.

Predicates such as triqs::gfs::is_gf_real and triqs::gfs::is_gf_hermitian, together with related operations such as complex conjugation.

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<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 G>
requires (is_gf_v<G> or is_block_gf_v<G>)
bool triqs::gfs::is_gf_hermitian (G const &g, double tolerance=1.e-12)
 Test whether a Green's function satisfies the hermitian symmetry up to a tolerance \( \epsilon \).
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 G>
bool triqs::gfs::is_gf_real_in_tau (G const &g, double tolerance=1.e-12)
 Test whether a Matsubara Green's function corresponds to a real imaginary-time Green's function.
template<typename T, typename Layout>
gf< mesh::imfreq, T > triqs::gfs::make_gf_from_real_gf (gf_const_view< mesh::imfreq, T, Layout > g)
 Build a full-mesh Matsubara Green's function from one defined on positive frequencies only.
template<typename G>
requires (is_gf_v<G> or is_block_gf_v<G>)
G::regular_type triqs::gfs::make_hermitian (G const &g)
 Symmetrize a Green's function so that it satisfies the hermitian symmetry.
template<typename G>
requires (is_gf_v<G> or is_block_gf_v<G>)
G::regular_type triqs::gfs::make_real_in_tau (G const &g)
 Symmetrize a Matsubara Green's function so that its imaginary-time partner is real-valued.
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.

Function Documentation

◆ conj()

template<typename G>
requires (is_gf_v<G>)
G::regular_type triqs::gfs::conj ( G const & g)

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

Complex-conjugate a Green's function, returning a new Green's function.

Template Parameters
GThe type of the Green's function.
Parameters
gThe Green's function.
Returns
A new Green's function holding the complex conjugate of g.

Definition at line 391 of file functions2.hpp.

◆ imag()

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)

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

Take the imaginary part of a Green's function (no check), returning a new Green's function with a real target.

Template Parameters
GAny Gf, BlockGf or Block2Gf type.
Parameters
gThe Green's function.
Returns
A Green's function holding the imaginary part of g.

Definition at line 355 of file functions2.hpp.

◆ is_gf_hermitian()

template<typename G>
requires (is_gf_v<G> or is_block_gf_v<G>)
bool triqs::gfs::is_gf_hermitian ( G const & g,
double tolerance = 1.e-12 )

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

Test whether a Green's function satisfies the hermitian symmetry up to a tolerance \( \epsilon \).

Depending on the mesh and target rank, one of the following relations is checked:

  • \( G(i\omega) \approx \frac{1}{2} [ G(i\omega) + G^*(-i\omega) ] \)
  • \( G(\tau) \approx \frac{1}{2} [ G(\tau) + G^*(\tau) ] \)
  • \( G_{i,j}(i\omega) \approx \frac{1}{2} [ G_{i,j}(i\omega) + G_{j,i}^*(i\omega) ] \)
  • \( G_{i,j}(\tau) \approx \frac{1}{2} [ G_{i,j}(\tau) + G_{j,i}^*(\tau) ] \)
  • \( G_{i,j,k,l}(i\omega) \approx \frac{1}{2} [ G_{i,j,k,l}(i\omega)] + G_{k,l,i,j}^*(i\omega) ] \)
  • \( G_{i,j,k,l}(\tau) \approx \frac{1}{2} [ G_{i,j,k,l}(\tau) + G_{k,l,i,j}(\tau) ] \)

For block Green's functions, the check is applied block-wise.

Template Parameters
GThe type of the Green's function.
Parameters
gThe Green's function to check.
toleranceTolerance \( \epsilon \) for the check (default \( 10^{-12} \)).
Returns
True if the property holds at every point of the mesh.

Definition at line 123 of file imfreq.hpp.

◆ is_gf_real()

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

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

Test whether a Green's function is real up to a tolerance.

Template Parameters
GAny Green's function type.
Parameters
gThe Green's function.
toleranceTolerance threshold.
Returns
True if g is real up to tolerance.

Definition at line 312 of file functions2.hpp.

◆ is_gf_real_in_tau()

template<typename G>
bool triqs::gfs::is_gf_real_in_tau ( G const & g,
double tolerance = 1.e-12 )

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

Test whether a Matsubara Green's function corresponds to a real imaginary-time Green's function.

The criterion checked, up to tolerance \( \epsilon \), is \( G_{i,j,\dots}(i\omega) \approx G_{i,j,\dots}^*(-i\omega) \) for every element of the target space and for every Matsubara frequency.

For block Green's functions, the check is applied block-wise.

Template Parameters
GThe type of the Green's function.
Parameters
gThe Matsubara Green's function to check.
toleranceTolerance \( \epsilon \) for the check (default \( 10^{-12} \)).
Returns
True if the property holds at every point of the mesh.

Definition at line 211 of file imfreq.hpp.

◆ make_gf_from_real_gf()

template<typename T, typename Layout>
gf< mesh::imfreq, T > triqs::gfs::make_gf_from_real_gf ( gf_const_view< mesh::imfreq, T, Layout > g)

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

Build a full-mesh Matsubara Green's function from one defined on positive frequencies only.

Uses the relation \( G(-i\omega_n) = G(i\omega_n)^* \), valid for Green's functions with a real imaginary-time counterpart, to fill in the negative-frequency part of the mesh.

Template Parameters
TTarget type.
LayoutLayout type.
Parameters
gGreen's function defined on a positive-only Matsubara mesh.
Returns
The Green's function on the full (positive and negative) Matsubara mesh.

Definition at line 62 of file imfreq.hpp.

◆ make_hermitian()

template<typename G>
requires (is_gf_v<G> or is_block_gf_v<G>)
G::regular_type triqs::gfs::make_hermitian ( G const & g)

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

Symmetrize a Green's function so that it satisfies the hermitian symmetry.

Depending on the mesh and target rank, one of the following transformations is applied:

  • \( G(i\omega) \rightarrow \frac{1}{2} [ G(i\omega) + G^*(-i\omega) ] \)
  • \( G(\tau) \rightarrow \frac{1}{2} [ G(\tau) + G^*(\tau) ] \)
  • \( G_{i,j}(i\omega) \rightarrow \frac{1}{2} [ G_{i,j}(i\omega) + G_{j,i}^*(i\omega) ] \)
  • \( G_{i,j}(\tau) \rightarrow \frac{1}{2} [ G_{i,j}(\tau) + G_{j,i}^*(\tau) ] \)
  • \( G_{i,j,k,l}(i\omega) \rightarrow \frac{1}{2} [ G_{i,j,k,l}(i\omega)] + G_{k,l,i,j}^*(i\omega) ] \)
  • \( G_{i,j,k,l}(\tau) \rightarrow \frac{1}{2} [ G_{i,j,k,l}(\tau) + G_{k,l,i,j}(\tau) ] \)

For block Green's functions, the symmetrization is applied block-wise.

Template Parameters
GThe type of the Green's function.
Parameters
gThe Green's function to symmetrize.
Returns
The symmetrized Green's function.

Definition at line 251 of file imfreq.hpp.

◆ make_real_in_tau()

template<typename G>
requires (is_gf_v<G> or is_block_gf_v<G>)
G::regular_type triqs::gfs::make_real_in_tau ( G const & g)

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

Symmetrize a Matsubara Green's function so that its imaginary-time partner is real-valued.

The transformation applied is \( G_{i,j,\dots}(i\omega) \rightarrow \frac{1}{2} [ G_{i,j,\dots}(i\omega) + G_{i,j,\dots}^*(-i\omega) ] \).

For block Green's functions, the symmetrization is applied block-wise.

Template Parameters
GThe type of the Green's function.
Parameters
gThe Matsubara Green's function to symmetrize.
Returns
The symmetrized Green's function.

Definition at line 323 of file imfreq.hpp.

◆ real()

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)

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

Take the real part of a Green's function (no check), returning a new Green's function with a real target.

Template Parameters
GAny Gf, BlockGf or Block2Gf type.
Parameters
gThe Green's function.
Returns
A Green's function holding the real part of g.

Definition at line 336 of file functions2.hpp.