Stabilizer Formalism for Operator Algebra Quantum Error Correction

We introduce a stabilizer formalism for the general quantum error correction framework called operator algebra quantum error correction (OAQEC), which generalizes Gottesman's formulation for traditional quantum error correcting codes (QEC) and Poulin's for operator quantum error correction and subsystem codes (OQEC). The construction generates hybrid classical-quantum stabilizer codes and we formulate a theorem that fully characterizes the Pauli errors that are correctable for a given code, generalizing the fundamental theorems for the QEC and OQEC stabilizer formalisms. We discover hybrid versions of the Bacon-Shor subsystem codes motivated by the formalism, and we apply the theorem to derive a result that gives the distance of such codes. We show how some recent hybrid subspace code constructions are captured by the formalism, and we also indicate how it extends to qudits.


Introduction
Quantum error correction (QEC) is a central topic in quantum information science.Its origins as an independent field of study go back almost three decades [18,42,64,65], and it now touches on almost every aspect of quantum information, ranging from theoretical to experimental investigations and in recent years as a key facet in the development of new quantum technologies [12,15,36,56,67,69,70].More recently, developments in QEC included the introduction of a unified approach, called 'operator quantum error correction' (OQEC) [44,45] that brought together traditional QEC with passive notions such as decoherence-free subspaces and noiseless subsystems, and led to the advent of subsystem codes and advances in fault-tolerant quantum computing [7,8,13,14,31,34,47,61]. Subsequently, a further generalization was discovered, called 'operator algebra quantum error correction' (OAQEC) [9,10], which additionally provided an approach for hybrid classical-quantum codes used for the simultaneous encoding of classical and quantum information, and for infinite-dimensional error correction [11,22,38,39,48].The following decade saw limited development of OAQEC theory, perhaps due to a paucity of initial applications.
The last few years have witnessed significant renewed interest in OAQEC, from at least three different but related directions.There have been advances in hybrid classical-quantum information coding theory and error correction [19,29,49,53] that fit into the OAQEC framework.Several small quantum error correcting codes and operations necessary as fundamental components of a scalable fault-tolerant quantum computer have been implemented experimentally [1,23,46,60].And in black hole theory, recent work [2][3][4][5][6]30,33,40,59,68] has reinterpreted the AdS/CFT correspondence using the language of quantum error correction.In particular, it was argued in [30] that the full machinery of OAQEC is necessary to capture the relevant properties of AdS/CFT.
The stabilizer formalism [17,25,26] introduced by Gottesman is a bedrock of QEC, providing a toolbox for the construction and characterization of correctable codes for Pauli error models.This formalism was generalized by Poulin [61] to the OQEC setting, giving a way to construct stabilizer subsystem codes and also a characterization of correctable subsystem codes for Pauli errors.The OQEC formalism further gave an appropriate framework in which to view the well-known Bacon-Shor subsystem codes [8], which have proved to be important in fault tolerant quantum computing.
In this paper, we introduce a stabilizer formalism for OAQEC, which generalizes Gottesman's formulation for traditional QEC codes and Poulin's for OQEC subsystem codes.The codes constructed include hybrid classical-quantum stabilizer codes, and motivated by this, we discover hybrid versions of the Bacon-Shor codes.We formulate a theorem that fully characterizes the Pauli errors that are correctable for a given stabilizer code, generalizing the fundamental theorems for QEC and OQEC, and we apply the theorem to calculate the distance of hybrid Bacon-Shor codes.Further, we show how some recent hybrid subspace code constructions are captured by the formalism.We also show how it extends to the case of qudits and we present examples in that general context.This paper is organized as follows.Section 2 includes requisite background material.In Section 3 we give the main details of the formalism, and in Section 4 we formulate and prove the error correction theorem.We present some examples and applications in Section 5, including the hybrid Bacon-Shor codes and a theorem that gives the distance of such codes.Section 6 includes the extension of the formalism to qudits, and Section 7 includes concluding remarks.

Preliminaries
Given a fixed positive integer n ≥ 1, let C N , with N = 2 n , be N -dimensional complex Hilbert space with a fixed orthonormal basis {|0⟩, . . ., |N − 1⟩}, which alternatively can be identified with (C 2 ) ⊗n and orthonormal basis {|i 1 • • • i n ⟩ = |i 1 ⟩ ⊗ . . .⊗ |i n ⟩ : i j = 0, 1} via dyadic expansions.Further let M N = (M 2 ) ⊗n be the set of N × N complex matrices, which can be viewed as the set of matrix representations of linear transformations B(C N ) on C N with respect to the basis {|k⟩}, and let U(N ) be the unitary group inside M N .
We let P n be the usual n-qubit Pauli group; that is, the subgroup of U(N ) generated by n-tensors of the single qubit bit flip and phase flip Pauli operators X, Z, and iI (we shall write I m for the identity operator on C m , or just I when the context is clear); that is, X|0⟩ = |1⟩, X|1⟩ = |0⟩ and Z|0⟩ = |0⟩, Z|1⟩ = −|1⟩, and with the corresponding n-qubit operators defined as Given a subgroup of unitary operators G inside B(H), the set of (bounded linear) operators on a Hilbert space H, we let Alg(G) denote the subalgebra of B(H) generated by G; in other words, the set of complex polynomials in the elements of G.When H is finite-dimensional, such an algebra A is a (unital) C * -algebra [21,58], and hence from the structure theory of such algebras, it is unitarily equivalent to a direct sum of the form for some positive integers m k , n k with k m k n k = dim H. Associated with this unitary equivalence is a decomposition of the Hilbert space H as an orthogonal direct sum of subspaces each with its own tensor decomposition, Moreover, the set A ′ (also an algebra) of all operators that commute with the algebra, the commutant of A, is unitarily equivalent to which again is determined by the structure of the Hilbert space decomposition as Open system quantum dynamics gives us quantum channels, which are completely positive trace-preserving linear maps E : T (H) → T (H) on the set of trace class operators on H [35,55,58]. To each channel there is an associated dual map E † defined on B(H) via the equation: Tr(E † (X)ρ) = Tr(XE(ρ)).(Observe that E is trace-preserving exactly when E † is unital; E † (I) = I.)Of course, in the finite-dimensional case the sets T (H) and B(H) coincide, but we will still use the different notation to distinguish between the quantum information flow direction under consideration; namely, the Heisenberg and Schrödinger perspectives as discussed in the OAQEC context below, where we focus on correcting observables in the former picture and correcting states in the latter picture.
Every channel E has operator-sum representations [20], which are sets of 'Choi-Kraus' operators In the quantum error context, channels are often referred to as error or noise models, and the implementation operators called error operators.Most importantly for the present work, the class of Pauli error models are central to quantum error correction, and are the subclass of mixed unitary channels on C N of the form where U k ∈ P n and the p k form a classical probability distribution.

