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 mutual_info and density matrices
docstr_tok: ["Test","broadcasting","for","mutual_info","and","density","matrices"]
code: def test_mutual_info_broadcast_dm(self, interface):
      """Test broadcasting for mutual_info and density matrices"""
      state = [
          [[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
          [
              [0.5, 0, 0.5, 0],
              [0, 0, 0, 0],
              [0.5, 0, 0.5, 0],
              [0, 0, 0, 0],
          ],
          [
              [0.5, 0, 0, 0.5],
              [0, 0, 0, 0],
              [0, 0, 0, 0],
              [0.5, 0, 0, 0.5],
          ],
          np.ones((4, 4)) * 0.25,
      ]
      expected = [0, 0, 2 * np.log(2), 0]
  
      state = qml.math.asarray(state, like=interface)
  
      actual = qml.math.mutual_info(state, indices0=[0], indices1=[1])
      assert np.allclose(actual, expected)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 3 for calling the TestEntropyBroadcasting obj's underlying member method code with example usage: obj.test_mutual_info_broadcast_dm(interface) without return types