I'm learning more about enumerator polynomials for quantum error correcting codes (QECCs). What is the relationship between enumerator polynomials and the distance $ d $ of an $ [[n,k,d]] $ quantum code?
For example is there any condition in terms of enumerator polynomials that is sufficient to imply that $ d \geq 2 $ (error detecting) or $ d \geq 3 $ (error correcting)?
Update: Define weight enumerators \begin{align*} A_i &= \frac{1}{4^k} \sum_{E \in \mathcal{E}_i} |Tr(E \Pi)|^2 \\ B_i &= \frac{1}{2^k} \sum_{E \in \mathcal{E}_i} Tr( E \Pi E \Pi) \end{align*} Here $\Pi$ is the code projector and $\mathcal{E}_i$ are the Pauli errors with weight $i$. Then the code has distance $ d $ if and only if $$ A_i=B_i $$ for all $ i \leq d-1 $. In particular note that $ A_0=1=B_0 $ always. So the code has distance $ 2 $ if and only if $$ A_1-B_1=0 $$ And has distance $ 3 $ if and only if $$ A_1-B_1=0=A_2-B_2 $$ As noted in the answer below, the distance $ d $ is the degree of the first nonzero term in the polynomial $ B-A $.