qecx.TransversalReadoutCregDecl

class qecx.TransversalReadoutCregDecl(name, source, indices=None, qubits=None, block_index=None, frame=None)

Bases: object

Declaration of checks read from one classical register holding one bit per block qubit.

For each declared check, the parity of the register’s bits over the check’s support equals the check’s value, whatever its Pauli on each qubit. For a gauge source, the claim holds for each set of declared rows whose product is a stabilizer, with that stabilizer’s value. Several declarations may name one register, for example one per source of a readout in mixed bases.

Variables:
  • name (str) – Name of the classical register the declaration reads.

  • source (SyndromeSource) – Which check-matrix or generator family the declared checks belong to.

  • indices (tuple[int, ...] | None) – Selection of rows of source the declaration names, strictly increasing; None names every row; sequence input is normalized to a tuple at construction.

  • qubits (tuple[int, ...] | None) – Block qubit each register bit reads, bit i reading block qubit qubits[i], the entries distinct; None means bit i reads block qubit i; sequence input is normalized to a tuple at construction.

  • block_index (int | None) – Operand block label of the block whose checks the register holds; None when the declaration names no block.

  • frame (CheckFrame | None) – Frame the checks are named in; None when the key is absent, the declaring variant’s operation kind then supplying its default where it has one.