class_docstr: Tests for the state function
class_docstr_tok: ["Tests","for","the","state","function"]
docstr: Test if an error is raised for devices inheriting from the base Device class,
  which do not currently support returning the state
docstr_tok: ["Test","if","an","error","is","raised","for","devices","inheriting","from","the","base","Device","class",",","which","do","not","currently","support","returning","the","state"]
code: def test_state_not_supported(self):
      """Test if an error is raised for devices inheriting from the base Device class,
      which do not currently support returning the state"""
      dev = qml.device("default.gaussian", wires=1)
  
      @qml.qnode(dev)
      def func():
          return state()
  
      with pytest.raises(
          qml.QuantumFunctionError,
          match="Returning the state is not supported",
      ):
          func()
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices import DefaultQubitLegacy
  from pennylane.measurements import State, Shots, density_matrix, expval, state
label_desc: Use image node_id 10 for calling the TestState obj's underlying member method code with example usage: obj.test_state_not_supported() and returns: state