Skip to content

Commit

Permalink
fix: typo in differentiation docstrings and rm qibo.set_backend from …
Browse files Browse the repository at this point in the history
…differentiation tests
  • Loading branch information
MatteoRobbiati committed Jan 3, 2025
1 parent 881aec5 commit 7c9b764
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/qiboml/operations/differentiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions tests/test_differentiation_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7c9b764

Please sign in to comment.