# What is an example of a non-additive code that is not a CWS code?

A generalization of stabilizer codes are the codeword stabilized codes (CWS), see https://errorcorrectionzoo.org/c/cws.

These encompass stabilizer codes but more broadly also contain some non-additive codes.

What is a simple example of a non-additive quantum code that is not a CWS code?

A simple example of a non-additive code that is not a CWS code is the $$((11,2,3))$$ code given in On the Structure of Additive Quantum Codes and the Existence of Nonadditive Codes .

Theorem 6 of Codeword stabilized quantum codes: algorithm and structure says "All ((n, 2, d)) CWS codes are additive."

Thus, any non-additive $$((n,2,d))$$ code is not CWS. An interesting example, pointed out in the same paper, is the $$((11,2,3))$$ code from On the Structure of Additive Quantum Codes and the Existence of Nonadditive Codes . This code is non-additive, which one can check for example by observing that the weight enumerators are not integers. Thus the code is not CWS.

This $$((11,2,3))$$ code example is especially interesting because the codewords are a uniform superpositions of computational basis states, so the test you give in your answer would fail to detect that this $$((11,2,3))$$ code is not CWS.

In general the test you describe is agnostic about any code whose codewords are (signed) uniform superpositions of computational basis states. Given this $$((11,2,3))$$ example it seems likely that there may be many codes whose codewords are signed uniform superpositions of computational basis states, but which are not CWS codes.

• If the answer is modified to "A CWS code is one that admits a signed uniform superposition and the basis is a power of 2", would that be correct? Commented May 20 at 18:49
• @EricKubischta I think even then there might be weird exceptions because you could have codewords that have power of 2 support but are "fake stabilizer states" like this question quantumcomputing.stackexchange.com/questions/27666/… Probably you need to explicitly require a basis of stabilizer states and then I bet the code must be CWS. That equivalence sounds about right but I'm not totally sure so I asked a new question quantumcomputing.stackexchange.com/questions/38410/… Commented May 20 at 22:02

All $$((n,K,d))$$ CWS codewords can be written as $$|i \rangle = Z_{\gamma_i} | G \rangle$$ where $$| G \rangle$$ is a graph state, $$1 \leq i \leq K$$, and $$\gamma_i \subset \{1,2, \cdots, n\}$$. To be sure, $$Z_{\gamma_i}$$ is a operator that acts with Pauli $$Z$$ on each qubit in $$\gamma_i$$ (and identity elsewhere).

On the other hand, graph states are defined up to normalization by $$| G \rangle = \sum_{\mu = 00\cdots 0}^{11\cdots 1} (-1)^{\frac{1}{2} \mu \Gamma \mu} | \mu \rangle,$$ where $$\Gamma$$ is the adjacency matrix for the graph $$G$$.

It follows that CWS codes can always be written in a form for which all codewords have coefficients of $$\pm 1$$ (up to normalization).

Therefore, any code that does not admit such a basis will be non-CWS.