Skip to content

Commit

Permalink
Migrate from qiskit-ibm-provider to qiskit-ibm-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Tansito committed Jun 17, 2024
1 parent e561026 commit df9cf81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions client/qiskit_serverless/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import requests
from ray.dashboard.modules.job.sdk import JobSubmissionClient
from opentelemetry import trace
from qiskit_ibm_provider import IBMProvider
from qiskit_ibm_runtime import QiskitRuntimeService

from qiskit_serverless.core.constants import (
REQUESTS_TIMEOUT,
Expand Down Expand Up @@ -577,7 +577,7 @@ def __init__(self, token: Optional[str] = None, name: Optional[str] = None):
token: IBM quantum token
name: Name of the account to load
"""
token = token or IBMProvider(name=name).active_account().get("token")
token = token or QiskitRuntimeService(name=name).active_account().get("token")
super().__init__(token=token, host=IBM_SERVERLESS_HOST_URL)

@staticmethod
Expand All @@ -594,7 +594,7 @@ def save_account(
name: Name of the account to save
overwrite: ``True`` if the existing account is to be overwritten
"""
IBMProvider.save_account(token=token, name=name, overwrite=overwrite)
QiskitRuntimeService.save_account(token=token, name=name, overwrite=overwrite)

def get_compute_resources(self) -> List[ComputeResource]:
raise NotImplementedError(
Expand Down
3 changes: 1 addition & 2 deletions client/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ requests>=2.32.2
importlib-metadata>=5.2.0
qiskit>=1.0.2
qiskit-ibm-runtime>=0.21.1
qiskit-ibm-provider>=0.10.0
# TODO: make sure ray node and notebook node have the same version of cloudpickle
# Make sure ray node and notebook node have the same version of cloudpickle
cloudpickle==2.2.1
tqdm>=4.66.3
# opentelemetry
Expand Down

0 comments on commit df9cf81

Please sign in to comment.