rqutils.paulis.general.truncate

rqutils.paulis.general.truncate(components: ~numpy._typing._array_like.ArrayLike, reduced_dim: int | ~numpy.integer | ~collections.abc.Sequence[int | ~numpy.integer], npmod: ~types.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]

Truncate a component array of a matrix into the components for a submatrix.

The component array can have extra dimensions in front (e.g. time axis if this is a time series of components). In such a case, reduced_dim must be a sequence of integers with the length correpsonding to the number of subsystems.

Parameters:
  • components – Pauli components of the original matrix, shape (…, d1**2, d2**2, …)

  • reduced_dim – Dimension(s) of the submatrix(es).

Returns:

Components of the submatrix, shape (…, r1**2, r2**2, …)