In this project, we study entanglement in gauge theories and gravitation (string theory). In both cases, the physical Hilbert space does not factorize so that the definition of entanglement becomes problematic. Edge states enable factorisation of the Hilbert space but are not unique. We investigate which definition of edge states corresponds with geometric entanglement entropy based on the replica trick and the relation with distillable entanglement entropy. More generally, we try to uncover the relation between entanglement and emergent gravity.