diff --git a/qiskit_ibm_runtime/session.py b/qiskit_ibm_runtime/session.py index 269d24381..c68bcc823 100644 --- a/qiskit_ibm_runtime/session.py +++ b/qiskit_ibm_runtime/session.py @@ -286,6 +286,8 @@ def details(self) -> Optional[Dict[str, Any]]: started_at: Timestamp of when the session was started. closed_at: Timestamp of when the session was closed. activated_at: Timestamp of when the session state was changed to active. + usage_time: The usage time, in seconds, of this Session or Batch. + Usage is defined as the time a quantum system is committed to complete a job. """ if self._session_id and isinstance(self._service, QiskitRuntimeService): response = self._service._api_client.session_details(self._session_id) @@ -303,6 +305,7 @@ def details(self) -> Optional[Dict[str, Any]]: "started_at": response.get("started_at"), "closed_at": response.get("closed_at"), "activated_at": response.get("activated_at"), + "usage_time": response.get("elapsed_time"), } return None diff --git a/release-notes/unreleased/1567.feat.rst b/release-notes/unreleased/1567.feat.rst new file mode 100644 index 000000000..83553e36d --- /dev/null +++ b/release-notes/unreleased/1567.feat.rst @@ -0,0 +1,3 @@ +Session `details() `__ +now includes a new field, `usage_time`. Usage is defined as the time a quantum system +is committed to complete a job. \ No newline at end of file