Modular Hamiltonians and modular invariance In the literature you will often see the use of modular Hamiltonians in e.g. entanglement entropy calculations in CFT's. The modular Hamiltonian $H$ is given in terms of the density matrix
$$\rho = e^{-H}$$
It is my understanding that for a CFT to be well defined on a general Riemann surface, modular invariance of the partition function (on the torus, say) is a requirement. 
In this case then, my overall question is: how, if at all, is the modular Hamiltonian related to modular invariance? 
More specifically, I understand that the modular Hamiltonians generate 'modular flow', and although I don't have a clean definition of what this means, it seems to just imply that acting on some operator generates a unitary transformation in some 'modular time', and the term modular just seems redundant. What does 'modular' mean in this context?
 A: In QFT, the reduced density matrix can be written as, 
\begin{equation}
\rho = \frac{e^{-\beta H}}{\mathrm{Tr} (e^{-\beta H})} 
\end{equation}
where $H$ is the modular Hamiltonian often used in QFT literature while it is called entanglement Hamiltonian in the condensed matter theory literature. See the first few minutes of this talk (https://www.perimeterinstitute.ca/videos/modular-hamiltonians-2d-cft) by John Cardy. 
The denominator is included just to ensure that $\mathrm{Tr} \rho = 1$. 
The origin of the name "modular Hamiltonian" goes back to the Tomita-Takesaki modular theory where an operator of the form $ \Delta = e^{-K}$ is called the modular operator and $K$ is called the modular Hamiltonian. In general, $K$ is a complicated nonlocal operator.
See Definition 1.21 of https://arxiv.org/abs/1301.1836 or the book "Local Quantum Physics: Fields, Particles, Algebras" by R. Haag for details (Chapter 5). 
In https://arxiv.org/abs/1102.0440, it was shown that in some cases one can write this modular Hamiltonian in terms of stress-energy tensor of a CFT. 
(Extra note: The author is also part of the famous Haag–Lopuszański–Sohnius theorem which was a foundation work in supersymmetry introducing the non-trivial extension of the Poincare algebra, namely the supersymmetric algebra)
