class_docstr: This device provides derivatives via parameter shift.
class_docstr_tok: ["This","device","provides","derivatives","via","parameter","shift","."]
code: def execute_and_compute_vjp(
      self,
      circuits,
      cotangents,
      execution_config=qml.devices.DefaultExecutionConfig,
  ):
      is_single_circuit = False
      if isinstance(circuits, qml.tape.QuantumScript):
          is_single_circuit = True
          circuits = [circuits]
          cotangents = [cotangents]
  
      if self.tracker.active:
          for c in circuits:
              self.tracker.update(resources=c.specs["resources"])
          self.tracker.update(
              execute_and_vjp_batches=1,
              executions=len(circuits),
              vjps=len(circuits),
          )
          self.tracker.record()
  
      batch, fn = qml.gradients.batch_vjp(
          circuits, cotangents, qml.gradients.param_shift
      )
      full_batch = tuple(circuits) + tuple(batch)
      all_results = self.execute(full_batch)
      results = all_results[: len(circuits)]
      vjps = fn(all_results[len(circuits) :])
      return (
          results[0],
          vjps[0],
      ) if is_single_circuit else results, vjps
  
file_path: pennylane/tests/param_shift_dev.py
imports: import dataclasses
  import pennylane
label_desc: Use image node_id 8 for calling the ParamShiftDerivativesDevice obj's underlying member method code with example usage: obj.execute_and_compute_vjp(circuits, cotangents, execution_config) and returns: unknown,  vjps