Hybrid Stabilizer Code Construction
Hybrid classical-quantum codes are codes that can be used to simultaneously encode classical and quantum information.In terms of Hilbert space representations, they are codes with several mutually orthogonal subspaces, each of which carrying certain properties.In this section we construct hybrid codes that both fit into the OAQEC framework and generalize the codes from the original stabilizer formalism.For clarity, we have divided the presentation into four subsections, which include the three core notions and a motivating class of examples.

Stabilizer Subgroup and Code Subspace
Let S be an abelian subgroup of P n that does not contain −I, and suppose it has s independent generators.As all elements of the Pauli group either commute or anti-commute up to some power of iI, and S does not contain the subgroup ⟨iI⟩ generated by iI, it is easy to see that the normalizer and centralizer of S inside P n coincide; Let C = C(S) be the stabilizer subspace for S, which is the subspace of C N defined as the joint eigenvalue-1 eigenspace for S; that is, We will let P denote the codespace projector for C, the orthogonal projection of C N onto C. It is well known that dim C = 2 n−s (for instance see the motivating example below).The stabilizer subspace is the base code for an OAQEC stabilizer code, which will encode further structure as described below.

Gauge Group and Logical Operations
Let us first discuss some relevant operator theoretic notions.Given any element g of N (S) = Z(S), the subspace C is a reducing subspace for g; that is, both the subspace and its orthogonal complement are invariant for g.Indeed, if g commutes with every element of S, then gP = P g as P is equal to a polynomial in the elements of S, which follows from the joint spectral functional calculus for those elements (an explicit formula is given in Section 6).Hence, gP = P gP and gP ⊥ = P ⊥ gP ⊥ where P ⊥ = I −P , which are the invariant subspace conditions for C and C ⊥ as operator relations.Observe that if C is a reducing subspace for every operator in an algebra A, then AP is a subalgebra of B(C N ) which is fully supported on C. We will call AP = P A = P AP the 'compression algebra' of A to C. In such a case, as a notational convenience to distinguish between that algebra and the corresponding algebra of operators restricted to C (so a subalgebra of B(C)), we shall write A| C for the latter.
We now turn to the subsystem structure generated by a stabilizer subspace.Our formulation here is a little more abstract than that of [61], with an eye toward possible extensions of this formalism as noted in Section 7. Thus, suppose we can find subsets G 0 and L 0 of N (S) = Z(S) with the following properties: • The compression algebra Alg(G 0 )P , respectively Alg(L 0 )P , is unitarily equivalent to a full matrix algebra M 2 r for some positive integer r, respectively to M 2 k for some positive integer k.(The motivating example presented below shows how this arises through anticommuting pairs of Pauli operators.) • The sets G 0 and L 0 are mutually commuting; [g, L] = 0 for all g ∈ G 0 , L ∈ L 0 .
• The normalizer subgroup N (S) is generated by S, iI, G 0 , and L 0 .
We will assume these sets are minimal with these properties (in particular, an element of the set cannot be obtained as a product of other elements).The group G defined as is called the gauge group for the code, and the group is called the logical group.The conditions ensure the normalizer is determined by the gauge and logical groups via the group isomorphism N (S) × ⟨iI⟩ ∼ = G × L. Choices of such subsets can be made using well-known properties of the Pauli group, using (r and k respectively) anti-commuting pairs of operators that mutually commute, and that commute with the other set and the stabilizers.
The subsystem structure that these subgroups generate is given in the following result.This can be proved straightforwardly as a consequence of the above formulation, together with the structure theory of algebras and their commutants described in the previous section.

Lemma 1.
Let C be a code subspace with gauge group G and logical group L as chosen above.Then C is a reducing subspace for both G and L, and C decomposes as a tensor product of subsystems Note that here the subsystem B encodes the logical qubits of the code.Further observe that an empty gauge set G 0 leads to a standard subspace code (dim A = 1), whereas a nonempty G 0 generates subsystem structure in the code (that is, when dim A > 1).

