class_docstr: Tests gradients of multivariate multidimensional functions.
docstr: Tests gradients with multivariate multidimensional exp and tanh.
docstr_tok: ["Tests","gradients","with","multivariate","multidimensional","exp","and","tanh","."]
code: def test_exp(self, tol):
      """Tests gradients with multivariate multidimensional exp and tanh."""
      x_vec = np.random.uniform(-5, 5, size=(2))
      x_vec_multidim = np.expand_dims(x_vec, axis=1)
  
      gradf = lambda x: np.array(
          [
              [np.exp(x[0, 0] / 3) / 3 * np.tanh(x[1, 0])],
              [np.exp(x[0, 0] / 3) * (1 - np.tanh(x[1, 0]) ** 2)],
          ]
      )
      f = lambda x: np.exp(x[0, 0] / 3) * np.tanh(x[1, 0])
  
      g = qml.grad(f, 0)
      auto_grad = g(x_vec_multidim)
      correct_grad = gradf(x_vec_multidim)
      assert np.allclose(auto_grad, correct_grad, atol=tol, rtol=0)
  
imports: import autograd
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 2 for calling the TestGradientMultivarMultidim obj's underlying member method code with example usage: obj.test_exp(tol) without return types