class_docstr: Tests circuits with sample-based measurements
docstr: Test a simple circuit with a single expval measurement
docstr_tok: ["Test","a","simple","circuit","with","a","single","expval","measurement"]
code: def test_single_expval(self):
      """Test a simple circuit with a single expval measurement"""
      x = np.array(0.732)
      qs = qml.tape.QuantumScript(
          [qml.RY(x, wires=0)], [qml.expval(qml.PauliZ(0))], shots=10000
      )
      result = simulate(qs)
  
      assert isinstance(result, np.float64)
      assert result.shape == ()
      assert np.allclose(result, np.cos(x), atol=0.1)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.devices.qubit import simulate, get_final_state, measure_final_state
label_desc: Use image node_id 1 for calling the TestSampleMeasurements obj's underlying member method code with example usage: obj.test_single_expval() without return types