class_docstr: Tests for parameter gradient methods
docstr: Test that an independent variable is properly marked
  as having a zero gradient
docstr_tok: ["Test","that","an","independent","variable","is","properly","marked","as","having","a","zero","gradient"]
code: def test_independent(self):
      """Test that an independent variable is properly marked
      as having a zero gradient"""
  
      with qml.queuing.AnnotatedQueue() as q:
          qml.Rotation(0.543, wires=[0])
          qml.Rotation(-0.654, wires=[1])
          qml.expval(qml.QuadP(0))
  
      tape = qml.tape.QuantumScript.from_queue(q)
      assert _grad_method_cv(tape, 0) == "A"
      assert _grad_method_cv(tape, 1) == "0"
  
      trainable_params = choose_trainable_params(tape, None)
      diff_methods = _find_gradient_methods_cv(tape, trainable_params)
  
      assert diff_methods[0] == "A"
      assert diff_methods[1] == "0"
  
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 2 for calling the TestGradAnalysis obj's underlying member method code with example usage: obj.test_independent() without return types