Skip to content
A full-stack quantum processing toolkit
C++ Python C Other
Branch: master
Clone or download
meamy Merge pull request #4 from amccaskey/master
update to cirq output to address Issue #3
Latest commit 598a9ef Jan 23, 2020
Type Name Latest commit message Commit time
Failed to load latest commit information.
demos Removed extra Hadamard gates from .qc translation Jan 9, 2020
include update to cirq output to address Issue #3 Jan 23, 2020
libs minor updates Nov 1, 2019
qasm Formatting changes Oct 30, 2019
staq commit Dec 11, 2019
tools commit Dec 11, 2019
unit_tests code formatting Dec 11, 2019
.clang-format code formatting Dec 11, 2019
.gitignore name change Dec 11, 2019
.gitmodules Merging tweedledee directly into source tree Jun 12, 2019
.travis.yml Update .travis.yml Dec 11, 2019
CHANGES public release Dec 11, 2019
CMakeLists.txt name change Dec 11, 2019
Doxyfile More documentation Dec 17, 2019
LICENSE Update LICENSE Nov 1, 2019 Update Dec 11, 2019
VERSION public release Dec 11, 2019 Update Dec 11, 2019


Version 1.0 - 10 December 2019

Build status:

Build Status


staq is a modern C++17 library for the synthesis, transformation, optimization and compilation of quantum circuits. 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 circuit description language.

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

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


Linux & Mac OS

staq uses CMake for its build system. To build the main staq executable, from the root directory execute

mkdir build && cd build
cmake ..
make staq

To build the staq tool suite, from the build directory, enter make tools. Unit tests can be built with the command make unit_tests.


Building on Windows requires Visual Studio 2017 or later for cmake support. In Visual Studio, open CMakeLists.txt as a cmake project, then simply build as a regular Visual Studio project.


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


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 parser was adapted.

You can’t perform that action at this time.