In a recent paper, Shor and Laflamme define two "weight enumerators" for qu
antum error-correcting codes, connected by a MacWilliams transform, and use
them to give a linear-programming bound for quantum codes. We extend their
work by introducing another enumerator, based on the classical theory of s
hadow codes, that tightens their bounds significantly. In particular, nearl
y all of the codes known to be optimal among additive quantum codes (codes
derived from orthogonal geometry) can be shown to be optimal among all quan
tum codes. We also use the shadow machinery to extend a bound on additive c
odes to general codes, obtaining as a consequence that any code of length i
t can correct at most [n+1/6] errors.