rqutils.paulis.truncate

rqutils.paulis.truncate(components, reduced_dim, npmod=np)

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 (Union[Number, Sequence[Number], numpy.ndarray]) – Pauli components of the original matrix, shape (…, d1**2, d2**2, …)

  • reduced_dim (Union[int, Sequence[int]]) – Dimension(s) of the submatrix(es).

Return type

numpy.ndarray

Returns

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