Qiskit/qiskit-ibm-runtime

Provide a usage function on RuntimeJob so metrics don't have to be parsed

mriedem opened this issue · 2 comments

What is the expected feature or enhancement?

The RuntimeJob.metrics() method does not document what is in that metrics dictionary.

For the quantum channel the API docs are here. For the cloud channel the API docs are here.

There are 3 different fields in there that talk about usage:

image

It'd be nice if the client didn't have to know which of these to use to get the usage of a terminal-state job and instead a usage() method or something like that could abstract that information in the SDK.

This is sort of similar to how Session.details() has the usage_time field, but at least that's documented.

Acceptance criteria

Provide a method on RuntimeJob to get the usage time of a job.

We should do the same for Session + Batch. We'll need to update docs once that's done.

We should do the same for Session + Batch. We'll need to update docs once that's done.

Added an issue to update the docs once this is in the newest release Qiskit/documentation#1971