From 05967b4e9d5ce13ab8a39a01651d8dd8628323b9 Mon Sep 17 00:00:00 2001 From: antalszava Date: Thu, 4 Nov 2021 20:24:03 -0400 Subject: [PATCH 1/2] doc format --- pennylane/math/is_independent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane/math/is_independent.py b/pennylane/math/is_independent.py index ee2d6321fef..d28f598249a 100644 --- a/pennylane/math/is_independent.py +++ b/pennylane/math/is_independent.py @@ -296,7 +296,7 @@ def func(x): The analytic and numeric tests used are as follows. - The analytic test performed depends on the provided ``interface``, - both in its method and its degree of reliability. + both in its method and its degree of reliability. - For the numeric test, the function is evaluated at a series of random positions, and the outputs numerically compared to verify that the output From 9fe5cd89eed2b5fa00650cbc500140c93bb98145 Mon Sep 17 00:00:00 2001 From: antalszava Date: Thu, 4 Nov 2021 20:40:28 -0400 Subject: [PATCH 2/2] docstring example --- pennylane/transforms/unitary_to_rot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pennylane/transforms/unitary_to_rot.py b/pennylane/transforms/unitary_to_rot.py index 270ff5f1fc9..a03a8eff15d 100644 --- a/pennylane/transforms/unitary_to_rot.py +++ b/pennylane/transforms/unitary_to_rot.py @@ -100,8 +100,9 @@ def circuit(angles): transformed_qnode = qml.QNode(transformed_qfunc, dev) >>> g = qml.grad(transformed_qnode) - >>> g([0.2, 0.3]) - [array(-0.24454992), array(-0.23913254)] + >>> params = np.array([0.2, 0.3], requires_grad=True) + >>> g(params) + array([ 0.00296633, -0.29392145]) However, the following example will **not** be differentiable: