Getting started

Getting started with Q-CTRL BOULDER OPAL

The Q-CTRL Python package provides an intuitive and convenient Python interface to Q-CTRL’s quantum control solutions for customers of Q-CTRL.


  • To use the Q-CTRL Python package you will need a Q-CTRL account
  • The Q-CTRL Python package requires Python 3.6.4 or later, Python 3.7 or Python 3.8


To get started quickly and easily, we recommend Anaconda — a free and open-source distribution of the Python and R programming languages for scientific computing that aims to simplify package management and deployment.

Once you're set up with a valid Python version, run the following command in your terminal application:

$ pip install qctrl


If you already have the qctrl package installed and wish to upgrade to the latest version, run:

$ pip install --upgrade qctrl


To authenticate, you will need the email and password used to create your Q-CTRL account. You can use the following command to see all qctrl authentication options:

$ qctrl auth --help

Interactive authentication

The interactive authentication method is a command line utility that authenticates your credentials and saves an authentication file that gets used in all future interactions with the Python package.

This utility can be invoked from the terminal as follows:

$ qctrl auth

If you would like to store the automatically generated authentication file in a different place to the default location, you can do so through the use of the path command.

$ qctrl auth --path <your_custom_path>

The interactive authentication method can also be invoked using Python as shown below:

$ python
>>> from qctrl import Qctrl
>>> qctrl = Qctrl()

    This is an interactive Q-CTRL Authentication setup tool.

    For non-interactive or alternative options check our help:

        $ qctrl auth --help


Authenticating to
Successfully authenticated!
Authentication file created at /Users/me/.config/qctrl/99a605c91232cda79437e2908bdf0837

Note: You only need to do the above once. Subsequent invocations of Qctrl() will use the created authentication file.

Non-interactive authentication

For usage when interactive authentication is not available, you can authenticate by providing your credentials to the Qctrl() object as shown below.

$ python
>>> from qctrl import Qctrl
>>> qctrl = Qctrl(email='', password='mypassword')