class_docstr: Test for adjoint_vjp
docstr: Test that batched cotangents with adjoint VJP give correct results when
  the tape has a single trainable parameter and a single observable
docstr_tok: ["Test","that","batched","cotangents","with","adjoint","VJP","give","correct","results","when","the","tape","has","a","single","trainable","parameter","and","a","single","observable"]
code: def test_single_param_single_obs_batched(self, cotangents, tol):
      """Test that batched cotangents with adjoint VJP give correct results when
      the tape has a single trainable parameter and a single observable
      """
      x = np.array(0.654)
      y = np.array(1.221)
  
      obs = [qml.expval(qml.PauliZ(wires=[0]))]
      qs = QuantumScript(
          [qml.RY(x, wires=[0]), qml.RX(y, wires=[1])],
          obs,
          trainable_params=[0],
      )
  
      actual = adjoint_vjp(qs, cotangents)
      assert isinstance(actual, tuple)
      assert len(actual) == 1
  
      jac = np.array([[-np.sin(x)]])
      expected = jac.T @ np.expand_dims(np.array(cotangents), 0)
      assert np.allclose(actual, expected, atol=tol)
  
imports: import pytest
  import pennylane
  from pennylane.devices.qubit import adjoint_jacobian, adjoint_jvp, adjoint_vjp
  from pennylane.tape import QuantumScript
  import pennylane.numpy
label_desc: Use image node_id 6 for calling the TestAdjointVJP obj's underlying member method code with example usage: obj.test_single_param_single_obs_batched(cotangents, tol) without return types