True-Q™ Readme

True-Q™ provides methods to calibrate and optimize the performance of quantum devices. This includes diagnostic tools, which generate quantum circuits that measure noise properties of your device, and runtime solutions, which tailor and reduce noise profiles.


To install True-Q™, navigate to the folder containing and run:

pip install .

which will install it as a site-package in your current Python environment. Note that you must have your qb-token.json located in the same directory as in order to perform the installation successfully.

If you want to be able to run tests, view documentation locally, or edit the Python source code, then it is easiest to install True-Q™ in the editable mode using:

pip install -e .


To use True-Q™, you must have a 64-bit version of Python 3.6 or above, and you need to meet the following OS-specific requirements:

  • Linux: libstdc++ >= 8.2.1

  • MacOS: libSystem.B >= 1252.250.1 and libc++ >= 400.9.4

  • Windows: Microsoft Visual C++ 2015-2019 Redistributable (x64) >= 14.27.29112 (download it here)

A full list of required Python packages can be found in the requirements.txt file.

Optional dependencies

True-Q™ is capable of interfacing with other Python quantum computing packages, such as Cirq, pyQuil, and Qiskit. This functionality is optional and becomes available automatically whenever any of these packages are installed on your machine.


If you installed True-Q™ using pip install . command, you can update it via:

pip install . -U

If you installed True-Q™ in the develop or editable mode, you can update your local copy using:

python update

Installation without Internet

If you are using a sandboxed version of True-Q™ and you want to install it on a computer without Internet access, you can do so as follows. First, ensure that you are working on a different computer with Internet access. If you do not have a local copy of True-Q™ (i.e. you only have qb-token.json and, you can obtain all of the required files by running:

python get_all

Once everything has been downloaded, you can copy this folder to your target machine and run the following command to perform a local (offline) installation:

python local_install

Note that your target machine must also have all of the required Python packages specified inside requirements.txt, otherwise True-Q™ will not function correctly.


You can view True-Q™ documentation and examples online at

If you have a local copy of True-Q™, you can open documentation.html in your browser to view it.

Alternatively, documentation can be built manually from source, which is located in the docs folder. If you are building from source, ensure that you have all of the required Python packages installed by doing:

pip install -r requirements_optional.txt
pip install -r docs/requirements.txt

To manually build the documentation, execute the following commands:

cd docs && make html && cd ..

If successful, the compiled documentation will appear in the docs/build/html folder, which could be accessed via the documentation.html shortcut with your browser.


Running tests requires the pytest package, which can be installed via:

pip install pytest>=4.4

Once installed, navigate to the folder containing and run:


to run tests from the tests folder using the installed version of True-Q™. You can also run tests against the local copy of True-Q™, rather than the installed version, by running:

python -m pytest

Note that many of these tests involve quantum simulation, and therefore it might take a minute or two to run all of them.


A troubleshooting script is included that checks True-Q™, its dependencies, and the connection to the server and produces a log file of the results. To run the script from the command line, navigate to the trueq folder and then run:


from the command line. Make sure to use the same version of Python that you will use with True-Q™ since you may have multiple copies of Python installed, especially if you use Anaconda. This will generate a file called troubleshoot-[date].log.

If you are having trouble running this script via command line, you can also execute it through Jupyter (IPython) Notebook. First, copy the full file path of located in your trueq folder, paste it into the code below, and run it. (To get the full path on Windows, hold shift and right click on in Explorer and select “Copy as path”. On macOS, right click on in Finder, hold down Alt/Option, and select “Copy as Pathname”. On Linux, right click on in Files and select “Copy”.)

import os
import subprocess
import sys

full_path = "/your/trueq/path/"

log_file = os.path.join(os.path.dirname(full_path), "troubleshoot.log")[sys.executable, full_path, "--filename", log_file])
with open(log_file, "r") as f:

If you require assistance generating or interpreting a log file, please email


If you wish to cite True-Q™ in your publication, you can visit this page to download a citation in a format of your choice. You can download citations for the current or past versions of True-Q™ on that page.