Subsystem CSS codes, a tighter stabilizer-to-CSS mapping, and Goursat's Lemma

The CSS code construction is a powerful framework used to express features of a quantum code in terms of a pair of underlying classical codes. Its subsystem extension allows for similar expressions, but the general case has not been fully explored. Extending previous work of Aly, Klappenecker, and Sarvepalli [quantph/0610153], we determine subsystem CSS code parameters, express codewords, and develop a Steane-type decoder using only data from the two underlying classical codes. Generalizing a result of Kovalev and Pryadko [Phys. Rev. A 88 012311 (2013)], we show that any subsystem stabilizer code can be"doubled"to yield a subsystem CSS code with twice the number of physical, logical, and gauge qudits and up to twice the code distance. This mapping preserves locality and is tighter than the Majorana-based mapping of Bravyi, Terhal, and Leemhuis [New J. Phys. 12 083039 (2010)]. Using Goursat's Lemma, we show that every subsystem stabilizer code can be constructed from two nested subsystem CSS codes satisfying certain constraints, and we characterize subsystem stabilizer codes based on the nested codes' properties.


I. INTRODUCTION AND SUMMARY OF RESULTS
An extensive theory of quantum error-correcting codes has been developed to protect quantum computers from noise [1][2][3] .Qualitatively, a quantum error-correcting code describes how to "hide" quantum information within a protected subsystem of a quantum system, such that noise within the quantum system can be detected and removed from the protected subsystem.The class of quantum error-correcting codes called stabilizer codes [4,5] remains the most promising route to a working and robust quantum computer, in part due to extra structure that is useful for promptly detecting and correcting errors.
We are interested in the special class of subsystem stabilizer codes [6,7] , which correspond to the nontrivial normal subgroups of a Pauli group.While subsystem stabilizer codes can be derived from subspace stabilizer codes by using only a subset of the original logical qudits to store quantum information, such codes can exhibit advantageous and/or inherently different properties from subspace stabilizer codes such as lower weights of check operators [8], new fault-tolerant protocols [9], the association with more general types of anyon theories in two dimensions [10], as well as single-shot error correction in three dimensions [11,12].The extra data used to define subsystem stabilizer codes yields a richer code structure, warranting its own investigation.
A large part of our work studies subsystem CSS codes [13,14] , where the corresponding normal subgroup admits a generating set consisting of X-type and Z-type Pauli operators.Subsystem CSS codes generalize sub- * mliu24@amherst.eduspace CSS codes [15][16][17] , of which there are many useful examples [18,19], recently culminating in the first asymptotically good quantum low-density parity-check codes [20][21][22].Subspace CSS codes have rich connections to classical coding theory [23][24][25] and homology theory [26][27][28], and they admit a recovery procedure that utilizes classical linear codes to independently correct Xtype and Z-type Pauli errors [15,29].Thus, it is interesting to investigate the generalization of subspace CSS codes to the subsystem setting.Indeed, many subsystem stabilizer codes are CSS [30][31][32], so a general theory of subsystem CSS codes would apply to a broad class of examples developed to date.
To study subsystem CSS codes, we adopt a linearalgebraic perspective that streamlines previous proofs and distills the essential mathematical ideas [33].This places subsystem CSS codes on the same footing as subspace CSS codes, allowing us to generalize many important features of subspace CSS codes to the subsystem setting.
Our main tool is the symplectic representation, which allows us to view a subsystem stabilizer code as a subspace of a vector space by considering Pauli groups modulo phase factors.In this representation, the structure and parameters of a subsystem stabilizer code are encoded in a "tower" of subspaces, which can then be manipulated using tools from linear algebra [34][35][36] to yield several general results.
Our results include a mapping from subsystem stabilizer codes to subsystem CSS codes, a fleshing out of the connection between subsystem CSS codes and classical coding theory, a general recovery procedure for subsystem CSS codes, and a characterization of subsystem stabilizer codes based on Goursat's Lemma from group theory.
In Section II, we review the theory of Pauli groups and subsystem stabilizer codes, and we explain how to translate these objects to the linear algebraic framework.
In Section III, we review the subspace CSS construction and its generalization to the subsystem case.While the subspace CSS construction utilizes two classical linear codes [37] under certain constraints, the subsystem CSS construction utilizes two classical linear codes with no constraints.We express the logical and gauge codewords in terms of the two underlying classical linear codes.
In Section IV, we show that the performance of subsystem CSS codes is comparable to that of subsystem stabilizer codes.More precisely, we show that every modularqudit subsystem stabilizer code can be "doubled" to yield a subsystem CSS code with twice the number of physical, logical, and gauge qudits and up to twice the code distance.
In Section V, we present an error-correction procedure for subsystem CSS codes that generalizes the wellknown Steane procedure for subspace CSS codes (see, e.g., [15,29,38]).While specific instances of this procedure have been presented previously [39][40][41][42][43][44][45], we are unaware of a presentation of the general case that uses only information from the underlying classical linear codes.Our error-correction procedure for subsystem CSS codes decodes up to arbitrary actions on the gauge qudits, and the corresponding classical step in our error-correction procedure decodes up to prescribed "redundant" subcodes obtained from the underlying classical codes.We explore an alternative decoder that generalizes the recovery procedure for the Bacon-Shor code [30] in Appendix C.
In Section VI, we show that every subsystem stabilizer code can be constructed from two subsystem CSS codes satisfying certain constraints, much as every subsystem CSS code can be constructed from two classical codes.We investigate the structure of a given subsystem stabilizer code in terms of its two underlying subsystem CSS codes, and we define two code families that can be viewed as generalizations of subsystem CSS codes from this perspective (see Fig. 2).
Finally, we provide concluding remarks in Section VII.Most proofs have been deferred to Appendix A for readability.

