This could be seen as a followup to the question "How to calculate the distance of stabilizer code?". Summarizing the accepted answer : distance is the minimum weight of the set $$E = \bigl\{e : e \not \in S, e \in \mathrm{Nor}(P_N,S)/(\pm I) \bigr\}$$ where $S$ is the stabilizer group (generated by $K_n$'s in the previous question), and $\mathrm{Nor}(P_N,S)$ is its normalizer in the Pauli group of order $2^{2N+1}$ (where $N$=number of qubits; using real version of group here).

My question is the following: does this hold for $k=0$ stabilizer codes? I suspect that it doesn't always hold but can't find a reference for it... it does seem to work for most cases, but some simple counter examples are also easy to find : take the GHZ state $\tfrac{1}{\sqrt 2}\bigl(\lvert00\rangle + \lvert11\rangle\bigr)$, with $K_1=X_1X_2$ and $K_2=Z_1Z_2$. In this case, $\mathrm{Nor}(P,S)=\pm S$, so the set $E$ is empty. Something is obviously broken in this process: I think that the distance should be 2. What's going on here?

  • $\begingroup$ @unknown: When you say that it works 'for most cases', can you describe an example of a case which does work the way that you expect it to? $\endgroup$ Aug 17, 2020 at 9:31
  • 1
    $\begingroup$ @NieldeBeaudrap Sorry, I was being dumb. $\endgroup$
    – DaftWullie
    Aug 17, 2020 at 11:12
  • $\begingroup$ @NieldeBeaudrap: I tried a few examples from codetables.de : [5,0,3],[8,0,4],[12,0,6] give the expected distance. |Nor(S)/S| =2 so I was a little puzzled why the process worked for these codes and not others. I also tried some graph states and these also worked. Here's a [2,0,2] example : $K_1=X_1Z_1$, $K_2=Z_1X_2$, calculation gives minimum weight error = $Y_1 Y_2$ of weight 2. I work in real version so $Y=XZ$ and not $\imath XZ$. $\endgroup$
    – unknown
    Aug 17, 2020 at 16:39
  • $\begingroup$ Here's a [5,0,3] example : $K_1=X_2Z_4Z_5$, $K_2=Y_2Z_3Y_5$, $K_3=Y_1Y_2X_4$, $K_4=X_1Z_2Y_3Y_5$, $K_5=Y_1Y_2X_3X_5$. errors=$\{Z_1Z_3Z_4,Y_1Y_3Z_5,Z_2Y_3Y_4\}$. $\endgroup$
    – unknown
    Aug 17, 2020 at 16:41
  • 1
    $\begingroup$ @unknown: Note that in the [2,0,2] example that you give, $Y_1 Y_2 = K_1 K_2$, so that operator is in the stabiliser group. (N.B. I'm not sure what precisely you mean by the "real version" of the stabiliser formalism, but you're going to have problems with signs if you adopt a convention which simply ignores the imaginary units of the usual presentation. Adopting your definition of the $Y$ operator, you'd instead say that $Y_1 Y_2 = - K_1 K_2$.) $\endgroup$ Aug 17, 2020 at 16:44

2 Answers 2


Note that in the case $k = 0$, the stabiliser 'code' is a $2^0 = 1$ dimensional subspace of the Hilbert space, which is to say that it consists of a single stabiliser state. This will have somewhat peverse effects on the features such as the 'distance' of the code.

The "code distance" is ultimately defined in terms of the minimum weight of a Pauli operator $E$ which is not 'detectable' (by which I mean, distinguishable from the identity) according to the Knill–Laflamme conditions: $$ \langle \psi_j \rvert E \lvert \psi_k \rangle = C_E \delta_{j,k} $$ where $\lvert \psi_j \rangle, \lvert \psi_k \rangle$ are states in the code. In the case of a 1-dimensional subspace, there is only a single state $\lvert \psi \rangle =: \lvert \psi_0 \rangle$. Thus we would take $j,k \in \{ 0 \}$, so that the $\delta_{j,k}$ term is always equal to $1$. But that means that by simply defining $C_E = \langle \psi \rvert E \lvert \psi \rangle$, the Knill–Laflamme condition is always satisfied. Thus, the 'distance' of the code is defined for a $k = 0$ stabiliser code as the minimum over the empty set.

Using the less abstract approach for stabiliser codes, of considering weights of Pauli operators which are in the normaliser of the code, bear in mind that we're talking then of operators which map the code-space to itself, but are not proportional to a member ofthe stabiliser group. But for $k = 0$ operators which map the state $\lvert \psi \rangle$ to itself are necessarily proportional to stabilisers, so no such operator exists. Again, we are considering the minimum weight over an empty set of operators.

According to your conventions, it could possibly be sensible to talk about the distance as being infinite; but in practise it would be better to say that the distance is undefined.

  • $\begingroup$ This makes sense. There's a similar argument here perimeterinstitute.ca/personal/dgottesman/CO639-2004 about why $k=0$ needs special consideration. However distance for $k=0$ codes seems to be well defined...I see it in use in many sources... $\endgroup$
    – unknown
    Aug 17, 2020 at 16:48
  • $\begingroup$ Sure, there's no problem at all with $k=0$ codes. It's the idea that they should have a finite distance, which I don't think is quite right. $\endgroup$ Aug 17, 2020 at 17:38
  • $\begingroup$ I'm tempted to adapt the infinite distance convention...in that case that does that mean that the state is immune to all errors? this seems hard to accept (...but a great result if true!) That would also make all $k=0$ codes the "same" since they all have the same (infinite) distance...another uncomfortable result... $\endgroup$
    – unknown
    Aug 17, 2020 at 17:56
  • 2
    $\begingroup$ Well, consider what the distance means. It doesn't mean automatic imperviousness to noise: it means that for any finite error, you can detect what the error is in principle, and then correct it if you wish. That's certainly true, but that's due in part to the fact that it's a single state. You don't even need to store / correct it: why not just throw away the state and reprepare it? That's not far from what an 'error correction' procedure to recover the state from a large amount of noise would do, anyway. $\endgroup$ Aug 17, 2020 at 18:07
  • $\begingroup$ That's what I meant by "immune" : you can have the "channel" corrupt any of the qubits but there's a decoder than reverses that error. However you bring out an interesting angle that I didn't think about before : since it's a single state then re-preparing it will have the same affect as correcting any error! I still wonder why it is used in so many sources and what exactly does it mean...maybe it's just the minimum weight of the stabilizer itself but again I'm not sure what that implies. $\endgroup$
    – unknown
    Aug 17, 2020 at 18:59

In the classic paper https://arxiv.org/pdf/quant-ph/9608006.pdf, on page 10, the distance of an $[n,0]$ code is defined as the smallest non-zero weight of any stabilizer in the code. The physical interpretation for this definition given is, "An $[[n, 0, d]]$ code is a quantum state such that, when subjected to a decoherence of $[(d − 1)/2]$ coordinates, it is possible to determine exactly which coordinates were decohered."


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.