qecx.Operand

class qecx.Operand(block, logical_qubit, role=None)

Bases: object

One logical-qubit argument of a logical operation.

Operands sharing a block value act on the same code block. A wildcard operand (logical_qubit=None) asserts that the operation is permutation-invariant over the block’s logical qubits; within one block, operands are either all concrete or all wildcards, and an all-wildcard block covers the block’s full logical-qubit set, checked at document registration.

Variables:
  • block (int) – Code-block label; operands with equal labels address the same code block.

  • logical_qubit (int | None) – Logical-qubit index within the block, or None for a wildcard position.

  • role (str | None) – Informational role of the operand within the operation (e.g. "control"); never participates in equality comparisons, so operands differing only in role are equal and hash alike.