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, for the JAX-jit interface
docstr_tok: ["Test","that","the","measurement","process","for","mutual","information","works","for","QNodes","by","comparing","against","the","mutual","information","transform",",","for","the","JAX-jit","interface"]
code: def test_qnode_mutual_info_jax_jit(self, params, interface):
      """Test that the measurement process for mutual information works for QNodes
      by comparing against the mutual information transform, for the JAX-jit interface
      """
      import jax
      import jax.numpy as jnp
  
      dev = qml.device("default.qubit", wires=2)
  
      params = jnp.array(params)
  
      @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="jax-jit")
      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 = jax.jit(circuit_mutual_info)(params)
  
      # compare measurement results with transform results
      expected = jax.jit(
          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 9 for calling the TestIntegration obj's underlying member method code with example usage: obj.test_qnode_mutual_info_jax_jit(params, interface) and returns: qml, qml