qiskit-ibm-runtime
qiskit-ibm-runtime copied to clipboard
differing calls to job_id and session_id
job.job_id
is a method where as job.session_id
is an attribute. They should both be one or the other.
job.job_id
is defined in Terra as an attribute. job.session_id
is defined in qiskit_ibm_runtime
as a property. I think they should both be properties. However, we will not make changes in Terra. @kt474 - do you think I should change job.session_id
to be an attribute to be more consistent?
~~Yeah I think we could change session_id
to also be a property~~
Sorry, misunderstood your comment
Yeah I think we could change
session_id
to also be a property
It is the opposite. session_id
is currently a property. Either we turn session_id
into an attribute in our code, or else we ask Terra to turn job_id
into a property. What do you think?
I think a good case can be made to have a JobV2
that has job_id
as an attribute, given similar things are attributes in BackendV2
. We can still maintain backward compatibility by making job_id
a "callable string" (i.e. both job.job_id
and job.job_id()
return the same thing).
Opened issue in Terra: https://github.com/Qiskit/qiskit-terra/issues/10213
Closing because Qiskit doesn't want to change job_id
to be an attribute, and it doesn't seem to be worth the effort to make everyone migration from session_id
to session_id()