Skip to content

Commit

Permalink
frontend -> qibo_backend
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoRobbiati committed May 6, 2024
1 parent e3c6a79 commit f8af7fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qiboml/operations/expectation.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def expectation(
``qiboml.differentiation``.
"""

# read the frontend user choice
frontend = observable.backend
# read the qibo_backend user choice
qibo_backend = observable.backend
exec_backend = construct_backend(backend)

kwargs = dict(
Expand All @@ -60,10 +60,10 @@ def expectation(
)

if differentiation_rule is not None:
if isinstance(frontend, TensorflowBackend):
if isinstance(qibo_backend, TensorflowBackend):
return _with_tf(**kwargs)

if isinstance(frontend, JaxBackend):
if isinstance(qibo_backend, JaxBackend):
return _with_jax(**kwargs)

elif nshots is None:
Expand Down

0 comments on commit f8af7fa

Please sign in to comment.