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 Overwrite=true when saving API key #1500

Merged
merged 4 commits into from
Jun 5, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions docs/start/setup-channel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ 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="<MY_IBM_QUANTUM_TOKEN>", set_as_default=True)
QiskitRuntimeService.save_account(
channel="ibm_quantum",
token="<MY_IBM_QUANTUM_TOKEN>",
set_as_default=True,
# Use `overwrite=True` if you're updating your token.
overwrite=True,
)

# Load saved credentials
service = QiskitRuntimeService()
Expand Down Expand Up @@ -144,7 +150,14 @@ print(result)
from qiskit_ibm_runtime import QiskitRuntimeService

# Save account to disk.
QiskitRuntimeService.save_account(channel="ibm_cloud", token="<IBM Cloud API key>", instance="<IBM Cloud CRN>", name="<account-name>")
QiskitRuntimeService.save_account(
channel="ibm_cloud",
token="<IBM Cloud API key>",
instance="<IBM Cloud CRN>",
name="<account-name>",
# Use `overwrite=True` if you're updating your token.
overwrite=True,
)

# Load saved credentials
service = QiskitRuntimeService(name="<account-name>")
Expand Down
Loading