class_docstr: Tests for Fidelity function between two states (state vectors or density matrix).
docstr: Test that a message is raised when the density matrix is not positive semi def.
code: def test_density_matrix_not_positive_semi_def(self, state0, state1):
      """Test that a message is raised when the density matrix is not positive semi def."""
      with pytest.raises(
          ValueError, match="The matrix is not positive semi"
      ):
          qml.math.fidelity(state0, state1, check_state=True)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 8 for calling the TestFidelityMath obj's underlying member method code with example usage: obj.test_density_matrix_not_positive_semi_def(state0, state1) without return types