# Keldysh formalism

In non-equilibrium physics, the Keldysh formalism or Keldysh–Schwinger formalism is a general framework for describing the quantum mechanical evolution of a system in a non-equilibrium state or systems subject to time varying external fields (electrical field, magnetic field etc.). Historically, it was foreshadowed by the work of Julian Schwinger and proposed almost simultaneously by Leonid Keldysh and, separately, Leo Kadanoff and Gordon Baym. It was further developed by later contributors such as O. V. Konstantinov and V. I. Perel.
Extensions to driven-dissipative open quantum systems is given not only for bosonic systems, but also for fermionic systems.
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.

## Time evolution of a quantum system

Consider a general quantum mechanical system. This system has the Hamiltonian $H_{0}$. Let the initial state of the system be the pure state $|n\rangle$. If we now add a time-dependent perturbation to this Hamiltonian, say $H'(t)$, the full Hamiltonian is $H(t)=H_{0}+H'(t)$ and hence the system will evolve in time under the full Hamiltonian. In this section, we will see how time evolution actually works in quantum mechanics.
Consider a Hermitian operator ${\mathcal {O}}$. In the Heisenberg picture of quantum mechanics, this operator is time-dependent and the state is not. The expectation value of the operator ${\mathcal {O}}(t)$ is given by
    ${\begin{aligned}\langle {\mathcal {O}}(t)\rangle &=\langle n|{U}^{\dagger }(t,0)\,{\mathcal {O}}(0)\,U(t,0)|n\rangle \\\end{aligned}}$
