[GfImFreq] Matsubara Green’s function in imaginary frequencies

Reference

class pytriqs.gf.GfImFreq(**kw)[source]
mesh: MeshImFreq, optional
The mesh of the Green function If not present, it will be constructed from the parameters beta, indices, [n_points], [statistic]
data: numpy.array, optional
The data of the Gf. Must be of dimension mesh.rank + target_rank. Incompatible with target_shape
target_shape: list of int, optional
Shape of the target space. Incompatible with data
is_real: bool
Is the Green function real valued ? If true, and target_shape is set, the data will be real. No effect with the parameter data.
indices: GfIndices or list of str or list of list of str, Optional
Optional string indices for the target space, to allow e.g g[‘eg’, ‘eg’] list of list of str: the list of indices for each dimension. list of str: all indices are assumed to be the same for all dimensions.
name: str
The name of the Green function. For plotting.
density(*args, **kwargs)

Compute the density matrix of the Greens function

Parameters:beta (float, optional) – Used for finite temperature density calculation with MeshReFreq.
Returns:density_matrix – Single particle density matrix with shape target_shape.
Return type:ndarray

Notes

Only works for single mesh Greens functions with a, Matsubara, real-frequency, or Legendre mesh.

set_from_fourier(*args, **kw)

Fills self with the Fourier transform of g_in

