Skip to main content

Qiskit IBM Experiment service for accessing the quantum experiment interface at IBM

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Qiskit 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

  1. Create an IBM Quantum account or log in to your existing account by visiting the IBM Quantum login page.

  2. Ensure you have access to the experiment database.

  3. Copy (and/or optionally regenerate) your API token from your IBM Quantum account page.

  4. Take your token from step 2, here called MY_API_TOKEN, and save it by calling IBMExperimentService.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 $HOME is 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:

export QISKIT_IBM_EXPERIMENT_TOKEN='MY_API_TOKEN'
export QISKIT_IBM_EXPERIMENT_URL='https://auth.quantum-computing.ibm.com/api'

Then instantiate the provider without any arguments and access the backends:

from qiskit_ibm_experiment import IBMExperimentService
service = IBMExperimentService()

Environment variable take precedence over the default account saved to disk via save_account, if one exists; but if the name parameter is given, the environment variables are ignored.

Enable Account for Current Session

As another alternative, you can also enable an account just for the current session by instantiating the service with the token

from qiskit_ibm_experiment import IBMExperimentService
service = IBMExperimentService(token='MY_API_TOKEN')

Contribution Guidelines

If you'd like to contribute to IBM Quantum Experiment Service, please take a look at our contribution guidelines. This project adheres to Qiskit's code of conduct. By participating, you are expect to uphold to this code.

We use GitHub issues for tracking requests and bugs. Please use our slack for discussion and simple questions. To join our Slack community use the invite link at Qiskit.org. For questions that are more suited for a forum we use the Qiskit tag in Stack Exchange.

Next Steps

Now you're set up and ready to check out some of the other examples from our Qiskit Tutorial repository.

Authors and Citation

The Qiskit IBM Quantum Experiment Service is the work of many people who contribute to the project at different levels. If you use Qiskit, please cite as per the included BibTeX file.

License

Apache License 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qiskit-ibm-experiment-0.3.tar.gz (64.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qiskit_ibm_experiment-0.3-py3-none-any.whl (56.7 kB view details)

Uploaded Python 3

File details

Details for the file qiskit-ibm-experiment-0.3.tar.gz.

File metadata

  • Download URL: qiskit-ibm-experiment-0.3.tar.gz
  • Upload date:
  • Size: 64.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for qiskit-ibm-experiment-0.3.tar.gz
Algorithm Hash digest
SHA256 8e3c027f606a65811d7c6e55169a241e23ecb98c03c74705a8282ba75300372f
MD5 1fdefd755279c1380d8a8ef3fff11eb3
BLAKE2b-256 073cae24e4f718d800467ba776ea6778713bdbf21009dac5a8641af712b0900f

See more details on using hashes here.

File details

Details for the file qiskit_ibm_experiment-0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for qiskit_ibm_experiment-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 066a00c8915375eef12b89166ef4767a85e6aecbf4cf8fba6c9b1959fb67156b
MD5 4b5381e96e64f63ce68a29f3ddff5ff1
BLAKE2b-256 1f5d6781bb87be29e1cf1680812030e3f74c71837e2355a89e4e6a69a3a6af09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page