qecx.CellPlacement

class qecx.CellPlacement(cell, mapping)

Bases: object

Register placement on cell-complex elements.

Entry mapping[i] is the index of the element carrying qubit i of the placed register: vertex indices for CellType.VERTEX, positions in the edge tuple for CellType.EDGE, positions in the face tuple for CellType.FACE. Geometric positions are not stored; they derive from the cell complex and its embedding.

Variables:
  • cell (CellType) – Type of cell-complex element the register is placed on; a string given at construction is normalized to the member with that value.

  • mapping (tuple[int, ...]) – Element index per register qubit; sequence input is normalized to a tuple at construction.