rqutils.paulis.general.compose
- rqutils.paulis.general.compose(components: ArrayLike, dim: int | integer | Sequence[int | integer] | None = None, npmod: ModuleType = <module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/rqutils/envs/v0.2.0/lib/python3.12/site-packages/numpy/__init__.py'>) NDArray[complex128]
Compose a matrix from the Pauli components.
- Parameters:
components – Pauli components of the desired matrix, shape (…, d1**2, d2**2, …)
dim – Subsystem dimensions. If present, last len(dim) dimensions of components are dotted with the corresponding Pauli matrices.
- Returns:
A complex array of shape (…, d1*d2*…, d1*d2*…).