class_docstr: Test first order results for the matrix of jpc options.
class_docstr_tok: ["Test","first","order","results","for","the","matrix","of","jpc","options","."]
docstr: Test execute_and_compute_jacobian for a simple single input single output.
docstr_tok: ["Test","execute_and_compute_jacobian","for","a","simple","single","input","single","output","."]
code: def test_execute_jacobian_basic(self, jpc, shots):
      """Test execute_and_compute_jacobian for a simple single input single output."""
      if shots and not _accepts_finite_shots(jpc):
          pytest.skip("jpc does not work with finite shots.")
  
      x = 1.62
      tape = qml.tape.QuantumScript(
          [qml.RX(x, 0)], [qml.expval(qml.PauliZ(0))], shots=shots
      )
      results, jacs = jpc.execute_and_compute_jacobian((tape,))
      assert qml.math.allclose(
          results[0], np.cos(x), atol=_tol_for_shots(shots)
      )
      assert qml.math.allclose(
          jacs, -np.sin(x), atol=_tol_for_shots(shots)
      )
  
imports: import pytest
  from cachetools import LRUCache
  from param_shift_dev import ParamShiftDerivativesDevice
  import numpy
  import pennylane
  from pennylane.workflow.jacobian_products import JacobianProductCalculator, TransformJacobianProducts, DeviceDerivatives, DeviceJacobianProducts, LightningVJPs
label_desc: Use image node_id 4 for calling the TestJacobianProductResults obj's underlying member method code with example usage: obj.test_execute_jacobian_basic(jpc, shots) without return types