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

Fix error messages with program-capture device wires and shot vectors #7130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

isaacdevlugt
Copy link
Contributor

No description provided.

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Mar 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.60%. Comparing base (248120f) to head (dc0076b).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7130   +/-   ##
=======================================
  Coverage   99.60%   99.60%           
=======================================
  Files         499      499           
  Lines       47878    47878           
=======================================
  Hits        47687    47687           
  Misses        191      191           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@isaacdevlugt
Copy link
Contributor Author

@albi3ro are we missing tests here since the CI doesn't fail? 😅

@albi3ro
Copy link
Contributor

albi3ro commented Mar 21, 2025

@albi3ro are we missing tests here since the CI doesn't fail? 😅

I often just check for part of the message instead of the full thing. Error messages can sometimes get long, and we just want to check with enough detail to know it's error we wanted.

def test_error_if_shot_vector():

@isaacdevlugt
Copy link
Contributor Author

@albi3ro thanks! makes sense :)


if not qnode.device.wires:
raise NotImplementedError("devices must specify wires for integration with plxpr capture.")
raise NotImplementedError("devices must specify wires for integration with plxpr.")
Copy link
Contributor Author

@isaacdevlugt isaacdevlugt Mar 21, 2025

Choose a reason for hiding this comment

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

Suggested change
raise NotImplementedError("devices must specify wires for integration with plxpr.")
raise NotImplementedError("devices must specify wires for integration with program capture.")

different option

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