Signature : (gf_view<imtime,scalar_valued> g_out, gf_view<imfreq,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<imtime,scalar_valued> g_out, block_gf_view<imfreq,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<imtime,scalar_valued> g_out, block2_gf_view<imfreq,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imtime,scalar_valued> g_out, gf_view<imfreq,scalar_valued> g_in, array_const_view<dcomplex,1+scalar_valued::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<imfreq,scalar_valued> g_out, gf_view<imtime,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<imfreq,scalar_valued> g_out, block_gf_view<imtime,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<imfreq,scalar_valued> g_out, block2_gf_view<imtime,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imfreq,scalar_valued> g_out, gf_view<imtime,scalar_valued> g_in, array_const_view<dcomplex,1+scalar_valued::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<retime,scalar_valued> g_out, gf_view<refreq,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<retime,scalar_valued> g_out, block_gf_view<refreq,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<retime,scalar_valued> g_out, block2_gf_view<refreq,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<retime,scalar_valued> g_out, gf_view<refreq,scalar_valued> g_in, array_const_view<dcomplex,1+scalar_valued::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<refreq,scalar_valued> g_out, gf_view<retime,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<refreq,scalar_valued> g_out, block_gf_view<retime,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<refreq,scalar_valued> g_out, block2_gf_view<retime,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<refreq,scalar_valued> g_out, gf_view<retime,scalar_valued> g_in, array_const_view<dcomplex,1+scalar_valued::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<cyclic_lattice,scalar_valued> g_out, gf_view<brillouin_zone,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<cyclic_lattice,scalar_valued> g_out, block_gf_view<brillouin_zone,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<cyclic_lattice,scalar_valued> g_out, block2_gf_view<brillouin_zone,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<brillouin_zone,scalar_valued> g_out, gf_view<cyclic_lattice,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<brillouin_zone,scalar_valued> g_out, block_gf_view<cyclic_lattice,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<brillouin_zone,scalar_valued> g_out, block2_gf_view<cyclic_lattice,scalar_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imtime,matrix_valued> g_out, gf_view<imfreq,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<imtime,matrix_valued> g_out, block_gf_view<imfreq,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<imtime,matrix_valued> g_out, block2_gf_view<imfreq,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imtime,matrix_valued> g_out, gf_view<imfreq,matrix_valued> g_in, array_const_view<dcomplex,1+matrix_valued::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<imfreq,matrix_valued> g_out, gf_view<imtime,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<imfreq,matrix_valued> g_out, block_gf_view<imtime,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<imfreq,matrix_valued> g_out, block2_gf_view<imtime,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imfreq,matrix_valued> g_out, gf_view<imtime,matrix_valued> g_in, array_const_view<dcomplex,1+matrix_valued::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<retime,matrix_valued> g_out, gf_view<refreq,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<retime,matrix_valued> g_out, block_gf_view<refreq,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<retime,matrix_valued> g_out, block2_gf_view<refreq,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<retime,matrix_valued> g_out, gf_view<refreq,matrix_valued> g_in, array_const_view<dcomplex,1+matrix_valued::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<refreq,matrix_valued> g_out, gf_view<retime,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<refreq,matrix_valued> g_out, block_gf_view<retime,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<refreq,matrix_valued> g_out, block2_gf_view<retime,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<refreq,matrix_valued> g_out, gf_view<retime,matrix_valued> g_in, array_const_view<dcomplex,1+matrix_valued::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<cyclic_lattice,matrix_valued> g_out, gf_view<brillouin_zone,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<cyclic_lattice,matrix_valued> g_out, block_gf_view<brillouin_zone,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<cyclic_lattice,matrix_valued> g_out, block2_gf_view<brillouin_zone,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<brillouin_zone,matrix_valued> g_out, gf_view<cyclic_lattice,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<brillouin_zone,matrix_valued> g_out, block_gf_view<cyclic_lattice,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<brillouin_zone,matrix_valued> g_out, block2_gf_view<cyclic_lattice,matrix_valued> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imtime,tensor_valued<3>> g_out, gf_view<imfreq,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<imtime,tensor_valued<3>> g_out, block_gf_view<imfreq,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<imtime,tensor_valued<3>> g_out, block2_gf_view<imfreq,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imtime,tensor_valued<3>> g_out, gf_view<imfreq,tensor_valued<3>> g_in, array_const_view<dcomplex,1+tensor_valued<3>::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<imfreq,tensor_valued<3>> g_out, gf_view<imtime,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<imfreq,tensor_valued<3>> g_out, block_gf_view<imtime,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<imfreq,tensor_valued<3>> g_out, block2_gf_view<imtime,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imfreq,tensor_valued<3>> g_out, gf_view<imtime,tensor_valued<3>> g_in, array_const_view<dcomplex,1+tensor_valued<3>::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<retime,tensor_valued<3>> g_out, gf_view<refreq,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<retime,tensor_valued<3>> g_out, block_gf_view<refreq,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<retime,tensor_valued<3>> g_out, block2_gf_view<refreq,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<retime,tensor_valued<3>> g_out, gf_view<refreq,tensor_valued<3>> g_in, array_const_view<dcomplex,1+tensor_valued<3>::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<refreq,tensor_valued<3>> g_out, gf_view<retime,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<refreq,tensor_valued<3>> g_out, block_gf_view<retime,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<refreq,tensor_valued<3>> g_out, block2_gf_view<retime,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<refreq,tensor_valued<3>> g_out, gf_view<retime,tensor_valued<3>> g_in, array_const_view<dcomplex,1+tensor_valued<3>::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<cyclic_lattice,tensor_valued<3>> g_out, gf_view<brillouin_zone,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<cyclic_lattice,tensor_valued<3>> g_out, block_gf_view<brillouin_zone,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<cyclic_lattice,tensor_valued<3>> g_out, block2_gf_view<brillouin_zone,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<brillouin_zone,tensor_valued<3>> g_out, gf_view<cyclic_lattice,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<brillouin_zone,tensor_valued<3>> g_out, block_gf_view<cyclic_lattice,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<brillouin_zone,tensor_valued<3>> g_out, block2_gf_view<cyclic_lattice,tensor_valued<3>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imtime,tensor_valued<4>> g_out, gf_view<imfreq,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<imtime,tensor_valued<4>> g_out, block_gf_view<imfreq,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<imtime,tensor_valued<4>> g_out, block2_gf_view<imfreq,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imtime,tensor_valued<4>> g_out, gf_view<imfreq,tensor_valued<4>> g_in, array_const_view<dcomplex,1+tensor_valued<4>::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<imfreq,tensor_valued<4>> g_out, gf_view<imtime,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<imfreq,tensor_valued<4>> g_out, block_gf_view<imtime,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<imfreq,tensor_valued<4>> g_out, block2_gf_view<imtime,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<imfreq,tensor_valued<4>> g_out, gf_view<imtime,tensor_valued<4>> g_in, array_const_view<dcomplex,1+tensor_valued<4>::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<retime,tensor_valued<4>> g_out, gf_view<refreq,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<retime,tensor_valued<4>> g_out, block_gf_view<refreq,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<retime,tensor_valued<4>> g_out, block2_gf_view<refreq,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<retime,tensor_valued<4>> g_out, gf_view<refreq,tensor_valued<4>> g_in, array_const_view<dcomplex,1+tensor_valued<4>::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<refreq,tensor_valued<4>> g_out, gf_view<retime,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<refreq,tensor_valued<4>> g_out, block_gf_view<retime,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<refreq,tensor_valued<4>> g_out, block2_gf_view<retime,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<refreq,tensor_valued<4>> g_out, gf_view<retime,tensor_valued<4>> g_in, array_const_view<dcomplex,1+tensor_valued<4>::rank> known_moments) -> None
Fills self with the Fourier transform of g_in with known high-frequency moments
Signature : (gf_view<cyclic_lattice,tensor_valued<4>> g_out, gf_view<brillouin_zone,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<cyclic_lattice,tensor_valued<4>> g_out, block_gf_view<brillouin_zone,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<cyclic_lattice,tensor_valued<4>> g_out, block2_gf_view<brillouin_zone,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (gf_view<brillouin_zone,tensor_valued<4>> g_out, gf_view<cyclic_lattice,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block_gf_view<brillouin_zone,tensor_valued<4>> g_out, block_gf_view<cyclic_lattice,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
Signature : (block2_gf_view<brillouin_zone,tensor_valued<4>> g_out, block2_gf_view<cyclic_lattice,tensor_valued<4>> g_in) -> None
Fills self with the Fourier transform of g_in
set_from_legendre(*args, **kw)

Fills self with the legendre transform of gl

Signature : (gf_view<imfreq,scalar_valued> gw, gf_view<triqs::gfs::legendre,scalar_valued> gl) -> None
Fills self with the legendre transform of gl
Signature : (gf_view<imtime,scalar_valued> gt, gf_view<triqs::gfs::legendre,scalar_valued> gl) -> None
Fills self with the legendre transform of gl
Signature : (gf_view<imfreq,matrix_valued> gw, gf_view<triqs::gfs::legendre,matrix_valued> gl) -> None
Fills self with the legendre transform of gl
Signature : (gf_view<imtime,matrix_valued> gt, gf_view<triqs::gfs::legendre,matrix_valued> gl) -> None
Fills self with the legendre transform of gl
Signature : (gf_view<imfreq,tensor_valued<3>> gw, gf_view<triqs::gfs::legendre,tensor_valued<3>> gl) -> None
Fills self with the legendre transform of gl
Signature : (gf_view<imtime,tensor_valued<3>> gt, gf_view<triqs::gfs::legendre,tensor_valued<3>> gl) -> None
Fills self with the legendre transform of gl
Signature : (gf_view<imfreq,tensor_valued<4>> gw, gf_view<triqs::gfs::legendre,tensor_valued<4>> gl) -> None
Fills self with the legendre transform of gl
Signature : (gf_view<imtime,tensor_valued<4>> gt, gf_view<triqs::gfs::legendre,tensor_valued<4>> gl) -> None
Fills self with the legendre transform of gl

Warning

Arguments of __init__() must be documented.

HDF5 data scheme

The GfImFreq (TRIQS_HDF5_data_scheme= “GfImFreq”) is decomposed in the following objects:

Name Type Meaning
Mesh MeshGf The mesh
Data 3d numpy of complex
Data[n,i1,i2] is the element of the Green function where:
  • n is the Matsubara index
  • i1, i2 are the indices

For real GF in time, we store only starting from n=0 and the rest is deduced by symmetry

IndicesL,IndicesR string The Python repr of the indices, e.g. (1,2), or (1,) repr(this_string) reproduces the indices
Name string Name of the Green function block
Note string Note

Example

from pytriqs.gf import GfImFreq, SemiCircular

g = GfImFreq(indices = ['eg1','eg2'], beta = 50, n_points = 1000, name = "egBlock")

g['eg1','eg1'] = SemiCircular(half_bandwidth = 1)
g['eg2','eg2'] = SemiCircular(half_bandwidth = 2)

from pytriqs.plot.mpl_interface import oplot, plt
oplot(g, '-o', x_window = (0,10))
plt.ylim(-2,1)

(Source code, png, hires.png, pdf)

../../../../../../_images/green_imfreq.png