qecx.StabilizerCodeData¶
- class qecx.StabilizerCodeData(n, k, d, stabilizer_generators, logical_operators_X, logical_operators_Z)¶
Bases:
CodeDataAlgebraic surface for a general stabilizer code.
Instances compare and hash by value over the declared field contents; comparison is type-strict across code-data classes.
- 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.stabilizer_generators (tuple[PauliProductOperator, ...]) – Pauli-product stabilizer 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.
stabilizer_matrix (NDArray[np.uint8]) – Symplectic-form view of
stabilizer_generators, shape(m, 2n).gauge_generators (tuple[PauliProductOperator, ...]) – Trivial-gauge alias of
stabilizer_generators.gauge_matrix (NDArray[np.uint8]) – Trivial-gauge alias of
stabilizer_matrix.
- property stabilizer_matrix: NDArray[uint8]¶
Symplectic-form view of
stabilizer_generators, shape(m, 2n).
- property gauge_generators: tuple[PauliProductOperator, ...]¶
Trivial-gauge alias returning
self.stabilizer_generators.