triqs.mesh.meshes.MeshImTime

class triqs.mesh.meshes.MeshImTime

Bases: object

Imaginary time mesh type.

An imaginary time mesh is defined by its size \(N \geq 0\), an inverse temperature \(\beta > 0\) and its particle statistics. It contains \(N\) equally spaced mesh points on the interval \([0, \beta]\) such that the distance between two consecutive mesh points (step size) is constant.

An imaginary time mesh has the following properties:

  • Each mesh point is identified by a unique index \(n \in \{0, 1, \ldots, N-1\}\).

  • An index \(n\) is mapped to the corresponding data index \(d\) by the identity function \(d(n) = n\) and vice versa.

  • An index \(n\) is mapped to the corresponding value \(\tau\) by the linear function \(\tau(n) = n \cdot \Delta\) such that \(\tau(0) = 0\) and \(\tau(N-1) = \beta\). The step size of the mesh is \(\Delta = \frac{\beta}{N - 1}\) for \(N > 1\), otherwise it is undefined. For implementation purposes, we set \(\Delta = 0\) and \(\Delta^{-1} = 0\) for \(N = 0\) and \(\Delta = 0\) and \(\Delta^{-1} = \infty\) for \(N = 1\).

  • An arbitrary value \(\tau \in [0, \beta]\) is mapped to the closest mesh point with index \(n\) by the function \(n(\tau) = \left\lfloor \frac{\tau}{\Delta} + 0.5 \right\rfloor\).

Green’s function containers that are based on an imaginary time mesh store the function values at the discrete time points \(\tau(n)\), i.e. \(f_n = f(\tau(n))\), and use linear interpolation to evaluate the function at an arbitrary imaginary time \(\tau \in [0, \beta]\).


Dispatched C++ constructor(s).

[1] (beta: float = 1, statistic: Statistic ("Fermion" | "Boson") = 1, n_tau: int = 0)

Construct an imaginary time mesh on the interval \([0, \beta]\) with \(N \geq 0\) equally spaced mesh points and the given particle statistics.

Parameters:
betafloat

Inverse temperature \(\beta > 0\).

statisticStatistic (“Fermion” | “Boson”)

Particle statistics.

n_tauint

Size of the mesh.

Attributes

beta

Get the inverse temperature \(\beta\).

delta

Get the step size \(\Delta\) of the mesh, i.e. the distance between two consecutive mesh points.

delta_inv

Get the inverse of the step size of the mesh, i.e. \(1 / \Delta\).

first_index

Get the first index of the mesh, i.e. \(0\).

last_index

Get the last index of the mesh, i.e. \(N - 1\).

mesh_hash

Get the hash value of the mesh.

statistic

Get the particle statistics.

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 an index \(n\) is valid.

to_data_index

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

to_index

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

to_value

Map an index \(n \in \{0, 1, \ldots, N-1\}\) to its corresponding value \(m(n)\).

values

Get the values of all mesh points in a mesh.