Let $ C $ be an $ [\![n,k]\!] $ quantum error correcting code encoding $ k $ logical qubits into $ n $ physical qubits. Define the weight enumerator polynomial $ A(x) $ of the code as
$$
A(x):=A_0+A_1x+\dots+A_nx^n
$$
where
$$
A_j:=\frac{1}{(2^k)^2} \sum_{p \in P_n,\,\mathrm{wt}(p)=j} |\mathrm{tr}(p \Pi)|^2.
$$
here $ \Pi $ is the projector onto the code space.
Is it the case that the sum of the even weight coefficients $ A_{2j} $
$$
A_0+A_2+A_4+\dots
$$
is always either $ 2^{n-k} $ or $ 2^{n-k-1} $ for an arbitrary $ [\![n,k]\!] $ code?
For stabilizer codes this seems plausible since a stabilizer code always has an even weight subcode which is either the whole code space or exactly half the codespace. If all the stabilizers are even weight we say the code is even. If exactly half the stabilizer are even we say the code is odd. Every stabilizer code is either even or odd.
For an even code $ A_i=0 $ for all $ i $ odd. AS show here Do the coefficients of the weight enumerator polynomial add up to $2^{n-k}$ for any $[\![n,k]\!]$ code? $ \sum_{i } A_i =2^{n-k} $ So for an even code $ \sum_{i \text{even} } A_i =2^{n-k} $ since $ A_i=0 $ for all $ i $ odd. On the other hand for an odd code we have $ \sum_{i \text{even} } A_i =\sum_{i \text{odd} } A_i $. Combining that with $ \sum_{i \text{even} } A_i =2^{n-k} $ we conclude that $ \sum_{i \text{even} } A_i =2^{n-k-1}=\sum_{i \text{odd} } A_i $
So while this fact is true for all even and all odd codes there are non-additive codes which are not even or odd for which this is not true