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 Stack Overflow

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, pre-configured access to QPUs from IonQ, Oxford Quantum Circuits, QuEra, Rigetti, and IQM, as well as on-demand simulators from qBraid, AWS, IonQ, QuEra, and NEC. See pricing for more.

Resources:

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

To manage qBraid environments using the CLI, you must also install the envs extra:

pip install 'qbraid-cli[envs]'

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

For more on API keys, see documentation.

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/cli/api-reference/qbraid

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
  account                       Manage qBraid account
  admin                         CI/CD commands for qBraid maintainers.
  configure                     Configure qBraid CLI options.
  account                       Manage qBraid account.
  chat                          Interact with qBraid AI chat service.
  devices                       Manage qBraid quantum devices.
  envs                          Manage qBraid environments.
  files                         Manage qBraid cloud storage files.
  jobs                          Manage qBraid quantum jobs.
  kernels                       Manage qBraid kernels.
  pip                           Run pip command in active qBraid environment.

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 chat -f code -p "Write a Qiskit bell circuit"

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.10.6.tar.gz (247.8 kB view details)

Uploaded Source

Built Distribution

qbraid_cli-0.10.6-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file qbraid_cli-0.10.6.tar.gz.

File metadata

  • Download URL: qbraid_cli-0.10.6.tar.gz
  • Upload date:
  • Size: 247.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for qbraid_cli-0.10.6.tar.gz
Algorithm Hash digest
SHA256 93d863e5025011ab3ed2d3eb4370fbff9c718e1468bc2856f6ffdf9c71143157
MD5 1447c54efcdea220f05e47e6d3b19e6d
BLAKE2b-256 57a20a43d2f0619af11f018e00093260e097ed37a2a214da501ce7f524cb3158

See more details on using hashes here.

File details

Details for the file qbraid_cli-0.10.6-py3-none-any.whl.

File metadata

  • Download URL: qbraid_cli-0.10.6-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for qbraid_cli-0.10.6-py3-none-any.whl
Algorithm Hash digest
SHA256 bccdb06a22914279661a4975fa7fb693197552e35da7a852b6179fafaee196d6
MD5 0182c15a8cb81389677f419cf0f46de6
BLAKE2b-256 e3615c3bc0289f4dabca05f2f27307256b22e4701ef7a9199333e54a9edc318e

See more details on using hashes here.

Supported by

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