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