qiskit.quantum_info.Pauli.to_matrix¶ Pauli.to_matrix(sparse=False)[source]¶ Convert to a Numpy array or sparse CSR matrix. Parameters sparse (bool) – if True return sparse CSR matrices, otherwise return dense Numpy arrays (default: False). Returns The Pauli matrix. Return type array