class_docstr: Test for shot vectors with device method adjoint_jacobian.
class_docstr_tok: ["Test","for","shot","vectors","with","device","method","adjoint_jacobian","."]
docstr: Test that an error is raised for adjoint backward.
docstr_tok: ["Test","that","an","error","is","raised","for","adjoint","backward","."]
code: def test_jac_adjoint_bwd_error(self, shots):
      """Test that an error is raised for adjoint backward."""
      dev = qml.device("default.qubit.legacy", wires=1, shots=shots)
  
      with pytest.warns(
          UserWarning,
          match="Requested adjoint differentiation to be computed with finite shots.",
      ):
  
          @qnode(
              dev,
              interface="jax",
              diff_method="adjoint",
              grad_on_execution=False,
          )
          def circuit(a):
              qml.RY(a, wires=0)
              qml.RX(0.2, wires=0)
              return qml.expval(qml.PauliZ(0))
  
      a = jax.numpy.array(0.1)
  
      with pytest.raises(
          qml.QuantumFunctionError,
          match="Adjoint does not support shot vectors.",
      ):
          jax.jacobian(circuit)(a)
  
imports: import pytest
  from flaky import flaky
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
label_desc: Use image node_id 2 for calling the TestReturnShotVectorsDevice obj's underlying member method code with example usage: obj.test_jac_adjoint_bwd_error(shots) and returns: qml