class_docstr: Class to test the integration of argnums (Jax) and the hadamard grad transform.
class_docstr_tok: ["Class","to","test","the","integration","of","argnums","(","Jax",")","and","the","hadamard","grad","transform","."]
docstr: Test for multiple expectation values.
code: def test_multi_expectation_values(self, argnums, interface):
      """Test for multiple expectation values."""
      import jax
  
      dev = qml.device("default.qubit", wires=3)
  
      @qml.qnode(dev, interface=interface)
      def circuit(x, y):
          qml.RX(x[0], wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0)), qml.expval(qml.PauliX(1))
  
      x = jax.numpy.array([0.543, 0.2])
      y = jax.numpy.array(-0.654)
  
      res = qml.gradients.hadamard_grad(circuit, argnums=argnums)(x, y)
  
      expected_0 = np.array([[-np.sin(x[0]), 0.0], [0.0, 0.0]])
      expected_1 = np.array([0, np.cos(y)])
  
      if argnums == [0]:
          assert np.allclose(res[0], expected_0[0])
          assert np.allclose(res[1], expected_0[1])
      if argnums == [1]:
          assert np.allclose(res, expected_1)
      if argnums == [0, 1]:
          assert np.allclose(res[0][0], expected_0[0])
          assert np.allclose(res[0][1], expected_0[1])
          assert np.allclose(res[1][0], expected_1[0])
          assert np.allclose(res[1][1], expected_1[1])
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 3 for calling the TestJaxArgnums obj's underlying member method code with example usage: obj.test_multi_expectation_values(argnums, interface) and returns: qml,  qml