Skip to content

Commit

Permalink
Fixed decorator functional test failing for nightly (#1747)
Browse files Browse the repository at this point in the history
* fixed decorator functional test

* updated changelog
  • Loading branch information
kessler-frost authored Aug 16, 2023
1 parent a5f5cf9 commit eec8d77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed test cases to adapt changes to SQLAlchemy version 1.4.49
- Ignored remote file transfer how-to functional tests.
- Skipping a UI backend test for now
- Fixed `test_decorated_function` test case in functional tests

### Fixed

Expand Down
18 changes: 8 additions & 10 deletions tests/functional_tests/workflow_stack_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,22 +474,20 @@ def test_decorated_function():
Test whether covalent works as intended on an already decorated function.
"""

import pennylane as qml
def wrapper(func):
def inner(*args, **kwargs):
return func(*args, **kwargs)

import covalent as ct

dev1 = qml.device("default.qubit", wires=1)
return inner

@ct.electron
@qml.qnode(dev1)
def circuit(params):
qml.RX(params[0], wires=0)
qml.RY(params[1], wires=0)
return qml.expval(qml.PauliZ(0))
@wrapper
def task(x):
return x**2

@ct.lattice
def workflow():
return circuit([0.54, 0.12])
return task(x=5)

dispatch_id = ct.dispatch(workflow)()
workflow_result = rm.get_result(dispatch_id, wait=True)
Expand Down

0 comments on commit eec8d77

Please sign in to comment.