class_docstr: Tests for the mutual information functions
class_docstr_tok: ["Tests","for","the","mutual","information","functions"]
docstr: Test that the mutual information transform works for QNodes by comparing
  against analytic values
docstr_tok: ["Test","that","the","mutual","information","transform","works","for","QNodes","by","comparing","against","analytic","values"]
code: def test_qnode_state(self, device, interface, params):
      """Test that the mutual information transform works for QNodes by comparing
      against analytic values"""
      dev = qml.device(device, wires=2)
  
      params = qml.math.asarray(params, like=interface)
  
      @qml.qnode(dev, interface=interface)
      def circuit(params):
          qml.RY(params, wires=0)
          qml.CNOT(wires=[0, 1])
          return qml.state()
  
      actual = qml.qinfo.mutual_info(circuit, wires0=[0], wires1=[1])(
          params
      )
  
      # compare transform results with analytic values
      expected = -2 * np.cos(params / 2) ** 2 * np.log(
          np.cos(params / 2) ** 2 + 1e-10
      ) - 2 * np.sin(params / 2) ** 2 * np.log(
          np.sin(params / 2) ** 2 + 1e-10
      )
  
      assert np.allclose(actual, expected)
  
imports: import copy
  import numpy
  import pytest
  import pennylane
  from pennylane.measurements import MutualInfo, Shots
  from pennylane.measurements.mutual_info import MutualInfoMP
  from pennylane.wires import Wires
label_desc: Use image node_id 3 for calling the TestIntegration obj's underlying member method code with example usage: obj.test_qnode_state(device, interface, params) and returns: qml