class_docstr: Test that using vector-valued QNodes with JAX integrate with the
  PennyLane stack
class_docstr_tok: ["Test","that","using","vector-valued","QNodes","with","JAX","integrate","with","the","PennyLane","stack"]
docstr: Tests correct output shape and evaluation for a tape with prob and expval outputs with less
  trainable parameters (argnums) than parameters.
docstr_tok: ["Tests","correct","output","shape","and","evaluation","for","a","tape","with","prob","and","expval","outputs","with","less","trainable","parameters","(","argnums",")","than","parameters","."]
code: def test_diff_expval_probs_sub_argnums(
      self,
      dev,
      diff_method,
      grad_on_execution,
      device_vjp,
      interface,
      tol,
  ):
      """Tests correct output shape and evaluation for a tape with prob and expval outputs with less
      trainable parameters (argnums) than parameters."""
      kwargs = {}
      if diff_method == "spsa":
          kwargs["sampler_rng"] = np.random.default_rng(SEED_FOR_SPSA)
          tol = TOL_FOR_SPSA
  
      x = jax.numpy.array(0.543)
      y = jax.numpy.array(-0.654)
  
      if diff_method == "adjoint":
          x = x + 0j
          y = y + 0j
  
      @qnode(
          dev,
          diff_method=diff_method,
          interface=interface,
          grad_on_execution=grad_on_execution,
          device_vjp=device_vjp,
          **kwargs,
      )
      def circuit(x, y):
          qml.RX(x, wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0)), qml.probs(wires=[1])
  
      if "lightning" in getattr(dev, "short_name", ""):
          pytest.xfail(
              "lightning does not support measuring probabilities with adjoint."
          )
      jac = jax.jacobian(circuit, argnums=[0])(x, y)
  
      expected = [
          [-np.sin(x), 0],
          [
              [-np.sin(x) * np.cos(y) / 2, np.cos(y) * np.sin(x) / 2],
              [-np.cos(x) * np.sin(y) / 2, np.cos(x) * np.sin(y) / 2],
          ],
      ]
      assert isinstance(jac, tuple)
      assert len(jac) == 2
  
      assert isinstance(jac[0], tuple)
      assert len(jac[0]) == 1
      assert isinstance(jac[0][0], jax.numpy.ndarray)
      assert jac[0][0].shape == ()
      assert np.allclose(jac[0][0], expected[0][0], atol=tol, rtol=0)
  
      assert isinstance(jac[1], tuple)
      assert len(jac[1]) == 1
      assert isinstance(jac[1][0], jax.numpy.ndarray)
      assert jac[1][0].shape == (2,)
      assert np.allclose(jac[1][0], expected[1][0], atol=tol, rtol=0)
  
imports: from itertools import product
  import numpy
  import pytest
  import pennylane
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 6 for calling the TestVectorValuedQNode obj's underlying member method code with example usage: obj.test_diff_expval_probs_sub_argnums(dev, diff_method, grad_on_execution, device_vjp, interface, tol) and returns: qml,  qml