From 146f24cc0b812f2616482b8437215cbb3e4d82a4 Mon Sep 17 00:00:00 2001 From: Rebecca Dimock Date: Wed, 5 Jun 2024 13:20:33 -0500 Subject: [PATCH 1/4] Add Overwrite=true --- docs/start/setup-channel.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/start/setup-channel.mdx b/docs/start/setup-channel.mdx index f6c53f24356..c034924aeea 100644 --- a/docs/start/setup-channel.mdx +++ b/docs/start/setup-channel.mdx @@ -66,7 +66,8 @@ Available plans: from qiskit_ibm_runtime import QiskitRuntimeService # Save an IBM Quantum account and set it as your default account. - QiskitRuntimeService.save_account(channel="ibm_quantum", token="", set_as_default=True) + # Use `overwrite=True` if you're updating your token. + QiskitRuntimeService.save_account(channel="ibm_quantum", token="", set_as_default=True, overwrite=True) # Load saved credentials service = QiskitRuntimeService() @@ -144,7 +145,8 @@ print(result) from qiskit_ibm_runtime import QiskitRuntimeService # Save account to disk. - QiskitRuntimeService.save_account(channel="ibm_cloud", token="", instance="", name="") + # Use `overwrite=True` if you're updating your token. + QiskitRuntimeService.save_account(channel="ibm_cloud", token="", instance="", name="", overwrite=True) # Load saved credentials service = QiskitRuntimeService(name="") From 04ce176018259f01ccbe5879f8a8acaf1064334d Mon Sep 17 00:00:00 2001 From: Rebecca Dimock <66339736+beckykd@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:34:03 -0500 Subject: [PATCH 2/4] Update docs/start/setup-channel.mdx Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> --- docs/start/setup-channel.mdx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/start/setup-channel.mdx b/docs/start/setup-channel.mdx index c034924aeea..f8c076b797c 100644 --- a/docs/start/setup-channel.mdx +++ b/docs/start/setup-channel.mdx @@ -66,8 +66,13 @@ Available plans: from qiskit_ibm_runtime import QiskitRuntimeService # Save an IBM Quantum account and set it as your default account. - # Use `overwrite=True` if you're updating your token. - QiskitRuntimeService.save_account(channel="ibm_quantum", token="", set_as_default=True, overwrite=True) + QiskitRuntimeService.save_account( + channel="ibm_quantum", + token="", + set_as_default=True, + # Use `overwrite=True` if you're updating your token. + overwrite=True, + ) # Load saved credentials service = QiskitRuntimeService() From 511f003a868f7859af00f4d138b2263f6e2c6daf Mon Sep 17 00:00:00 2001 From: Rebecca Dimock <66339736+beckykd@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:34:45 -0500 Subject: [PATCH 3/4] Update docs/start/setup-channel.mdx Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> --- docs/start/setup-channel.mdx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/start/setup-channel.mdx b/docs/start/setup-channel.mdx index f8c076b797c..500c13dc5fe 100644 --- a/docs/start/setup-channel.mdx +++ b/docs/start/setup-channel.mdx @@ -150,8 +150,14 @@ print(result) from qiskit_ibm_runtime import QiskitRuntimeService # Save account to disk. - # Use `overwrite=True` if you're updating your token. - QiskitRuntimeService.save_account(channel="ibm_cloud", token="", instance="", name="", overwrite=True) + QiskitRuntimeService.save_account( + channel="ibm_cloud", + token="", + instance="", + name="", + # Use `overwrite=True` if you're updating your token. + overwrite=True, + ) # Load saved credentials service = QiskitRuntimeService(name="") From 42a1e5256312e3793b38fcab4192a11012f5311a Mon Sep 17 00:00:00 2001 From: Rebecca Dimock Date: Wed, 5 Jun 2024 13:50:53 -0500 Subject: [PATCH 4/4] Add an id --- docs/start/setup-channel.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/start/setup-channel.mdx b/docs/start/setup-channel.mdx index 500c13dc5fe..c5ef997c6f7 100644 --- a/docs/start/setup-channel.mdx +++ b/docs/start/setup-channel.mdx @@ -51,6 +51,7 @@ Available plans: 1. Retrieve your IBM Quantum token from the [IBM Quantum account page](https://quantum.ibm.com/account). + 1. Authenticate to the service by calling `QiskitRuntimeService` with your IBM Quantum API key and CRN: ```python @@ -78,7 +79,7 @@ Available plans: service = QiskitRuntimeService() ``` - * If you save your credentials to disk, you can use `QiskitRuntimeService()` in the future to initialize your account. The `channel` parameter distinguishes between different account types. If you are saving multiple accounts per channel, consider using the `name` parameter to differentiate them. + * If you save your credentials to disk, you can use `QiskitRuntimeService()` in the future to initialize your account. The `channel` parameter distinguishes between different account types. * If you are saving multiple accounts per channel, consider using the `name` parameter to differentiate them. * Credentials are saved to `$HOME/.qiskit/qiskit-ibm.json`. Do not manually edit this file. * If you don't save your credentials, you must specify them every time you start a new session. @@ -132,6 +133,7 @@ print(result) 1. Find your API key. From the [API keys page](https://cloud.ibm.com/iam/apikeys), view or create your API key, then copy it to a secure location so you can use it for authentication. 2. Find your Cloud Resource Name (CRN). Open the [Instances page](https://cloud.ibm.com/quantum/instances) and click your instance. In the page that opens, click the icon to copy your CRN. Save it in a secure location so you can use it for authentication. + 1. Authenticate to the service by calling `QiskitRuntimeService` with your saved credentials or with your IBM Cloud API key and CRN: ```python