fastdla.PauliProduct.to_matrix
- PauliProduct.to_matrix(*, sparse=False, npmod=np)
Compose a matrix represented by the Pauli product.
- Parameters:
sparse (
bool) – If True, return the matrix in the CSR sparse representation.npmod – Numpy-like module to use for calculation.
- Return type:
numpy.ndarray|csr_array- Returns:
A matrix representation (dense or sparse) of the Pauli product.