The Keldysh formalism provides a systematic way to study non-equilibrium systems, usually based on the two-point functions corresponding to excitations in the system. The main mathematical object in the Keldysh formalism is the non-equilibrium Green's function (NEGF), which is a two-point function of particle fields. In this way, it resembles the Matsubara formalism, which is based on equilibrium Green functions in imaginary-time and treats only equilibrium systems.