qbraid logo qBraid | CLI

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



The qBraid CLI is a specialized command-line interface tool designed exclusively for use within the qBraid Lab platform. It is not intended for local installations or use outside the qBraid Lab environment. This tool ensures seamless integration and optimized performance specifically tailored for qBraid Lab’s unique cloud-based quantum computing ecosystem.


the qBraid CLI can be intalled using pip:

pip install qbraid-cli

To use the qBraid CLI, login to qBraid (or create an account), launch Lab, and then open Terminal. You can also access the CLI directly from within Notebooks using the ! operator. See quantum jobs example.

Quick start

$ qbraid
 * Welcome to the qBraid CLI! *

       ____            _     _
  __ _| __ ) _ __ __ _(_) __|  |
 / _  |  _ \|  __/ _  | |/ _   |
| (_| | |_) | | | (_| | | (_|  |
 \__  |____/|_|  \__ _|_|\__ _ |

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

- Use `qbraid --version` to display the current version.

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

List environments installed in your qBraid Lab instance using:

$ qbraid envs list
# qbraid environments:

qsharp                         /opt/.qbraid/environments/qsharp_b54crn
default                        /opt/.qbraid/environments/qbraid_000000
qbraid_sdk                     /home/jovyan/.qbraid/environments/qbraid_sdk_9j9sjy
custom_env                     /home/jovyan/.qbraid/environments/custom_env_lj3zlt

Environments with the jobs keyword listed before their path support qBraid Quantum Jobs. To use qBraid Quantum Jobs in an environment, it must have Amazon Braket installed.

By default, your qBraid terminal opens using Python (and pip) from /opt/conda/bin. Packages that are installed directly at this top-level will not persist between sessions. Instead, use the qBraid CLI to install new packages directly into one of your listed qBraid environments:

$ qbraid envs activate custom_env          # activate environment
$ python -m pip install amazon-braket-sdk  # pip install package
$ deactivate

Once Amazon Braket is installed in an environment, add and enable quantum jobs:

$ qbraid jobs enable braket      # toggle quantum jobs on
$ qbraid jobs state              # verify quantum jobs enabled

Congrats! Every AWS job you run in this environment will now be submitted through the qBraid API, so no access keys are necessary. At any time, you can switch back to using your own AWS credentials by disabling quantum jobs:

$ qbraid jobs disable braket  # toggle quantum jobs off