Repository: PennyLaneAI/pennylane
Pull request #2116 (2022-01-20 17:11:37)

Remove warning and hotfix about `requires_grad` attribute
**Context:** In anticipation of this user interface change to require explicit marking of trainable parameters, a warning has been emitted in the last few releases:
```
Starting with PennyLane v0.21.0, when using Autograd, inputs have to explicitly specify requires_grad=True (or the argnum argument must be passed) in order for trainable parameters to be identified.
```
That is, to perform auto-differentiation with PennyLane's Autograd interface, parameters must be marked as trainable by instantiating a PennyLane tensor which accepts a `requires_grad` keyword argument. Select functions (such as `qml.grad`/`qml.jacobian` are also able to identify trainable parameters via an `argnum` keyword, *in the absence of the `requires_grad` attribute*. If the two conflict, an error is raised.

**Description of the Change:**

Removes the hotfixes in `qnode.py` and `_grad.py` which convert all QNode arguments that do not have the `requires_grad` attribute set to a PennyLane tensor with `requires_grad=True`. Many tests are updated to explicitely set the attribute, and to no longer rely on the implicit conversion of non-array QNode arguments (lists/tuples) to tensor.

The default for newly created PennyLane tensors remains `True` for now. Thus, this change only affects QNode arguments that are not already specifified as PennyLane tensors.

~~Optional:  Coerce QNode arguments whose indices are specified in `argnum` to PennyLane tensors with `requires_grad=True`. -TBD~~

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**


github-actions[bot]: Hello. You may have forgotten to update the changelog!
Please edit [`doc/releases/changelog-dev.md`](/PennyLaneAI/pennylane/blob/master/doc/releases/changelog-dev.md) with:
* A one-to-two sentence description of the change. You may include a small working example for new features.
* A link back to this PR.
* Your name (or GitHub username) in the contributors section.
antalszava: @dime10 most of the failures
* `'tuple' object has no attribute 'tolist'`;
* `TypeError: list indices must be integers or slices, not tuple`;
* `AttributeError: 'list' object has no attribute 'shape'`;

will likely be related to the point you raised: such cases did assume that all input parameters are converted to arrays. It should be okay to convert them to arrays.
dime10: > - 'tuple' object has no attribute 'tolist';
> - TypeError: list indices must be integers or slices, not tuple;
> - AttributeError: 'list' object has no attribute 'shape';
>
> will likely be related to the point you raised: such cases did assume that all input parameters are converted to arrays. It should be okay to convert them to arrays.

Regarding the 2nd error about slicing, I feel like users should not rely on the implicit conversion in our current implementation to use array slicing even though they provided a tuple as argument to the QNode. This does already not work with other interfaces, so I think tests that use array slicing should be changed to actually use arrays. For example, this should not work but currently does due to the QNode hotfix:
```py
@qml.qnode(qml.device('default.qubit', wires=1))
def circuit(x):
    qml.RY(x[0, 1], wires=0)
    return qml.expval(qml.PauliZ(0))

circuit(((0.1, 0.2), (0.3, 0.4)))
```

