skillfed

qualang-tools

The qualang_tools package includes various tools related to QUA programs in Python

qualang-tools v0.23.0 122.0K downloads/30d#11,965 on PyPI59
Permissive license BSD-3-Clause Active released

What it is and what it does

qualang-tools is a companion library for the QUA programming language, used to write and run quantum computing experiments on Quantum Machines' OPX hardware. It bundles a collection of specialized utilities: loop tools for parametrizing QUA for-loops with numpy arrays, plotting and result-handling helpers, unit conversion (MHz, microseconds, millivolts), data analysis (including state discrimination), waveform generation with nanosecond resolution, and configuration management for the OPX control system.

The package is organized into modules covering different aspects of quantum experiment workflow—from low-level waveform design and hardware control to high-level experiment orchestration and multi-user coordination. It also includes integrations with external frameworks like QCoDeS and tools for calibration, dynamic parameter tuning (video mode), and digital filter design. Most users will import specific submodules (e.g., loops, plot, results, units) rather than the entire package.

Use it for:

  • Parametrize QUA for-loops using numpy arrays (linspace, arange, logspace) to sweep experimental parameters.
  • Generate and manage complex pulse sequences with nanosecond timing resolution using the Bakery framework.
  • Extract, analyze, and save experimental results from QUA programs, including state discrimination for two-level systems.
  • Convert between physical units (MHz, microseconds, millivolts) and hardware-native units in QUA programs.
  • Configure and control OPX hardware outputs in continuous-wave mode or as a vector network analyzer.
  • Perform standard single-qubit calibrations and randomized benchmarking experiments from a single Python script.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a comprehensive toolkit for writing QUA programs, including utilities for loop parametrization, plotting, result handling, unit conversion, data analysis, and waveform generation for quantum computing experiments.

Yes. The package is actively maintained, has no known vulnerabilities, installs cleanly, and supports current Python versions. It is purpose-built for QUA users and provides essential utilities that would otherwise require custom implementation. Install it if you are writing QUA programs; skip it if you do not use Quantum Machines hardware.

Install

qualang-tools on PyPI

pip

pip install qualang-tools

uv

uv add qualang-tools

poetry

poetry add qualang-tools

Installing qualang-tools

Before you install

Low friction install with a pure-Python wheel. Actively maintained with a release 14 days ago. Nine runtime dependencies including numpy, scipy, and scikit-learn are all widely-used scientific packages, so environment setup is straightforward.

License in practice

BSD-3-Clause is permissive and imposes minimal restrictions on use or modification. You can use this package in commercial or proprietary projects without licensing obligations.

Quickstart

pip install qualang-tools

from qualang_tools.loops import from_array
import numpy as np

freq_array = np.linspace(1, 2, 11)
loop_values = from_array(freq_array)

Requires Python 3.9–3.13. Some optional features (interactive plotting, two-qubit randomized benchmarking) need extras installed separately.

Verify before relying

  • Whether qm-qua (the core QUA runtime dependency) is freely available or requires a commercial license or hardware access.
  • Whether all nine runtime dependencies are automatically installed or if some are optional.
  • Performance characteristics when handling large datasets or complex waveforms.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (<=3.13,>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 9 — attrs, grpclib, matplotlib, numpy, packaging, qm-qua, scikit-learn, scipy, xarray
Maintenance actively maintained — 14 days since the last release
Last repo commit
First released
Downloads 121,982/month — #11,965 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: qualang_tools-0.23.0-py3-none-any.whl

License :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

QUA programming toolsquantum experiment utilitieswaveform generation quantumQUA loop parametrizationquantum data analysisQOP configuration toolsquantum pulse sequences
quantum-computinghardware-controlexperiment-automation

More Scientific/Engineering packages