Qiskit/qiskit-ibm-runtime

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

nonhermitian opened this issue · 1 comments

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:

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