II. PRELIMINARIES
In Section II A, we review the construction of Pauli groups.In Section II B, we explain how to interpret Pauli groups as vector spaces, and we review the related theory of bilinear forms on vector spaces.In Section II C, we review the construction of subsystem stabilizer codes.Finally, in Section II D, we explain how to interpret subsystem stabilizer codes as subspaces of vector spaces, and we define the properties of subsystem stabilizer codes in the vector space setting.Consider a quantum system with n prime qudits, each of dimension p.The Hilbert space of this system is given by the quantization of G := F n p , i.e., Acting on this space is a special class of linear operators called Pauli operators, denoted by X a , Z b for any a, b ∈ G.For any basis vector |g⟩ ∈ H, the Pauli operators act as where • is the usual dot product on G.One verifies the relations among the Pauli operators.We define the weight of a Pauli operator to be the number of qudits on which it acts nontrivially.The Pauli operators generate the Pauli group, which is given explicitly by We remark that in other works, the phase factors included in the Pauli group may differ depending on whether p is odd or even [10,46,47].This will not matter much for our work, since we will henceforth consider Pauli groups modulo phase factors.

B. Pauli groups as vector spaces
In light of Eqs. ( 4) and ( 6), one sees that the Pauli group modulo phases is essentially equivalent to the vector space G × G. Formally, letting denote the collection of phases in the Pauli group, one verifies that the map is a vector space isomorphism.For most of this work, it will be convenient to view the Pauli group modulo phases as the vector space G×G.We review the necessary theory below [33,34].
and nondegenerate if We call ξ a form if it is bilinear and nondegenerate.Henceforth, ξ will denote a symmetric or antisymmetric form, θ will denote a symmetric form, and ω will denote an antisymmetric form.Every subspace H ≤ G has a complement with respect to ξ One verifies that dim H + dim H ξ = dim G and ( 14) Moreover, if K ≤ G is another subspace, then A symmetric form θ on G passes naturally to a symmetric form on G × G, which by abuse of notation we also call θ (note that for the Pauli group, θ is the dot product).In addition, the original symmetric form θ on G induces the antisymmetric form on G × G (note that for the Pauli group, ω encodes the commutation of the Pauli operators as in Eq. ( 5)).Direct products behave well with respect to these induced forms.Indeed, if For any a = (a 1 , . . . Note that the weight of a Pauli operator X a Z b is equal to the symplectic weight of the corresponding vector (a, b).
Finally, for any algebraic objects G, H, we write to indicate that H ≤ G and, if G, H are vector spaces, that dim G/H = l.

C. Subsystem stabilizer codes
A subsystem stabilizer code can be interpreted as a subspace stabilizer code with some of its logical qudits relegated to gauge qudits.This necessitates the use of a "gauge group" to determine the gauge qudits.
In the usual formalism for subsystem stabilizer codes [6,47], one begins with an abelian "stabilizer group" S ≤ P whose intersection with Φ is trivial.Then, one considers the centralizer of S, denoted C(S), which is the subgroup of all Pauli operators that commute with everything in S. Finally, one selects a "gauge group" G ≤ C(S) whose center is ⟨Φ, S⟩.These relationships can be summarized in the tower of normal subgroups which encodes the parameters of the subsystem stabilizer code.Indeed, the number of logical (resp.gauge) qudits in G is given by half the size of any minimal generating set for C(S)/G (resp.G/⟨Φ, S⟩).Moreover, the distance of G is defined to be the minimum weight of a Pauli operator in C(S) \ G.
Observe that every tower as in Eq. ( 27) determines a gauge group Φ ≤ G ≤ P. Conversely, every gauge group Φ ≤ G ≤ P determines a tower as in Eq. (27).Thus, in the usual formalism, a subsystem stabilizer code is defined to be a subgroup Φ ≤ G ≤ P.Moreover, one calls G a subsystem CSS code if G admits a generating set that consists only of X-type or Z-type Pauli operators.
Any subsystem stabilizer code G generates a von Neumann algebra Alg G of linear operators on the physical Hilbert space H.This algebra induces an orthogonal de-composition of H as [6,47,48] where L ⊗ G is the subspace of H fixed by the stabilizer group S. With respect to this decomposition, the algebra Alg G takes the form where End(G) denotes the collection of linear operators on G.We call G a subspace stabilizer code if the gauge space G is one-dimensional.

D. Subsystem stabilizer codes as subspaces of vector spaces
In this work, we find it convenient to consider the tower in Eq. ( 27) modulo phase factors, since this allows us to apply tools from linear algebra to analyze subsystem stabilizer codes.To begin, recall that P/Φ ∼ = G × G, so there exists some subspace H ≤ G × G corresponding to the gauge group modulo phases, G/Φ ∼ = H.Now, let C(G) denote the centralizer of G. Then by Eq. ( 5), we have C(G)/Φ ∼ = H ω .Since ⟨Φ, S⟩ is the center of G and C(S) is the centralizer of ⟨Φ, S⟩, we have We claim that this tower still encodes the parameters of the original subsystem stabilizer code.To see this, note that by the third and fourth isomorphism theorems [49], we have so the number of logical and gauge qudits can still be detected in Eq. (30).Moreover, note that the weight of a Pauli operator is phase invariant, so the code distance can still be detected in Eq. (30).This motivates the following proposition, which describes the parameters of a subsystem stabilizer code in the vector space setting (see also [50,Theorem 5]).
Proposition 1.Let ω be an antisymmetric form on G × G, let H ≤ G × G, and let n := dim G. Then for some k, r ∈ Z.Moreover, we can write for some d ∈ Z.
Proof.See Appendix A 1.
This discussion leads to an alternative definition of subsystem stabilizer codes in the vector space setting.
With n, k, r, d as in Proposition 1, we say that H encodes k logical qudits and r gauge qudits into n physical qudits, and that H has distance d.To summarize these parameters, we call H an [[n, k, r, d]] code.

III. SUBSYSTEM CSS CODES
In this section, we summarize what is known about subsystem CSS codes, and we fill in some details that, to our knowledge, have been missing in the general case.
Subsystem CSS codes are constructed from two classical linear codes C 1 and C 2 , which are subspaces of the vector space G = F n p .The subsystem CSS construction does not require any relations between the two classical codes.Our construction is the same as that in Ref. [13,Corollary 4] via the association C 1 ↔ H X and C 2 ↔ H Z ; we define the gauge group to be the direct product of the two classical codes, i.e., Restricting to the subspace case requires additionally that the gauge group and stabilizer group coincide up to phases, which forces the gauge group to be abelian.This imposes the relations which are the well-known relations between the two classical codes in the subspace CSS construction.
Dictionary between the names (first column), Pauli group representations (second column), and vector space representations of seven components of a subsystem stabilizer code (third column), subsystem CSS code (fourth column), and subspace CSS code (fifth column) (see also [51,Table 2]).For a subsystem stabilizer code, these components are derived from one object -the gauge group H -up to the phases of the stabilizer group elements.For a subsystem CSS code, these components are derived from two objects -HX and HZ -which are two unrelated classical linear codes.Imposing the relations in Eq. ( 36) yields the subspace CSS construction.
In general, H X does not have to be a subspace of H θ Z , and the overlap between the two spaces controls the parameters of the subsystem CSS code.For example, suppose that we fix the dimensions of H X and H Z , but we choose H Z such that H θ Z has less overlap with H X .Then the resulting subsystem CSS code encodes more logical and gauge qudits into the same number of physical qudits.This is demonstrated in the following proposition, which expresses the tower in Eq. ( 33) and the code parameters in Proposition 1 in terms of H X and H Z .
be the minimum weight of a non-gauge X-type logical operator, and let be the minimum weight of a non-gauge Z-type logical operator.Then Proof.See Appendix A 2.
The above tower (Eq.( 37)) is summarized in the fourth column of Table I, while the fifth column shows the consequences of the subspace restriction (Eq.( 36)).Each subspace in these columns is a direct product, where the second factor is obtained from the first factor by switching the letters X and Z.This illustrates the X ↔ Z symmetry of the CSS construction.
Recall that the subspace CSS construction yields a simple expression for a basis of logical codewords in terms of cosets of the underlying classical codes [15,29,38].Indeed, the logical X-type Paulis commute and generate the entire codespace (up to scalars) when acting on the all-zero logical state, so their labels -cosets of H X in H θ Z -form a complete set of quantum numbers with which we can label a basis of logical codewords.Since a subsystem code can be interpreted as a subspace code with some of its logical qudits relegated to gauge qudits, we can extend this construction to subsystem CSS codes.
In the subsystem case, the logical and gauge qudits are labeled by elements of their own subspaces, (H X + H θ Z )/H X and H X /(H X ∩ H θ Z ).A basis for the codespace is given by the collection of vectors of the form |l, g⟩ := 1 where l and g represent elements in ( , respectively (see Appendix D).This reduces to the subspace CSS construction upon imposing Eq. (36).

IV. STABILIZER-TO-CSS MAPPING
In this section, we show that every subsystem stabilizer code can be used to construct a subsystem CSS code with comparable parameters.Our construction is simple to express in the notation of Sections II A and II C. Namely, if G is a subsystem stabilizer code generated by X aj Z bj 2r j=1 , then the corresponding subsystem CSS code ∆(G) is generated by X aj ⊗ X bj , Z bj ⊗ Z −aj 2r j=1 (see Examples 1, 2, and 3).However, to prove that the codes G and ∆(G) do indeed have comparable parameters, it is convenient to work in the vector space formalism introduced in Sections II B and II D. Thus, we define our mapping ∆ in the vector space setting, and we exhibit its key properties in the following lemma.
For any Then for any H, K ≤ G × G, we have That is, ∆ is a lattice embedding that respects ωcomplement and doubles dimension.
Then for any subspace H ≤ G × G, we have Thus, we have where the second line holds by Eq. ( 46), and the third line holds by Eq. ( 21).To verify Eq. (44a), observe that To verify Eq. (44b), observe that Finally, to verify Eq. (44d), note that Ψ is an isomorphism on G×G, and take the dimension of the right-hand side of Eq. (43).
We are now ready to state and prove the main result of this section.
Moreover, if H admits a collection of generators with symplectic weight at most w, then ∆(H) admits a collection of generators with symplectic weight at most 2w.

Proof. Apply ∆ to the tower
to obtain the tower To bound d ′ , first note that by Proposition 2 along with Eq. ( 46), it follows that the tower in Eq. ( 51) is equal to the tower Since the map Ψ is weight-preserving, it follows from Proposition 2 that Now, for any x ∈ G × G, we have Minimizing over (H + H ω ) \ H, we find that as needed.
Intuitively, our mapping in Eq. ( 43) embeds two copies of the subsystem stabilizer code H into the subsystem CSS code ∆(H).One copy H × 0 consists entirely of Xtype Pauli operators, while the other (isomorphic) copy 0×Ψ(H) consists entirely of Z-type Pauli operators.This is shown explicitly in Eq. ( 52), which explains why ∆ can be called a "doubling" mapping.
We remark that Theorem 1 can be generalized to subsystem stabilizer codes over modular qudits (see Appendix B).Now, we illustrate our construction with three examples.
Example 1 (Five-qubit code).Consider the [[5, 1, 0, 3]] code [52] , which is the smallest subspace stabilizer code that can correct any single-qubit Pauli error.Note that the [[5, 1, 0, 3]] code does not admit a CSS representation under single-qubit Clifford rotations.The stabilizer group is ( Example 2 (Double semion code).The double semion code is a topological subspace stabilizer code [53] encoding one logical qubit.To define the code, we place one 4-dimensional qudit on each edge of a square lattice with periodic boundary conditions.Then, we specify the gauge group, which is generated by the four Pauli operators per unit cell, where Note that the double semion code is not a subspace CSS code.In fact, one can argue that there does not exist a shallow depth Clifford circuit transforming the double semion code into a subspace CSS code.Indeed, if such a circuit exists, then one can define a commuting projector Hamiltonian which is stoquastic [54], and whose ground state lies in the double semion topological phase.However, it is known that the double semion phase has an intrinsic sign problem [55,56].
Although the double semion code is not Clifford equivalent to a subspace CSS code, one can apply the mapping in Lemma 1 and Theorem 1 to construct a subspace CSS code with parameters comparable to that of the double semion code.The resulting subspace CSS code has two physical qudits per edge and eight stabilizer generators per unit cell given by Here, we use the shorthand X a X b to mean X a ⊗ X b (as opposed to operator multiplication) and similarly for the Z-type operators.
It would be interesting to determine the phase of matter corresponding to the subspace CSS code above.This code cannot be two copies of the double semion code due to the sign problem, but we conjecture that this code is equivalent to two copies of a Z 2 toric code.We leave further investigation of this point to future work. where Since each vertex hosts three checks of XX, Y Y , and ZZ type, there does not exist a shallow depth Clifford circuit transforming the Z N subsystem code into a subsystem CSS code.However, using the mapping in Lemma 1 and Theorem 1, we can construct a subsystem CSS code with comparable parameters.This code is generated by the six checks The proof of Theorem 1 suggests a general strategy for constructing subsystem CSS codes from subsystem stabilizer codes.Indeed, any function ∆ satisfying Eq. ( 44) yields a mapping of codes that doubles the number of physical, logical, and gauge qudits.Moreover, by modifying Eq. (44d) appropriately, one can allow ∆ to map to subspaces of G m × G m for any m ∈ N, thus producing [[mn, mk, mr, d ′ ]] subsystem CSS codes as output.We hope that the proof of Theorem 1 and the related linear algebraic ideas will inspire new mappings from subsystem stabilizer codes to subsystem CSS codes.
We remark that results analogous to Theorem 1 have been obtained previously [58][59][60] With some modifications, it is possible to demonstrate the validity of the mappings in [58][59][60] by following the general proof structure in Lemma 1 and Theorem 1.

V. RECOVERY PROCEDURE FOR SUBSYSTEM CSS CODES
Having shown that subsystem CSS codes achieve performance comparable to that of subsystem stabilizer codes, we now study subsystem CSS codes in greater detail.In this section, we present a recovery procedure to correct an unknown Pauli error affecting the physical Hilbert space of a subsystem CSS code.Our recovery procedure generalizes the usual Steane-type decoder for subspace stabilizer codes [15,29,38] to the subsystem setting.
To begin, let H = H X × H Z ≤ G × G be a subsystem CSS code.Let L⊗G ≤ H be the codespace of H, i.e., the fixed space of the stabilizer group of H. Suppose that a code state is corrupted by a Pauli error X a Z b ∈ P, where (a, b) ∈ G × G. Our recovery procedure identifies the error (a, b) up to some unknown gauge term in H X × H Z .The first step in our recovery procedure is purely quantum: in Section V A, we use gauge generator measurements to determine the syndrome of the Pauli error.The second step in our recovery procedure is purely classical: in Section V B, we use two classical linear codes to identify the Pauli error up to gauge terms.Our discussion focuses on correcting the X-component of the error; correcting the Z-component is similar.

A. Quantum step: syndrome measurement
We determine the syndrome of the Pauli error by measuring gauge generators.Usually, the syndrome of a Pauli error is defined to be its commutation with each of the stabilizer generators.In the linear algebraic framework, the syndrome of a Pauli error is defined (for subsystem CSS codes) as follows. and be the canonical projections.We call Syn X (a) the syndrome of a and similarly for b.
For intuition, note that the space H X +H θ Z is precisely the space of all X-type logical operators, i.e., the space of all X-type Pauli operators that commute with all the Z-type stabilizers in H Z ∩ H θ X .Thus, the syndrome of an X-type error a is precisely the set of all X-type Pauli operators with the same Z-type stabilizer commutations as a.
Now, our goal is to use gauge generator measurements to determine the syndrome of a.To begin, fix bases for the spaces Observe that for each basis vector s Z in H Z ∩ H θ X , we have for some c h Z ∈ F, so That is, every Z-type stabilizer generator Z s Z can be written as a product of Z-type gauge generators Z h Z .Now, the stabilizer generators X s X , Z s Z and the Z-type gauge generators Z h Z all commute, so there exists an orthonormal basis {|e i ⟩} i for H in which the X s X , Z s Z , and Z h Z are all diagonal.Write the corrupted state in this basis, i.e., where the ψ i ∈ C \ 0. Since |ψ⟩ ∈ L ⊗ G, by applying Z s Z to both sides above, we find that for each |e i ⟩ in Eq. ( 74).Similarly, applying X s X to both sides in Eq. ( 74), we find that for each |e i ⟩ in Eq. ( 74).Now, since the |e i ⟩ are also eigenstates of the Z h Z , measuring any Z h Z projects the corrupted state X a Z b |ψ⟩ onto a subspace spanned by some subset of the |e i ⟩ in Eq. ( 74).Thus, by Eq. ( 73), if we measure each gauge generator Z h Z and multiply each corresponding measurement outcome c h Z times, we obtain the value e 2πi p θ(s Z ,a) , from which we can determine θ(s Z , a).Repeating this for each s Z , we can determine the image of a under the linear map a → s Z θ(s Z , a)s Z on G. Since this map has kernel We claim that this procedure does not disturb the logical component of the corrupted state.To see this, recall that the gauge generators Z h Z are of the form for some unitaries U τ G ∈ End(G).Since any projection onto an eigenspace of Z h Z can be written as a polynomial in Z h Z , any measurement of Z h Z effects a projection of the form , where the P τ G ∈ End(G) are some projections.Thus, after measuring the Z h Z , the corrupted state is of the form G ⟩ still belongs to the codespace L ⊗ G, one can apply an analogous procedure to determine Syn Z (b) by measuring the X-type gauge generators X h X , and after this procedure, the state of the system is X a Z b (|ψ L ⟩ ⊗ |ψ ′′ G ⟩) for some |ψ ′′ G ⟩ ∈ G.This concludes the first step in our recover procedure.
We remark that our syndrome measurement procedure uses homogeneous scheduling of gauge generator measurements.That is, in our procedure, all Z-type gauge generators are measured, and subsequently all X-type gauge generators are measured.However, other measurement schedules might be relevant for fault-tolerant implementations of our recovery procedure; this is related to the notion of "gauge fixing" [44,62].Indeed, the special case of our recovery procedure for subspace CSS codes (i.e., the Steane recovery procedure) is fault-tolerant [38].Future work could investigate potential fault-tolerant implementations of our generalized recovery procedure for subsystem CSS codes.

B. Classical step: error recovery
In the first step of our recovery procedure, we determined the syndrome Syn X (a) of the error a.That is, we determined the image of a under the map In the second step of our recovery procedure, we use Syn X as the parity check of the classical linear code H X + H θ Z to identify the error a up to gauge terms in H X .To begin, we introduce a general notion of a classical linear code capable of identifying an error up to some prescribed "redundant" subcode.Definition 3. Let N be a vector space over F p .A classical linear code is a subspace K ≤ N .A parity check for K is a linear map F : N → M such that ker F = K.A redundant subcode for K is a subspace R ≤ K.We say that K has logical dimension k := dim K and physical dimension n := dim N .The distance of K with respect to R is To summarize these parameters, we call K an n, k, d R code.
Now, suppose that we only wish to identify an error a ∈ N up to some redundant subcode R.That is, suppose that we only wish to recover the coset a + R from the syndrome F a of the error.As shown in the following proposition, this is possible when a + R contains some vector of sufficiently small weight relative to the code distance d R .Proposition 3. Let K be a classical linear code with parity check F : N → M and redundant subcode R. Let a ∈ N be unknown, but suppose that F a is known.Suppose that min wt(a + R) < d R 2 .Then we can determine a + R, i.e., we can determine a + k for some unknown redundant vector k ∈ R.
Proof.See Appendix A 3.
The special case of Proposition 3 with trivial redundant subcode is well known [37].We state it as a corollary below for a sanity check.
Corollary 1.Let K be a classical linear code with parity check F : N → M .Let a ∈ N be unknown, but suppose that F a is known.Suppose that wt(a) < min wt K 2 .Then we can determine a.
Let us return to the second step of our recovery procedure.Suppose that 2 .Then by Proposition 3, we can recover the error class a + H X from the syndrome Syn X (a), which was previously determined.To correct the X-type error, we can pick any a + h X ∈ a + H X and apply X a+h X −1 to the corrupted code state Assuming that the error b satisfies min wt(b + H Z ) < d H Z 2 , we can apply a similar procedure to correct the Z-type error and restore the state |ψ L ⟩ ⊗ |ψ ′′′′ G ⟩.This concludes the second step in our recovery procedure.
We remark that the second step in our recovery procedure performs as well as can be expected, given that the distance of the parent subsystem CSS code is d = min{d H X , d H Z } (as shown in Proposition 2).Indeed, if the original Pauli error X a Z b satisfies swt(a, b) < d 2 , which is the usual correctability condition for subsystem stabilizer codes, then a and b satisfy wt(a) 2 , so by the above discussion, the second step in our recovery procedure succeeds.
One might note that the second step in our recovery procedure identifies a little more than just the coset a + H X .In fact, as indicated in the proof of Proposition 3, our recovery procedure always identifies a representative a+h X of a+H X with weight less than d H X 2 (provided that such a representative exists).One might ask whether a weaker recovery procedure exists, which only recovers the coset a + H X and nothing else.We explore this idea further in Appendix C.

VI. STRUCTURE OF SUBSYSTEM STABILIZER CODES
After a detailed study of subsystem CSS codes, we now turn our attention to the structure of general subsystem stabilizer codes.Our main observation is that every subsystem stabilizer code is associated with two subsystem CSS codes and an isomorphism that determine the structure of the subsystem stabilizer code.In Section VI A, we formalize this observation using Goursat's Lemma.Then, in Section VI B, we investigate the structure of subsystem stabilizer codes by associating two subsystem CSS codes to each subsystem stabilizer code in Eq. ( 33), just as we associated two classical linear codes to each subsystem CSS code in Eq. (37).Finally, in Section VI C, we apply this theory to introduce two generalizations of subsystem CSS codes.

A. Goursat data of the gauge group
We can quantify the degree of "non-CSS-ness" of any subsystem stabilizer code H ≤ G × G by sandwiching it between two subsystem CSS codes, where the internal CSS code N is the largest subsystem CSS code contained in H, and the external CSS code E is the smallest subsystem CSS code containing H.
The internal CSS code consists of all elements in the gauge group that are purely X-type or purely Z-type, i.e., all X a and Z b where X a , Z b ∈ G.In particular, the internal CSS code equals H iff H is itself a subsystem CSS code, and the internal CSS code is trivial iff H has no pure X or pure Z elements.
The external CSS code is constructed by independently peeling off the X-and Z-components of each element in the gauge group.That is, the external CSS code contains all X a and Z b such that X a Z b ∈ G.In particular, the external CSS code equals H iff H is itself a subsystem CSS code, and the external CSS code always contains H.
If H is not a subsystem CSS code, the inclusions are strict.In particular, the internal code is a strict subspace of the external code, since there are elements of E that cannot be obtained by taking products of the pure gauge group elements in N .The relative size of the internal and external codes corresponds to the number of non-CSS elements in the gauge group.This claim is made precise using Goursat's Lemma.Goursat's Lemma associates a gauge group with a set of Goursat data -the internal code N = N X × N Z , the external code E = E X × E Z , and an isomorphism ϕ : E X /N X → E Z /N Z that associates the X-and Zcomponents of each gauge group element (e X , e Z ) ∈ H up to pure X, Z elements: In other words, for each gauge group element (e X , e Z ), the isomorphism ϕ associates the non-pure component of e X with the non-pure component of its partner e Z .The number of such independent pairs quantifies the "non-CSS-ness" of the code: if E X /N X has one element, then H is CSS, but if E X /N X is large, then H is highly "non-CSS".This is all stated formally below.
Lemma 2 (Goursat's Lemma).Let G be a vector space. ( For each e X ∈ E X , define where (e X , e Z ) ∈ H.
We emphasize that item (3) above states that the correspondence between H and its Goursat data is bijective.Thus, we can write to indicate that the subsystem stabilizer code on the lefthand side corresponds via Lemma 2 to the Goursat data on the right-hand side.
Goursat's Lemma implicitly states that the subsystem stabilizer code H consists of "blocks" (i.e., cosets) of The isomorphism ϕ essentially pairs pure X elements e X with pure Z elements e Z to obtain the representatives (e X , e Z ) of these cosets comprising H.We illustrate this in Fig. 1 and state it formally below.Proposition 4. Suppose that Eq. (91) holds.Fix a basis e j X + N X j (92) for E X /N X , and consider the basis As indicated in Eq. (94), the isomorphism ϕ specifies which X-type operators e j X and Z-type operators e j Z are "paired together" to form generators of H.We illustrate this in the following example.
Example 4 (5-qubit code).The five-qubit code [52] is a stabilizer code, so its gauge group is the join of its stabilizer group and phases, G = ⟨S, Φ⟩.
Inspecting the stabilizer generators of this code in Eq. ( 58), we see that there are no elements of the gauge group that are purely X-type or Z-type.Thus, the internal code N X × N Z is trivial.
On the other hand, the external code E X × E Z is generated by splitting the gauge group into its X-part and Z-part.That is, with a slight abuse of notation, we have E X = ⟨IXXII, IIXXI, IIIXX, XIIIX⟩ and (95) The isomorphism ϕ is constructed from combinations of e X ∈ E X and e Z ∈ E Z such that e X e Z ∈ G. Thus, again with a slight abuse of notation, the action of ϕ is An alternative set of generators for the external code is E X = ⟨XXIII, IXXII, IIXXI, IIIXX⟩ and (99) E Z = ⟨ZZIII, IZZII, IIZZI, IIIZZ⟩. (100) The external code can be gauged fixed to obtain the [[5, 1, 0, 3]] code.However, the external code has distance one, since XIIII and ZIIII are dressed logicals.
The Goursat data of a subsystem stabilizer code H can be expressed explicitly in terms of its generators.This is useful for explicitly computing the Goursat data of subsystem stabilizer codes.
Proposition 5. Suppose that Define the dim G × l matrices and Then for some isomorphism ϕ.Moreover, H is a subsystem CSS code iff Proof.See Appendix A 5.
Note that Eq. ( 105) provides an alternative characterization of subsystem CSS codes that can be readily checked given the generators of H. Indeed, to check whether a given subsystem stabilizer code is a subsystem CSS code, one can compute spanning sets for ker π X and ker π Z , take their union to form a spanning set for ker π X +ker π Z , and compare the dimension of that spanning set with l.

B. Goursat data of the stabilizer group
The stabilizer group H ∩ H ω of a subsystem stabilizer code H can be described in terms of the Goursat data of H.More broadly, our goal in this section is to determine the Goursat data of each subsystem stabilizer code in Eq. (33) in terms of the Goursat data of H, just as we determined the classical linear codes comprising each subsystem CSS code in Eq. ( 37) in terms of the classical linear codes comprising H.
We first derive the Goursat data of the gaugepreserving group H ω in terms of that of H. Proposition 6. Suppose that Then there exist isomorphisms ϕ X , ϕ Z in the diagram such that with we have Proof.See Appendix A 6.
Intuitively, this proposition states that if a subsystem stabilizer code H corresponds to the subsystem CSS codes N ≤ H ≤ E, then the complement H ω corresponds to the subsystem CSS codes E ω ≤ H ω ≤ N ω (c.f.Eq. ( 21)).
Next, we derive the Goursat data of an intersection of codes H ∩ H in terms of the Goursat data of the original codes H and H.This result is slightly more general than is needed to determine the Goursat data of the stabilizer H ∩ H ω , since H does not have to equal H ω .Proposition 7. Suppose that Then there exist subspaces and isomorphisms ϕ T , ϕ W in the diagram we have Abstractly, Propositions 6 and 7 are sufficient to determine the Goursat data of each subsystem stabilizer code in Eq. (33) in terms of the Goursat data of H.However, these expressions for subsystem stabilizer codes are not as explicit as the expressions for subsystem CSS codes in Eq. (37).Nonetheless, Propositions 6 and 7 might be useful for some applications, such as a characterizaztion of subsystem stabilizer codes.
C. Characterizing subsystem stabilizer codes using the Goursat data of the stabilizer group Here, we characterize subsystem stabilizer codes according to the Goursat data of their stabilizer groups (see Fig. 2 for a summary).
Recall that a subsystem stabilizer code H can equivalently be described by its Goursat data -the internal maximal stabilizer CSS code N , the external CSS code E, and the isomorphism ϕ.Here, we are interested in the number of blocks in the stabilizer group H ∩ H ω of H (see Figure 1).To motivate this inquiry, recall that the stabilizer group has one block iff it is CSS, and the stabilizer group has many blocks iff it is "far from CSS".As we will show, the number of blocks in the stabilizer group is upper bounded by a function of N and E. This upper bound is independent of the particular isomorphism ϕ, which determines the true number of blocks in the stabilizer group of H. Thus, for fixed internal and external codes N and E, we can define two extreme classes of codes which, in some sense, achieve the largest and the smallest number of blocks admitted by N and E.
By Propositions 6 and 7, we have for some subspace T × W (interpreted as the external code of the stabilizer) and some isomorphism ϕ ∩ .We say that H has maximal stabilizer if i.e., if T × W is as large as possible.We say that H has minimal stabilizer if i.e., if T × W is as small as possible.
It is in the following sense that subsystem stabilizer codes with maximal or minimal stabilizer generalize subsystem CSS codes.Proposition 8.A subsystem stabilizer code has both maximal and minimal stabilizer iff it is a subsystem CSS code.
Proof.See Appendix A 8.
Observe that a subsystem stabilizer code has minimal stabilizer iff its underlying stabilizer group is CSS.We remark that such codes have multiple characterizations.
This corollary yields a simple algorithm to test whether a subsystem stabilizer code has minimal stabilizer.Indeed, given a spanning set for H, one can compute a spanning set for H + H ω and apply Eq. (105) to test if H + H ω is a direct product, i.e., if H has minimal stabilizer.We leave a more detailed investigation of codes with maximal and minimal stabilizer for future research.

VII. CONCLUSION
In this work, we study subsystem stabilizer codes in a linear algebraic framework by viewing Pauli groups as vector spaces and subsystem stabilizer codes as subspaces via the symplectic representation.This perspective allows us to construct a doubling map that converts any modular-qudit subsystem stabilizer code into a subsystem CSS code with comparable parameters (see Theorem 1).
The linear algebraic perspective also elucidates the correspondence between a subsystem CSS code and a pair of classical linear codes, yielding an explicit basis of codewords (see Section III), a generalized Steane-type recovery procedure (see Section V), and other results (see Appendices C and D).
Finally, the linear-algebraic perspective enables a characterization of subsystem stabilizer codes via Goursat's Lemma, which yields two generalizations of subsystem CSS codes (see Section VI).
for some h X ∈ H X .Thus, min wt(a + H X ) ≤ wt(a + h X ) = wt σ0 (a + H X ) .(C9) Now, suppose in addition that a+H X ∈ H X + H θ Z /H X is nonzero and satisfies wt σ0 (a + H Unfortunately, this proposition does not immediately reveal whether Par X performs better or worse than Syn X .Indeed, the distance of Par X is nominally lower bounded by the distance of Syn X , but the notion of error weight relevant for Par X is also lower bounded by that for Syn X .Thus, it is not immediately clear whether one code performs better than the other.To shed light on this issue, we investigate the special case in which the notions of error weight for Par X and Syn X coincide.Definition 5. We say that H X ≤ G respects weight if there exists σ 0 ⊆ σ such that σ 0 is a basis for G/H X satisfying min wt(a + H for all a ∈ G. Note that by definition, H X respects weight iff the notions of weight for Syn X and Par X in Eqs.(C2) and (C3) coincide.In fact, if H X respects weight, then the distances of Syn X and Par X also coincide.To see this, note that so by Proposition 9, we have d H X = d Par X .Interestingly, it turns out that there are not very many subspaces H X ≤ G that respect weight.Proposition 10.A subspace H X ≤ G respects weight iff H X admits a basis whose elements have weight at most 2.
Proof. ( =⇒ ) Fix β ∈ σ c 0 := σ \ σ 0 and write where the a αβ ∈ F p .If more than one a αβ is nonzero, then wt σ0 (β + H X ) > 1 but wt(β) = 1, a contradiction.Thus, at most one a αβ is nonzero, so for some c β ∈ F p .Then which by linear independence of σ implies that c β = 0 for all β ∈ σ c 0 .Thus, Γ has exactly |σ c 0 | = dim H X elements, so Γ is a basis for H X whose elements have weight at most 2.
( ⇐= ) Let M be the dim H X × dim G matrix whose rows are the basis vectors of H X .Let M ′ be the reduced row echelon form of M .Note that the row space of M ′ is H X .Let σ 0 be the subset of σ corresponding to the non-pivot columns of M ′ , so σ c 0 corresponds to the pivot columns of M ′ .Since each row of M has weight at most 2, it follows that for each pivot β ∈ σ c 0 , there is at most one other nonzero entry (which lies to the right of β and is not a pivot) in the corresponding row of M ′ .Call that entry −b β α β , where b β ∈ F p and α β ∈ σ 0 .Now, fix any a ∈ G, and write a = (C17) Thus, the weight of a + H X is at most the number of nonzero a α plus the number of nonzero a β .That is, wt σ0 (a + H X ) ≤ wt(a). (C18) Since this holds for any a ∈ G, we conclude that H X respects weight.
In the following example, we illustrate the usage of Par X to correct errors affecting a subsystem CSS code whose underlying classical linear codes respect weight.
Example 5 (Bacon-Shor code).The physical qubits of a Bacon-Shor code [30] are located at the vertices of an l × l grid, so we set G = F l 2 2 .For concreteness, let l = 4. Every pair of row-adjacent sites (i, j), (i, j +1) on the grid contributes an X-type gauge generator X (i,j) ⊗ X (i,j+1) , and every pair of column-adjacent sites (i, j), (i + 1, j) on the grid contributes a Z-type gauge generator Z (i,j) ⊗ Z (i+1,j) .Thus, the gauge group is the direct product of (C20) Note that H X and H Z respect weight by Proposition 10.Now, the complement H θ X corresponds to the collection of all Z-type Pauli operators which commute with all the X-type Pauli operators in H X (and similarly for H θ Z ).Explicitly, we have Thus, for the Bacon-Shor code, Par X is the parity check of the l-fold repetition code, which coincides with the lfold repetition code described in the original work [30].
To correct an X-type error a ∈ G, we first determine its syndrome Syn X (a) by measuring the Z-type gauge generators in Eq. (C20), as described in Section V A. We then express Syn X (a) = a + H X + H θ Z in the basis of Eq. (C28).Next, by viewing Par X as the matrix in Eq. (C29), we compute (a + H X ) + ker Par X in the basis of Eq. (C27).Now, suppose that the original X-type error a has odd weight in less than l 2 rows.Then a + H X has weight less than l 2 in the basis of Eq. (C27).Thus, since the distance of Par X is l, we can determine a + H X in the basis of Eq. (C27).This allows us to correct the X-type error a up to gauge terms.
and the logical Pauli operators are X = XXXXX andZ = ZZZZZ.(59)Applying the mapping in Lemma 1 and Theorem 1, the corresponding subspace CSS code has ten physical qubits with stabilizer

N
subsystem code).The Z (1) N subsystem code is a topological subsystem stabilizer code based on the qudit generalization of the Kitaev honeycomb model introduced in [10, 57] .It encodes one logical qudit, which is of dimension N if N is odd and N 2 if N is even.To define the code, we place one N -dimensional qudit on each vertex of a honeycomb lattice.The gauge group is generated by the two-body checks . The mappings in these works take [[n, k, 0, d]] subspace stabilizer codes to [[4n, 2k, 0, d ′ ]] subspace CSS codes.These mappings take subspace stabilizer codes to Majorana fermion codes to subspace CSS codes, which increases the complexity of the proof (a mapping from [[n, k, r, d]] subsystem stabilizer codes to [[4n, 2k, 2r, 2d]] subsystem CSS codes was obtained in [61, Theorem 5.7], but the proof remains rather long despite avoiding the intermediate Majorana fermion codes).Nonetheless, the mappings in [58-60] can be formulated as maps analogous to ∆ in Lemma 1.
the bases of Eqs.(C27) and (C28), the parity check Par X is represented by the (l − 1) × l matrix Par X = kernel of Par X isH X + H θ Z /H X = as in Proposition 2. One verifies from the definitions that H X + H θ Z with parity check Syn X and redundant subcode H X is an [n, k X , d H X ] classical linear code, and H Z + H θ X with parity check Syn Z and redundant subcode H Z is an [n, k Z , d H Z ] classical linear code.
Now, suppose that the error a satisfies min wt(a + H X ) < d H X Venn diagram depicting features of subsystem stabilizer codes with maximal and minimal stabilizer groups, per Def. 4. A code has minimal stabilizer iff its stabilizer group is CSS.A code has minimal and maximal stabilizer iff its gauge group is CSS.Every subspace stabilizer code has maximal stabilizer, but there are codes with maximal stabilizer that are not subspace stabilizer codes.
7. Is there a concise characterization of subsystem stabilizer codes with maximal (minimal) stabilizer, as introduced in Definition 4?8.Do subsystem stabilizer codes with maximal (minimal) stabilizer have nice structural properties, analogous to those described in Proposition 2 for subsystem CSS codes?