Regarding the other errors, there seems to be an assumption in certain parts of our code that some arguments are numpy arrays, or can implicitely be converted to numpy arrays. I think such assumptions are ok if the function interface specifically requires an array (e.g. `qml.BasisState` expects an array, but some tests in [test_qmc_transform.py](https://github.com/PennyLaneAI/pennylane/blob/8be99131b53c710aacab9678af659fea0d2cb398/tests/transforms/test_qmc_transform.py#L38-L44) pass it a tuple which generates the first error above. I wonder if it would be better to check this kind of assumption and either fix the code or the test, rather than a blanket conversion to array for all QNode arguments (unless that is a conscious requirement we have in our code base for the autograd interface).
josh146: > Regarding the 2nd error about slicing, I feel like users should not rely on the implicit conversion in our current implementation to use array slicing even though they provided a tuple as argument to the QNode.

Oof, I didn't even realize our tests were doing this 😬 Yes, I agree we should be passing arrays if using array indexing. Otherwise, the other fix would be to change `[0, 1]` to `[0][1]` in the tests
codecov[bot]: # [Codecov](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI) Report
> Merging [#2116](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI) (8df0055) into [master](https://codecov.io/gh/PennyLaneAI/pennylane/commit/8be99131b53c710aacab9678af659fea0d2cb398?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI) (8be9913) will **decrease** coverage by `2.12%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/graphs/tree.svg?width=650&height=150&src=pr&token=9S3YzlUgGk&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI)](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI)

```diff
@@            Coverage Diff             @@
##           master    #2116      +/-   ##
==========================================
- Coverage   99.19%   97.06%   -2.13%     
==========================================
  Files         228      228              
  Lines       17454    17441      -13     
==========================================
- Hits        17313    16929     -384     
- Misses        141      512     +371     
```


| [Impacted Files](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI) | Coverage Δ | |
|---|---|---|
| [pennylane/qnode.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL3Fub2RlLnB5) | `100.00% <ø> (ø)` | |
| [pennylane/\_grad.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL19ncmFkLnB5) | `100.00% <100.00%> (ø)` | |
| [pennylane/interfaces/batch/jax.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL2ludGVyZmFjZXMvYmF0Y2gvamF4LnB5) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [pennylane/interfaces/jax.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL2ludGVyZmFjZXMvamF4LnB5) | `0.00% <0.00%> (-97.44%)` | :arrow_down: |
| [pennylane/devices/default\_qubit\_jax.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL2RldmljZXMvZGVmYXVsdF9xdWJpdF9qYXgucHk=) | `0.00% <0.00%> (-96.63%)` | :arrow_down: |
| [pennylane/qnn/cost.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL3Fubi9jb3N0LnB5) | `42.85% <0.00%> (-57.15%)` | :arrow_down: |
| [pennylane/transforms/classical\_jacobian.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL3RyYW5zZm9ybXMvY2xhc3NpY2FsX2phY29iaWFuLnB5) | `77.08% <0.00%> (-22.92%)` | :arrow_down: |
| [pennylane/math/utils.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL21hdGgvdXRpbHMucHk=) | `84.41% <0.00%> (-15.59%)` | :arrow_down: |
| [pennylane/math/multi\_dispatch.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL21hdGgvbXVsdGlfZGlzcGF0Y2gucHk=) | `87.73% <0.00%> (-12.27%)` | :arrow_down: |
| [pennylane/math/is\_independent.py](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI#diff-cGVubnlsYW5lL21hdGgvaXNfaW5kZXBlbmRlbnQucHk=) | `88.50% <0.00%> (-11.50%)` | :arrow_down: |
| ... and [14 more](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI). Last update [8be9913...8df0055](https://codecov.io/gh/PennyLaneAI/pennylane/pull/2116?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PennyLaneAI).

dime10: [sc-13796]
dime10: @antalszava this PR is ready to merge (will require codecov override, but there are no new uncovered lines due to this pr)

Patch:
diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index 0b07c9790..e17e8f9de 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -402,6 +402,10 @@
   with respect to which the differentiation takes place, or if an integer
   is provided as `argnum`.
 
+  A workaround that allowed `qml.jacobian` to differentiate multiple QNode arguments
+  will no longer support higher-order derivatives. In such cases, combining multiple
+  arguments into a single array is recommended.
+
 * The behaviour of `RotosolveOptimizer` has been changed regarding
   its keyword arguments.
   [(#2081)](https://github.com/PennyLaneAI/pennylane/pull/2081)
@@ -424,6 +428,37 @@
   For more details, see the
   [RotosolveOptimizer documentation](https://pennylane.readthedocs.io/en/stable/code/api/pennylane.RotosolveOptimizer.html).
 
+* QNode arguments will no longer be considered trainable by default when using
+  the Autograd interface. In order to obtain derivatives with respect to a parameter,
+  it should be instantiated via PennyLane's NumPy wrapper using the `requires_grad=True`
+  attribute. The previous behaviour was deprecated in version v0.19.0 of PennyLane.
+  [(#2116)](https://github.com/PennyLaneAI/pennylane/pull/2116)
+
+  ```python
+  from pennylane import numpy as np
+
+  @qml.qnode(qml.device("default.qubit", wires=2))
+  def circuit(x):
+    ...
+
+  x = np.array([0.1, 0.2], requires_grad=True)
+  qml.grad(circuit)(x)
+  ```
+
+  For the `qml.grad` and `qml.jacobian` functions, trainability can alternatively be
+  indicated via the `argnum` keyword:
+
+  ```python
+  import numpy as np
+
+  @qml.qnode(qml.device("default.qubit", wires=2))
+  def circuit(hyperparam, param):
+    ...
+
+  x = np.array([0.1, 0.2])
+  qml.grad(circuit, argnum=1)(0.5, x)
+  ```
+
 <h3>Bug fixes</h3>
 
 * Fixes a bug for the TensorFlow interface where the dtype of input tensors was
diff --git a/pennylane/_grad.py b/pennylane/_grad.py
index f2498281b..8451b5dca 100644
--- a/pennylane/_grad.py
+++ b/pennylane/_grad.py
@@ -14,7 +14,6 @@
 """
 This module contains the autograd wrappers :class:`grad` and :func:`jacobian`
 """
-import warnings
 from functools import partial
 
 import numpy as onp
@@ -84,23 +83,7 @@ class grad:
         argnum = []
 
         for idx, arg in enumerate(args):
-
-            trainable = getattr(arg, "requires_grad", None)
-            array_box = isinstance(arg, ArrayBox)
-
-            if trainable is None and not array_box:
-
-                warnings.warn(
-                    "Starting with PennyLane v0.21.0, when using Autograd, inputs "
-                    "have to explicitly specify requires_grad=True (or the "
-                    "argnum argument must be passed) in order for trainable parameters to be "
-                    "identified.",
-                    UserWarning,
-                )
-
-            if trainable is None:
-                trainable = True
-
+            trainable = getattr(arg, "requires_grad", None) or isinstance(arg, ArrayBox)
             if trainable:
                 argnum.append(idx)
 
@@ -292,23 +275,7 @@ def jacobian(func, argnum=None):
         argnum = []
 
         for idx, arg in enumerate(args):
-
-            trainable = getattr(arg, "requires_grad", None)
-            is_array_box = isinstance(arg, ArrayBox)
-
-            if trainable is None and not is_array_box:
-
-                warnings.warn(
-                    "Starting with PennyLane v0.21.0, when using Autograd, inputs "
-                    "have to explicitly specify requires_grad=True (or the "
-                    "argnum argument must be passed) in order for trainable parameters to be "
-                    "identified.",
-                    UserWarning,
-                )
-
-            if trainable is None:
-                trainable = True
-
+            trainable = getattr(arg, "requires_grad", None) or isinstance(arg, ArrayBox)
             if trainable:
                 argnum.append(idx)
 
diff --git a/pennylane/qnode.py b/pennylane/qnode.py
index 57adb1724..f6a101584 100644
--- a/pennylane/qnode.py
+++ b/pennylane/qnode.py
@@ -479,16 +479,6 @@ class QNode:
     def construct(self, args, kwargs):
         """Call the quantum function with a tape context, ensuring the operations get queued."""
 
-        if self.interface == "autograd":
-            # HOTFIX: to maintain backwards compatibility existing PennyLane code and demos, here we treat
-            # all inputs that do not explicitly specify `requires_grad=False`
-            # as trainable. This should be removed at some point, forcing users
-            # to specify `requires_grad=True` for trainable parameters.
-            args = [
-                qml.numpy.array(a, requires_grad=True) if not hasattr(a, "requires_grad") else a
-                for a in args
-            ]
-
         self._tape = qml.tape.JacobianTape()
 
         with self.tape:


Test patch:
diff --git a/tests/circuit_graph/test_circuit_graph.py b/tests/circuit_graph/test_circuit_graph.py
index 8aaa993f3..6b7803fae 100644
--- a/tests/circuit_graph/test_circuit_graph.py
+++ b/tests/circuit_graph/test_circuit_graph.py
@@ -20,6 +20,7 @@ import pytest
 import numpy as np
 
 import pennylane as qml
+from pennylane import numpy as pnp
 from pennylane.circuit_graph import CircuitGraph
 from pennylane.wires import Wires
 
@@ -241,11 +242,11 @@ class TestCircuitGraph:
 
     @pytest.mark.parametrize("wires", [["a", "q1", 3]])
     def test_layers(self, parameterized_circuit, wires):
-        """A test of a simple circuit with 3 layers and 6 parameters"""
+        """A test of a simple circuit with 3 layers and 6 trainable parameters"""
 
         dev = qml.device("default.gaussian", wires=wires)
         qnode = qml.QNode(parameterized_circuit, dev)
-        qnode(0.1, 0.2, 0.3, 0.4, 0.5, 0.6)
+        qnode(*pnp.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6], requires_grad=True))
         circuit = qnode.qtape.graph
         layers = circuit.parametrized_layers
         ops = circuit.operations
@@ -264,7 +265,7 @@ class TestCircuitGraph:
 
         dev = qml.device("default.gaussian", wires=wires)
         qnode = qml.QNode(parameterized_circuit, dev)
-        qnode(0.1, 0.2, 0.3, 0.4, 0.5, 0.6)
+        qnode(*pnp.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6], requires_grad=True))
         circuit = qnode.qtape.graph
         result = list(circuit.iterate_parametrized_layers())
 
diff --git a/tests/devices/test_default_qubit_autograd.py b/tests/devices/test_default_qubit_autograd.py
index a707d777c..a13a7be1f 100644
--- a/tests/devices/test_default_qubit_autograd.py
+++ b/tests/devices/test_default_qubit_autograd.py
@@ -280,7 +280,10 @@ class TestPassthruIntegration:
         )
         assert np.allclose(res, expected_grad, atol=tol, rtol=0)
 
-    @pytest.mark.parametrize("x, shift", [(0.0, 0.0), (0.5, -0.5)])
+    @pytest.mark.parametrize(
+        "x, shift",
+        [np.array((0.0, 0.0), requires_grad=True), np.array((0.5, -0.5), requires_grad=True)],
+    )
     def test_hessian_at_zero(self, x, shift):
         """Tests that the Hessian at vanishing state vector amplitudes
         is correct."""
diff --git a/tests/fourier/test_qnode_spectrum.py b/tests/fourier/test_qnode_spectrum.py
index edb0d1ddb..f148a10ee 100644
--- a/tests/fourier/test_qnode_spectrum.py
+++ b/tests/fourier/test_qnode_spectrum.py
@@ -20,7 +20,6 @@ import numpy as np
 import pennylane as qml
 from pennylane import numpy as pnp
 from pennylane.fourier.qnode_spectrum import qnode_spectrum, _process_ids
-from pennylane.transforms import classical_jacobian
 
 
 def circuit_0(a):
@@ -136,11 +135,11 @@ expected_spectra = [
 
 circuits_nonlinear = [circuit_6, circuit_7, circuit_8]
 
-a = 0.812
-b = -5.231
-x = np.array([0.1, -1.9, 0.7])
-y = np.array([[0.4, 5.5], [1.6, 5.1]])
-z = np.array([-1.9, -0.1, 0.49, 0.24])
+a = pnp.array(0.812, requires_grad=True)
+b = pnp.array(-5.231, requires_grad=True)
+x = pnp.array([0.1, -1.9, 0.7], requires_grad=True)
+y = pnp.array([[0.4, 5.5], [1.6, 5.1]], requires_grad=True)
+z = pnp.array([-1.9, -0.1, 0.49, 0.24], requires_grad=True)
 all_args = [(a,), (a, b), (x,), (x, y), (x, y), (x, y, z)]
 all_args_nonlinear = [(x, y, z), (a,), (a, x)]
 
@@ -270,7 +269,7 @@ class TestCircuits:
             qml.RY(3 * y, wires=1)
             return qml.expval(qml.PauliZ(wires=0))
 
-        x, y = [0.2, 0.1]
+        x, y = pnp.array([0.2, 0.1], requires_grad=True)
         y_freq = [-3.2, -3.0, -2.8, -0.2, 0.0, 0.2, 2.8, 3.0, 3.2]
 
         res = qnode_spectrum(circuit, argnum=[0])(x, y)
@@ -295,8 +294,10 @@ class TestCircuits:
             qml.RY(3 * Y[0, 0, 0], wires=1)
             return qml.expval(qml.PauliZ(wires=0))
 
-        x = -1.5
-        Y = np.array([0.2, -1.2, 9.2, -0.2, 1.1, 4, -0.201, 0.8]).reshape((2, 2, 2))
+        x = pnp.array(-1.5, requires_grad=True)
+        Y = pnp.array([0.2, -1.2, 9.2, -0.2, 1.1, 4, -0.201, 0.8], requires_grad=True).reshape(
+            (2, 2, 2)
+        )
         z = 1.2
 
         res = qnode_spectrum(circuit, encoding_args={"x"})(x, Y, z=z)
diff --git a/tests/fourier/test_reconstruct.py b/tests/fourier/test_reconstruct.py
index 1c9568f7f..36bce8486 100644
--- a/tests/fourier/test_reconstruct.py
+++ b/tests/fourier/test_reconstruct.py
@@ -889,9 +889,15 @@ class TestReconstruct:
                 if nums_frequency is None:
                     # Gradient evaluation at reconstruction point not supported for
                     # Dirichlet reconstruction
-                    assert np.isclose(grad(x0), exp_qnode_grad(*params)[inner_key])
-                assert np.isclose(grad(x0 + 0.1), exp_grad(x0 + 0.1))
-                assert fun_close(grad, exp_grad, 10)
+                    assert np.isclose(
+                        grad(pnp.array(x0, requires_grad=True)),
+                        exp_qnode_grad(*pnp.array(params, requires_grad=True))[inner_key],
+                    )
+                assert np.isclose(
+                    grad(pnp.array(x0 + 0.1, requires_grad=True)),
+                    exp_grad(pnp.array(x0 + 0.1, requires_grad=True)),
+                )
+                assert fun_close(grad, exp_grad, pnp.array(10, requires_grad=True))
 
     @pytest.mark.parametrize(
         "qnode, params, ids, nums_frequency, spectra, shifts, exp_calls",
diff --git a/tests/gradients/test_gradient_transform.py b/tests/gradients/test_gradient_transform.py
index 967b4dea8..490b63bd0 100644
--- a/tests/gradients/test_gradient_transform.py
+++ b/tests/gradients/test_gradient_transform.py
@@ -380,7 +380,7 @@ class TestGradientTransformIntegration:
             qml.RX(x, wires=0)
             return qml.expval(qml.PauliZ(0))
 
-        x = 0.543
+        x = np.array(0.543, requires_grad=True)
 
         # the gradient function can be called with different shot values
         grad_fn = qml.gradients.param_shift(circuit)
diff --git a/tests/gradients/test_vjp.py b/tests/gradients/test_vjp.py
index 1fe4786f8..70bd9671c 100644
--- a/tests/gradients/test_vjp.py
+++ b/tests/gradients/test_vjp.py
@@ -302,7 +302,8 @@ class TestVJPGradients:
 
         dev = qml.device("default.qubit", wires=2)
 
-        params = torch.tensor([0.543, -0.654], requires_grad=True, dtype=torch.float64)
+        params_np = np.array([0.543, -0.654], requires_grad=True)
+        params = torch.tensor(params_np, requires_grad=True, dtype=torch.float64)
         dy = torch.tensor([-1.0, 0.0, 0.0, 1.0], dtype=torch.float64)
 
         with qml.tape.JacobianTape() as tape:
@@ -317,7 +318,7 @@ class TestVJPGradients:
         cost = vjp[0]
         cost.backward()
 
-        exp = qml.jacobian(lambda x: expected(x)[0])(params.detach().numpy())
+        exp = qml.jacobian(lambda x: expected(x)[0])(params_np)
         assert np.allclose(params.grad, exp, atol=tol, rtol=0)
 
     @pytest.mark.slow
@@ -328,7 +329,8 @@ class TestVJPGradients:
 
         dev = qml.device("default.qubit.tf", wires=2)
 
-        params = tf.Variable([0.543, -0.654], dtype=tf.float64)
+        params_np = np.array([0.543, -0.654], requires_grad=True)
+        params = tf.Variable(params_np, dtype=tf.float64)
         dy = tf.constant([-1.0, 0.0, 0.0, 1.0], dtype=tf.float64)
 
         with tf.GradientTape() as t:
@@ -342,7 +344,7 @@ class TestVJPGradients:
         assert np.allclose(vjp, expected(params), atol=tol, rtol=0)
 
         res = t.jacobian(vjp, params)
-        assert np.allclose(res, qml.jacobian(expected)(params.numpy()), atol=tol, rtol=0)
+        assert np.allclose(res, qml.jacobian(expected)(params_np), atol=tol, rtol=0)
 
     def test_tf_custom_loss(self):
         """Tests that the gradient pipeline using the TensorFlow interface with
@@ -386,7 +388,8 @@ class TestVJPGradients:
         from jax import numpy as jnp
 
         dev = qml.device("default.qubit.jax", wires=2)
-        params = jnp.array([0.543, -0.654])
+        params_np = np.array([0.543, -0.654], requires_grad=True)
+        params = jnp.array(params_np)
 
         @partial(jax.jit, static_argnums=1)
         def cost_fn(x, dy):
@@ -403,7 +406,7 @@ class TestVJPGradients:
         assert np.allclose(res, expected(params), atol=tol, rtol=0)
 
         res = jax.jacobian(cost_fn, argnums=0)(params, dy)
-        exp = qml.jacobian(expected)(np.array(params))
+        exp = qml.jacobian(expected)(params_np)
         assert np.allclose(res, exp, atol=tol, rtol=0)
 
 
diff --git a/tests/interfaces/test_batch_autograd_qnode.py b/tests/interfaces/test_batch_autograd_qnode.py
index eddbe910b..eaaf96f70 100644
--- a/tests/interfaces/test_batch_autograd_qnode.py
+++ b/tests/interfaces/test_batch_autograd_qnode.py
@@ -690,8 +690,7 @@ class TestQubitIntegration:
             Template(weights, wires=[0, 1])
             return qml.expval(qml.PauliX(0))
 
-        def cost(weights):
-            w1, w2 = weights
+        def cost(w1, w2):
             c1 = circuit1(w1)
             c2 = circuit2(c1, w2)
             return np.sum(c2) ** 2
@@ -700,12 +699,12 @@ class TestQubitIntegration:
         w2 = qml.templates.StronglyEntanglingLayers.shape(n_wires=2, n_layers=4)
 
         weights = [
-            np.random.random(w1),
-            np.random.random(w2),
+            np.random.random(w1, requires_grad=True),
+            np.random.random(w2, requires_grad=True),
         ]
 
         grad_fn = qml.grad(cost)
-        res = grad_fn(weights)
+        res = grad_fn(*weights)
 
         assert len(res) == 2
 
@@ -744,9 +743,9 @@ class TestQubitIntegration:
         a = np.array(0.4, requires_grad=False)
 
         # The remaining free parameters are all differentiable.
-        b = 0.5
-        c = 0.1
-        weights = np.array([0.2, 0.3])
+        b = np.array(0.5, requires_grad=True)
+        c = np.array(0.1, requires_grad=True)
+        weights = np.array([0.2, 0.3], requires_grad=True)
 
         res = grad_fn(a, b, c, weights)
 
@@ -1136,7 +1135,7 @@ class TestQubitIntegration:
 
         dev = qml.device(dev_name, wires=2)
         P = np.array([1], requires_grad=False)
-        x, y = 0.765, -0.654
+        x, y = np.array([0.765, -0.654], requires_grad=True)
 
         @qnode(dev, diff_method=diff_method, interface="autograd", mode=mode)
         def circuit(x, y):
@@ -1172,8 +1171,8 @@ class TestCV:
         """Test variance of a first order CV observable"""
         dev = qml.device("default.gaussian", wires=1)
 
-        r = 0.543
-        phi = -0.654
+        r = np.array(0.543, requires_grad=True)
+        phi = np.array(-0.654, requires_grad=True)
 
         @qnode(dev, diff_method=diff_method, **kwargs)
         def circuit(r, phi):
@@ -1201,8 +1200,8 @@ class TestCV:
         """Test variance of a second order CV expectation value"""
         dev = qml.device("default.gaussian", wires=1)
 
-        n = 0.12
-        a = 0.765
+        n = np.array(0.12, requires_grad=True)
+        a = np.array(0.765, requires_grad=True)
 
         @qnode(dev, diff_method=diff_method, **kwargs)
         def circuit(n, a):
diff --git a/tests/interfaces/test_qnode_autograd.py b/tests/interfaces/test_qnode_autograd.py
index ce5798fbf..d95b3c969 100644
--- a/tests/interfaces/test_qnode_autograd.py
+++ b/tests/interfaces/test_qnode_autograd.py
@@ -300,7 +300,7 @@ class TestQNode:
         assert len(spy.call_args_list) == 2
 
         # make the second QNode argument a constant
-        a = 0.54  # the QNode will treat a scalar as differentiable
+        a = np.array(0.54, requires_grad=True)
         b = np.array(0.8, requires_grad=False)
 
         spy.call_args_list = []
@@ -639,19 +639,21 @@ class TestQNode:
             qml.templates.StronglyEntanglingLayers(weights, wires=[0, 1])
             return qml.expval(qml.PauliX(0))
 
-        def cost(weights):
-            w1, w2 = weights
+        def cost(w1, w2):
             c1 = circuit1(w1)
             c2 = circuit2(c1, w2)
             return np.sum(c2) ** 2
 
-        w1 = np.random.random(qml.templates.StronglyEntanglingLayers.shape(n_layers=3, n_wires=2))
-        w2 = np.random.random(qml.templates.StronglyEntanglingLayers.shape(n_layers=4, n_wires=2))
+        w1 = qml.templates.StronglyEntanglingLayers.shape(n_layers=3, n_wires=2)
+        w2 = qml.templates.StronglyEntanglingLayers.shape(n_layers=4, n_wires=2)
 
-        weights = [w1, w2]
+        weights = [
+            np.random.random(w1, requires_grad=True),
+            np.random.random(w2, requires_grad=True),
+        ]
 
         grad_fn = qml.grad(cost)
-        res = grad_fn(weights)
+        res = grad_fn(*weights)
 
         assert len(res) == 2
 
@@ -690,9 +692,9 @@ class TestQNode:
         a = np.array(0.4, requires_grad=False)
 
         # The remaining free parameters are all differentiable.
-        b = 0.5
-        c = 0.1
-        weights = np.array([0.2, 0.3])
+        b = np.array(0.5, requires_grad=True)
+        c = np.array(0.1, requires_grad=True)
+        weights = np.array([0.2, 0.3], requires_grad=True)
 
         res = grad_fn(a, b, c, weights)
 
@@ -1140,7 +1142,7 @@ def test_adjoint_reuse_device_state(mocker):
 
     spy = mocker.spy(dev, "adjoint_jacobian")
 
-    grad = qml.grad(circ)(1.0)
+    grad = qml.grad(circ)(np.array(1.0, requires_grad=True))
     assert circ.device.num_executions == 1
 
     spy.assert_called_with(mocker.ANY, use_device_state=True)
diff --git a/tests/ops/qubit/test_hamiltonian.py b/tests/ops/qubit/test_hamiltonian.py
index 28b190bf9..779e7ee5d 100644
--- a/tests/ops/qubit/test_hamiltonian.py
+++ b/tests/ops/qubit/test_hamiltonian.py
@@ -1236,8 +1236,8 @@ class TestHamiltonianDifferentiation:
     def test_trainable_coeffs_paramshift(self, simplify, group):
         """Test the parameter-shift method by comparing the differentiation of linearly combined subcircuits
         with the differentiation of a Hamiltonian expectation"""
-        coeffs = np.array([-0.05, 0.17])
-        param = np.array(1.7)
+        coeffs = pnp.array([-0.05, 0.17], requires_grad=True)
+        param = pnp.array(1.7, requires_grad=True)
 
         # differentiating a circuit with measurement expval(H)
         @qml.qnode(dev, diff_method="parameter-shift")
diff --git a/tests/ops/qubit/test_non_parametric_ops.py b/tests/ops/qubit/test_non_parametric_ops.py
index c87808515..f200b4894 100644
--- a/tests/ops/qubit/test_non_parametric_ops.py
+++ b/tests/ops/qubit/test_non_parametric_ops.py
@@ -687,7 +687,9 @@ class TestMultiControlledX:
                 op.queue()
             return qml.probs(wires=range(n_ctrl_wires + 1))
 
-        u = np.array([f(b) for b in itertools.product(range(2), repeat=n_ctrl_wires + 1)]).T
+        u = np.array(
+            [f(np.array(b)) for b in itertools.product(range(2), repeat=n_ctrl_wires + 1)]
+        ).T
         assert np.allclose(u, np.eye(2 ** (n_ctrl_wires + 1)))
 
     @pytest.mark.parametrize("n_ctrl_wires", range(3, 6))
@@ -718,7 +720,9 @@ class TestMultiControlledX:
                 op.queue()
             return qml.probs(wires=range(n_ctrl_wires + 1))
 
-        u = np.array([f(b) for b in itertools.product(range(2), repeat=n_ctrl_wires + 1)]).T
+        u = np.array(
+            [f(np.array(b)) for b in itertools.product(range(2), repeat=n_ctrl_wires + 1)]
+        ).T
         assert np.allclose(u, np.eye(2 ** (n_ctrl_wires + 1)))
 
     def test_not_enough_workers(self):
@@ -780,7 +784,9 @@ class TestMultiControlledX:
                 op.queue()
             return qml.probs(wires=range(n_ctrl_wires + 1))
 
-        u = np.array([f(b) for b in itertools.product(range(2), repeat=n_ctrl_wires + 1)]).T
+        u = np.array(
+            [f(np.array(b)) for b in itertools.product(range(2), repeat=n_ctrl_wires + 1)]
+        ).T
         spy.assert_called()
         assert np.allclose(u, np.eye(2 ** (n_ctrl_wires + 1)))
 
@@ -812,7 +818,9 @@ class TestMultiControlledX:
                 op.queue()
             return qml.probs(wires=control_wires + target_wire)
 
-        u = np.array([f(b) for b in itertools.product(range(2), repeat=n_ctrl_wires + 1)]).T
+        u = np.array(
+            [f(np.array(b)) for b in itertools.product(range(2), repeat=n_ctrl_wires + 1)]
+        ).T
         spy.assert_called()
         assert np.allclose(u, np.eye(2 ** (n_ctrl_wires + 1)))
 
diff --git a/tests/ops/qubit/test_parametric_ops.py b/tests/ops/qubit/test_parametric_ops.py
index 3339f8e87..42bea16e9 100644
--- a/tests/ops/qubit/test_parametric_ops.py
+++ b/tests/ops/qubit/test_parametric_ops.py
@@ -1151,7 +1151,7 @@ class TestPauliRot:
         assert decomp_ops[4].wires == Wires([2])
         assert decomp_ops[4].data[0] == -np.pi / 2
 
-    @pytest.mark.parametrize("angle", np.linspace(0, 2 * np.pi, 7))
+    @pytest.mark.parametrize("angle", npp.linspace(0, 2 * np.pi, 7, requires_grad=True))
     @pytest.mark.parametrize("pauli_word", ["XX", "YY", "ZZ"])
     def test_differentiability(self, angle, pauli_word, tol):
         """Test that differentiation of PauliRot works."""
@@ -1356,7 +1356,7 @@ class TestMultiRZ:
         assert decomp_ops[4].name == "CNOT"
         assert decomp_ops[4].wires == Wires([3, 2])
 
-    @pytest.mark.parametrize("angle", np.linspace(0, 2 * np.pi, 7))
+    @pytest.mark.parametrize("angle", npp.linspace(0, 2 * np.pi, 7, requires_grad=True))
     def test_differentiability(self, angle, tol):
         """Test that differentiation of MultiRZ works."""
 
diff --git a/tests/ops/test_channel_ops.py b/tests/ops/test_channel_ops.py
index a5b4c9ac6..1cc0492d2 100644
--- a/tests/ops/test_channel_ops.py
+++ b/tests/ops/test_channel_ops.py
@@ -14,10 +14,10 @@
 """
 Unit tests for the available built-in quantum channels.
 """
-import functools
 import pytest
 import numpy as np
 import pennylane as qml
+from pennylane import numpy as pnp
 from pennylane.ops import channel
 from pennylane.wires import WireError
 
@@ -159,7 +159,7 @@ class TestBitFlip:
         grad recipes are independent of channel parameter"""
 
         dev = qml.device("default.mixed", wires=1)
-        prob = 0.5
+        prob = pnp.array(0.5, requires_grad=True)
 
         @qml.qnode(dev)
         def circuit(p):
@@ -196,7 +196,7 @@ class TestPhaseFlip:
         grad recipes are independent of channel parameter"""
 
         dev = qml.device("default.mixed", wires=1)
-        prob = 0.5
+        prob = pnp.array(0.5, requires_grad=True)
 
         @qml.qnode(dev)
         def circuit(p):
@@ -235,7 +235,7 @@ class TestDepolarizingChannel:
         grad recipes are independent of channel parameter"""
 
         dev = qml.device("default.mixed", wires=1)
-        prob = 0.5
+        prob = pnp.array(0.5, requires_grad=True)
 
         @qml.qnode(dev)
         def circuit(p):
@@ -293,7 +293,7 @@ class TestResetError:
         grad recipes are independent of channel parameter"""
 
         dev = qml.device("default.mixed", wires=1)
-        p_0, p_1 = 0.0, 0.5
+        p_0, p_1 = pnp.array([0.0, 0.5], requires_grad=True)
 
         @qml.qnode(dev)
         def circuit(p_0, p_1):
diff --git a/tests/tape/test_jacobian_tape.py b/tests/tape/test_jacobian_tape.py
index bde745c5a..f878d8cae 100644
--- a/tests/tape/test_jacobian_tape.py
+++ b/tests/tape/test_jacobian_tape.py
@@ -16,6 +16,7 @@ import pytest
 import numpy as np
 
 import pennylane as qml
+from pennylane import numpy as pnp
 from pennylane.tape import JacobianTape, QuantumTape
 from pennylane.devices import DefaultQubit
 from pennylane.operation import Observable
@@ -872,5 +873,6 @@ class TestObservableWithObjectReturnType:
             qml.RY(x, wires=0)
             return qml.expval(qml.PauliZ(wires=0))
 
-        assert np.isclose(qnode(0.2).item().val, reference_qnode(0.2))
-        assert np.isclose(qml.jacobian(qnode)(0.2).item().val, qml.jacobian(reference_qnode)(0.2))
+        par = pnp.array(0.2, requires_grad=True)
+        assert np.isclose(qnode(par).item().val, reference_qnode(par))
+        assert np.isclose(qml.jacobian(qnode)(par).item().val, qml.jacobian(reference_qnode)(par))
diff --git a/tests/tape/test_qnode_old.py b/tests/tape/test_qnode_old.py
index 8d0229d36..caf4f263c 100644
--- a/tests/tape/test_qnode_old.py
+++ b/tests/tape/test_qnode_old.py
@@ -542,7 +542,9 @@ class TestValidation:
         if method == "best":
             spy.assert_called_once()
 
-    @pytest.mark.parametrize("par", [None, 1, 1.1, np.array(1.2)])
+    @pytest.mark.parametrize(
+        "par", [None, 1, 1.1, np.array(1.2), pnp.array(1.3, requires_grad=True)]
+    )
     def test_diff_method_none(self, par):
         """Test if diff_method=None works as intended."""
         dev = qml.device("default.qubit", wires=1)
@@ -556,13 +558,17 @@ class TestValidation:
 
         grad = qml.grad(qn)
 
-        # Raise error in all cases
+        # Raise error in cases 1 and 5, as non-trainable parameters do not trigger differentiation
         # Case 1: No input
         # Case 2: int input
         # Case 3: float input
         # Case 4: numpy input
-        with pytest.raises(TypeError) as exp:
-            grad() if par is None else grad(par)
+        # Case 5: differentiable tensor input
+        if par is None or hasattr(par, "requires_grad"):
+            with pytest.raises(TypeError) as exp:
+                grad() if par is None else grad(par)
+        else:
+            grad(par)
 
     def test_diff_method_none_no_qnode_param(self):
         """Test if diff_method=None works as intended."""
@@ -725,8 +731,8 @@ class TestTapeConstruction:
         assert qn.diff_options["h"] == 1e-8
         assert qn.diff_options["order"] == 2
 
-        x = 0.12
-        y = 0.54
+        x = pnp.array(0.12, requires_grad=True)
+        y = pnp.array(0.54, requires_grad=True)
 
         spy = mocker.spy(JacobianTape, "expand")
         res = qn(x, y)
diff --git a/tests/tape/test_qubit_param_shift.py b/tests/tape/test_qubit_param_shift.py
index 255a7cbae..d5d080651 100644
--- a/tests/tape/test_qubit_param_shift.py
+++ b/tests/tape/test_qubit_param_shift.py
@@ -16,8 +16,8 @@ import pytest
 import numpy as np
 
 import pennylane as qml
+from pennylane import numpy as pnp
 from pennylane.tape import QubitParamShiftTape
-from pennylane.measure import MeasurementProcess
 
 
 class TestGradMethod:
@@ -710,7 +710,7 @@ class TestHessian:
             G(b, wires=[0, 1])
             return qml.expval(qml.PauliX(0))
 
-        b = 0.123
+        b = pnp.array(0.123, requires_grad=True)
 
         res = circuit(b)
         assert np.allclose(res, -np.cos(b / 2), atol=tol, rtol=0)
diff --git a/tests/tape/test_reversible.py b/tests/tape/test_reversible.py
index 0ec628cc7..4216d1cc2 100644
--- a/tests/tape/test_reversible.py
+++ b/tests/tape/test_reversible.py
@@ -17,10 +17,9 @@ import pytest
 from pennylane import numpy as np
 
 import pennylane as qml
-from pennylane.interfaces.autograd import AutogradInterface
+from pennylane import numpy as pnp
 from pennylane.tape import JacobianTape, ReversibleTape
 from pennylane.qnode_old import QNode, qnode
-from pennylane.measure import MeasurementProcess
 
 
 thetas = np.linspace(-2 * np.pi, 2 * np.pi, 8)
@@ -395,7 +394,7 @@ class TestQNodeIntegration:
             UserWarning,
             match="Requested reversible differentiation to be computed with finite shots.",
         ):
-            qml.grad(circ)(0.1)
+            qml.grad(circ)(pnp.array(0.1, requires_grad=True))
 
     def test_qnode(self, mocker, tol):
         """Test that specifying diff_method allows the reversible
diff --git a/tests/templates/test_embeddings/test_qaoa_emb.py b/tests/templates/test_embeddings/test_qaoa_emb.py
index 89fccfe92..9a6600bf1 100644
--- a/tests/templates/test_embeddings/test_qaoa_emb.py
+++ b/tests/templates/test_embeddings/test_qaoa_emb.py
@@ -262,25 +262,6 @@ class TestInterfaces:
     """Tests that the template is compatible with all interfaces, including the computation
     of gradients."""
 
-    def test_list_and_tuples(self, tol):
-        """Tests common iterables as inputs."""
-
-        features = [0.1, -1.3]
-        weights = [[0.1, -1.1, 0.2]]
-
-        dev = qml.device("default.qubit", wires=2)
-
-        circuit = qml.QNode(circuit_template, dev)
-        circuit2 = qml.QNode(circuit_decomposed, dev)
-
-        res = circuit(features, weights)
-        res2 = circuit2(features, weights)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
-        res = circuit(tuple(features), tuple(weights))
-        res2 = circuit2(tuple(features), tuple(weights))
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
     def test_autograd(self, tol):
         """Tests the autograd interface."""
 
diff --git a/tests/templates/test_layers/test_basic_entangler.py b/tests/templates/test_layers/test_basic_entangler.py
index c6908256a..611c72396 100644
--- a/tests/templates/test_layers/test_basic_entangler.py
+++ b/tests/templates/test_layers/test_basic_entangler.py
@@ -167,25 +167,6 @@ class TestInterfaces:
     """Tests that the template is compatible with all interfaces, including the computation
     of gradients."""
 
-    def test_list_and_tuples(self, tol):
-        """Tests common iterables as inputs."""
-
-        weights = [[0.1, -1.1, 0.2]]
-
-        dev = qml.device("default.qubit", wires=3)
-
-        circuit = qml.QNode(circuit_template, dev)
-        circuit2 = qml.QNode(circuit_decomposed, dev)
-
-        res = circuit(weights)
-        res2 = circuit2(weights)
-        np.testing.assert_allclose(res, res2, atol=tol, rtol=0)
-
-        weights_tuple = [tuple(weights[0])]
-        res = circuit(weights_tuple)
-        res2 = circuit2(weights_tuple)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
     def test_autograd(self, tol):
         """Tests the autograd interface."""
 
diff --git a/tests/templates/test_layers/test_gate_fabric.py b/tests/templates/test_layers/test_gate_fabric.py
index cb8ec78aa..f36a870c1 100644
--- a/tests/templates/test_layers/test_gate_fabric.py
+++ b/tests/templates/test_layers/test_gate_fabric.py
@@ -17,6 +17,7 @@ Unit tests for the GateFabric template.
 import pytest
 import numpy as np
 import pennylane as qml
+from pennylane import numpy as pnp
 
 
 class TestDecomposition:
@@ -775,30 +776,10 @@ class TestInterfaces:
     """Tests that the GateFabric template is compatible with all interfaces, including the computation
     of gradients."""
 
-    def test_list_and_tuples(self, tol):
-        """Tests common iterables as inputs."""
-
-        weights = [[[0.1, -1.1]]]
-
-        dev = qml.device("default.qubit", wires=4)
-
-        circuit = qml.QNode(circuit_template, dev)
-        circuit2 = qml.QNode(circuit_decomposed, dev)
-
-        res = circuit(weights)
-        res2 = circuit2(weights)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
-        weights_tuple = [tuple(weights[0])]
-        res = circuit(weights_tuple)
-        res2 = circuit2(weights_tuple)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
     def test_autograd(self, tol):
         """Tests the autograd interface."""
 
-        weights = np.random.random(size=(1, 1, 2))
-        weights = qml.math.array(weights)
+        weights = pnp.random.random(size=(1, 1, 2), requires_grad=True)
 
         dev = qml.device("default.qubit", wires=4)
 
diff --git a/tests/templates/test_layers/test_particle_conserving_u1.py b/tests/templates/test_layers/test_particle_conserving_u1.py
index 0b548e646..cb143c508 100644
--- a/tests/templates/test_layers/test_particle_conserving_u1.py
+++ b/tests/templates/test_layers/test_particle_conserving_u1.py
@@ -305,25 +305,6 @@ class TestInterfaces:
     """Tests that the template is compatible with all interfaces, including the computation
     of gradients."""
 
-    def test_list_and_tuples(self, tol):
-        """Tests common iterables as inputs."""
-
-        weights = [[[0.1, -1.1]]]
-
-        dev = qml.device("default.qubit", wires=2)
-
-        circuit = qml.QNode(circuit_template, dev)
-        circuit2 = qml.QNode(circuit_decomposed, dev)
-
-        res = circuit(weights)
-        res2 = circuit2(weights)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
-        weights_tuple = [tuple(weights[0])]
-        res = circuit(weights_tuple)
-        res2 = circuit2(weights_tuple)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
     def test_autograd(self, tol):
         """Tests the autograd interface."""
 
diff --git a/tests/templates/test_layers/test_particle_conserving_u2.py b/tests/templates/test_layers/test_particle_conserving_u2.py
index 22ab59a17..97c864e89 100644
--- a/tests/templates/test_layers/test_particle_conserving_u2.py
+++ b/tests/templates/test_layers/test_particle_conserving_u2.py
@@ -246,25 +246,6 @@ class TestInterfaces:
     """Tests that the template is compatible with all interfaces, including the computation
     of gradients."""
 
-    def test_list_and_tuples(self, tol):
-        """Tests common iterables as inputs."""
-
-        weights = [[0.1, -1.1, 0.2]]
-
-        dev = qml.device("default.qubit", wires=2)
-
-        circuit = qml.QNode(circuit_template, dev)
-        circuit2 = qml.QNode(circuit_decomposed, dev)
-
-        res = circuit(weights)
-        res2 = circuit2(weights)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
-        weights_tuple = [tuple(weights[0])]
-        res = circuit(weights_tuple)
-        res2 = circuit2(weights_tuple)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
     def test_autograd(self, tol):
         """Tests the autograd interface."""
 
diff --git a/tests/templates/test_layers/test_random.py b/tests/templates/test_layers/test_random.py
index ecdf6b71f..48e26ab65 100644
--- a/tests/templates/test_layers/test_random.py
+++ b/tests/templates/test_layers/test_random.py
@@ -161,25 +161,6 @@ class TestInterfaces:
     """Tests that the template is compatible with all interfaces, including the computation
     of gradients."""
 
-    def test_list_and_tuples(self, tol):
-        """Tests common iterables as inputs."""
-
-        weights = [[0.1, -1.1, 0.2]]
-
-        dev = qml.device("default.qubit", wires=3)
-
-        circuit = qml.QNode(circuit_template, dev)
-        circuit2 = qml.QNode(circuit_decomposed, dev)
-
-        res = circuit(weights)
-        res2 = circuit2(weights)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
-        weights_tuple = [tuple(weights[0])]
-        res = circuit(weights_tuple)
-        res2 = circuit2(weights_tuple)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
     def test_autograd(self, tol):
         """Tests the autograd interface."""
 
diff --git a/tests/templates/test_layers/test_simplified_twodesign.py b/tests/templates/test_layers/test_simplified_twodesign.py
index ef473ecbd..281e8a11e 100644
--- a/tests/templates/test_layers/test_simplified_twodesign.py
+++ b/tests/templates/test_layers/test_simplified_twodesign.py
@@ -105,7 +105,7 @@ class TestDecomposition:
             )
             return [qml.expval(qml.PauliZ(wires=i)) for i in range(n_wires)]
 
-        expectations = circuit(initial_layer_weights, weights)
+        expectations = circuit(np.array(initial_layer_weights), np.array(weights))
         for exp, target_exp in zip(expectations, target):
             assert np.allclose(exp, target_exp, atol=tol, rtol=0)
 
@@ -212,27 +212,6 @@ class TestInterfaces:
     """Tests that the template is compatible with all interfaces, including the computation
     of gradients."""
 
-    def test_list_and_tuples(self, tol):
-        """Tests common iterables as inputs."""
-
-        weights = [[[0.1, -1.1], [0.2, 0.1]]]
-        initial_weights = [0.1, 0.2, 0.3]
-
-        dev = qml.device("default.qubit", wires=3)
-
-        circuit = qml.QNode(circuit_template, dev)
-        circuit2 = qml.QNode(circuit_decomposed, dev)
-
-        res = circuit(initial_weights, weights)
-        res2 = circuit2(initial_weights, weights)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
-        weights_tuple = [[tuple(weights[0][0]), tuple(weights[0][1])]]
-        init_weights_tuple = tuple(initial_weights)
-        res = circuit(init_weights_tuple, weights_tuple)
-        res2 = circuit2(init_weights_tuple, weights_tuple)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
     def test_autograd(self, tol):
         """Tests the autograd interface."""
 
diff --git a/tests/templates/test_layers/test_strongly_entangling.py b/tests/templates/test_layers/test_strongly_entangling.py
index 59ccf1236..c4e15fd81 100644
--- a/tests/templates/test_layers/test_strongly_entangling.py
+++ b/tests/templates/test_layers/test_strongly_entangling.py
@@ -195,31 +195,6 @@ class TestInterfaces:
     """Tests that the template is compatible with all interfaces, including the computation
     of gradients."""
 
-    def test_list_and_tuples(self, tol):
-        """Tests common iterables as inputs."""
-
-        weights = [[[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]]
-
-        dev = qml.device("default.qubit", wires=3)
-
-        circuit = qml.QNode(circuit_template, dev)
-        circuit2 = qml.QNode(circuit_decomposed, dev)
-
-        res = circuit(weights)
-        res2 = circuit2(weights)
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
-        weights_tuple = [
-            [
-                tuple(weights[0][0]),
-                tuple(weights[0][1]),
-                tuple(weights[0][2]),
-            ]
-        ]
-        res = circuit(weights_tuple)
-        res2 = circuit2(tuple(weights_tuple))
-        assert qml.math.allclose(res, res2, atol=tol, rtol=0)
-
     def test_autograd(self, tol):
         """Tests the autograd interface."""
 
diff --git a/tests/test_classical_gradients.py b/tests/test_classical_gradients.py
index a4a4a6811..237a1bdd9 100644
--- a/tests/test_classical_gradients.py
+++ b/tests/test_classical_gradients.py
@@ -57,17 +57,6 @@ class TestGradientUnivar:
 
         assert np.allclose(auto_grad, correct_grad, atol=tol, rtol=0)
 
-    def test_sin_warns_grad(self, tol):
-        """Test that a warning is raised if a positional argument without the
-        requires_grad attribute set is passed when differentiating a classical
-        scalar valued function."""
-        x_vals = np.linspace(-10, 10, 16, endpoint=False)
-
-        with pytest.warns(
-            UserWarning, match="inputs have to explicitly specify requires_grad=True"
-        ):
-            qml.grad(np.sin)(0.0)
-
 
 class TestGradientMultiVar:
     """Tests gradients of multivariate unidimensional functions."""
@@ -111,16 +100,6 @@ class TestGradientMultiVar:
 
         assert np.allclose(auto_grad, correct_grad, atol=tol, rtol=0)
 
-    def test_sin_warns_jacobian(self, tol):
-        """Test that a warning is raised if a positional argument without the
-        requires_grad attribute set is passed when differentiating a classical
-        vector valued function."""
-        arr = onp.array([0.1, 0.2, 0.3])
-        with pytest.warns(
-            UserWarning, match="inputs have to explicitly specify requires_grad=True"
-        ):
-            qml.jacobian(np.sin)(arr)
-
 
 class TestGradientMultiargs:
     """Tests gradients of univariate functions with multiple arguments in signature."""
diff --git a/tests/test_measure.py b/tests/test_measure.py
index 27905c0d9..c633c7f63 100644
--- a/tests/test_measure.py
+++ b/tests/test_measure.py
@@ -16,6 +16,7 @@ import pytest
 import numpy as np
 
 import pennylane as qml
+from pennylane import numpy as pnp
 from pennylane.devices import DefaultQubit
 
 from pennylane.queuing import AnnotatedQueue
@@ -695,7 +696,7 @@ class TestState:
             ValueError,
             match="Computing the gradient of circuits that return the state is not supported",
         ):
-            d_func(0.1)
+            d_func(pnp.array(0.1, requires_grad=True))
 
     def test_no_state_capability(self, monkeypatch):
         """Test if an error is raised for devices that are not capable of returning the state.
diff --git a/tests/test_prob.py b/tests/test_prob.py
index 08fa61883..2b865522b 100644
--- a/tests/test_prob.py
+++ b/tests/test_prob.py
@@ -18,6 +18,7 @@ import pytest
 
 import numpy as np
 import pennylane as qml
+from pennylane import numpy as pnp
 
 
 # make the test deterministic
@@ -142,7 +143,7 @@ def test_numerical_analytic_diff_agree(init_state, tol):
 
         return qml.probs(wires=[1, 3])
 
-    params = [0.543, -0.765, -0.3]
+    params = pnp.array([0.543, -0.765, -0.3], requires_grad=True)
 
     circuit_F = qml.QNode(circuit, dev, diff_method="finite-diff")
     circuit_A = qml.QNode(circuit, dev, diff_method="parameter-shift")
diff --git a/tests/test_qaoa.py b/tests/test_qaoa.py
index 7d73fe015..d7c4703a6 100644
--- a/tests/test_qaoa.py
+++ b/tests/test_qaoa.py
@@ -1868,7 +1868,9 @@ class TestCycles:
         bitstrings = itertools.product([0, 1], repeat=wires)
 
         # Calculate the corresponding energies
-        energies_bitstrings = ((cost(bitstring).numpy(), bitstring) for bitstring in bitstrings)
+        energies_bitstrings = (
+            (cost(np.array(bitstring)).numpy(), bitstring) for bitstring in bitstrings
+        )
 
         for energy, bs in energies_bitstrings:
 
@@ -1919,7 +1921,7 @@ class TestCycles:
         states = itertools.product([0, 1], repeat=wires)
 
         # Calculate the corresponding energies
-        energies_states = ((cost(state).numpy(), state) for state in states)
+        energies_states = ((cost(np.array(state)).numpy(), state) for state in states)
 
         # We now have the energies of each bitstring/state. We also want to calculate the net flow of
         # the corresponding edges
@@ -1981,7 +1983,9 @@ class TestCycles:
         bitstrings = itertools.product([0, 1], repeat=wires)
 
         # Calculate the corresponding energies
-        energies_bitstrings = ((cost(bitstring).numpy(), bitstring) for bitstring in bitstrings)
+        energies_bitstrings = (
+            (cost(np.array(bitstring)).numpy(), bitstring) for bitstring in bitstrings
+        )
 
         def find_simple_cycle(list_of_edges):
             """Returns True if list_of_edges contains a permutation corresponding to a simple cycle"""
diff --git a/tests/test_qnode.py b/tests/test_qnode.py
index 60237372d..7730ac199 100644
--- a/tests/test_qnode.py
+++ b/tests/test_qnode.py
@@ -277,7 +277,7 @@ class TestValidation:
 
         assert circuit.gradient_fn is qml.gradients.finite_diff
 
-        qml.grad(circuit)(0.5)
+        qml.grad(circuit)(pnp.array(0.5, requires_grad=True))
         spy.assert_called()
 
     def test_unknown_diff_method_string(self):
@@ -403,8 +403,8 @@ class TestTapeConstruction:
 
         qn = QNode(func, dev)
 
-        x = 0.12
-        y = 0.54
+        x = pnp.array(0.12, requires_grad=True)
+        y = pnp.array(0.54, requires_grad=True)
 
         res = qn(x, y)
 
@@ -437,7 +437,9 @@ class TestTapeConstruction:
         assert qn.gradient_kwargs["h"] == 1e-8
         assert qn.gradient_kwargs["approx_order"] == 2
 
-        jac = qn.gradient_fn(qn)(0.45, 0.1)
+        jac = qn.gradient_fn(qn)(
+            pnp.array(0.45, requires_grad=True), pnp.array(0.1, requires_grad=True)
+        )
         assert isinstance(jac, tuple) and len(jac) == 2
         assert jac[0].shape == (2, 2)
         assert jac[1].shape == (2, 2)
@@ -607,8 +609,8 @@ class TestDecorator:
         assert isinstance(func, QNode)
         assert func.__doc__ == "My function docstring"
 
-        x = 0.12
-        y = 0.54
+        x = pnp.array(0.12, requires_grad=True)
+        y = pnp.array(0.54, requires_grad=True)
 
         res = func(x, y)
 
@@ -812,13 +814,11 @@ class TestShots:
     def test_no_shots_per_call_if_user_has_shots_qfunc_arg(self):
         """Tests that the per-call shots overwriting is suspended
         if user has a shots argument, but a warning is raised."""
-
-        # Todo: use standard creation of qnode below for both asserts once we do not parse args to tensors any more
-        dev = qml.device("default.qubit", wires=[qml.numpy.array(0), qml.numpy.array(1)], shots=10)
+        dev = qml.device("default.qubit", wires=[0, 1], shots=10)
 
         def circuit(a, shots):
             qml.RX(a, wires=shots)
-            return qml.sample(qml.PauliZ(wires=qml.numpy.array(0)))
+            return qml.sample(qml.PauliZ(wires=0))
 
         # assert that warning is still raised
         with pytest.warns(
@@ -980,7 +980,7 @@ class TestTapeExpansion:
             UnsupportedOp(x, wires=0)
             return qml.expval(qml.PauliZ(0))
 
-        x = np.array(0.5)
+        x = pnp.array(0.5, requires_grad=True)
         spy = mocker.spy(circuit.gradient_fn, "transform_fn")
         qml.grad(circuit)(x)
 
@@ -1022,7 +1022,7 @@ class TestTapeExpansion:
             return qml.expval(qml.PauliX(0))
 
         spy = mocker.spy(circuit.device, "batch_execute")
-        x = np.array(0.5)
+        x = pnp.array(0.5, requires_grad=True)
         circuit(x)
 
         tape = spy.call_args[0][0][0]
diff --git a/tests/test_quantum_gradients.py b/tests/test_quantum_gradients.py
index 86fb440b2..798bf15ff 100644
--- a/tests/test_quantum_gradients.py
+++ b/tests/test_quantum_gradients.py
@@ -185,7 +185,7 @@ class TestCVGradient:
 
     def test_cv_gradients_multiple_gate_parameters(self, gaussian_dev, tol):
         "Tests that gates with multiple free parameters yield correct gradients."
-        par = [0.4, -0.3, -0.7, 0.2]
+        par = anp.array([0.4, -0.3, -0.7, 0.2], requires_grad=True)
 
         def qf(r0, phi0, r1, phi1):
             qml.Squeezing(r0, phi0, wires=[0])
@@ -535,7 +535,7 @@ class TestQubitGradient:
             J = grad_method(quantum)(a, np.log(b))
             return val * np.array([J[0][0] + J[0][1], (J[1][0] + J[1][1]) / b])
 
-        param = np.array([-0.1259, 1.53])
+        param = anp.array([-0.1259, 1.53], requires_grad=True)
         y0 = classical(param)
         grad_classical = autograd.jacobian(classical)
         grad_auto = grad_classical(param)
@@ -612,38 +612,6 @@ class TestQubitGradient:
 
                 assert grad_eval == pytest.approx(grad_true, abs=tol)
 
-    def test_autograd_positional_non_trainable_warns_grad(self):
-        """Test that a warning is raised if a positional argument without the
-        requires_grad attribute set is passed when differentiating a QNode with a
-        scalar output."""
-        dev = qml.device("default.qubit", wires=5)
-
-        @qml.qnode(dev)
-        def test(x):
-            qml.RY(x, wires=[0])
-            return qml.expval(qml.PauliZ(0))
-
-        with pytest.warns(
-            UserWarning, match="inputs have to explicitly specify requires_grad=True"
-        ):
-            qml.grad(test)(0.3)
-
-    def test_autograd_positional_non_trainable_warns_jacobian(self):
-        """Test that a warning is raised if a positional argument without the
-        requires_grad attribute set is passed when differentiating a QNode with a
-        vector output."""
-        dev = qml.device("default.qubit", wires=5)
-
-        @qml.qnode(dev)
-        def test(x):
-            qml.RY(x, wires=[0])
-            return qml.probs(wires=[0])
-
-        with pytest.warns(
-            UserWarning, match="inputs have to explicitly specify requires_grad=True"
-        ):
-            qml.jacobian(test)(0.3)
-
     def test_autograd_trainable_no_warn_grad(self, recwarn):
         """Test that no warning is raised if positional arguments are marked as
         trainable using the requires_grad attribute."""
@@ -728,7 +696,7 @@ class TestFourTermParameterShifts:
         """Tests that the automatic gradient of a arbitrary controlled Euler-angle-parameterized
         gate is correct."""
         dev = qml.device("default.qubit", wires=2)
-        a, b, c = np.array([theta, theta ** 3, np.sqrt(2) * theta])
+        a, b, c = anp.array([theta, theta ** 3, np.sqrt(2) * theta], requires_grad=True)
 
         @qml.qnode(dev, diff_method="parameter-shift")
         def circuit(a, b, c):
@@ -751,3 +719,71 @@ class TestFourTermParameterShifts:
             ]
         )
         assert np.allclose(grad, expected, atol=tol, rtol=0)
+
+
+@pytest.mark.parametrize("diff_method", ["backprop", "parameter-shift", "finite-diff"])
+@pytest.mark.parametrize("argnum", [0, 2, [1], [0, 2], [0, 1, 2]])
+class TestArgnum:
+    """Test various argnum scenarios for qml.grad and qml.jacobian and compare output
+    to equivalent requires_grad configuration of the inputs."""
+
+    @pytest.mark.parametrize(
+        "input",
+        [
+            ((0.1, 0.2), (0.1, 0.2)),
+            [[0.1, 0.2], [0.1, 0.2]],
+            np.array([[0.1, 0.2], [0.1, 0.2]]),
+            qml.numpy.tensor([[0.1, 0.2], [0.1, 0.2]]),
+        ],
+    )
+    def test_grad(self, diff_method, input, argnum):
+        """Test qml.grad with various argnums"""
+        dev = qml.device("default.qubit", wires=2)
+
+        @qml.qnode(dev, diff_method=diff_method)
+        def circuit(x, y, z):
+            qml.RX(z[0][1], wires=0)
+            qml.RZ(x[0][1], wires=0)
+            qml.RY(y[0][1], wires=0)
+            return qml.expval(qml.PauliZ(0))
+
+        result = qml.grad(circuit, argnum=argnum)(input, input, input)
+
+        params = [input, input, input]
+        for i in range(3):
+            if i in ([argnum] if isinstance(argnum, int) else argnum):
+                params[i] = qml.numpy.tensor(params[i], requires_grad=True)
+            else:
+                params[i] = qml.numpy.tensor(params[i], requires_grad=False)
+
+        expected = qml.grad(circuit)(*params)
+
+        assert np.allclose(result, expected)
+
+    @pytest.mark.parametrize(
+        "input",
+        [np.array([[0.1, 0.2], [0.1, 0.2]]), qml.numpy.tensor([[0.1, 0.2], [0.1, 0.2]])],
+    )
+    def test_jacobian(self, diff_method, input, argnum):
+        """Test qml.jacobian with various argnums (no support for lists/tuples)"""
+        dev = qml.device("default.qubit", wires=2)
+
+        @qml.qnode(dev, diff_method=diff_method)
+        def circuit(x, y, z):
+            qml.RX(z[0][1], wires=0)
+            qml.RZ(x[0][1], wires=0)
+            qml.RY(y[0][1], wires=0)
+            return qml.expval(qml.PauliZ(0)), qml.expval(qml.PauliZ(1))
+
+        result = qml.jacobian(circuit, argnum=argnum)(input, input, input)
+
+        params = [input, input, input]
+        for i in range(3):
+            if i in ([argnum] if isinstance(argnum, int) else argnum):
+                params[i] = qml.numpy.tensor(params[i], requires_grad=True)
+            else:
+                params[i] = qml.numpy.tensor(params[i], requires_grad=False)
+
+        expected = qml.jacobian(circuit)(*params)
+
+        assert np.allclose(result, expected)
diff --git a/tests/test_qubit_device.py b/tests/test_qubit_device.py
index 6a79cbefa..3b3594094 100644
--- a/tests/test_qubit_device.py
+++ b/tests/test_qubit_device.py
@@ -19,6 +19,7 @@ import numpy as np
 from random import random
 
 import pennylane as qml
+from pennylane import numpy as pnp
 from pennylane import QubitDevice, DeviceError, QuantumFunctionError
 from pennylane.operation import Sample, Variance, Expectation, Probability, State
 from pennylane.circuit_graph import CircuitGraph
@@ -923,7 +924,7 @@ class TestShotList:
         assert circuit.device.shots == total_shots
 
         # test gradient works
-        res = qml.jacobian(circuit)(0.5, 0.1)
+        res = qml.jacobian(circuit)(*pnp.array([0.5, 0.1], requires_grad=True))
         assert isinstance(res, tuple) and len(res) == 2
         assert res[0].shape == expected_shape
         assert res[1].shape == expected_shape
diff --git a/tests/test_queuing.py b/tests/test_queuing.py
index c7bc0a7eb..ce407bb32 100644
--- a/tests/test_queuing.py
+++ b/tests/test_queuing.py
@@ -341,8 +341,8 @@ class TestOperationRecorder:
             + "==========\n"
             + "PauliY(wires=[0])\n"
             + "PauliY(wires=[1])\n"
-            + "RZ(tensor(0.4, requires_grad=True), wires=[0])\n"
-            + "RZ(tensor(0.4, requires_grad=True), wires=[1])\n"
+            + "RZ(0.4, wires=[0])\n"
+            + "RZ(0.4, wires=[1])\n"
             + "CNOT(wires=[0, 1])\n"
             + "\n"
             + "Observables\n"
diff --git a/tests/test_vqe.py b/tests/test_vqe.py
index ce05eb337..21f5b9f58 100644
--- a/tests/test_vqe.py
+++ b/tests/test_vqe.py
@@ -496,7 +496,7 @@ class TestVQE:
 
         np.random.seed(1967)
         shape = qml.templates.StronglyEntanglingLayers.shape(n_layers=2, n_wires=4)
-        w = np.random.uniform(low=0, high=2 * np.pi, size=shape)
+        w = pnp.random.uniform(low=0, high=2 * np.pi, size=shape, requires_grad=True)
 
         dc = qml.grad(cost)(w)
         exec_opt = dev.num_executions
diff --git a/tests/transforms/test_batch_transform.py b/tests/transforms/test_batch_transform.py
index 24edbcae1..a337e8315 100644
--- a/tests/transforms/test_batch_transform.py
+++ b/tests/transforms/test_batch_transform.py
@@ -574,15 +574,17 @@ class TestBatchTransformGradients:
         dev = qml.device("default.qubit", wires=2)
         qnode = qml.QNode(self.circuit, dev, interface="torch", diff_method=diff_method)
 
-        weights = torch.tensor([0.1, 0.2], requires_grad=True, dtype=torch.float64)
-        x = torch.tensor(0.543, requires_grad=True, dtype=torch.float64)
+        weights_np = np.array([0.1, 0.2], requires_grad=True)
+        weights = torch.tensor(weights_np, requires_grad=True, dtype=torch.float64)
+        x_np = np.array(0.543, requires_grad=True)
+        x = torch.tensor(x_np, requires_grad=True, dtype=torch.float64)
 
         res = self.my_transform(qnode, weights)(x)
         expected = self.expval(x.detach().numpy(), weights.detach().numpy())
         assert np.allclose(res.detach().numpy(), expected)
 
         res.backward()
-        expected = qml.grad(self.expval)(x.detach().numpy(), weights.detach().numpy())
+        expected = qml.grad(self.expval)(x_np, weights_np)
         assert np.allclose(x.grad, expected[0])
         assert np.allclose(weights.grad, expected[1])
 
diff --git a/tests/transforms/test_classical_jacobian.py b/tests/transforms/test_classical_jacobian.py
index 683392128..e18c348fa 100644
--- a/tests/transforms/test_classical_jacobian.py
+++ b/tests/transforms/test_classical_jacobian.py
@@ -16,14 +16,15 @@ import pytest
 import numpy as np
 
 import pennylane as qml
+from pennylane import numpy as pnp
 from pennylane.transforms.classical_jacobian import classical_jacobian
 
-a = -2.1
-b = 0.71
-w = np.array([0.3, 2.3, 0.1])
-x = np.array([0.3, 2.3, 0.1])
-y = np.array([[1.0, 2.0], [4.0, 5.0]])
-z = np.array([2.1, -0.3, 0.62, 0.89])
+a = pnp.array(-2.1, requires_grad=True)
+b = pnp.array(0.71, requires_grad=True)
+w = pnp.array([0.3, 2.3, 0.1], requires_grad=True)
+x = pnp.array([0.3, 2.3, 0.1], requires_grad=True)
+y = pnp.array([[1.0, 2.0], [4.0, 5.0]], requires_grad=True)
+z = pnp.array([2.1, -0.3, 0.62, 0.89], requires_grad=True)
 
 
 def circuit_0(a):
diff --git a/tests/transforms/test_draw.py b/tests/transforms/test_draw.py
index b026cd3f3..5567ea7fd 100644
--- a/tests/transforms/test_draw.py
+++ b/tests/transforms/test_draw.py
@@ -249,7 +249,7 @@ def test_draw_batch_transform(transform):
 
     # the parameter-shift transform will create two circuits; one with x+0.2
     # and one with x-0.2.
-    res = qml.draw(circuit)(0.6)
+    res = qml.draw(circuit)(np.array(0.6, requires_grad=True))
     expected = [" 0: ──H──RX(0.8)──┤ ⟨Z⟩ ", "", " 0: ──H──RX(0.4)──┤ ⟨Z⟩ ", ""]
     assert res == "\n".join(expected)
 
diff --git a/tests/transforms/test_metric_tensor.py b/tests/transforms/test_metric_tensor.py
index e8f410e42..3dd50614b 100644
--- a/tests/transforms/test_metric_tensor.py
+++ b/tests/transforms/test_metric_tensor.py
@@ -90,7 +90,7 @@ class TestMetricTensor:
             return qml.expval(qml.PauliX(0))
 
         circuit = qml.QNode(circuit, dev, diff_method=diff_method)
-        params = [0.1]
+        params = np.array([0.1], requires_grad=True)
         result = qml.metric_tensor(circuit, hybrid=False, approx="block-diag")(*params)
         assert result.shape == (2, 2)
 
@@ -269,8 +269,8 @@ class TestMetricTensor:
 
         circuit = qml.QNode(circuit, dev)
 
-        a = np.array([0.432, 0.1])
-        b = 0.12
+        a = np.array([0.432, 0.1], requires_grad=True)
+        b = np.array(0.12, requires_grad=True)
 
         # evaluate metric tensor
         g = qml.metric_tensor(circuit, approx="block-diag")(a, b)
diff --git a/tests/transforms/test_qfunc_transform.py b/tests/transforms/test_qfunc_transform.py
index 7fbccb5b8..0f9cc9c28 100644
--- a/tests/transforms/test_qfunc_transform.py
+++ b/tests/transforms/test_qfunc_transform.py
@@ -389,16 +389,19 @@ class TestQFuncTransformGradients:
         dev = qml.device("default.qubit", wires=2)
         qnode = qml.QNode(self.circuit, dev, interface="torch", diff_method=diff_method)
 
-        a = torch.tensor(0.5, requires_grad=True)
-        b = torch.tensor([0.1, 0.2], requires_grad=True)
-        x = torch.tensor(0.543, requires_grad=True)
+        a_np = np.array(0.5, requires_grad=True)
+        b_np = np.array([0.1, 0.2], requires_grad=True)
+        x_np = np.array(0.543, requires_grad=True)
+        a = torch.tensor(a_np, requires_grad=True)
+        b = torch.tensor(b_np, requires_grad=True)
+        x = torch.tensor(x_np, requires_grad=True)
 
         res = qnode(x, a, b)
-        expected = self.expval(x.detach().numpy(), a.detach().numpy(), b.detach().numpy())
+        expected = self.expval(x_np, a_np, b_np)
         assert np.allclose(res.detach().numpy(), expected)
 
         res.backward()
-        expected = qml.grad(self.expval)(x.detach().numpy(), a.detach().numpy(), b.detach().numpy())
+        expected = qml.grad(self.expval)(x_np, a_np, b_np)
         assert np.allclose(x.grad, expected[0])
         assert np.allclose(a.grad, expected[1])
         assert np.allclose(b.grad, expected[2])
diff --git a/tests/transforms/test_qmc_transform.py b/tests/transforms/test_qmc_transform.py
index 270a87c1c..d464d3320 100644
--- a/tests/transforms/test_qmc_transform.py
+++ b/tests/transforms/test_qmc_transform.py
@@ -41,7 +41,7 @@ def get_unitary(circ, n_wires):
         return qml.state()
 
     bitstrings = list(itertools.product([0, 1], repeat=n_wires))
-    u = [unitary_z(bitstring).numpy() for bitstring in bitstrings]
+    u = [unitary_z(np.array(bitstring)).numpy() for bitstring in bitstrings]
     u = np.array(u).T
     return u