Skip to content

Commit

Permalink
Merge d527a1d into 54c2282
Browse files Browse the repository at this point in the history
  • Loading branch information
kt474 committed Apr 6, 2022
2 parents 54c2282 + d527a1d commit d2791d3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/1_the_ibm_quantum_account.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"`IBMProvider` class can be initialized using the `API token`, which is used to authenticate to your IBM Quantum account.\n",
"\n",
"Class Methods:\n",
"- `IBMProvider.save_account(TOKEN, HUB, GROUP, PROJECT)`: Save your account to disk for future use and optionally set a default hub/group/project to be used when loading your account.\n",
"- `IBMProvider.saved_account()`: View the account saved to disk.\n",
"- `IBMProvider.save_account(TOKEN, INSTANCE)`: Save your account to disk for future use and optionally set a default hub/group/project to be used when loading your account.\n",
"- `IBMProvider.saved_accounts()`: View the accounts saved to disk.\n",
"- `IBMProvider.delete_account()`: Delete the saved account from disk.\n",
"- `IBMProvider.active_account()`: List the account currently active in the session.\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_provider/ibm_backend_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def _get_job_ids(
initial_filter = copy.deepcopy(api_filter)

while True:
job_page = self._provider._api_client.list_jobs_ids(
job_page = self._default_hgp._api_client.list_jobs_ids(
limit=current_page_limit,
skip=skip,
descending=descending,
Expand Down
13 changes: 7 additions & 6 deletions qiskit_ibm_provider/jupyter/backend_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from .qubits_widget import qubits_tab
from .live_data_widget import LiveDataVisualization
from ..visualization.interactive import iplot_error_map
from ..utils.hgp import to_instance_format


def _async_job_loader(
Expand All @@ -48,7 +49,11 @@ def backend_widget(backend: Union[IBMBackend, FakeBackend]) -> None:
backend: Display information about this backend.
"""
vue.theme.dark = False
cred = backend._credentials
if isinstance(backend, FakeBackend):
cred = backend._credentials
instance = to_instance_format(cred.hub, cred.group, cred.project)
else:
instance = backend._api_client._params.instance
last_tab = vue.TabItem(children=[])
livedata = LiveDataVisualization()
card = vue.Card(
Expand All @@ -60,11 +65,7 @@ def backend_widget(backend: Union[IBMBackend, FakeBackend]) -> None:
color="#002d9c",
children=[
vue.ToolbarTitle(
children=[
"{} @ ({}/{}/{})".format(
backend.name(), cred.hub, cred.group, cred.project
)
],
children=["{} @ ({})".format(backend.name(), instance)],
style_="color:white",
)
],
Expand Down
5 changes: 2 additions & 3 deletions qiskit_ibm_provider/jupyter/live_data_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ def set_job(self, job) -> None:

# To get all the information needed, we request the job details to the API
# The information returned is the type of QiskitJob
qiskit_job = self._backend.provider().backend.retrieve_job(job_id=job["id"])
qiskit_job = self._backend.provider().backend.job(job_id=job["id"])
status = qiskit_job.status()
if status in [JobStatus.RUNNING, JobStatus.DONE]:
self.show_progress_bar()
Expand Down Expand Up @@ -1320,8 +1320,7 @@ def get_provider(self) -> str:
Return:
bi (str): Backend information
"""

return f"{self._backend.hub}/{self._backend.group}/{self._backend.project}"
return self._backend._api_client._params.instance

def time_to_completion(self, completion_time: datetime) -> str:
"""Get the estimate remaining time to complete
Expand Down

0 comments on commit d2791d3

Please sign in to comment.