Set up your IBM Cloud account - invited users
If you do not have an invitation from an administrator to join an account, follow the steps in Set up your IBM Cloud account instead.
You can run workloads on IBM® quantum processing units (QPUs) by setting up an account on IBM Cloud®. You will also need to install and set up Qiskit and Qiskit Runtime.
Your user account is associated with one or more instances, identified by Cloud Resource Names (CRNs) that give access to IBM Quantum services. Additionally, a unique API token (also called a key) is assigned to each account, allowing for IBM Quantum access from Qiskit. For instructions to choose a specific instance, see Connect to an instance.
The IBM Quantum Platform dashboard and the Instances page list the instances that you can access.
Set up to use IBM Cloud
Before you begin
-
Accept the email invitation.
-
Log in with an IBMid or Google account. If you don't have one, you are guided through creating one. After logging in, confirm your information and accept the invitation to join the account.
-
Navigate back to IBM Quantum Platform.
-
Make sure that the correct account and region are selected in the account switcher in the header, as shown in the following image.
- Choose the account that was invited in the email.
- The region controls where your jobs are run and where the job data is kept. You can access either region by using the same API key, but you can only see and access the instances that were created in the region that you're logged in to.
IBM Quantum Platform header
1. Find your access credentials
- Find your API key. From the dashboard, create your API key, then copy it to a secure location so you can use it for authentication.
- Optional: Find the instance you want to use from the Instances page. Click the icon to copy its CRN, then save it in a secure location so you can use it to identify the instance.
2. Connect Qiskit with your service instance
If you are working in a trusted Python environment (such as on a personal laptop or workstation), use the save_account()
method to save your credentials locally, then use them to initialize the service.
-
Ensure you are working in an active Python environment with the Qiskit SDK and Qiskit Runtime installed.
-
Activate the Python virtual environment, run Python in your virtual environment, and enter the following:
token = "<your-API-token>"
-
Initialize the service.
When an instance CRN or name is passed in, only backends and jobs from that instance are available. If an instance is not specified (allowed in Qiskit Runtime v0.40.1 and later), all backends and jobs across all instances in your account are available. In this case, when a backend is specified, an instance that can access that backend is found and used.
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService.save_account(
token=token, # Your token is confidential.
# Do not share your key in public code.
instance="<IBM Cloud CRN or instance name>", # Specify the instance to use.
set_as_default=True, # Set these as your default credentials.
)
from qiskit_ibm_runtime import QiskitRuntimeService
# If you named your credentials, optionally specify the name here, as follows:
# QiskitRuntimeService(name='account-name')
# If you don't specify a name, the default credentials are loaded.
service = QiskitRuntimeService()
- If you have saved credentials for both an IBM Quantum Platform account and an IBM Cloud account, IBM Cloud is the default account used when you initialize your account, unless you specify
set_as_default=True
in your IBM Quantum Platform account when you use thesave_account()
method. - If you are saving multiple accounts, 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.
- Follow these instructions to authenticate to IBM Cloud if you are not using a trusted environment. For example, if you are using a public comptuer.
- Follow these instructions if you want to connect by using the REST API instead of using Qiskit.
- If necessary, use this information to configure your firewall to enable access to the IBM Quantum API endpoints.
Next steps
- Overview of available plans.
- Configure the Qiskit SDK locally.
- Follow the steps in Hello world to write and run a quantum program.
- Set up to use IBM Quantum Platform with REST API.
- Try a tutorial.