triqs.mesh.meshes.MeshImFreq

class triqs.mesh.meshes.MeshImFreq

Bases: object

Imaginary frequency mesh type.

An imaginary frequency mesh is defined by the number of positive frequencies \(N_{i\omega_n} \geq 0\), the inverse temperature \(\beta > 0\), its particle statistics and an option (all_frequencies vs positive_frequencies_only).

An imaginary frequency mesh has the following properties:

  • Each mesh point is identified by a unique index \(n \in \{ n_{\text{min}}, n_{\text{min}} + 1, \dots, n_{\text{max}} - 1, n_{\text{max}} \}\), where \(n_{\text{max}} = N_{i\omega_n} - 1\) and

\[\begin{split}n_{\text{min}} = \begin{cases} -N_{i\omega_n} & \text{if fermionic statistics and all frequencies} \\ -N_{i\omega_n} + 1 & \text{if bosonic statistics and all frequencies} \\ 0 & \text{if positive frequencies only} \end{cases} \; .\end{split}\]
  • The size of the mesh is \(N = n_{\text{max}} - n_{\text{min}} + 1\).

  • An index \(n\) is mapped to the corresponding data index \(d\) by the function \(d(n) = n - n_{\text{min}}\). The inverse map is \(n(d) = d + n_{\text{min}}\).

  • An index \(n\) is mapped to the corresponding value \(i\omega_n \equiv i\omega(n)\) by the function

\[\begin{split}i\omega_n = \begin{cases} i\frac{2n \pi}{\beta} & \text{if fermionic statistics} \\ i\frac{(2n + 1) \pi}{\beta} & \text{if bosonic statistics} \end{cases} \; .\end{split}\]

Green’s function containers that are based on an imaginary frequency mesh store the function values at the discrete frequency points \(i\omega_n\), i.e. \(f_n = f(i\omega(n))\), and to evaluate the function at a specific Matsubara frequency \(i\omega_n\) with \(n_{\text{min}} \leq n \leq n_{\text{max}}\) the container simply returns the corresponding \(f_n\).


Dispatched C++ constructor(s).

[1] ()

[2] (beta: float,
     statistic: Statistic ("Fermion" | "Boson"),
     n_iw: int = 1025,
     opt: str {"all_frequencies", "positive_frequencies_only"} = <unprintable>)

[1] Default constructor constructs an empty mesh.


[2] Construct an imaginary frequency mesh with \(N_{i\omega_n} \geq 0\) positive Matsubara frequencies.


Parameters:
betafloat

Inverse temperature \(\beta > 0\).

statisticStatistic (“Fermion” | “Boson”)

Particle statistics.

n_iwint

Number of positive Matsubara frequencies, i.e. \(N_{i\omega_n}\).

optstr {“all_frequencies”, “positive_frequencies_only”}

Whether to use all or only the positive frequencies.

Attributes

beta

Get the inverse temperature \(\beta\).

first_index

Get the first Matsubara index, i.e. \(n_{\text{min}}\).

get_positive_freq

Get a new mesh with the same \(\beta\), particle statistics and \(N_{i\omega_n}\) but only positive frequencies.

last_index

Get the last Matsubara index, i.e. \(n_{\text{max}}\).

mesh_hash

Get the hash value of the mesh.

n_iw

Get the number of positive Matsubara frequencies \(N_{i\omega_n}\).

positive_only

Is the mesh restricted to positive Matsubara frequencies?

statistic

Get the particle statistics.

w_max

Get the complex value of the largest positive Matsubara frequency in the mesh.

Methods

__call__(*args, **kwargs)

Call self as a function.

copy

Get a copy of a mesh (for Python bindings).

copy_from

Copy one mesh into another (for Python bindings).

is_index_valid

Check if a Matsubara index \(n\) is valid.

set_tail_fit_parameters

Set the pointer to a new tail-fitter object constructed with the given parameters.

to_data_index

Map a Matsubara index \(n \in \{ n_{\text{min}}, \dots, n_{\text{max}} \}\) to its corresponding data

to_index

Map a data index \(d \in \{0, 1, \ldots, N-1\}\) to the corresponding Matsubara index \(n(d)\).

to_value

Map a Matsubara index \(n \in \{ n_{\text{min}}, \dots, n_{\text{max}} \}\) to its corresponding

values

Get the values of all mesh points in a mesh.