class_docstr: Integration tests for default.mixed.tf. This test ensures it integrates
  properly with the PennyLane UI, in particular the QNode.
docstr: Test that the device state is correct after evaluating a
  quantum function on the device
docstr_tok: ["Test","that","the","device","state","is","correct","after","evaluating","a","quantum","function","on","the","device"]
code: def test_correct_state(self, tol):
      """Test that the device state is correct after evaluating a
      quantum function on the device"""
  
      dev = qml.device("default.mixed", wires=2)
  
      state = dev.state
      expected = np.zeros((4, 4))
      expected[0, 0] = 1
      assert np.allclose(state, expected, atol=tol, rtol=0)
  
      @qml.qnode(dev, interface="tf", diff_method="backprop")
      def circuit(a):
          qml.Hadamard(wires=0)
          qml.RZ(a, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      circuit(tf.constant(np.pi / 4))
      state = dev.state
  
      amplitude = np.exp(-1j * np.pi / 4) / 2
      expected = np.array(
          [
              [0.5, 0, amplitude, 0],
              [0, 0, 0, 0],
              [np.conj(amplitude), 0, 0.5, 0],
              [0, 0, 0, 0],
          ]
      )
  
      assert np.allclose(state, expected, atol=tol, rtol=0)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
label_desc: Use image node_id 3 for calling the TestQNodeIntegration obj's underlying member method code with example usage: obj.test_correct_state(tol) and returns: qml