class_docstr: Tests for the batch VJP function
class_docstr_tok: ["Tests","for","the","batch","VJP","function"]
docstr: A tape with no trainable parameters will simply return None
docstr_tok: ["A","tape","with","no","trainable","parameters","will","simply","return","None"]
code: def test_one_tape_no_trainable_parameters(self):
      """A tape with no trainable parameters will simply return None"""
      dev = qml.device("default.qubit", wires=2)
  
      with qml.queuing.AnnotatedQueue() as q1:
          qml.RX(0.4, wires=0)
          qml.CNOT(wires=[0, 1])
          qml.expval(qml.PauliZ(0))
  
      tape1 = qml.tape.QuantumScript.from_queue(q1)
      with qml.queuing.AnnotatedQueue() as q2:
          qml.RX(0.4, wires=0)
          qml.RX(0.6, wires=0)
          qml.CNOT(wires=[0, 1])
          qml.expval(qml.PauliZ(0))
  
      tape2 = qml.tape.QuantumScript.from_queue(q2)
      tape1.trainable_params = {}
      tape2.trainable_params = {0, 1}
  
      tapes = [tape1, tape2]
      dys = [np.array(1.0), np.array(1.0)]
  
      v_tapes, fn = qml.gradients.batch_vjp(tapes, dys, param_shift)
      assert len(v_tapes) == 4
  
      # Even though there are 3 parameters, only two contribute
      # to the VJP, so only 2*2=4 quantum evals
      res = fn(dev.execute(v_tapes))
      assert res[0] is None
      assert res[1] is not None
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.gradients import param_shift
label_desc: Use image node_id 1 for calling the TestBatchVJP obj's underlying member method code with example usage: obj.test_one_tape_no_trainable_parameters() without return types