class_docstr: Tests for integration with the PassthruQNode
class_docstr_tok: ["Tests","for","integration","with","the","PassthruQNode"]
docstr: Test that jacobian of a QNode with an attached default.mixed.autograd device
  gives the correct result in the case of parameters multiplied by scalars
docstr_tok: ["Test","that","jacobian","of","a","QNode","with","an","attached","default.mixed.autograd","device","gives","the","correct","result","in","the","case","of","parameters","multiplied","by","scalars"]
code: def test_jacobian_variable_multiply(self, tol):
      """Test that jacobian of a QNode with an attached default.mixed.autograd device
      gives the correct result in the case of parameters multiplied by scalars
      """
      x = 0.43316321
      y = 0.2162158
      z = 0.75110998
      weights = np.array([x, y, z], requires_grad=True)
  
      dev = qml.device("default.mixed", wires=1)
  
      @qml.qnode(dev, interface="autograd", diff_method="backprop")
      def circuit(p):
          qml.RX(3 * p[0], wires=0)
          qml.RY(p[1], wires=0)
          qml.RX(p[2] / 2, wires=0)
          return qml.expval(qml.PauliZ(0))
  
      assert circuit.gradient_fn == "backprop"
      res = circuit(weights)
  
      expected = np.cos(3 * x) * np.cos(y) * np.cos(z / 2) - np.sin(
          3 * x
      ) * np.sin(z / 2)
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
      grad_fn = qml.jacobian(circuit, 0)
      res = grad_fn(np.array(weights))
  
      expected = np.array(
          [
              -3
              * (
                  np.sin(3 * x) * np.cos(y) * np.cos(z / 2)
                  + np.cos(3 * x) * np.sin(z / 2)
              ),
              -np.cos(3 * x) * np.sin(y) * np.cos(z / 2),
              -0.5
              * (
                  np.sin(3 * x) * np.cos(z / 2)
                  + np.cos(3 * x) * np.cos(y) * np.sin(z / 2)
              ),
          ]
      )
  
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
  from pennylane import DeviceError
label_desc: Use image node_id 1 for calling the TestPassthruIntegration obj's underlying member method code with example usage: obj.test_jacobian_variable_multiply(tol) and returns: qml