class_docstr: Test vector-valued returns for the JAX-JIT interface.
docstr: Tests computing multiple expectation values in a tape.
docstr_tok: ["Tests","computing","multiple","expectation","values","in","a","tape","."]
code: def test_qnode_sample(self, execute_kwargs):
      """Tests computing multiple expectation values in a tape."""
      dev = qml.device("default.qubit.legacy", wires=2, shots=10)
      params = jax.numpy.array([0.1, 0.2, 0.3])
  
      grad_meth = (
          execute_kwargs["gradient_kwargs"]["method"]
          if "gradient_kwargs" in execute_kwargs
          else ""
      )
      if "adjoint" in grad_meth or "backprop" in grad_meth:
          pytest.skip("Adjoint does not support probs")
  
      def cost(a, cache):
          with qml.queuing.AnnotatedQueue() as q:
              qml.RY(a[0], wires=0)
              qml.RX(a[1], wires=0)
              qml.RY(a[2], wires=0)
              qml.sample(qml.PauliZ(0))
  
          tape = qml.tape.QuantumScript.from_queue(q)
  
          res = qml.execute([tape], dev, cache=cache, **execute_kwargs)[
              0
          ]
          return res
  
      res = jax.jit(cost, static_argnums=1)(params, cache=None)
      assert res.shape == (dev.shots,)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.gradients import param_shift
  from pennylane import execute
label_desc: Use image node_id 4 for calling the TestVectorValuedJIT obj's underlying member method code with example usage: obj.test_qnode_sample(execute_kwargs) and returns: res