qecx.CellComplex

class qecx.CellComplex(num_vertices, edges, faces=())

Bases: object

Pure combinatorial cell complex: vertices, edges, and optional faces.

Vertices are 0-cells addressed by index in [0, num_vertices); edges are 1-cells given as pairs of vertex indices; faces are 2-cells. Edge and face indices are positions in the respective tuples. Without faces the structure degenerates to a graph.

Variables:
  • num_vertices (int) – Total number of vertices (0-cells).

  • edges (tuple[tuple[int, int], ...]) – Vertex-index pairs, each defining an edge (1-cell); sequence input is normalized to tuples at construction.

  • faces (tuple[Face, ...]) – Face (2-cell) definitions; sequence input is normalized to a tuple at construction.