class_docstr: Tests for adjoint_jacobian
docstr: Test that computing the gradient of a tape that obtains the
  expectation value of a Tensor operator works correctly.
docstr_tok: ["Test","that","computing","the","gradient","of","a","tape","that","obtains","the","expectation","value","of","a","Tensor","operator","works","correctly","."]
code: def test_gradient_of_tape_with_tensor(self, tol):
      """Test that computing the gradient of a tape that obtains the
      expectation value of a Tensor operator works correctly."""
      a, b, c = [0.5, 0.3, -0.7]
  
      qs = QuantumScript(
          [
              qml.RX(a, wires=0),
              qml.RX(b, wires=1),
              qml.RX(c, wires=2),
              qml.CNOT(wires=[0, 1]),
              qml.CNOT(wires=[1, 2]),
          ],
          [qml.expval(qml.PauliX(0) @ qml.PauliY(2))],
          trainable_params=[0, 1, 2],
      )
  
      qs_valid, _ = qml.devices.preprocess.decompose(qs, adjoint_ops)
      qs_valid = qs_valid[0]
  
      res = adjoint_jacobian(qs_valid)
  
      expected = [
          np.cos(a) * np.sin(b) * np.sin(c),
          np.cos(b) * np.sin(a) * np.sin(c),
          np.cos(c) * np.sin(b) * np.sin(a),
      ]
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
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 10 for calling the TestAdjointJacobian obj's underlying member method code with example usage: obj.test_gradient_of_tape_with_tensor(tol) without return types