  We study a random matrix model for the statistical properties of the purity
of a bipartite quantum system at a finite (fictitious) temperature. This
enables us to write the generating function for the cumulants, for both
balanced and unbalanced bipartitions. It also unveils an unexpected feature of
the system, namely the existence of two phase transitions, characterized by
different spectra of the density matrices. One of the critical phases is
described by the statistical mechanics of random surfaces, the other is a
second-order phase transition.
