Package: qiskit-ibm-experiment
Qiskit IBM Experiment serviceQiskitis 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 theIBM Quantumexperiment database.InstallationThe provider can be installed via pip:pipinstallqiskit-ibm-experimentProvider SetupCreate an IBM Quantum account or log in to your existing account by visiting theIBM Quantum login page.Ensure you have access to the experiment database.Copy (and/or optionally regenerate) your API token from yourIBM Quantum account page.Take your token from step 2, here calledMY_API_TOKEN, and save it by callingIBMExperimentService.save_account():fromqiskit_ibm_experimentimportIBMExperimentServiceIBMExperimentService.save_account(token='MY_API_TOKEN')The command above stores your credentials locally in a configuration file calledqiskit-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:fromqiskit_ibm_experimentimportIBMExperimentServiceservice=IBMExperimentService()# display current supported backendsprint(service.backends())# get the latest experiments in the DBexperiment_list=service.experiments()You can also save specific configuration under a given name:fromqiskit_ibm_experimentimportIBMExperimentServiceIBMExperimentService.save_account(name='my_config',token='MY_API_TOKEN')And explicitly load it:fromqiskit_ibm_experimentimportIBMExperimentServiceservice=IBMExperimentService(name='my_config')# display current supported backendsprint(service.backends())Load Account from Environment VariablesAlternatively, the IBM Provider can discover credentials from environment variables:exportQISKIT_IBM_EXPERIMENT_TOKEN='MY_API_TOKEN'exportQISKIT_IBM_EXPERIMENT_URL='https://auth.quantum-computing.ibm.com/api'Then instantiate the provider without any arguments and access the backends:fromqiskit_ibm_experimentimportIBMExperimentServiceservice=IBMExperimentService()Environment variable take precedence over the default account saved to disk viasave_account,
if one exists; but if thenameparameter is given, the environment variables are ignored.Enable Account for Current SessionAs another alternative, you can also enable an account just for the current session by instantiating the service with the tokenfromqiskit_ibm_experimentimportIBMExperimentServiceservice=IBMExperimentService(token='MY_API_TOKEN')Contribution GuidelinesIf you'd like to contribute to IBM Quantum Experiment Service, please take a look at ourcontribution guidelines. This project adheres to Qiskit'scode of conduct.
By participating, you are expect to uphold to this code.We useGitHub issuesfor tracking requests and bugs. Please use ourslackfor discussion and simple questions. To join our Slack community use the
invite link atQiskit.org. For questions that are more suited for a forum we
use theQiskittag inStack Exchange.Next StepsNow you're set up and ready to check out some of the other examples from ourQiskit Tutorialrepository.Authors and CitationThe Qiskit IBM Quantum Experiment Service is the work ofmany peoplewho contribute to the
project at different levels. If you use Qiskit, please cite as per the includedBibTeX file.LicenseApache License 2.0.