From 7c9b764627a3549c22de816fdb4d8272d2b37e2d Mon Sep 17 00:00:00 2001 From: MatteoRobbiati Date: Fri, 3 Jan 2025 11:29:32 +0100 Subject: [PATCH] fix: typo in differentiation docstrings and rm qibo.set_backend from differentiation tests --- src/qiboml/operations/differentiation.py | 2 +- tests/test_differentiation_rules.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/qiboml/operations/differentiation.py b/src/qiboml/operations/differentiation.py index 1d6c825..dd0fc17 100644 --- a/src/qiboml/operations/differentiation.py +++ b/src/qiboml/operations/differentiation.py @@ -97,7 +97,7 @@ def gradient_from_data( backend, ): """ - Pad the gradient w.r.t. data. + Pad the gradient w.r.t. inputs. """ # TODO: adapt this to the discussed strategy x_size = backend.to_numpy(data).size diff --git a/tests/test_differentiation_rules.py b/tests/test_differentiation_rules.py index 2629ad7..06b986f 100644 --- a/tests/test_differentiation_rules.py +++ b/tests/test_differentiation_rules.py @@ -54,10 +54,6 @@ def test_expval_grad_PSR(frontend, backend, nshots): if frontend.__name__ == "qiboml.interfaces.keras": pytest.skip("keras interface not ready.") elif frontend.__name__ == "qiboml.interfaces.pytorch": - # TODO: replace with qiboml, pytorch as soon as migration is complete - # TODO: define a proper qiboml.set_interface() procedure for these situations - qibo.set_backend("pytorch") - from qiboml.interfaces.pytorch import QuantumModel decimals = 6 if nshots is None else 1