qecx.CodeData¶
- class qecx.CodeData¶
Bases:
ABCNominal base shared by every algebraic code-data class.
CodeDatashould not be instantiated directly. Forward compatibility: subclass it instead, declaring the three class constants: the serialized code type, the syndrome sources the type carries, and the optional declared-seed fields.- 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.
- syndrome_operator_count(source)¶
Return how many syndrome operators the code carries for one source.
- Parameters:
source (SyndromeSource) – The addressed syndrome source.
- Returns:
The operator count, or
Nonefor a source the code type does not carry. The answer isNonethere even when the field the source names is readable, as it is for an authored seed or a derived surface.- Return type: