  While quantum weight enumerators establish some of the best upper bounds on
the minimum distance of quantum error-correcting codes, these bounds are not
optimized to quantify the performance of quantum codes under the effect of
arbitrary quantum channels that describe bespoke noise models. Herein, for any
Kraus decomposition of any given quantum channel, we introduce corresponding
quantum weight enumerators that naturally generalize the Shor-Laflamme quantum
weight enumerators. We establish an indirect linear relationship between these
generalized quantum weight enumerators by introducing an auxiliary exact weight
enumerator that completely quantifies the quantum code's projector, and is
independent of the underlying noise process. By additionally working within the
framework of approximate quantum error correction, we establish a general
framework for constructing a linear program that is infeasible whenever
approximate quantum error correcting codes with corresponding parameters do not
exist. Our linear programming framework allows us to establish the
non-existence of certain quantum codes that approximately correct amplitude
damping errors, and obtain non-trivial upper bounds on the maximum dimension of
a broad family of permutation-invariant quantum codes.
