class_docstr: Tests for the (reduced) density matrix for matrix.
class_docstr_tok: ["Tests","for","the","(","reduced",")","density","matrix","for","matrix","."]
docstr: Test that non hermitian matrix raises an error with check_state=True
docstr_tok: ["Test","that","non","hermitian","matrix","raises","an","error","with","check_state=True"]
code: def test_matrix_not_positive_definite(self):
      """Test that non hermitian matrix raises an error with check_state=True"""
      density_matrix = [[3, 0], [0, -2]]
  
      with pytest.raises(
          ValueError, match="The matrix is not positive semi-definite."
      ):
          fn.quantum.reduce_dm(
              density_matrix, indices=[0], check_state=True
          )
  
imports: import numpy
  import pytest
  from pennylane import numpy
  from pennylane import math
label_desc: Use image node_id 7 for calling the TestDensityMatrixFromMatrix obj's underlying member method code with example usage: obj.test_matrix_not_positive_definite() without return types