class_docstr: Tests circuits with sample-based measurements
docstr: Test a simple circuit with a single sample measurement
docstr_tok: ["Test","a","simple","circuit","with","a","single","sample","measurement"]
code: def test_single_sample(self):
      """Test a simple circuit with a single sample measurement"""
      x = np.array(0.732)
      qs = qml.tape.QuantumScript(
          [qml.RY(x, wires=0)],
          [qml.sample(wires=range(2))],
          shots=10000,
      )
      result = simulate(qs)
  
      assert isinstance(result, np.ndarray)
      assert result.shape == (10000, 2)
      assert np.allclose(
          np.sum(result, axis=0).astype(np.float32) / 10000,
          [np.sin(x / 2) ** 2, 0],
          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 3 for calling the TestSampleMeasurements obj's underlying member method code with example usage: obj.test_single_sample() without return types