Skip to content

Commit

Permalink
add reno
Browse files Browse the repository at this point in the history
  • Loading branch information
kt474 committed Oct 9, 2023
1 parent 71b6eae commit d8a984c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def close(self) -> None:
queued or running jobs will run to completion. The session will be closed when there
are no more jobs to run."""
backend = self._service.backend(self._backend)
# There is a 500 internal error on IQP when the backend is a simulator
# There is a 500 internal error on IQP if the backend is a simulator
if not backend.simulator and self._session_id:
self._service._api_client.close_session(self._session_id)

Expand Down
14 changes: 14 additions & 0 deletions releasenotes/notes/sessions-accepting-jobs-d77e3bba150a20f5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
upgrade:
- |
:meth:`qiskit_ibm_runtime.Session.close` has been updated to mark a ``Session`` as no longer
accepting new jobs. The session won't accept more jobs but it will continue to run any
queued jobs until they are done or the max time expires. This will also happen
automatically when the session context manager is exited. When a session that is not accepting
jobs has run out of jobs to run, it's immediately closed, freeing up the backend to run more jobs rather
than wait for the interactive timeout.
The old close method behaviour has been moved to a new method,
:meth:`qiskit_ibm_runtime.Session.cancel`, where all jobs within a session are
cancelled and terminated.

0 comments on commit d8a984c

Please sign in to comment.