Skip to content

Use get_runtime_service() in Qiskit Serverless programs - #5602

Open
pandasa123 wants to merge 1 commit into
mainfrom
replace-qiskitruntimeservice-with-get-runtime-service
Open

Use get_runtime_service() in Qiskit Serverless programs#5602
pandasa123 wants to merge 1 commit into
mainfrom
replace-qiskitruntimeservice-with-get-runtime-service

Conversation

@pandasa123

Copy link
Copy Markdown
Collaborator

Update the Qiskit Serverless and Qiskit Functions examples so that program source running on Qiskit Serverless creates the Qiskit Runtime service with get_runtime_service() instead of QiskitRuntimeService().

Runtime primitive jobs and sessions launched through get_runtime_service() are registered against the parent Serverless job on the gateway. This linkage lets the platform associate a Serverless job with the QPU jobs and sessions it spawns, for status tracking, logs, and usage accounting. A bare QiskitRuntimeService submits jobs that are not associated with the Serverless job.

The guidance is explained once on the Write your first Qiskit Serverless program page and referenced from the other examples. Local, client-side cells are unchanged. The qiskit-serverless package version is ~=0.27.0, the first release that provides get_runtime_service().

…rograms

Update program source that runs on Qiskit Serverless to create the Qiskit
Runtime service with get_runtime_service() instead of QiskitRuntimeService().
This registers the Runtime jobs and sessions launched by a program against its
parent Serverless job, so the platform can associate them for status tracking,
logs, and usage accounting. Explain the guidance once on the Write your first
Qiskit Serverless program page and reference it from the other examples.
@pandasa123
pandasa123 requested a review from a team September 3, 2026 10:09
@qiskit-bot

Copy link
Copy Markdown
Contributor

One or more of the following people are relevant to this code:

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@pandasa123 pandasa123 changed the title Use get_runtime_service() in Qiskit Serverless and Qiskit Functions programs Use get_runtime_service() in Qiskit Serverless programs Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants