class_docstr: Tests for the mutual information functions
class_docstr_tok: ["Tests","for","the","mutual","information","functions"]
docstr: Test that the measurement process for mutual information works for QNodes
  by comparing against the mutual information transform
docstr_tok: ["Test","that","the","measurement","process","for","mutual","information","works","for","QNodes","by","comparing","against","the","mutual","information","transform"]
code: def test_qnode_mutual_info(self, device, interface, params):
      """Test that the measurement process for mutual information works for QNodes
      by comparing against the mutual information transform"""
      dev = qml.device(device, wires=2)
  
      params = qml.math.asarray(np.array(params), like=interface)
  
      @qml.qnode(dev, interface=interface)
      def circuit_mutual_info(params):
          qml.RY(params[0], wires=0)
          qml.RY(params[1], wires=1)
          qml.CNOT(wires=[0, 1])
          return qml.mutual_info(wires0=[0], wires1=[1])
  
      @qml.qnode(dev, interface=interface)
      def circuit_state(params):
          qml.RY(params[0], wires=0)
          qml.RY(params[1], wires=1)
          qml.CNOT(wires=[0, 1])
          return qml.state()
  
      actual = circuit_mutual_info(params)
  
      # compare measurement results with transform results
      expected = qml.qinfo.mutual_info(
          circuit_state, wires0=[0], wires1=[1]
      )(params)
  
      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 4 for calling the TestIntegration obj's underlying member method code with example usage: obj.test_qnode_mutual_info(device, interface, params) and returns: qml, qml