Skip to content

Commit

Permalink
tests: rm tf import
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoRobbiati committed Nov 4, 2024
1 parent c5af099 commit 1b75cae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_differentiation_rules.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import numpy as np
import pytest
import qibo
import tensorflow as tf
import torch
from qibo import hamiltonians
from qibo.backends import NumpyBackend, PyTorchBackend
Expand All @@ -23,9 +22,9 @@

def construct_x(frontend):
if frontend.__name__ == "qiboml.interfaces.pytorch":
return torch.tensor([0.5, 0.8])
return frontend.torch.tensor([0.5, 0.8])
elif frontend.__name__ == "qiboml.interfaces.keras":
return tf.Variable([0.5, 0.8])
return frontend.tf.Variable([0.5, 0.8])


@pytest.mark.parametrize("nshots", [None, 500000])
Expand Down

0 comments on commit 1b75cae

Please sign in to comment.