Skip to content

Compilers and languages

staq

Maintained by softwareqinc

**staq** is a modern C++ library for the synthesis, transformation, optimization and compilation of quantum circuits.

OpenQASMMITv3.5
staq illustration

Resource snapshot

Category

Compilers and languages

Stars

181

Last pushed

Feb 22, 2026Updated 6mo ago

Open issues

6

What it is

staq is maintained by softwareqinc and sits in the Compilers and languages lane of the open-source quantum map.

**staq** is a modern C++ library for the synthesis, transformation, optimization and compilation of quantum circuits.

Last verified by Qtangl generator on May 27, 2026

Who it's for

Developers who want to understand the representations and compilers that sit between high-level code and runnable circuits.

What you can build or learn

  • Compare IRs, DSLs, transpilers, and compiler assumptions across ecosystems.
  • Understand how high-level code becomes something a backend can execute.
  • Spot tools that matter when interoperability and compilation quality are important.

License

MIT

SPDX identifier detected from the repository metadata or license files.

Repository README

Preview from the project README.

Rendered as Markdown inside a scrollable preview. Long READMEs stay contained; expand or open on GitHub for the full document.

~282 words · about 1 min readOpen on GitHub

staq

Version 3.5 - 8 March 2024

GitHub actions


About

staq is a modern C++ library for the synthesis, transformation, optimization and compilation of quantum circuits. staq is written in standard C++17 and has very low external dependencies. It is usable either through the provided binary tools, or as a header-only library that can be included to provide direct support for parsing & manipulating circuits written in the OpenQASM 2.0 circuit description language.

Inspired by Clang, staq is designed to manipulate OpenQASM 2.0 syntax trees directly, rather than through an intermediate representation which makes retrieving the original source code impossible. In particular, OpenQASM 2.0 circuits can be inspected and transformed (in most cases) without losing the original source structure. This makes staq ideally suited for source-to-source transformations, where only specific changes are desired. Likewise, this allows translations to other common circuit description languages and libraries to closely follow the OpenQASM 2.0 source.

Check out the Wiki for more information about the library and included tools.

Copyright (c) 2019 - 2025 softwareQ Inc. All rights reserved.


License

staq is distributed under the MIT license. Please see the LICENSE.txt file for more details.


Installation instructions

Please see the installation guide INSTALL.md and the comprehensive Wiki for further documentation and detailed examples.


Python 3 wrapper

pystaq is a Python 3 wrapper for staq. pystaq can be installed using pip

pip install git+https://github.com/softwareQinc/staq

For more details, please see pystaq/README.md.


Acknowledgements

Thanks to the excellent EPFL logic synthesis libraries which are used to perform logic synthesis in staq, and in particular Bruno Schmitt's tweedledum library, from which the OpenQASM 2.0 parser was adapted.

Read on GitHub

Activity

Latest release

—

Watchers

11

Python support

>=3.9

Learn digest

Get monthly updates when library entries change.

Monthly digest: new library entries, updated flagships, and one editorial pick.

Related resources

Keep exploring nearby tools.

NVIDIA

cuda-quantum

C++ and Python support for the CUDA Quantum programming model for heterogeneous quantum-classical workflows

C++Apache-2.0Flagship

1,048 stars · Updated 3mo ago

QISKit

openqasm

Quantum assembly language for extended quantum circuits

PythonApache-2.0

1,468 stars · Updated 3mo ago

Quantomatic

pyzx

Python library for quantum circuit rewriting and optimisation using the ZX-calculus

OpenQASMApache-2.0Flagship

524 stars · Updated 3mo ago

QISKit

qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.

PythonApache-2.0FlagshipQtangl relevant

7,412 stars · Updated 3mo ago

Microsoft

QuantumKatas

Tutorials and programming exercises for learning Q# and quantum computing

Jupyter NotebookMITFlagshipArchive

4,862 stars · Updated 2y ago

CQCL

tket

Source code for the TKET quantum compiler, Python bindings and utilities

C++Apache-2.0FlagshipQtangl relevant

308 stars · Updated 3mo ago