seemps.analysis.mesh.mps_to_mesh_matrix#
- seemps.analysis.mesh.mps_to_mesh_matrix(sites_per_dimension: list[int], permutation: TypeAliasForwardRef('~seemps.typing.Vector') | None = None, base: int = 2) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]#
Returns a transformation matrix T that maps between MPS indices and multi-dimensional mesh coordinates.
For a mesh with m dimensions and n = sum(sites_per_dimension) sites, T is a matrix of shape (n, m). Row r corresponds to an MPS site while column i contains the contribution of that site to dimension i, such that the integer mesh coordinates read:
x_i = sum_r physical_indices[r] * T[r, i].
Each dimension i uses sites_per_dimension[i] consecutive sites given by decreasing powers of base. If permutation is provided, the rows of T are reordered accordinglyy.
- Parameters:
- Returns:
MatrixLinear mapping of shape (N, m) with integer base^k weights.
Examples
sites_per_dimension = [2, 3] with base 2 yields:
- T = [[2, 0], # site 0 → x contributes base^1
[1, 0], # site 1 → x contributes base^0 [0, 4], # site 2 → y contributes base^2 [0, 2], # site 3 → y contributes base^1 [0, 1]] # site 4 → y contributes base^0