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

Using FakeBackend in local testing mode fails if trying to access job metrics #1939

Closed
nonhermitian opened this issue Sep 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@nonhermitian
Copy link
Contributor

Describe the bug
Jobs from real QPUs have a metrics method that allows for grabbing timing information. However this is not the case if passing a simulator where one gets the error:

AttributeError: 'PrimitiveJob' object has no attribute 'metrics'

Steps to reproduce
Try to calll the methods attribute on a PrimitiveJob

Expected behavior
I would expect the jobs to have the same attributes and methods given that local testing mode is supposed to verify that code sent to the real systems works as it should

Suggested solutions
Unify the job types

Additional Information

  • qiskit-ibm-runtime version: latest
  • Python version:
  • Operating system:
@nonhermitian nonhermitian added the bug Something isn't working label Sep 20, 2024
@kt474
Copy link
Member

kt474 commented Sep 30, 2024

PrimitiveJob is imported from Qiskit so if we wanted to add methods like metrics we'd have to make updates there first.

@kt474
Copy link
Member

kt474 commented Nov 25, 2024

Closing in favor of #1963

@kt474 kt474 closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants