Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes a test in the device test suite #1943

Merged
merged 6 commits into from Nov 29, 2021
Merged

Fixes a test in the device test suite #1943

merged 6 commits into from Nov 29, 2021

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Nov 26, 2021

In pennylane/devices/tests/test_gates.py, the test test_supported_gates_can_be_implemented was creating an empty circuit and not applying the actual gate, since the operation was instantiated outside the QNode.

@albi3ro albi3ro requested a review from rmoyard November 26, 2021 17:21
Copy link
Contributor

@rmoyard rmoyard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @albi3ro for catching this, there is a problem with the following operation

"QubitDensityMatrix": qml.QubitStateVector(np.array([[0.5, 0.0], [0, 0.5]]), wires=[0])

I think you should extend it to 4 wires as it is defined in the device.

@albi3ro albi3ro requested a review from rmoyard November 29, 2021 11:47
@codecov
Copy link

codecov bot commented Nov 29, 2021

Codecov Report

Merging #1943 (230b09b) into master (adfd99c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1943   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files         225      225           
  Lines       17167    17167           
=======================================
  Hits        16963    16963           
  Misses        204      204           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update adfd99c...230b09b. Read the comment docs.

Copy link
Contributor

@rmoyard rmoyard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @albi3ro it looks good to me 💯

@albi3ro albi3ro merged commit 5d01713 into master Nov 29, 2021
@albi3ro albi3ro deleted the device_tests_bugfix branch November 29, 2021 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants