  A quantum code is a subspace of a Hilbert space of a physical system chosen
to be correctable against a given class of errors, where information can be
encoded. Ideally, the quantum code lies within the ground space of the physical
system. When the physical model is the Heisenberg ferromagnet in the absence of
an external magnetic field, the corresponding ground-space contains all
permutation-invariant states. We use techniques from combinatorics and operator
theory to construct families of permutation-invariant quantum codes. These
codes have length proportional to $t^2$; one family of codes perfectly corrects
arbitrary weight $t$ errors, while the other family of codes approximately
correct $t$ spontaneous decay errors. The analysis of our codes' performance
with respect to spontaneous decay errors utilizes elementary matrix analysis,
where we revisit and extend the quantum error correction criterion of Knill and
Laflamme, and Leung, Chuang, Nielsen and Yamamoto.
