qecx.SubsystemStabilizerCodeData¶
- class qecx.SubsystemStabilizerCodeData(n, k, d, gauge_generators, logical_operators_X, logical_operators_Z, declared_stabilizer_generators=None)¶
Bases:
CodeDataAlgebraic surface for a subsystem stabilizer code.
Instances compare and hash by value over the declared field contents, with authored
stabilizer_generatorsdistinguished from derived: two codes with equal gauge data but differing on whether they declare the stabilizer generators are unequal. Comparison is type-strict across code-data classes. The gauge-combination consistency of the stabilizer basis is verified on first access ofstabilizer_gauge_combinationsrather than at construction.- Variables:
code_type (ClassVar[str]) – Code type the serialized form declares the class under.
syndrome_sources (ClassVar[frozenset[SyndromeSource]]) – Syndrome sources a code of the type carries.
declared_seed_fields (ClassVar[frozenset[str]]) – Code fields the serialized form admits as authored seeds of derived surfaces.
n (int) – Physical-qubit count.
k (int) – Logical-qubit count.
d (int | AsymmetricDistance) – Code distance: a symmetric integer of at least 1, or split X/Z via
AsymmetricDistance.gauge_generators (tuple[PauliProductOperator, ...]) – Pauli-product gauge generators of length
neach.logical_operators_X (tuple[PauliProductOperator, ...]) – Length-
ktuple of length-nPauli products.logical_operators_Z (tuple[PauliProductOperator, ...]) – Symmetric tuple for the Z-logicals.
declared_stabilizer_generators (tuple[PauliProductOperator, ...] | None) – Authored stabilizer generators of length
neach, orNoneto derive them from the gauge group.stabilizer_generators (tuple[PauliProductOperator, ...]) – Effective stabilizer generators:
declared_stabilizer_generatorswhen authored, else the derived center-of-gauge basis.stabilizer_matrix (NDArray[np.uint8]) – Symplectic-form view of
stabilizer_generators.gauge_matrix (NDArray[np.uint8]) – Symplectic-form view of
gauge_generators.stabilizer_gauge_combinations (NDArray[np.uint8]) – F2 coefficient matrix expressing each row of the derived
stabilizer_matrixas a linear combination ofgauge_generators(in their symplectic representation), shape(m, g).
- property stabilizer_generators: tuple[PauliProductOperator, ...]¶
Pauli-product basis for the center of the gauge group, length
neach.Returns
declared_stabilizer_generatorswhen authored; otherwise the canonical symplectic-RREF basis.