  We propose a generalisation of the $T \bar{T}$ deformation to curved spaces
by defining, and solving, a suitable flow equation for the partition function.
We provide evidence it is well-defined at the quantum level. This proposal
identifies, for any CFT, the $T \bar{T}$ deformed partition function and a
certain wavefunction of 3d quantum gravity. This connection, true for any $c$,
is not a holographic duality --- the 3d theory is a "fake bulk." We however
emphasise that this reduces to the known holographic connection in the
classical limit. Concretely, this means the deformed partition function solves
exactly not just one global equation, defining the $T \bar{T}$ flow, but in
fact a local Wheeler-de Witt equation, relating the $T \bar{T}$ operator to the
trace of the stress tensor. This also immediately suggests a version of the $T
\bar{T}$ deformation with locally varying deformation parameter. We flesh out
the connection to 3d gravity, showing that the partition function of the
deformed theory is precisely a 3d gravity path integral. In particular, in the
classical limit, this path integral reproduces the holographic picture of
Dirichlet boundary conditions at a finite radius and mixed boundary conditions
at the asymptotic boundary. Further, we reproduce known results in the flat
space limit, as well as the large $c$ $S^2$ partition function, and conjecture
an answer for the finite $c$ $S^2$ partition function.
