Qiskit IBM Experiment service for accessing the quantum experiment interface at IBM
Archived. The repository is read-only: no more fixes or releases will come.
pip install qiskit-ibm-experimentQiskit IBM Experiment service
Qiskit is an open-source SDK for working with quantum computers at the level of circuits, algorithms, and application modules.
This project contains a service that allows accessing the IBM Quantum experiment database.
Installation
The provider can be installed via pip:
pip install qiskit-ibm-experiment
Provider Setup
-
Create an IBM Quantum account or log in to your existing account by visiting the IBM Quantum login page.
-
Ensure you have access to the experiment database.
-
Copy (and/or optionally regenerate) your API token from your IBM Quantum account page.
-
Take your token from step 2, here called
MY_API_TOKEN, and save it by callingIBMExperimentService.save_account():from qiskit_ibm_experiment import IBMExperimentService IBMExperimentService.save_account(token='MY_API_TOKEN')The command above stores your credentials locally in a configuration file called
qiskit-ibm.json. By default, this file is located in$HOME/.qiskit, where$HOMEis your home directory.Once saved you can then instantiate the experiment service without using the API token:
from qiskit_ibm_experiment import IBMExperimentService service = IBMExperimentService() # display current supported backends print(service.backends()) # get the latest experiments in the DB experiment_list = service.experiments()You can also save specific configuration under a given name:
from qiskit_ibm_experiment import IBMExperimentService IBMExperimentService.save_account(name='my_config', token='MY_API_TOKEN')And explicitly load it:
from qiskit_ibm_experiment import IBMExperimentService service = IBMExperimentService(name='my_config') # display current supported backends print(service.backends())
Load Account from Environment Variables
Alternatively, the IBM Provider can discover credentials from environment variables: