# Same weight enumerator iff equivalent by permutations and local unitaries

A non-entangling gate on $$n$$ qubits is an element of the group $$N\Big(\bigotimes_{i=1}^n U(2)\Big)=\bigotimes_{i=1}^n U(2) \rtimes S_n$$ which is generated by $$U(2)$$ acting locally on each qubit as well as all $$SWAP$$ gates between qubits.

Let $$C_1,C_2$$ be $$[[n,k,d]]$$ quantum codes. In other words, $$n_1=n_2, k_1=k_2,d_1=d_2$$. If $$C_1, C_2$$ are equivalent by non-entangling gates then they have the same weight enumerator.** Is the converse true? That is, if $$C_1,C_2$$ have the same weight enumerator must they be related by a non-entangling gate?

Note that the weight enumerator already gives $$d$$ (it is the least degree of a nonzero term in $$B(x)-A(x)$$ enumerators polynomials and distance for a quantum error correcting code, note that $$A(x)$$ determines $$B(x)$$ by quantum McWilliams identity) and gives $$n-k$$ (because $$2^{n-k}=A(1)$$ Do the coefficients of the weight enumerator polynomial add up to $2^{n-k}$ for any $[\![n,k]\!]$ code?) so two different codes on $$n$$ qubits with the same weight enumerator must have the same parameters $$[[n,k,d]]$$.

**For a reference for this fact see top of page 4 in

Quantum Weight Enumerators

which in turn refers to the discussion below equation (9) in

Quantum MacWilliams Identities

No. There are 16 inequivalent $$[[7,1,3]]$$ codes but they correspond to only 10 weight enumerators. For reference see https://arxiv.org/pdf/0709.1780.pdf.