[GfLegendre] Matsubara Green’s function with Legendre polynomials
Reference
- class triqs.gf.GfLegendre(**kw)[source]
Parameters (KEYWORD argument ONLY)
- mesh: MeshLegendre, optional
The mesh of the Green function If not present, it will be constructed from the parameters beta, [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.
- 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.
- enforce_discontinuity(*args, **kw)
Signature : (gf_view<triqs::gfs::legendre,matrix_valued> gl, matrix_view<double> disc) -> None Modify the coefficient to adjust discontinuity
Warning
Arguments of __init__()
must be documented.
HDF5 data scheme
The GfLegendre (Format= “GfLegendre”) is decomposed in the following objects:
Name |
Type |
Meaning |
---|---|---|
Mesh |
MeshGf |
The mesh |
Data |
3d numpy of complex |
|
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’s function block |
Note |
string |
Note |
Example
from triqs.gf import *
from triqs.plot.mpl_interface import oplot,plt
# A Green's function on the Matsubara axis set to a semicircular
gw = GfImFreq(indices = [1], beta = 50)
gw << SemiCircular(half_bandwidth = 1)
# Create a Legendre Green's function with 40 coefficients
# and initialize it from gw
gl = GfLegendre(indices = [1], beta = 50, n_points = 40)
gl << MatsubaraToLegendre(gw)
# Plot the Legendre Green's function
oplot(gl, '-o')