  Completely entangled quantum states are shown to factorize into tensor
products of entangled states whose dimensions are powers of prime numbers. The
entangled states of each prime-power dimension transform among themselves under
a finite Heisenberg group. We are thus led to examine processes in which
factors are exchanged between entangled states and so consider canonical
ensembles in which these processes occur. It is shown that the Riemann zeta
function is the appropriate partition function and that the Riemann hypothesis
makes a prediction about the high temperature contribution of modes of large
dimension.
