Tools for GFs[source]

Return the conjugate of a Green’s function[source]

Compute Delta_iw from G0_iw. CAUTION: This function assumes the following properties of g

  • The diagonal components of g should decay as 1/iOmega
  • g should fullfill the property g[iw][i,j] = conj(g[-iw][j,i])
Parameters:g (BlockGf (of GfImFreq) or GfImFreq) – Non-interacting Green’s function.
Returns:delta_iw – Hybridization function.
Return type:BlockGf (of GfImFreq) or GfImFreq**kwargs)[source]

Solve Dyson’s equation for given two of G0_iw, G_iw and Sigma_iw to yield the third.

  • G0_iw (Gf, optional) – Non-interacting Green’s function.
  • G_iw (Gf, optional) – Interacting Green’s function.
  • Sigma_iw (Gf, optional) – Self-energy., order=10)[source]

General fit of a noisy imaginary time Green’s function to a low order Legendre expansion in imaginary time.

Only Hermiticity is imposed on the fit, so discontinuities has to be fixed separately (see the method enforce_discontinuity)

Author: Hugo U.R. Strand

  • g_t (TRIQS imaginary time Green's function (matrix valued)) – Imaginary time Green’s function to fit (possibly noisy binned data)
  • order (int) – Maximal order of the fitted Legendre expansion

g_l – Fitted Legendre Green’s function with order order

Return type:

TRIQS Legendre polynomial Green’s function (matrix valued)[source]

Return the inverse of a Green’s function, n_moments=10)[source]

Return a container for the high-frequency coefficients of a given Green function initialized to zero.

  • g (GfImFreq or GfReFreq or GfImTime or GfReTime) – The real/imaginary frequency/time Green’s function that we create the tail-array for.
  • [default=10] (n_moments) –, block_name)[source]

Read a GfReFreq from text files with the format (w, Re(G), Im(G)) for a single block.


A BlockGf must be constructed from multiple GfReFreq objects if desired. The mesh must be the same for all files read in. Non-uniform meshes are not supported.

  • block_txtfiles (Rank 2 square np.array(str) or list[list[str]]) –

    The text files containing the GF data that need to read for the block. e.g. [[‘up_eg1.dat’]] for a one-dimensional block and

    [‘up_eg1_2.dat’,’up_eg2_2.dat’]] for a 2x2 block.
  • block_name (str) – Name of the block.

g – The real frequency Green’s function read in.

Return type:


Return the transpose of a Green’s function[source]

Write a GfReFreq or GfImFreq to in the format (w/iw, Re(G), Im(G)) for a single block.

Parameters:g (GfReFreq or GfImFreq) – The real/imaginary frequency Green’s function to be written out.