# What are the logical 0 and 1 states in the 9 qubit 'surface 17' code?

I am trying to implement the 9 qubit 'surface 17' code, however it appeared to me that I couldn't find in the literature what the encoding states for such a physical system are.

I have found in the paper Low-distance Surface Codes under Realistic Quantum Noise that one may use $$\bar{X}=X_2X_4X_6$$ and $$\bar{Z}=Z_0Z_4Z_8$$ as logical operator (qubits are numbered 0 to 8), however I don't quite understand why these should be chosen and how they are recovered. Isn't checking only 3/9 qubit more prone to errors ?

• "Surface 17"? What is that supposed to be? Dec 10, 2022 at 17:53
• It's the code you can see above with 9 data qubits and 8 checks (9+8=17), so they chose this name i guess. Dec 21, 2022 at 11:51
• Yes, but it is very non-standard. Dec 21, 2022 at 13:01

To find the logical operators starting from a stabilizer set, you need the former to be stabilized by the latter.

This happens iff all the stabilizers commute with the operators, that can be considered logical (as their application to any logical state is closed into the code scheme space).

You can verify yourself on table II of the cited paper that the operators you mention commute with all the Z and X stabilizers.

I.e. X operators have one common qubit with X stabilizers, while two common qubits (or zero) with Z stibilizers. The Z operators case is symmetrical.

To add some resources to Daniele's answer, there is an algorithm similar to Gaussian elimination that permits you to efficiently find these logical operators (that commute with all the given stabilizing operators) for any quantum code.

It is described in a few places, most conveniently in Gottesman's PhD thesis, chapter 4.

The algorithm is also implemented in the QuantumClifford.jl library among others, with the MixedDestabilizer constructor. E.g. with the Steane code:

julia> MixedDestabilizer(S"___XXXX
_XX__XX
X_X_X_X
___ZZZZ
_ZZ__ZZ
Z_Z_Z_Z")
𝒟ℯ𝓈𝓉𝒶𝒷━━━
+ Z______
+ _Z_____
+ ___Z___
+ __X____
+ ____X__
+ ______X
𝒳ₗ━━━━━━━
+ __X_XX_
𝒮𝓉𝒶𝒷━━━━━
+ X_X_X_X
+ _XX__XX
+ ___XXXX
+ Z_ZZ_Z_
+ ZZ__ZZ_
+ ZZ_Z__Z
𝒵ₗ━━━━━━━
+ _Z_Z_Z_