docstr: Test sample-only measurements raise a notimplementedError.
docstr_tok: ["Test","sample-only","measurements","raise","a","notimplementedError","."]
code: def test_sample_based_observable(self):
      """Test sample-only measurements raise a notimplementedError."""
  
      qs = qml.tape.QuantumScript(measurements=[qml.sample(wires=0)])
      with pytest.raises(NotImplementedError):
          simulate(qs)
  
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 TestCurrentlyUnsupportedCases obj's underlying member method code with example usage: obj.test_sample_based_observable() without return types