Density matrices in quantum gravity