Normalizer Cosets and Hybrid Code Sectors
Let us now turn to the notion that generates hybrid codes.As a group theoretic observation that will be relevant below, first note that the left and right cosets of N (S) inside P n coincide; that is, gN (S) = N (S)g for all g ∈ P n .This follows from the anti-commutation relations of P n and the fact that N (S) contains ⟨iI⟩.
Let T ⊆ P n be a maximal set of coset representatives for N (S) inside P n (a so-called coset transversal for N (S) as a subgroup of P n ), and without loss of generality assume I ∈ T is the representative for the normalizer itself.Then the full group is equal to the (disjoint) union P n = ∪ g∈T gN (S), and the cardinality of T is equal to |T | = |P n |/|N (S)| = 2 s (see the motivating example for an explicit calculation).
Taking terminological motivation from other areas, such as the notion of 'charge sectors' in the study of topological codes [41,63], we shall use the term code sector to refer to the (quantum) code defined by a given T ∈ T and the elements that define the base code: S, L, G. Specifically, the code sector for T is defined by the collection of operators given by the sets T ST −1 , T LT −1 , T GT −1 , and then the associated codespace T C.
The key observation concerning normalizer cosets in this setting is the following, which shows that the subgroup and coset structure induces orthogonality at the Hilbert space level.Lemma 2. Let S be an abelian subgroup of P n that does not contain −I, and let C be its stabilizer subspace.If T is a selection of coset representatives for N (S) inside P n , then for all g 1 , g 2 ∈ T with g 1 ̸ = g 2 we have Proof.As g 1 and g 2 are representatives from different cosets, we have g := g −1 1 g 2 / ∈ N (S).Since the normalizer coincides with Z(S), and all elements of P n commute modulo a power of iI, it follows that there is some E ∈ S and z ∈ C, with |z| = 1 and z ̸ = 1, such that gE = zEg.
(In fact here in the qubit d = 2 case we must have z = −1.We keep the logical statement more general as we will make use of this argument in the qudit case.)Note that EP = P from the definition of C and because E ∈ S. Further, EP = P E as P is equal to the product of polynomials in elements of S from spectral theory functional calculus as discussed above.Thus we have, P gP = P gEP = P (zEg)P = zP EgP = zEP gP = zP gP, and so (1 − z)P gP = 0.But z ̸ = 1, and hence P gP = 0 as required.
Remark.We thus have stabilizer codes that generalize both the original (subspace) setting of Gottesman, which is captured with the singleton coset representative subset (T 0 = {I}) and abelian gauge group (with empty set G 0 = ∅), and then the OQEC (subsystem) setting of Poulin, which is captured with the singleton coset representative (T 0 = {I}) subset and non-trivial gauge group (G ̸ = ∅).Moreover, any code defined by a subset T 0 ⊆ T with |T 0 | > 1 will be a hybrid classicalquantum code, which will have a subspace base code (formally when the gauge group is abelian and a subsystem base code (C = A ⊗ B with dim A > 1) otherwise.The size of the subset T 0 determines the number of 'classical addresses' associated with the hybrid code, as is illustrated in Fig. 1.For instance, by Lemma 2, any g / ∈ N (S) gives a coset gN (S) for which the subspace gC is orthogonal to C, and hence it defines a 1-bit, k-qubit hybrid code (which may have further subsystem structure when the gauge group is non-abelian).

Motivating Class of Examples
We can build upon the motivating example from the original stabilizer formalism to illustrate the various concepts discussed above for a relatively simple class of examples.The following operators are defined on n-qubit Hilbert space.
• Let s ≤ n be a fixed positive integer and let S = ⟨Z 1 , . . ., Z s ⟩; the subgroup of P n generated by phase flip operators on the first s qubits.Then and dim C = 2 n−s so that C can encode n − s qubits.
• Let r be a fixed integer with 0 ≤ r ≤ n − s, and let G 0 be the set of r pairs of Pauli operators acting on qubits s + 1 to r + s: Then the gauge group G is generated by S, iI, and G 0 , and includes the full Pauli subgroup of operators acting non-trivially on the r 'gauge qubits'.
• Let k = n − s − r, and let L 0 be the set of k pairs of Pauli operators acting on qubits r + s + 1 to n: Then the logical group L is the group generated by L 0 and iI, and includes the full Pauli subgroup of operators acting non-trivially on the k 'logical qubits'.
• The normalizer N (S) = Z(S) for S inside P n in this case is given by the following set of operators: The size of the normalizer here is thus The full Pauli group P n has 4 n+1 elements (as every element can be uniquely written in the form and hence the number of normalizer cosets is given by, Observe that each of the operators X j , 1 ≤ j ≤ s, do not belong to N (S).Hence we can take as a set of canonical coset representatives, the transversal given by the following 2 s -element set: As a caveat, however, we note that there are many other choices of coset representatives, which could have different algebraic properties as it relates to the code generators.As a simple example, note that X i , with 1 ≤ i ≤ s, and X i N , for some fixed N ∈ N (S), generate the same coset, and so in particular a transversal need not consist entirely of mutually commuting operators, or even operators that commute with the gauge and logical operators.
Regarding the Hilbert space decomposition generated by this example, notice that the gauge and logical operators induce a tensor decomposition for the base code subspace C = A ⊗ B, where A ∼ = (C 2 ) ⊗r , B ∼ = (C 2 ) ⊗k , and this tensor structure naturally translates to any of the subspaces T C, for T ∈ T , as T is unitary.(Recall here that n − s = r + k, and the base code encodes k logical and r gauge qubits.)The subspace C is easily seen to be invariant for each of the gauge and logical operators, and evidently for every A ∈ G 0 and B ∈ L 0 , there are operators A 1 ∈ B(A) and B 1 ∈ B(B) such that which is all true in general by Lemma 1.Given a (non-trivial) subset of coset representatives T 0 ⊆ T , the subspaces T C, T ∈ T 0 , are mutually orthogonal (in general this is true by Lemma 2) and the corresponding subspace for the hybrid code is In Sections 5 and 6 we will give further examples of the general hybrid code construction and discuss them in detail.We next we turn to an analysis of what are the possible errors that a given hybrid stabilizer code can protect against.

Error Correction Theorem
The code construction above thus defines codes C = C(S, G 0 , L 0 , T 0 ), determined by, respectively, choices of stabilizer subgroup, gauge and logical operators, and subset of coset representatives.We shall characterize what sets of Pauli errors are correctable for a given code, and in doing so, we establish a generalization of the fundamental theorems of [25,26] and [61] to this setting.
We shall first recall the basic notions and relevant results from OAQEC [9,10], and then specify to the code framework formulated above.The starting point is the basic definition of OAQEC codes, which is most conveniently introduced in the Heisenberg picture.

Definition 1. An algebra
Given the unitary equivalence form for an algebra A ∼ = ⊕ i (I m i ⊗ M n i ), the unit element of A is the projection Q in the algebra corresponding under the equivalence to ⊕ i I m i ⊗I n i .There is a more general notion of OAQEC code considered in [9,10], wherein the unit element of A is replaced by an arbitrary projection on the Hilbert space, and one can then consider correction with respect to states supported on the corresponding range subspace of the projection.But the notion of correctable we consider here allows us to unambiguously discuss 'correction of an algebra', and is sufficient for our goal to extend the stabilizer formalism to this setting.
The corresponding Schrödinger picture description is given as follows: A is correctable for E if and only if there exists a channel R such that for any density operator ρ = i α i (τ i ⊗ ρ i ) with τ i ∈ T (A i ), ρ i ∈ T (B i ), and nonnegative scalars i α i = 1, there are density operators From this perspective, one can see that each of the subsystems B i (with dim B i > 1) can be used individually to encode quantum information that can be recovered.Moreover, an extra feature of such a code is that an arbitrary mixture of encoded states, one for each subsystem, can be simultaneously corrected by the same correction operation.
To generalize the main error correction theorem from previous stabilizer formalism settings, we need a description in terms of error operators.The following result from [9,10] gives such a description, and below we formulate it in a style that we will use.

Theorem 1.
Let A be a subalgebra of B(H) with unit projection Q.The following statements are equivalent: = 0 for all X ∈ A and all k, l.It follows from Theorem 1, using the structure of finite dimensional algebras and their commutants discussed above, that there is a correction operation R for which Eq. ( 4) is satisfied if and only if for all k, l there are operators where here the operators X kli ⊗ I B i are understood to act on A i ⊗ B i , and so the sum (when there is a sum with more than one term) is thus an orthogonal direct sum of operators.The case of a sum with a single term captures the well-known Knill-Laflamme error correction conditions [42] when dim A 1 = 1 (and so X kl1 are complex scalars), and the OQEC testable conditions [44,45] when dim A 1 > 1.Now let us specify to our setting.Further notation will be introduced in the proof below, but we will note here that the algebras associated with the code constructions of the previous section in their unitary equivalence form satisfy m i = m j and n i = n j for any two pair of indices i, j.Moreover, by saying a code C = C(S, G 0 , L 0 , T 0 ) is correctable, we mean the algebra determined by it, as in the previous section and the discussion above, is OAQECcorrectable.
Proof.First note that for any g ∈ P n , we have equality of the following operator sets: which follows from basic group properties, the anti-commutation relations, and the fact that G (and N (S)) includes the scalar operators.Next let us establish some notation.Recall that P is the projection onto C, and for each i, let P i = g i P g −1 i .This is the projection onto the subspace g i C := A i ⊗ B i , which has subsystem tensor structure A i , B i induced by that of C = A 1 ⊗B 1 and the unitary action of g i .So g i (|a⟩|b⟩) will define an orthonormal basis for the new subspace from a basis |a⟩|b⟩ for C, which gives a corresponding identification of operators in By Lemma 2, the projections P i project onto mutually orthogonal subspaces and hence we define the projection Q = i P i to be the (orthogonal direct) sum of the P i , and with P 1 = P .The algebra in the background to be corrected and defined by the code is A = ⊕ i (I A i ⊗B(B i )), which has Q as its unit projection, and the error correction conditions we make use of are those of Eq. ( 5).
Throughout the proof we will let E := E † k E l for a fixed pair k, l.We shall first prove the 'if' direction of the result.If E is not in any of the sets in Eq. ( 6), then in particular for each i, we have Thus by the OQEC special case of the theorem above (or the Knill-Laflamme theorem when G = ∅), we have for some operator X A ∈ B(A), P (g −1 i Eg i )P = X A ⊗ I B , and hence for some operator X A i ∈ B(A i ), with the first and last equalities following from the definition of P i and the induced tensor structure on g i C from the decomposition C = A ⊗ B and the action of g i discussed above.
For the off-diagonal blocks, choose i ̸ = j and assume E / ∈ g i N (S)g −1 j .Then we have g −1 i Eg j / ∈ N (S), and we claim that P g −1 i Eg j P = 0 through what has become a standard stabilizer formalism type argument.Indeed, in general if F / ∈ N (S) = Z(S), then there is some g ∈ S and z ∈ C with |z| = 1 and z ̸ = 1 such that F g = zgF .(As above, necessarily z = −1 here, but we keep the argument general as we will extend the result to qudits below.)Also, as g ∈ S and from the construction of C, we have P = gP = P g (the latter following from spectral theory since P is a polynomial in the elements of the abelian subgroup S).Hence, P F P = P F gP = P (zgF )P = z(P gF P ) = zP F P, and so P F P = 0. Thus we have, for all i ̸ = j, It follows then that QEQ = i,j P i EP j = i X A i ⊗ I B i , and hence each of the operators QE † k E l Q satisfy the form given in Eq. ( 5).Thus, C is correctable for the set of error operators {E k }.
Conversely, for the 'only if' direction of the proof, suppose E satisfies QEQ = i X A i ⊗I B i for some operators X A i ∈ B(A i ).Then for a fixed i, using this form for QEQ and that P i Q = P i = QP i , we have Hence for some X A 1 ∈ B(A 1 ), we have Finally, fix a pair i ̸ = j, and observe from the OAQEC correctable condition in Eq. ( 5) that the i, j off-diagonal block in the block diagonal decomposition determined by Q must be zero; that is, P i EP j = 0. Thus we have, and since g i , g j is unitary, in fact we have P g −1 i Eg j P = 0. We want to conclude that g −1 i Eg j / ∈ N (S).Suppose instead we had F := g −1 i Eg j ∈ N (S) = Z(S).Then F P = P F , from spectral theory and the construction of P , and so C, the range subspace of P , is a reducing subspace for F .Hence, P ⊥ F P = P ⊥ P F = 0, and so F P = P ⊥ F P + P F P = 0.But F is a unitary operator, and so F restricted to C must be a norm-preserving map.This contradicts the fact that F P = 0, and thus we must have g −1 i Eg j / ∈ N (S) as required, and this completes the proof.
Remark.Conceptually, not belonging to the first set of the theorem statement ensures the individual codes (which are OQEC subsystem codes when the subspace has a tensor decomposition) are correctable, and with the needed orthogonality for the multiple codes given by the choice of coset representatives.Not belonging to the operator sets in the second union encapsulates the joint hybrid classical-quantum correctable code conditions in the OAQEC framework.A larger subset of coset representatives corresponds to more sectors and a larger hybrid code.In particular, more sectors means generally larger operator sets in the theorem statements, which in turn makes it more difficult for errors to not belong to the sets, and hence smaller sets of correctable errors.These notions will be explored more in the examples below.
Regarding correctable sets of errors for the class of codes discussed in Section 3.4, Theorem 2 gives a full characterization of the possible correctable errors for any given coset subset T 0 .As a simple example, consider the case with the two operators T 0 = {I, X 1 } from the transversal T above.Here there are two operator sets that the error operator products E † k E l cannot belong to: (i) N (S) \ G; and (ii) X 1 N (S) = N (S)X 1 .From the normalizer and gauge structures above, the first set consists of all elements in the normalizer with scalar multiples of the identity on qubits s + 1 through to r + s.This set encapsulates the (quantum) error correction conditions for the two quantum codes defined by this code.The second set is simply all elements of the normalizer multiplied by X 1 , and it corresponds to the cross terms that govern whether the code is hybrid correctable.
Further, an example of a set of correctable errors for this code, one could take a subset of {I, X 2 , . . ., X s }.Any pairwise products of these operators do not belong to the two sets above and hence are correctable.(In fact, in general, any set of coset representatives not used to define the hybrid code will be correctable errors.)Sets of errors are not correctable by the theorem if any product of two of them belongs to either of the two sets.Thus, any error operator product of the form X 1 N , with N ∈ N (S), would disrupt any hybrid correction for the error model, whereas any product belonging to the first set would prevent the individual quantum codes from being corrected.

Hybrid Subspace Codes
When the gauge group is abelian (G 0 = ∅), the codes constructed above have no subsystem structure and are subspaces.Further, when additionally the coset representative set is nontrivial ({I} ⊊ T 0 ), the codes generated by the formalism are 'hybrid subspace codes'.From the OAQEC perspective, hybrid subspace codes are those associated with algebras A that are unitarily equivalent to a direct sum of full matrix algebras; i.e., of the form A ∼ = ⊕ M k=1 M n k for some positive integers n k (and |T 0 | = M in our notation above).These are precisely the algebras with an abelian commutant, A ′ ∼ = ⊕ M k=1 CI n k .Each summand thus can be used to encode quantum information (when n k > 1) as a traditional quantum (subspace) code, and overall the collection of codes defined by A make up a hybrid subspace code that can be corrected for error sets given by Theorem 2.
The testable conditions of Eq. ( 5) take on a particularly transparent form in this case.As before, let Q = i P i be the unit projection of A, with P i the projection onto the ith matrix block of A. Then the code is correctable for a set of error operators {E k } if and only if there are complex scalars λ (i) kl such that for all k, l, These conditions can be cast into vector state form (as discussed in [51]) as follows: Given We then have One can reverse this argument to observe that Eq. ( 7) is equivalent to the orthogonality conditions for any choice of orthonormal basis states |ψ ij ⟩ for the range subspaces of the P i .Recently, a distinguished special case of hybrid subspace codes was considered in [29].In OAQEC language (with notation used in [29]), the algebras of focus there are of the form A ∼ = ⊕ M ν=1 M K ; i.e., the direct sum of M copies of K × K complex matrices.The full code subspace is thus an orthogonal direct sum ⊕ M ν=1 C (ν) of K-dimensional subspaces, and there are unitary 'translation' operators that connect the individual code subspaces, C (ν) = T (ν) C (1) .Interestingly, the orthogonality conditions of Eq. ( 8) were independently discovered in [29] for this subclass of hybrid subspace codes (see the recent work [51] for further discussions and results on connections between the two perspectives).The codes constructed in [29] are captured by the stabilizer formalism presented above; in particular, they are special cases of hybrid codes with (in our notation above) trivial gauge generator group (G 0 = ∅) and nontrivial coset representatives ({I} ⊊ T 0 ).As an illustration, let us consider one of the codes presented there.
The following describes a single qubit hybrid code on 7-qubit space presented as one of the examples in [29].The first six rows are the stabilizer subgroup generators, the next two are logical operators on the base code space C (1) , and the final row is a translation operator which we shall denote by T .

S 1 X I I Z Y Y Z S 2 Z I I I I I X S 3 I X I X Z I I S 4 I Z I Z I X X S 5 I I X X I Z I S 6 I I Z Z X I X X I I I X Z Z X Z I I I Z X X I T I I I I X Y Y
In our notation, the parameters for this example are n = 7, s = 6, and k = 1 (with r = 0 as there is no subsystem structure here).The choice of coset representatives given by the table is T 0 = {I, T }; and indeed, one can see that T does not commute with S k for k = 2, 3, 5, 6, so T N (S) ̸ = N (S) is a different coset than that defined by the identity operator.Observe that there are 2 s = 64 cosets for N (S) in this case, and so there are several other potential coset representative subset choices.As a simple example, we could choose X 1 = XIIIIII, which does not commute with S 2 , and so defines a different coset than the identity operator and that defined by T (as T X 1 / ∈ N (S) since it does not commute with S 3 ); that is, Additionally, Theorem 2 gives a characterization of sets of possible Pauli errors that can be corrected by such codes.Correctable errors can be viewed through this lens; for instance, while the operator X 1 can act as a new coset representative for this hybrid code, it is also a correctable error for the code, as can be seen through an application of Theorem 2 and the group theoretic conditions displayed there.The relevant operator sets given by the theorem are (recalling that there are no noncommutative gauge operators here): (i) N (S)\⟨S, iI⟩; and, (ii) T N (S) = N (S)T .The fact that X 1 does not belong to either of these sets shows the set {I, X 1 } is a correctable set of errors for the code.
Note that Theorem 2 also tells us what sets of errors are not correctable for this hybrid code.As another simple example, consider the error set {I, T }.Observe that T I = T ∈ T N (S), and so the error set fails the hybrid correctable condition.(In fact, as noted in the previous example, the same is true for any error set consisting of transversal operators.)This error set is interesting in the sense that, while it does not satisfy the hybrid correctable condition, each of the individual quantum subspace codes are correctable for the error set, which follows since T / ∈ N (S) ⊇ N (S) \ ⟨S, iI⟩.

Hybrid Bacon-Shor Code
The (two-dimensional) Bacon-Shor code [8,50] is a subsystem code defined on an ℓ × ℓ grid of qubits, with gauge group G generated by G 0 and iI, where We use the notation X (i,j) to denote a Pauli X operator acting on the qubit at coordinate (i, j) (and analogously for Pauli Z operators).See Fig. 2 for a visual depiction of the operators in G 0 .The stabilizer group S is generated by the set where X ( * ,j) = X (1,j) X (2,j) . . .X (ℓ,j) .The logical group L is generated by L 0 and iI, where and so the code distance is d = ℓ.Let us consider some example choices of subsets of coset representatives.First, let T 0 be generated by ⌊ℓ/2⌋ i=1 X (2i,1) and ⌊ℓ/2⌋ j=1 Z (1,2j−1) (see Fig. 2a for the ℓ = 8 case).With this choice of T 0 we get a 2-bit hybrid Bacon-Shor code.We can equivalently index our subset of coset representatives by their error syndromes.Consider the X-type stabilizer generators given in Eq. (10).We write the error syndrome as a binary string, where the j'th entry is 0 if the stabilizer X ( * ,j) X ( * ,j+1) is satisfied, and 1 if it is unsatisfied.Then the error syndromes corresponding to the coset representatives I and ⌊ℓ/2⌋ j=1 Z (1,2j) are respectively 00 . . .0 and 11 . . .1; i.e. the codewords of the (ℓ-1)-bit repetition code.In general, let C c be an (ℓ-1)bit linear code with basis {v i }.We are free to choose Z-type generators g i ∈ T 0 such that σ(g i ) = v i , where σ(g i ) denotes the (binary) error syndrome.Fig. 2b illustrates the case when C c is the [7,4,3] Hamming code.If we make the same choice for the X-type generators of T 0 we get an 8-bit hybrid Bacon-Shor code.The following theorems characterize the distance of our hybrid Bacon-Shor codes.k, d]] stabilizer subsystem code.Fix a generating set {S j : 1 ≤ j ≤ s} for S. Suppose that none of the single-qubit error operators anti-commute with more than m of the S j .Then for any [s, k c , d c ] linear code C c , there exists a hybrid subsystem code Proof.Let {v i } be a basis for the codewords of C c .For each v i , we construct a corresponding coset representative This can be done for example using Gaussian elimination.Now we apply Theorem 2 to C ′ = C(S, G 0 , L 0 , T ′ 0 ).First note that N (S) \ G contains operators of weight at least d.To bound the weight of operators in i̸ =j g i N (S)g −1 j , we observe that there is a bijection between the g i ∈ T ′ 0 and the codewords of C c .As operators in N (S) have trivial syndrome, every operator of the form g i N (S)g −1 j has syndrome equal to a codeword u = u i + u j of C c , where u i and u j are the codewords of C c corresponding to g i and g j , respectively.Furthermore, u ̸ = 0 as i ̸ = j.Because any single-qubit error anti-commutes with at most m stabilizer generators, any operator with syndrome equal to u must have weight at least ⌈d c /m⌉.
A CSS code [18,66] is a stabilizer code whose stabilizer group can be generated by two sets S X and S Z consisting of exclusively of X-type and Z-type operators, respectively.In this case, we have another option for constructing hybrid codes.[[n, k, d]] CSS subsystem code.Fix X-type and Z-type generating sets, S X and S Z , for S, where |S X | = s X and |S Z | = s Z .Suppose that none of the single-qubit error operators anti-commute with more than m X (m Z ) operators in S X (S Z ).Then for any pair of linear codes C X and Proof.Let {v i } and {w j } be bases for the codewords of C X and C Z , respectively.We construct coset representatives h i and f j , such that σ(h i ) = (v i , 0) and σ(f j ) = (0, w j ), giving . The only difference with the proof of Theorem 3 is that every operator in g i N (S)g −1 j has syndrome equal to (u, t), where u and t are codewords of C X and C Z , respectively.In this case we can have either u = 0 or t = 0, but not both.Because any single-qubit error anti-commutes with at most m X X-type stabilizer generators and m Z Z-type stabilizer generators, any operator with syndrome equal to (u, t) must have weight at least min(⌈d X /m X ⌉, ⌈d Z /m Z ⌉).
We are now equipped to discuss the distance of our hybrid Bacon-Shor code examples.We denote the parameters of a hybrid code by [[n, k : m, d]], where n is the number of physical qubits, k is the number of encoded qubits, m is the number of encoded bits, and d is the code distance 1 .For Bacon-Shor codes with the generating set of the stabilizer group given in (10), we have s X = s Z = ℓ − 1 and m X = m Z = 2. Applying Corollary 1, we find that any hybrid code built from an [[ℓ2 , 1, ℓ]] Bacon-Shor code using our construction has distance at most ⌈(ℓ − 1)/2⌉.We can saturate this bound by choosing C X and C Z to both be the This is exactly the case where For the ℓ = 8 case with both C X and C Z equal to the [7,4,3] Hamming code, we obtain a hybrid Bacon-Shor code with parameters [ [64, 1 : 8, 2]].In [54], the authors provide an alternative construction of hybrid codes starting from Bacon-Shor codes.They obtain hybrid codes with parameters [[ℓ 2 , 1 : (ℓ−1) 2 , 2]].In contrast, our hybrid Bacon-Shor codes can have at most 2(ℓ−1) encoded bits, but they can have distance up to ⌈(ℓ − 1)/2⌉.
In each of the previous examples, the distance of the hybrid Bacon-Shor code is lower than the distance of the initial Bacon-Shor code.This need not be the case for all initial codes, e.g., consider the [[ℓ 2 , 2, ℓ]] toric code with the canonical stabilizer generators [41].Here we have s = ℓ 2 − 2 and m = 4.If we choose a linear code with parameters [s, αs, βs] where β ≥ 4ℓ/(ℓ 2 − 2) then, by Theorem 3, we can construct a hybrid toric code with parameters

Extension to Qudits
In this section we discuss the extension of the stabilizer formalism presented above to the case of qudits; that is, what happens when one replaces the base qubit space C 2 with C d for fixed positive integer d > 2. We begin by recalling the basic set up for the standard qudit stabilizer formalism, as described in several other places (see for instance [24,27,52]).

The n-Qudit Pauli Group
Let {|0⟩, . . ., |d−1⟩} be a fixed basis for C d , and given a fixed positive integer n ≥ 1 consider the corresponding basis for (C d ) ⊗n written as Further let ω = e 2πi/d be a primitive dth root of unity, and define the following generalized Pauli operators: where in the definition of X we use modulo d arithmetic with |d⟩ ≡ |0⟩.Our choice of generalized Pauli errors is a common one, but there are other choices (for instance error operators related to the finite field with d elements are often used when d is a prime power).Some of the relevant properties of the so-called 'shift' (X) and 'clock' (Z) operators include: X d = I = Z d and the anti-commutation relation Note that X and Z are no longer self-adjoint for d > 2, but they are unitary with X −1 = X d−1 = X † (and the same for Z).The single qudit Pauli group is the unitary subgroup of U(C d ) given by where we use the choice of complex square root √ ω = e πi/d .So the generic element of P d,1 can be written in the form ω a/2 X b Z c for some a, b, c ∈ N.
Observe that for d = 2 we have √ ω = i, and so this definition agrees with the qubit case.But one may ask, why include the phase factor √ ω as a generator, instead of ω for instance?The reason is that including it allows for many more eigenvalue-1 operators, which is crucial in the context of the stabilizer formalism.Indeed, one can show using standard linear algebra tools that for any operator X a Z b , with a, b ∈ N, there is a U ∈ P d,1 that is proportional to the operator such that U has 1 as an eigenvalue.
As in the single qubit case, for arbitrary n ≥ 1, we define the n-qudit Pauli group P d,n to be the subgroup of U(N ), with N = d n , generated by n-tensors of the single qudit Pauli operators X, Z, and √ ωI; that is, the unitary group generated by Z 1 = Z ⊗ (I ⊗(n−1) ), ), etc. Hence it follows, again applying the anti-commutation relations, that a generic element of P d,n belongs to the set: Observe that the cardinality of P d,n is: For stabilizer formalism related calculations, it is useful to know that every element of P d,n that is not a multiple of the identity operator has trace equal to 0. Indeed, one can use the anti-commutation relation and cyclic property of the trace to show that Tr(X a Z b ) ̸ = 0 if and only if X a Z b is a multiple of the identity.Moreover, given an abelian subgroup S of P d,n , there is a well-known and useful formula for the orthogonal projection P S onto the stabilizer subspace defined by S given by P S = 1 |S| S∈S S.

Hybrid Qudit Stabilizer Formalism
The OAQEC stabilizer formalism presented above for the qubit base space, extends fully to the case of qudits, including the main error correction theorem.Here we briefly point out the main pieces, following along the presentation above.
• The starting point is again an abelian subgroup S of P d,n , and now we require that S contains no scalar operators other than the identity operator I (which is equivalent to −I / ∈ S in the d = 2 case).Even though the generating operators are no longer self-adjoint, it is still the case that the normalizer and centralizer coincide; that is, N (S) = Z(S).(This follows because elements of P d,n either commute or commute up to a power of ω, and I is the only scalar operator in S.) The stabilizer subspace C = C(S) = span{|ψ⟩ : g|ψ⟩ = |ψ⟩ ∀g ∈ S} is defined in the same way.
• The r-qudit gauge group and k-qudit logical group are analogously defined, with √ ωI replacing iI.Lemma 1 holds, with C d replacing C 2 in the Hilbert space and subsystem decompositions.
• Further, regarding the normalizer cosets and hybrid code sectors, Lemma 2 still holds, with the replacement of P d,n and ωI in the statement (with the same basic ingredients in the proof, as noted just above).Thus, given a subset of a coset transversal for N (S) inside P d,n , we will have an associated hybrid code C = C(S, G 0 , L 0 , T 0 ) with code sectors as in the qubit case, and subsystem structure defined by the gauge group (when it is non-trivial), which is carried to the different code spaces by the transversal operators.
In terms of the error correction conditions, first note that none of the OAQEC framework or results are qubit dependent, they are based on the general theory of operator algebras on Hilbert space.This, together with using analogous properties of the generalized Pauli group, allows us to generalize Theorem 2, essentially with the same proof.We state the result here for completeness.
A pair of examples are discussed below.
Example 1.The motivating example presented above generalizes straightforwardly as follows.
• Let s ≤ n be a fixed positive integer and let S = ⟨Z 1 , . . ., Z s ⟩ ⊆ P d,n .Then and dim C = d n−s so that C can encode n − s qudits.
• Let r be a fixed integer with 0 ≤ r ≤ n − s, and let G 0 be the set of r pairs of generating Pauli operators acting on qudits s + 1 to r + s: Then the gauge group G is generated by S, √ ωI, and G 0 , and includes the full subgroup of operators in P d,n acting non-trivially on the r gauge qudits.
• Let k = n − s − r, and let L 0 be the set of k pairs of generating Pauli operators acting on qudits r + s + 1 to n: Then the logical group L is the group generated by L 0 and √ ωI, and includes the full subgroup of operators in P d,n acting non-trivially on the k logical qudits.
• The normalizer N (S) = Z(S) for S inside P n,d is given by: The size of the normalizer here is: Hence the number of normalizer cosets is given by, As in the qubit case, each operator X j , 1 ≤ j ≤ s, does not belong to N (S), and nor does any product X j X −1 j ′ of operators from this set.So a coset transversal of maximal size is given by the d s -element set: Thus, given a (non-trivial) subset of coset representatives T 0 ⊆ T , the subspaces T C, T ∈ T 0 , are mutually orthogonal and the corresponding subspace for the hybrid code is C T 0 = ⊕ T ∈T 0 T C, with C (in the case of a non-trivial gauge group) having subsystem structure that is carried to the subspaces T C by the transversal operators.A full characterization of the possible correctable errors for any given coset subset T 0 is given by Theorem 4. The simple example of a two element transversal set and set of correctable errors discussed above in the qubit case, carries through analogously.
As another example, we give a hybrid version of a (subspace) code presented in the seminal work [28].In contrast to the qubit (d = 2) case, this example shows how for larger d, even a single mode (n = 1) can generate interesting hybrid code structures.
Example 2. Let d = 18 and n = 1.A single qubit subspace code, which can be viewed as a 'pre-GKP code', is given in [28] as the stabilizer subspace C generated by the (abelian) group S = ⟨X 6 , Z 6 ⟩, which one can readily calculate is spanned by the two states: (Note that for general d, the dimension of C need not be a power of d, as this example shows.) The commutation relations as it relates to these two operators are given, for any positive integers a, b, as follows: In particular, X a Z b commutes with S if and only if a and b are both divisible by 3. Thus, in this case we have Returning to the original code construction, the logical operators were identified as X = X 3 and Z = Z 3 .Moreover, as noted in [28], the 9 operators belonging to the set T = {X a Z b : |a|, |b| ≤ 1} form a correctable error set for the code (in the classic Knill-Laflamme sense, which remember is captured as a special case of OAQEC), as one can show they map C to 9 mutually orthogonal subspaces.This set of operators is also of interest here, as T forms a coset transversal for S. Indeed, one can easily verify using the anti-commutation relations that any two elements from this set define different cosets for S inside P 18,1 (as any product T −1 1 T 2 / ∈ N (S) when T 1 , T 2 ∈ T ).We can thus consider hybrid versions of this code, by taking a subset T 0 of elements from T and their corresponding code sectors, and then Theorem 4 can tell us what are the correctable error sets for the code.Consider for example the set T 0 = {I, X, X −1 } ⊆ T .Here the gauge group is generated by S and √ ωI, and for this particular T 0 the first set in the union of Eq. ( 12) is equal to: which follows from elements commuting modulo a power of ω.The cross-term union of Eq. ( 12) is defined by 6 sets, but due to repeats it collapses to the union of 4 sets given by a∈{−2,−1,1,2} X a N (S), which one can check is equal to the set: Observe the first set is a subset of the second union, which is a consequence of T 0 including I and being inverse closed.Thus, by Theorem 4, the possible correctable errors for this code are precisely those operator sets E ⊆ P 18,1 such that g −1 1 g 2 does not belong to this union for any choice of g 1 , g 2 ∈ E. For example, one can easily check that the set E = {Z 2b+1 : 0 ≤ b ≤ 8} satisfies this condition and hence forms a correctable set of errors for the code.
Note that the hybrid code in this particular instance is 6-dimensional, as it is determined by a qubit base code and the 3 code sectors defined by T 0 = {I, X, X −1 }; namely, the direct sum C T 0 = C ⊕ XC ⊕ X −1 C. Thus, as we are in a 18-dimensional space, we can have a maximum of 3 (non-degenerate) errors that can be correctable for this code.One might express concern then, as the error set E includes 9 operators; however, there is no contradiction here, as these operators include degeneracy on C T 0 .Indeed, one can check directly that Z, Z 3 , Z 5 map this 6-dimensional subspace to 3 mutually orthogonal subspaces.Moreover, Z 6 acts as the identity on C, and from the anti-commutation relations it acts as ω 6 I on XC and ω 6 I on X −1 C. It follows that ZC T 0 = Z 7 C T 0 = Z 13 C T 0 , where this is equality of subspaces, and analogous statements are true for the operator triples {Z 3 , Z 9 , Z 15 } and {Z 5 , Z 11 , Z 17 } on the other two (orthogonal) 6-dimensional subspaces defined by Z 3 and Z 5 .So the 9 operator error set actually degenerates in this case to 3 different errors when one restricts to the hybrid code space.

Concluding Remarks
This work opens up a number of potential new lines of investigation and the possible extension of some others.Further consideration of the hybrid Bacon-Shor subsystem codes introduced here is warranted, given the wide applicability of the subsystem versions [8,61] in fault-tolerant quantum computing and beyond, and in particular with NISQ era quantum computers likely to involve hybrid forms of classical and quantum information processing [62].It would be interesting to explore possible implications of our stablizer formalism on other classes of recently constructed hybrid codes; for instance, we expect new light can be shed on codes constructed in works such as [29,49,53,54], and one can ask if the formalism allows for construction of more codes with useful properties following the approaches introduced there.One could also consider generalizations of this formalism to a variety of other settings of relevance in quantum information, such as other generalized Pauli error models, continuous QEC and infinite-dimensional settings such as in [28], or entanglement-assisted error correction [16,37,43].Regarding the connection with black hole theory, it may be possible to use our OAQEC stabilizer formalism to construct toy models of AdS/CFT capturing the properties missed by the celebrated tensor-network models of [32,57], which are subsystem codes.We plan to pursue these investigations elsewhere and we invite others to do so as well.

Fig. 1 :
Fig. 1: Hybrid stabilizer code illustration.The coset representatives T0 = {T0 = I, T1, T2, . . ., T k } ⊂ T define different code sectors, each characterized by a classical codeword represented by a bit-string ⃗ ci, with 0 ≤ i ≤ k, its associated encoded state ρ ⃗ c i and sets TiST −1 i , TiLT −1 i , TiGT −1 i(only the stabilizers are shown for brevity).Note that here T0 is a strict subset of T .

Fig. 2 :
Fig. 2: Hybrid Bacon-Shor code.Qubits are indicated by black circles, XX gauge generators by red lines and ZZ gauge generators by blue lines.(a) Example coset representative whose error syndrome is 11 . . . 1. (b) Example coset representatives whose error syndromes generate the Hamming code (each colour denotes a different representative).