Skip to content

Selection of instances in the new IBM Quantum Platform #2236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
francabrera opened this issue Apr 25, 2025 · 5 comments · May be fixed by #2239
Open

Selection of instances in the new IBM Quantum Platform #2236

francabrera opened this issue Apr 25, 2025 · 5 comments · May be fixed by #2239
Assignees
Labels
enhancement New feature or request

Comments

@francabrera
Copy link
Member

francabrera commented Apr 25, 2025

What is the expected feature or enhancement?

Unlike with the ibm_quantum channel, the ibm_cloud channel makes it mandatory to specify an instance when saving an account and it does not provide a way to switch to a different instance other than saving multiple accounts and iterating over them.

Users may have access to more than one Qiskit Runtime service instance in IBM Cloud within their Account, and may want to, instead of specifying a single instance, being able to find the one which has access to a QPU backend or submit workloads to more than one instance within their code.

We would like to allow users in the new IBM Quantum Platform to connect to their accounts within Qiskit and being able to save a default instance or let the provider find the instance within the account which has access to a particular QPU, with the user optionally specifying their plans preferences when looking for an instance, or if they want only to look in one particular region and not the two regions our services are deployed in.

Acceptance criteria

  • There is a new channel ibm_quantum_platform which becomes the default channel and deprecates the ibm_quantum and ibm_cloud channels.
  • When saving the account with this new channel:
    • The user can optionally specify the default_instance they want to use (by providing a CRN or the Name of the instance).
    • The user can optionally define the region they want to use (us-east, eu-de), defaulting to all regions.
    • The user can optionally define the plans preference order for the provider to select the first instance which access to a particular backend.
  • The user can get a backend to run within the account and, if no default instance has been provided for the account, the provider will look for instances in the regions the user wanted to connect to with access to this backend in the plan preference order.
  • The user can get a backend to run within the account providing a specific instance CRN or Name.

Example:

from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService.save_account(
    # No channel needs to be specified, ibm_quantum_platform is the default
    token=token,
    default_instance="CRN/NAME", #Optional
    region="us-east|eu-de", # Optional
    plans_preference=['Open',...], #Optional
    set_as_default=True  #Optional
)
service = QiskitRuntimeService()

backend = service.backend('ibm_aachen') # valid, selects and instance which access to this backend
backend = service.backend('ibm_aachen', instance="CRN/NAME") # also valid, uses the instance specified by the user

cc @jyu00

@francabrera francabrera added the enhancement New feature or request label Apr 25, 2025
@francabrera francabrera changed the title Selection of instances through Qiskit provider in IBM Cloud Selection of instances in the new IBM Quantum Platform Apr 25, 2025
@jyu00
Copy link
Collaborator

jyu00 commented Apr 25, 2025

The user can get a backend to run within the account and, if no default instance has been provided for the account, the provider will look for instances in the regions the user wanted to connect to with access to this backend in the plan preference order.

What happens if one specifies a default_instance in save_account(), but that instance doesn't have access to the backend they specify in service.backend()? Does it fail or pick a different instance?

@francabrera
Copy link
Member Author

What happens if one specifies a default_instance in save_account(), but that instance doesn't have access to the backend they specify in service.backend()? Does it fail or pick a different instance?

it should fail

@jyu00
Copy link
Collaborator

jyu00 commented Apr 25, 2025

@beckykd we're going to need doc update for this when it's done. It my not be obvious to users where to find their instance names and plans.

@kt474
Copy link
Member

kt474 commented Apr 25, 2025

the provider will look for instances in the regions the user wanted to connect to with access to this backend in the plan preference order.

Does this mean looking at other instances the user has saved? Or somehow fetching all the instances the user has access to?

@francabrera
Copy link
Member Author

the provider will look for instances in the regions the user wanted to connect to with access to this backend in the plan preference order.

Does this mean looking at other instances the user has saved? Or somehow fetching all the instances the user has access to?

Fetching from the IBM Cloud platform API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants