tensorcircuit.templates.graphs#
Some common graphs and lattices
- class tensorcircuit.templates.graphs.Grid2DCoord(n: int, m: int)[source]#
Bases:
object
Two-dimensional grid lattice
- all_cols(pbc: bool = False) Sequence[Tuple[int, int]] [source]#
return all col edge with 1d index encoding
- Parameters
pbc (bool, optional) – whether to include pbc edges (periodic boundary condition), defaults to False
- Returns
list of col edge
- Return type
Sequence[Tuple[int, int]]
- all_rows(pbc: bool = False) Sequence[Tuple[int, int]] [source]#
return all row edge with 1d index encoding
- Parameters
pbc (bool, optional) – whether to include pbc edges (periodic boundary condition), defaults to False
- Returns
list of row edge
- Return type
Sequence[Tuple[int, int]]
- tensorcircuit.templates.graphs.Line1D(n: int, node_weight: Optional[Sequence[float]] = None, edge_weight: Optional[Sequence[float]] = None, pbc: bool = True) Any [source]#
1D chain with
n
sites- Parameters
n (int) – [description]
pbc (bool, optional) – [description], defaults to True
- Returns
[description]
- Return type
Graph
- tensorcircuit.templates.graphs.Odd1D(n: int, *, s: int = 1) Any #