  The theory of error-correcting codes is concerned with constructing codes
that optimize simultaneously transmission rate and relative minimum distance.
These conflicting requirements determine an asymptotic bound, which is a
continuous curve in the space of parameters. The main goal of this paper is to
relate the asymptotic bound to phase diagrams of quantum statistical mechanical
systems. We first identify the code parameters with Hausdorff and von Neumann
dimensions, by considering fractals consisting of infinite sequences of code
words. We then construct operator algebras associated to individual codes.
These are Toeplitz algebras with a time evolution for which the KMS state at
critical temperature gives the Hausdorff measure on the corresponding fractal.
We extend this construction to algebras associated to limit points of codes,
with non-uniform multi-fractal measures, and to tensor products over varying
parameters.
