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 compute_vjp for a simple single input single output.
docstr_tok: ["Test","compute_vjp","for","a","simple","single","input","single","output","."]
code: def test_vjp_basic(self, jpc, shots):
      """Test compute_vjp 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 = -0.294
      tape = qml.tape.QuantumScript(
          [qml.RX(x, 0)], [qml.expval(qml.PauliZ(0))], shots=shots
      )
  
      dy = ((1.1, 0.7),) if tape.shots.has_partitioned_shots else (1.8,)
      vjp = jpc.compute_vjp((tape,), dy)
  
      assert qml.math.allclose(
          vjp[0], -1.8 * 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 2 for calling the TestJacobianProductResults obj's underlying member method code with example usage: obj.test_vjp_basic(jpc, shots) without return types