In thermal quantum field theory, the Matsubara frequency summation (named after Takeo Matsubara) is the summation over discrete imaginary frequencies. It takes the following form where is the inverse temperature and the frequencies are usually taken from either of the following two sets (with ): bosonic frequencies: fermionic frequencies: The summation will converge if tends to 0 in limit in a manner faster than . The summation over bosonic frequencies is denoted as (with ), while that over fermionic frequencies is denoted as (with ). is the statistical sign. In addition to thermal quantum field theory, the Matsubara frequency summation method also plays an essential role in the diagrammatic approach to solid-state physics, namely, if one considers the diagrams at finite temperature. Generally speaking, if at , a certain Feynman diagram is represented by an integral , at finite temperature it is given by the sum . Summation formalism General formalism The trick to evaluate Matsubara frequency summation is to use a Matsubara weighting function hη(z) that has simple poles located exactly at . The weighting functions in the boson case η = +1 and fermion case η = −1 differ. The choice of weighting function will be discussed later. With the weighting function, the summation can be replaced by a contour integral surrounding the imaginary axis. As in Fig. 1, the weighting function generates poles (red crosses) on the imaginary axis. The contour integral picks up the residue of these poles, which is equivalent to the summation. By deformation of the contour lines to enclose the poles of g(z) (the green cross in Fig. 2), the summation can be formally accomplished by summing the residue of g(z)hη(z) over all poles of g(z), Note that a minus sign is produced, because the contour is deformed to enclose the poles in the clockwise direction, resulting in the negative residue. Choice of Matsubara weighting function To produce simple poles on boson frequencies , either of the following two types of Matsubara weighting functions can be chosen depending on which half plane the convergence is to be controlled in. controls the convergence in the left half plane (Re z < 0), while controls the convergence in the right half plane (Re z > 0). Here is the Bose–Einstein distribution function. The case is similar for fermion frequencies. There are also two types of Matsubara weighting functions that produce simple poles at controls the