Skip to content
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

Add local channel #1608

Closed
jyu00 opened this issue Apr 11, 2024 · 1 comment · Fixed by #1793
Closed

Add local channel #1608

jyu00 opened this issue Apr 11, 2024 · 1 comment · Fixed by #1793
Assignees
Labels
enhancement New feature or request

Comments

@jyu00
Copy link
Collaborator

jyu00 commented Apr 11, 2024

What is the expected feature or enhancement?

QiskitRuntimeLocalService was created to support local testing mode and is meant to be similar to QiskitRuntimeService. Today a user is not expected to instantiate this class directly, since it only has a run() method that is called under the cover by the primitives. As we add more methods to it (see #1606 and #1607), users will want to instantiate it. Instead of having to import / create another class, we should just add a "local" channel.

Acceptance criteria

User can do

from qiskit_ibm_runtime import QiskitRuntimeService, Sampler

service = QiskitRuntimeService(channel="local")  # <--- this will return an instance of `QiskitRuntimeLocalService`
@jyu00 jyu00 added the enhancement New feature or request label Apr 11, 2024
@jyu00 jyu00 added this to the Local testing mode MVP2 milestone Apr 11, 2024
@jyu00 jyu00 added the on hold label May 23, 2024
@jyu00 jyu00 removed the on hold label Jun 20, 2024
@jyu00
Copy link
Collaborator Author

jyu00 commented Jun 20, 2024

I was having second thoughts about whether to use QiskitRuntimeService(channel="local"), since we want to allow one to refresh the fake backend's data (see #1707), which requires a real service. So people may think they can do

service = QiskitRuntimeService(channel="local")
fake_backend = FakeSherbrooke()
fake_backend.refresh(service)

But that won't work since service here is local service, not a real QRT service. On the other hand, even if we make people to initialize service = QiskitRuntimeLocalService(), they may still think it's a "service" they can pass to refresh().

We should just check if the service passed to refresh is a non-local QiskitRuntimeService

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.

2 participants