rqutils.paulis.compose

rqutils.paulis.compose(components, dim=None, npmod=np)

Compose a matrix from the Pauli components.

Parameters
  • components (Union[Number, Sequence[Number], numpy.ndarray]) – Pauli components of the desired matrix, shape (…, d1**2, d2**2, …)

  • dim (Union[int, Sequence[int], None]) – Subsystem dimensions. If present, last len(dim) dimensions of components are dotted with the corresponding Pauli matrices.

Return type

numpy.ndarray

Returns

A complex array of shape (…, d1*d2*…, d1*d2*…).