class_docstr: Tests for the mutual information functions
class_docstr_tok: ["Tests","for","the","mutual","information","functions"]
docstr: Test that mutual information works for density matrices
docstr_tok: ["Test","that","mutual","information","works","for","density","matrices"]
code: def test_density_matrix(self, interface, state, expected):
      """Test that mutual information works for density matrices"""
      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 1 for calling the TestMutualInformation obj's underlying member method code with example usage: obj.test_density_matrix(interface, state, expected) without return types