class_docstr: Tests gradients of multivariate unidimensional functions.
docstr: Tests gradients with a quadratic function.
docstr_tok: ["Tests","gradients","with","a","quadratic","function","."]
code: def test_quadratic(self, tol):
      """Tests gradients with a quadratic function."""
      multi_var = lambda x: np.sum([x_**2 for x_ in x])
      grad_multi_var = lambda x: np.array([2 * x_ for x_ in x])
      x_vec = np.random.uniform(-5, 5, size=(2))
      g = qml.grad(multi_var, 0)
      auto_grad = g(x_vec)
      correct_grad = grad_multi_var(x_vec)
  
      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 3 for calling the TestGradientMultiVar obj's underlying member method code with example usage: obj.test_quadratic(tol) without return types