class_docstr: Tests for the mutual information functions
class_docstr_tok: ["Tests","for","the","mutual","information","functions"]
docstr: Test the output of qml.mutual_info
docstr_tok: ["Test","the","output","of","qml.mutual_info"]
code: def test_mutual_info_output(self, interface, state, expected):
      """Test the output of qml.mutual_info"""
      dev = qml.device("default.qubit.legacy", wires=4)
  
      @qml.qnode(dev, interface=interface)
      def circuit():
          qml.StatePrep(state, wires=[0, 1])
          return qml.mutual_info(wires0=[0, 2], wires1=[1, 3])
  
      res = circuit()
      new_res = qml.mutual_info(
          wires0=[0, 2], wires1=[1, 3]
      ).process_state(
          state=circuit.device.state, wire_order=circuit.device.wires
      )
      assert np.allclose(res, expected, atol=1e-6)
      assert np.allclose(new_res, expected, atol=1e-6)
      assert (
          INTERFACE_MAP.get(qml.math.get_interface(new_res))
          == interface
      )
      assert res.dtype == new_res.dtype
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane.workflow import INTERFACE_MAP
  from pennylane.measurements import Shots
label_desc: Use image node_id 1 for calling the TestIntegration obj's underlying member method code with example usage: obj.test_mutual_info_output(interface, state, expected) and returns: qml