class_docstr: Test that single measurements return behavior does not change.
class_docstr_tok: ["Test","that","single","measurements","return","behavior","does","not","change","."]
docstr: Return a single expval.
docstr_tok: ["Return","a","single","expval","."]
code: def test_expval(self, device, interface, shots):
      """Return a single expval."""
      dev = qml.device(device, wires=2, shots=shots)
  
      def circuit(x):
          qml.Hadamard(wires=[0])
          qml.CRX(x, wires=[0, 1])
          return qml.expval(qml.PauliZ(wires=1))
  
      qnode = qml.QNode(circuit, dev)
      qnode.construct([0.5], {})
  
      res = qml.execute(
          tapes=[qnode.tape],
          device=dev,
          gradient_fn=None,
          interface=interface,
      )
  
      assert res[0].shape == ()
      assert isinstance(res[0], (np.ndarray, np.float64))
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane.measurements import MeasurementProcess
label_desc: Use image node_id 3 for calling the TestSingleReturnExecute obj's underlying member method code with example usage: obj.test_expval(device, interface, shots) and returns: qml