class_docstr: Tests for caching behaviour
class_docstr_tok: ["Tests","for","caching","behaviour"]
docstr: Tests that the backward pass is one single batch, not a bunch of batches, when parameter shift
  is requested for multiple tapes.
docstr_tok: ["Tests","that","the","backward","pass","is","one","single","batch",",","not","a","bunch","of","batches",",","when","parameter","shift","is","requested","for","multiple","tapes","."]
code: def test_single_backward_pass_batch(self):
      """Tests that the backward pass is one single batch, not a bunch of batches, when parameter shift
      is requested for multiple tapes."""
  
      dev = qml.device("default.qubit")
  
      def f(x):
          tape1 = qml.tape.QuantumScript(
              [qml.RX(x, 0)], [qml.probs(wires=0)]
          )
          tape2 = qml.tape.QuantumScript(
              [qml.RY(x, 0)], [qml.probs(wires=0)]
          )
  
          results = qml.execute(
              [tape1, tape2], dev, gradient_fn=qml.gradients.param_shift
          )
          return results[0] + results[1]
  
      x = qml.numpy.array(0.1)
      with dev.tracker:
          out = qml.jacobian(f)(x)
  
      assert dev.tracker.totals["batches"] == 2
      assert dev.tracker.history["simulations"] == [1, 1, 1, 1, 1, 1]
      expected = [
          -2 * np.cos(x / 2) * np.sin(x / 2),
          2 * np.sin(x / 2) * np.cos(x / 2),
      ]
      assert qml.math.allclose(out, expected)
  
imports: import autograd
  import pytest
  from param_shift_dev import ParamShiftDerivativesDevice
  from pennylane import numpy
  import pennylane
  from pennylane.devices import DefaultQubit
  from pennylane.gradients import param_shift
  from pennylane import execute
  from pennylane.measurements import Shots
label_desc: Use image node_id 2 for calling the TestCaching obj's underlying member method code with example usage: obj.test_single_backward_pass_batch() and returns: unknown