# The analogy between temperature and imaginary time

There are many statements about the relation between time and temperature in statistical physics and quantum field theory, the basic idea is to interpret (inverse) temperature in statistics as "time" in quantum field theory. So the thermal fluctuation is kind of quantum fluctuation in quantum mechanics.

However, if I continue to think about this analog when include gravity, I feel hard to imagine the energy momentum tensor in term of temperature instead of time.

Could you physicists give me some hint about that?

The idea is to interpret temperature as "duration in imaginary time". You seem to be thinking of it as something more like "direction in time". More precisely: Suppose you compute the expectation value $Z[O]$ of an observable $O$ using the path integral in a universe where time is periodic with period $P$. You can vary $P$, so you can think of this expectation value as a function of $P$. If you set $P = -i\hbar/kT$, you will discover that the path integral formula transforms into the formula for expectation value with respect to the Boltzmann distribution associated to the Euclidean action.
In a covariant relativistic setting, you need to replace time $t$ by the spacetime position 4-vector $x$, energy $H$ by the energy-momentum 4-vector $P$, and the temperature by a temperature 4-vector $\beta$. In place of the unitary map $e^{-itH/\hbar}$ you get $e^{-ix\cdot P/\hbar}$, and in place of the the canonical density matrix $e^{-\beta H}$ you get $e^{-\beta\cdot P}$. Then analytic continuation works as in the nonrelativistic case.