qecx.QubitLayout

class qecx.QubitLayout(*, tiling_type=None, topology=None, cell_complex=None, embedding=None, qubit_placement=<factory>)

Bases: object

Spatial layout of the code: descriptive labels, geometry, and register placements.

Carries the code’s spatial structure: free-form tiling and topology labels, the combinatorial cell complex, its geometric embedding, and where each placed register’s qubits sit. Every field is optional; a layout may carry only descriptive labels, or only coordinate placements without any cell complex.

Variables:
  • tiling_type (str | None) – Tiling or tessellation label (e.g. "square", "4.8.8"); free-form.

  • topology (str | None) – Manifold topology label (e.g. "planar", "torus"); free-form.

  • cell_complex (CellComplex | None) – Combinatorial cell complex of the layout.

  • embedding (Embedding | None) – Geometric embedding of cell_complex; requires cell_complex.

  • qubit_placement (Mapping[RegisterTemplateEntry, CellPlacement | CoordinatePlacement]) – One placement per placed register, keyed by the live template entry object; each key must be a registered template entry of the owning document, checked at document registration. Defaults to an empty mapping.