Codeword stabilized (CWS) code[13] 


This family of codes strictly generalizes stabilizer codes. They are usually denoted by \( \mathcal{Q} = (\mathcal{G},\mathcal{C}) \) where \(\mathcal{G}\) is a graph and \(\mathcal{C}\) is a \( (n,K,d) \) binary classical code. From the graph we form the unique graph state (stabilizer state) \( |G \rangle \). From the classical code we form Pauli \(Z\)-type operators \( W_i = Z^{c_{i,1}} \otimes \cdots \otimes Z^{c_{i,n}} \), where \(c_{i,j} \) is the \(j\)-th bit of the \(i\)-th classical codeword. The CWS codewords are then \( | i \rangle = W_i | G \rangle \).

There is an alternative description to the one above that is locally Clifford-equivalent. In particular, we can describe CWS codes as \( \mathcal{Q} = (S,\mathcal{W})\) where \(S\) is a stabilizer group and \( \mathcal{W} = \{ w_\ell \}_{\ell = 1}^K \) is a family of \(K\) \(n\)-qubit Pauli strings. We then form CWS codeswords as \( | i \rangle = w_i | S \rangle \), where \( | S \rangle \) is the (unique) stabilizer state of \(S\).

The term CWS was coined in Ref. [2], and their approach is equivalent to another approach [1] based on Boolean functions (see Ref. [4]).


Code distance \(\mathcal{Q} = ( \mathcal{G},\mathcal{C}) \) is upper bounded by the distance of the classical code \(\mathcal{C} \). The diagonal distance is upper bounded by \(\delta + 1\), where \(\delta\) is the minimum degree of \(\mathcal{G}\). Computing the distance is generally \(NP\)-complete, and is \(NP\)-hard for non-degenerate codes [5].


If \( \mathcal{C} \) has an efficient classical encoder, then so does the CWS code \( \mathcal{Q} = (\mathcal{G},\mathcal{C}) \).


There is no known efficient algorithm to decode non-additive (non-stabilizer) CWS codes.Structured error recovery [6], which reduces to syndrome-based recovery for additive (i.e., stabilizer) CWS codes.


See Ref. [7] for an introduction to CWS codes.




  • Movassagh-Ouyang Hamiltonian code — The Movassagh-Ouyang codes overlap the CWS codes but neither family is contained in the other.
  • Spacetime code (STC) — CWS codes have been considered in the context of spacetime replication of quantum data [9,10], while STCs are designed to replicate classical data.
  • XP stabilizer code — The orbit representatives of XP codes play a similar role to the word operators of CWS codes.


V. Aggarwal and A. R. Calderbank, “Boolean Functions, Projection Operators, and Quantum Error Correcting Codes”, IEEE Transactions on Information Theory 54, 1700 (2008) arXiv:cs/0610159 DOI
A. Cross et al., “Codeword Stabilized Quantum Codes”, IEEE Transactions on Information Theory 55, 433 (2009) arXiv:0708.1021 DOI
S. Yu, Q. Chen, and C. H. Oh, “Graphical Quantum Error-Correcting Codes”, (2007) arXiv:0709.1780
Zeng, Bei. Quantum operations and codes beyond the Stabilizer-Clifford framework. Diss. Massachusetts Institute of Technology, 2009.
U. Kapshikar and S. Kundu, “On the Hardness of the Minimum Distance Problem of Quantum Codes”, IEEE Transactions on Information Theory 69, 6293 (2023) arXiv:2203.04262 DOI
Y. Li et al., “Structured error recovery for code-word-stabilized quantum codes”, Physical Review A 81, (2010) arXiv:0912.3245 DOI
M. Grassl and M. Rötteler, “Nonadditive quantum codes”, Quantum Error Correction 261 (2013) DOI
J.-L. Xia, “Quotient Space Quantum Codes”, (2023) arXiv:2311.07265
P. Hayden and A. May, “Summoning information in spacetime, or where and when can a qubit be?”, Journal of Physics A: Mathematical and Theoretical 49, 175304 (2016) arXiv:1210.0913 DOI
P. Hayden et al., “Spacetime replication of continuous variable quantum information”, New Journal of Physics 18, 083043 (2016) arXiv:1601.02544 DOI
Page edit log

Your contribution is welcome!

on (edit & pull request)— see instructions

edit on this site

Zoo Code ID: cws

Cite as:
“Codeword stabilized (CWS) code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022.
@incollection{eczoo_cws, title={Codeword stabilized (CWS) code}, booktitle={The Error Correction Zoo}, year={2022}, editor={Albert, Victor V. and Faist, Philippe}, url={} }
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:

Cite as:

“Codeword stabilized (CWS) code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022.