where, due to time evolution of operators in the Heisenberg picture, ${\mathcal {O}}(t)=U^{\dagger }(t,0){\mathcal {O}}(0)U(t,0)$. The time-evolution unitary operator $U(t_{2},t_{1})$ is the time-ordered exponential of an integral, $U(t_{2},t_{1})=T(e^{-i\int _{t_{1}}^{t_{2}}H(t')dt'}).$ (Note that if the Hamiltonian at one time commutes with the Hamiltonian at different times, then this can be simplified to $U(t_{2},t_{1})=e^{-i\int _{t_{1}}^{t_{2}}H(t')dt'}$.)
For perturbative quantum mechanics and quantum field theory, it is often more convenient to use the interaction picture. The interaction picture operator is
    ${\begin{aligned}{\mathcal {O_{I}}}(t)&={U_{0}}^{\dagger }(t,0)\,{\mathcal {O}}(0)\,U_{0}(t,0),\end{aligned}}$
where $U_{0}(t_{1},t_{2})=e^{-iH_{0}(t_{1}-t_{2})}$. Then, defining $S(t_{1},t_{2})=U_{0}^{\dagger }(t_{1},t_{2})U(t_{1},t_{2}),$ we have
    ${\begin{aligned}\langle {\mathcal {O}}(t)\rangle &=\langle n|{S}^{\dagger }(t,0){\mathcal {O_{I}}}(t)S(t,0)|n\rangle \\\end{aligned}}$
Since the time-evolution unitary operators satisfy $U(t_{3},t_{2})U(t_{2},t_{1})=U(t_{3},t_{1})$, the above expression can be rewritten as
    ${\begin{aligned}\langle {\mathcal {O}}(t)\rangle &=\langle n|{S}^{\dagger }(\infty ,0)S(\infty ,t){\mathcal {O_{I}}}(t)\,S(t,0)|n\rangle \\\end{aligned}}$,
or with $\infty$ replaced by any time value greater than $t$.

## Path ordering on the Keldysh contour

We can write the above expression more succinctly by, purely formally, replacing each operator $X(t)$ with a contour-ordered operator $X(c)$ , such that $c$ parametrizes the contour path on the time axis starting at $t=0$, proceeding to $t=\infty$, and then returning to $t=0$. This path is known as the Keldysh contour. $X(c)$ has the same operator action as $X(t)$ (where $t$ is the time value corresponding to $c$) but also has the additional information of $c$ (that is, strictly speaking $X(c_{1})\neq X(c_{2})$ if $c_{1}\neq c_{2}$, even if for the corresponding times $X(t_{1})=X(t_{2})$).
Then we can introduce notation of path ordering on this contour, by defining ${\mathcal {T_{c}}}(X^{(1)}(c_{1})X^{(2)}(c_{2})\ldots X^{(n)}(c_{n}))=(\pm 1)^{\sigma }X^{(\sigma (1))}(c_{\sigma (1)})X^{(\sigma (2))}(c_{\sigma (2)})\ldots X^{(\sigma (n))}(c_{\sigma (n)})$, where $\sigma$ is a permutation such that $c_{\sigma (1)}<c_{\sigma (2)}<\ldots c_{\sigma (n)}$, and the plus and minus signs are for bosonic and fermionic operators respectively. Note that this is a generalization of time ordering.
With this notation, the above time evolution is written as
    ${\begin{aligned}\langle {\mathcal {O}}(t)\rangle &=\langle n|{\mathcal {T_{c}}}({\mathcal {O(c)}}e^{-i\int dc'H'(c')})|n\rangle \end{aligned}}$
Where $c$ corresponds to the time $t$ on the forward branch of the Keldysh contour, and the integral over $c'$ goes over the entire Keldysh contour. For the rest of this article, as is conventional, we will usually simply use the notation $X(t)$ for $X(c)$ where $t$ is the time corresponding to $c$, and whether $c$ is on the forward or reverse branch is inferred from context.

## Keldysh diagrammatic technique for Green's functions

The non-equilibrium Green's function is defined as ${\begin{aligned}iG(x_{1},t_{1},x_{2},t_{2})=\langle n|T\psi (x_{1},t_{1})\psi (x_{2},t_{2})|n\rangle \end{aligned}}$.
Or, in the interaction picture, ${\begin{aligned}iG(x_{1},t_{1},x_{2},t_{2})=\langle n|{\mathcal {T_{c}}}(e^{-i\int _{c}H'(t')dt'}\psi (x_{1},t_{1})\psi (x_{2},t_{2}))|n\rangle \end{aligned}}$ . We can expand the exponential as a Taylor series to obtain the perturbation series
    $\sum _{j=0}^{\infty }\langle n|{\mathcal {T_{c}}}((-i\int _{t}(H'(t',+)+H'(t',-))dt')^{j}\psi (x_{1},t_{1})\psi (x_{2},t_{2}))|n\rangle /j!$.
This is the same procedure as in equilibrium diagrammatic perturbation theory, but with the important difference that both forward and reverse contour branches are included.
If, as is often the case, $H'$ is a polynomial or series as a function of the elementary fields $\psi$, we can organize this perturbation series into monomial terms and apply all possible Wick pairings to the fields in each monomial, obtaining a summation of Feynman diagrams. However, the edges of the Feynman diagram correspond to different propagators depending on whether the paired operators come from the forward or reverse branches. Namely,
    $\langle n|{\mathcal {T_{c}}}\psi (x_{1},t_{1},+)\psi (x_{2},t_{2},+)|n\rangle \equiv G_{0}^{++}(x_{1},t_{1},x_{2},t_{2})=\langle n|{\mathcal {T}}\psi (x_{1},t_{1})\psi (x_{2},t_{2})|n\rangle$
    $\langle n|{\mathcal {T_{c}}}\psi (x_{1},t_{1},+)\psi (x_{2},t_{2},-)|n\rangle \equiv G_{0}^{+-}(x_{1},t_{1},x_{2},t_{2})=\langle n|\psi (x_{1},t_{1})\psi (x_{2},t_{2})|n\rangle$
    $\langle n|{\mathcal {T_{c}}}\psi (x_{1},t_{1},-)\psi (x_{2},t_{2},+)|n\rangle \equiv G_{0}^{-+}(x_{1},t_{1},x_{2},t_{2})=\pm \langle n|\psi (x_{2},t_{2})\psi (x_{1},t_{1})|n\rangle$
    $\langle n|{\mathcal {T_{c}}}\psi (x_{1},t_{1},-)\psi (x_{2},t_{2},-)|n\rangle \equiv G_{0}^{--}(x_{1},t_{1},x_{2},t_{2})=\langle n|{\mathcal {\overline {T}}}\psi (x_{1},t_{1})\psi (x_{2},t_{2})|n\rangle$
where the anti-time ordering ${\mathcal {\overline {T}}}$ orders operators in the opposite way as time ordering and the $\pm$ sign in $G_{0}^{-+}$ is for bosonic or fermionic fields. Note that $G_{0}^{--}$ is the propagator used in ordinary ground state theory.
Thus, Feynman diagrams for correlation functions can be drawn and their values computed the same way as in ground state theory, except with the following modifications to the Feynman rules: Each internal vertex of the diagram is labeled with either $+$ or $-$, while external vertices are labelled with $-$. Then each (unrenormalized) edge directed from a vertex $a$ (with position $x_{a}$, time $t_{a}$ and sign $s_{a}$) to a vertex $b$ (with position $x_{b}$, time $t_{b}$ and sign $s_{b}$) corresponds to the propagator $G_{0}^{s_{a}s_{b}}(x_{a},t_{a},x_{b},t_{b})$. Then the diagram values for each choice of $\pm$ signs (there are $2^{v}$ such choices, where $v$ is the number of internal vertices) are all added up to find the total value of the diagram.