  We obtain exact formulae for three basic quantities in random conformal
geometry that depend on the modulus of an annulus. The first is for the law of
the modulus of the Brownian annulus describing the scaling limit of uniformly
sampled planar maps with annular topology, which is as predicted from the ghost
partition function in bosonic string theory. The second is for the law of the
modulus of the annulus bounded by a loop of a simple conformal loop ensemble
(CLE) on a disk and the disk boundary. The formula is as conjectured from the
partition function of the O$(n)$ loop model on the annulus derived by
Saleur-Bauer (1989) and Cardy (2006). The third is for the annulus partition
function of the SLE$_{8/3}$ loop introduced by Werner (2008), confirming
another prediction of Cardy (2006). The physics principle underlying our proofs
is that 2D quantum gravity coupled with conformal matters can be decomposed
into three conformal field theories (CFT): the matter CFT, the Liouville CFT,
and the ghost CFT. At the technical level, we rely on two types of
integrability in Liouville quantum gravity, one from the scaling limit of
random planar maps, the other from the Liouville CFT. We expect our method to
be applicable to a variety of questions related to the random moduli of
non-simply-connected random surfaces.
