diff --git a/qiskit_ibm_runtime/qiskit_runtime_service.py b/qiskit_ibm_runtime/qiskit_runtime_service.py index 3b087a81a4..2a05afcab2 100644 --- a/qiskit_ibm_runtime/qiskit_runtime_service.py +++ b/qiskit_ibm_runtime/qiskit_runtime_service.py @@ -1021,6 +1021,12 @@ def run( if self._channel_strategy == "default" else self._channel_strategy, ) + if self._channel == "ibm_quantum": + messages = response.get("messages") + if messages: + warning_message = messages[0].get("data") + warnings.warn(warning_message) + except RequestsApiError as ex: if ex.status_code == 404: raise RuntimeProgramNotFound(f"Program not found: {ex.message}") from None diff --git a/releasenotes/notes/job-quota-warning-0512f30571897f53.yaml b/releasenotes/notes/job-quota-warning-0512f30571897f53.yaml new file mode 100644 index 0000000000..f8b2a487a9 --- /dev/null +++ b/releasenotes/notes/job-quota-warning-0512f30571897f53.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + There will now be a warning if a user submits a job that is predicted to + exceed their job execution time monthly quota of 10 minutes. + This only applies to jobs run on real hardware in the instance ``ibm-q/open/main``. + If the job does end up exceeding the quota, it will be canceled.