def test_gell_mann_idx_3(self):
        """Gell-Mann operator for index = 3."""
        expected_res = np.array([[1, 0, 0], [0, -1, 0], [0, 0, 0]])
        res = gell_mann(3)

        bool_mat = np.isclose(expected_res, res)
        self.assertEqual(np.all(bool_mat), True)
 def test_gell_mann_sparse(self):
     """Test sparse Gell-Mann matrix."""
     res = gell_mann(3, is_sparse=True)
     self.assertEqual(isinstance(res, csr_matrix), True)
 def test_invalid_idx(self):
     """Invalid Gell-Mann parameters."""
     with self.assertRaises(ValueError):
         gell_mann(9)