tensorcircuit.templates.graphs#
Some common graphs and lattices
- class tensorcircuit.templates.graphs.Grid2DCoord(n: int, m: int)[源代码]#
基类:
object
Two-dimensional grid lattice
- all_cols(pbc: bool = False) Sequence[Tuple[int, int]] [源代码]#
return all col edge with 1d index encoding
- 参数
pbc (bool, optional) -- whether to include pbc edges (periodic boundary condition), defaults to False
- 返回
list of col edge
- 返回类型
Sequence[Tuple[int, int]]
- all_rows(pbc: bool = False) Sequence[Tuple[int, int]] [源代码]#
return all row edge with 1d index encoding
- 参数
pbc (bool, optional) -- whether to include pbc edges (periodic boundary condition), defaults to False
- 返回
list of row edge
- 返回类型
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 [源代码]#
1D chain with
n
sites- 参数
n (int) -- [description]
pbc (bool, optional) -- [description], defaults to True
- 返回
[description]
- 返回类型
Graph
- tensorcircuit.templates.graphs.Odd1D(n: int, *, s: int = 1) Any #