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

Warnings on empty circuits, error when failure returned #43

Merged
merged 9 commits into from
Dec 10, 2021

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Dec 8, 2021

No description provided.

@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

Merging #43 (5516767) into master (3110bfa) will increase coverage by 0.91%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
+ Coverage   87.85%   88.77%   +0.91%     
==========================================
  Files           5        5              
  Lines         280      285       +5     
==========================================
+ Hits          246      253       +7     
+ Misses         34       32       -2     
Impacted Files Coverage Δ
pennylane_ionq/device.py 93.26% <100.00%> (+0.33%) ⬆️
pennylane_ionq/api_client.py 94.96% <0.00%> (+1.25%) ⬆️

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 3110bfa...5516767. Read the comment docs.

.readthedocs.yml Outdated Show resolved Hide resolved
@albi3ro albi3ro requested a review from Jaybsoni December 10, 2021 15:28
Comment on lines +118 to +120
if len(operations) == 0 and len(rotations) == 0:
warnings.warn("Circuit is empty. Empty circuits return failures. Submitting anyway.")

Copy link
Contributor

Choose a reason for hiding this comment

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

👍🏼

@@ -100,6 +125,7 @@ def fake_response(self, resource_id=None):
@qml.qnode(dev)
def circuit():
"""Reference QNode"""
qml.PauliX(wires=0)
Copy link
Contributor

Choose a reason for hiding this comment

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

was this the empty circuit causing the trouble ?

Copy link
Contributor

@Jaybsoni Jaybsoni left a comment

Choose a reason for hiding this comment

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

Looks good :)

@Jaybsoni Jaybsoni merged commit 8436789 into master Dec 10, 2021
@Jaybsoni Jaybsoni deleted the fix-empty-circuits branch December 10, 2021 21:00
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.

2 participants