class_docstr: Tests for the mutual information functions
class_docstr_tok: ["Tests","for","the","mutual","information","functions"]
docstr: Test that the correct error is raised if the return type is not State.
docstr_tok: ["Test","that","the","correct","error","is","raised","if","the","return","type","is","not","State","."]
code: def test_mutual_info_no_state_error(self):
      """Test that the correct error is raised if the return type is not State."""
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev)
      def circuit(params):
          qml.RY(params, wires=0)
          qml.CNOT(wires=[0, 1])
          return qml.probs()
  
      transformed_circuit = qml.qinfo.mutual_info(
          circuit, wires0=[0], wires1=[1]
      )
  
      with pytest.raises(
          ValueError, match="The qfunc return type needs to be a state"
      ):
          _ = transformed_circuit(0.1)
  
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 7 for calling the TestIntegration obj's underlying member method code with example usage: obj.test_mutual_info_no_state_error() and returns: qml