class_docstr: Test for the dispatching logic of the parameter shift method
docstr: Test error raised if attempting to differentiate with
  respect to a state
docstr_tok: ["Test","error","raised","if","attempting","to","differentiate","with","respect","to","a","state"]
code: def test_state_non_differentiable_error(self):
      """Test error raised if attempting to differentiate with
      respect to a state"""
      with qml.queuing.AnnotatedQueue() as q:
          qml.state()
  
      tape = qml.tape.QuantumScript.from_queue(q)
      with pytest.raises(
          ValueError, match=r"return the state is not supported"
      ):
          qml.gradients.param_shift_cv(tape, None)
  
imports: import unittest.mock
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.gradients import param_shift_cv
  from pennylane.gradients.gradient_transform import choose_trainable_params
  from pennylane.gradients.parameter_shift_cv import _grad_method_cv, _find_gradient_methods_cv, _transform_observable
label_desc: Use image node_id 7 for calling the TestParameterShiftLogic obj's underlying member method code with example usage: obj.test_state_non_differentiable_error() without return types