class_docstr: Test that broadcasting works as expected for the entropy functions
class_docstr_tok: ["Test","that","broadcasting","works","as","expected","for","the","entropy","functions"]
docstr: Test broadcasting for relative entropy and density matrices when one input is unbatched
docstr_tok: ["Test","broadcasting","for","relative","entropy","and","density","matrices","when","one","input","is","unbatched"]
code: def test_relative_entropy_broadcast_dm_unbatched(
      self, interface, check_state
  ):
      """Test broadcasting for relative entropy and density matrices when one input is unbatched"""
      state0 = [
          [[0, 0], [0, 1]],
          np.ones((2, 2)) / 2,
          [[1, 0], [0, 0]],
          np.eye(2) / 2,
      ]
      state1 = np.eye(2) / 2
      expected = [np.log(2), np.log(2), np.log(2), 0]
  
      state0 = qml.math.asarray(state0, like=interface)
      state1 = qml.math.asarray(state1, like=interface)
  
      actual = qml.math.relative_entropy(
          state0, state1, check_state=check_state
      )
      assert np.allclose(actual, expected, rtol=1e-06, atol=1e-07)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 5 for calling the TestEntropyBroadcasting obj's underlying member method code with example usage: obj.test_relative_entropy_broadcast_dm_unbatched(interface, check_state) without return types