Skip to main content

Command Line Interface for interacting with all parts of the qBraid platform.

Project description

qbraid_cli

Documentation PyPI version Python verions Downloads GitHub Discord

Command Line Interface for interacting with all parts of the qBraid platform.

The qBraid CLI is a versatile command-line interface tool designed for seamless interaction with qBraid cloud services and quantum software management tools. Initially exclusive to the qBraid Lab platform, the CLI now supports local installations as well. This enhancement broadens access to features like qBraid Quantum Jobs, enabling direct acess to QPU devices from leading providers like IonQ, Oxford Quantum Circuits, QuEra, and Rigetti, as well as on-demand simulators from AWS, all using qBraid credits, with no additional access keys required.

Getting Started

The qBraid-CLI comes pre-installed and pre-configured in qBraid Lab:

For help, see qBraid Lab User Guide: Getting Started.

You can also install the qBraid-CLI from PyPI with:

pip install qbraid-cli

Local configuration

After installation, you must configure your account credentials to use the CLI locally:

  1. Create a qBraid account or log in to your existing account by visiting account.qbraid.com
  2. Copy your API Key token from the left side of your account page:
  3. Save your API key from step 2 in local configuration file ~/.qbraid/qbraidrc using:
$ qbraid configure

Basic Commands

$ qbraid
----------------------------------
  * Welcome to the qBraid CLI! * 
----------------------------------

        ____            _     _  
   __ _| __ ) _ __ __ _(_) __| | 
  / _` |  _ \| '__/ _` | |/ _` | 
 | (_| | |_) | | | (_| | | (_| | 
  \__,_|____/|_|  \__,_|_|\__,_| 
     |_|                         


- Use 'qbraid --help' to see available commands.

- Use 'qbraid --version' to see the current version.

Reference Docs: https://docs.qbraid.com/projects/cli/en/stable/guide/overview.html

A qBraid CLI command has the following structure:

$ qbraid <command> <subcommand> [options and parameters]

For example, to list installed environments, the command would be:

$ qbraid envs list

To view help documentation, use one of the following:

$ qbraid --help
$ qbraid <command> --help
$ qbraid <command> <subcommand> --help

For example:

$ qbraid --help

Usage: qbraid [OPTIONS] COMMAND [ARGS]...

The qBraid CLI.

Options
  --version                     Show the version and exit.
  --install-completion          Install completion for the current shell.
  --show-completion             Show completion for the current shell, to copy it or customize the installation.
  --help                        Show this message and exit.

Commands
  configure                     Configure qBraid CLI options.
  credits                       Manage qBraid credits.
  devices                       Manage qBraid quantum devices.
  envs                          Manage qBraid environments.
  jobs                          Manage qBraid quantum jobs.
  kernels                       Manage qBraid kernels.

To get the version of the qBraid CLI:

$ qbraid --version

Magic Commands

You can also access the CLI directly from within Notebooks using IPython magic commands. First, configure the qBraid magic commands extension using:

$ qbraid configure magic

The above command can also be executed from within a Jupyter notebook using the ! operator. Then, from within a notebook cell, load the qBraid magic IPython extension using:

In [1]: %load_ext qbraid_magic

Now you can continue to use the qBraid-CLI as normal from within your Jupyter notebook using the magic % operator, e.g.

In [2]: %qbraid jobs state

In [3]: %qbraid jobs enable braket -y

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

qbraid_cli-0.8.1a0.tar.gz (287.6 kB view details)

Uploaded Source

Built Distribution

qbraid_cli-0.8.1a0-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file qbraid_cli-0.8.1a0.tar.gz.

File metadata

  • Download URL: qbraid_cli-0.8.1a0.tar.gz
  • Upload date:
  • Size: 287.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for qbraid_cli-0.8.1a0.tar.gz
Algorithm Hash digest
SHA256 aa764602b9da66837fc5bd0d78bb4d3308c00372debd8662e9370d035aae0413
MD5 d4f008d390b51e2aaa4598ff60bae1fd
BLAKE2b-256 18facb0df10c8e33b34cc9d4323ae5614e4c14c6df862f5ec08e78d908a41827

See more details on using hashes here.

File details

Details for the file qbraid_cli-0.8.1a0-py3-none-any.whl.

File metadata

  • Download URL: qbraid_cli-0.8.1a0-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for qbraid_cli-0.8.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 af5c448b10568437fa4858bc523bd6d44dc352bf6a350a669e4141396075996c
MD5 d785a9e63b2dc5ec1b276aa9472b8c7f
BLAKE2b-256 57aa97978e242646e6f2495be3753fc594dff8d44d6a53ed68c1d12608361958

See more details on using hashes here.

Supported by

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