Skip to main content

SyReC - A Programming Language for Synthesis of Reversible Circuits

Project description

PyPI OS License: MIT CI Bindings codecov

MQT SyReC - A Programming Language for the Synthesis of Reversible Circuits

A tool for HDL-based synthesis of reversible circuits developed by the Chair for Design Automation at the Technical University of Munich and the Institute for Integrated Circuits at the Johannes Kepler University Linz. SyReC is part of the Munich Quantum Toolkit (MQT) and builds upon our quantum functionality representation (QFR).

If you have any questions, feel free to contact us via quantum.cda@xcit.tum.de or by creating an issue on GitHub.

Getting Started

SyReC is available via PyPI for Linux, macOS, and Windows.

  • In order to make the library as easy to use as possible (without compilation), we provide pre-built wheels for most common platforms (64-bit Linux, MacOS, Windows). These can be installed using
    (venv) $ pip install syrec
    
  • Once installed, start the SyReC editor GUI by running:
    (venv) $ syrec-editor
    

Reference

SyReC has been developed based on methods proposed in the following papers:

[1] Robert Wille, Majid Haghparast, Smaran Adarsh, and Tanmay M. "Towards HDL-based Synthesis of Reversible Circuits with No Additional Lines". In International Conference on Computer Aided Design (ICCAD), 2019
@inproceedings{wille2019towardsHDLsynthesis,
    author = {Wille, Robert and Haghparast, Majid and Adarsh, Smaran and M, Tanmay},
    title = {Towards HDL-based Synthesis of Reversible Circuits with No Additional Lines},
    booktitle = {International Conference on Computer Aided Design},
    year = {2019}
}

If you use our tool for your research, we would appreciate if you cited the appropriate publication.


Documentation for Developers

System requirements

Building (and running) is continuously tested under Linux, MacOS, and Windows using the latest available system versions for GitHub Actions. However, the implementation should be compatible with any current C++ compiler supporting C++17 and a minimum CMake version of 3.14.

Disclaimer: We noticed some issues when compiling with Microsoft's MSCV compiler toolchain. If you are developing under Windows, consider using the clang compiler toolchain. A detailed description of how to set this up can be found here.

Setup, Configure, and Build

To start off, clone this repository using

git clone --recurse-submodules -j8 https://github.com/cda-tum/syrec 

Note the --recurse-submodules flag. It is required to also clone all the required submodules. If you happen to forget passing the flag on your initial clone, you can initialize all the submodules by executing git submodule update --init --recursive in the main project directory.

Our projects use CMake as the main build configuration tool. Building a project using CMake is a two-stage process. First, CMake needs to be configured by calling

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

This tells CMake to search the current directory . (passed via -S) for a CMakeLists.txt file and process it into a directory build (passed via -B). The flag -DCMAKE_BUILD_TYPE=Release tells CMake to configure a Release build ( as opposed to, e.g., a Debug build).

After configuring with CMake, the project can be built by calling

 cmake --build build --config Release

This tries to build the project in the build directory (passed via --build). Some operating systems and developer environments explicitly require a configuration to be set, which is why the --config flag is also passed to the build command. The flag --parallel <NUMBER_OF_THREADS> may be added to trigger a parallel build.

Building the project this way generates

  • the main library libsyrec.a (Unix) / syrec.lib (Windows) in the build/src directory
  • a test executable syrec_test containing a small set of unit tests in the build/test directory (only if -DBUILD_SYREC_TESTS=ON is passed to CMake during configuration)

Building and Extending the Python Bindings

To extend the Python bindings you can locally install the package in edit mode, so that changes in the Python code are instantly available. The following example assumes you have a virtual environment set up and activated.

(venv) $ pip install --editable .

If you change parts of the C++ code, you have to run this command again to make the changes visible in Python.

In order for your IDE to pick up the bindings code, you might have to set the -DBINDINGS=ON CMake configuration option.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mqt.syrec-0.1.0.tar.gz (640.3 kB view details)

Uploaded Source

Built Distributions

mqt.syrec-0.1.0-cp310-cp310-win_amd64.whl (280.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

mqt.syrec-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (301.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

mqt.syrec-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (242.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

mqt.syrec-0.1.0-cp310-cp310-macosx_10_15_x86_64.whl (259.9 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

mqt.syrec-0.1.0-cp39-cp39-win_amd64.whl (280.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

mqt.syrec-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (301.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

mqt.syrec-0.1.0-cp39-cp39-macosx_11_0_arm64.whl (242.5 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

mqt.syrec-0.1.0-cp39-cp39-macosx_10_15_x86_64.whl (260.0 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

mqt.syrec-0.1.0-cp38-cp38-win_amd64.whl (280.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

mqt.syrec-0.1.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (301.1 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

mqt.syrec-0.1.0-cp38-cp38-macosx_11_0_arm64.whl (242.4 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

mqt.syrec-0.1.0-cp38-cp38-macosx_10_15_x86_64.whl (260.0 kB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

mqt.syrec-0.1.0-cp37-cp37m-win_amd64.whl (286.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

mqt.syrec-0.1.0-cp37-cp37m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (304.8 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

mqt.syrec-0.1.0-cp37-cp37m-macosx_10_15_x86_64.whl (257.8 kB view details)

Uploaded CPython 3.7m macOS 10.15+ x86-64

File details

Details for the file mqt.syrec-0.1.0.tar.gz.

File metadata

  • Download URL: mqt.syrec-0.1.0.tar.gz
  • Upload date:
  • Size: 640.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mqt.syrec-0.1.0.tar.gz
Algorithm Hash digest
SHA256 63169d3093f068c660210860c155efb819b2961fae1096e7ac112a23371aa0f3
MD5 9bcd1ab8357bc07d654e49fb99ee6666
BLAKE2b-256 00564bd784cc4cc4fff6b40b13c8c9eaf918edb3a2aaeea6a603c6e172b4bfa9

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8773e72b566b48fdbafd5dd4563060a75684babda976ca015ec9078018f00f33
MD5 3ba8847ab89ac742f9eb6c93a112e996
BLAKE2b-256 03fe105f2a218ce6467506617723ed9f87f524369e5ec35b2098d1b1d6eba3fa

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e822b12a1f52183e837c8e3e341aadb8ad42e45debc6ea0cb20b9f9b17f7bbfb
MD5 a184d13bfd1b6a9fdb186d257cab902f
BLAKE2b-256 24c5557611df3a8e2baf03be507d155c8744edb86d74b37f1f90a2b0c2ce271c

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 97bfb28db955df4ba159fa949950d8798f95d68e65d9bc77f39b82c4c904e9d5
MD5 30b23a7f0bf8ffc69ef5e357c1fe35f4
BLAKE2b-256 81eac2aa6856b157c1ce5938a064daec036f3909f87c42fba2af794793e097a6

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6f9ac56817539aa3367bf3a117d74afa026a1ef3b3b925e69b21133b81795ef1
MD5 6873e7efd086802100aabed223701905
BLAKE2b-256 883feb41a8ce1ad37439c9c17c67390872a440bda058c9db12e3305b826cab88

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: mqt.syrec-0.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 280.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mqt.syrec-0.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0d578ccd92da73493fbe138bf69a285fa05533747466aa70fc7557689bce1850
MD5 bf47939240741c84891a6c4cfec5cdaf
BLAKE2b-256 11f4dc5d259bef1a2c29f8238115b6860e8bc1371c28133a46bd2091f73bae32

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 82fcf96df4acb465b7d4898e3b3c791bfbff57de0311fd97815707434f692048
MD5 5fb59576000c991b1422c98ce44736c1
BLAKE2b-256 b058d1d07ae1120d8a555db537ee551d9561366ea7f0eafe166e1f50fd4d14db

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ee6a1c35471ca842b211d9fd7082dad3b9742cc2f4e53dc1c4fafa93081c9ce3
MD5 800ae5f775d8515e646fa02ae253e6f7
BLAKE2b-256 e6353b28c3a72d90bf700d8113cf7d42a3282fae9a82a694c1c08045c6c4a732

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 545cae63c91c570bd8465eb4572bbd13fa63ec6947f1bfa4ddd58a1eecb9eaf5
MD5 e3961a2cac6093d62a374b06ffda52ab
BLAKE2b-256 4bc7635874c052f67fabb2caa6fc4ab1a844e9e2b3d61cc237c411a3da90f754

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: mqt.syrec-0.1.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 280.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mqt.syrec-0.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 269058ac65ba3e6519a5b4b675a2531fd895d3665d1e9ceafce6df33a4ee189a
MD5 f24fbac9efeaa8b1535f8719e93f0c5b
BLAKE2b-256 afe962c8f26427111e3f8a8e8c80dc85dbf6c9bb06d502c9fac054279a30be77

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2e37b596953296bedc03e1b587af6ce441d720823e4f633488f1faed20f756ce
MD5 fca8792bfc2a6881f5ac42650c883ee8
BLAKE2b-256 7513b2bec32c59e531532800c8c5b35569b0add14f1f3ffc6ab6ca2e45c07ba5

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f696e95b246772ee75a0be6c28e61e9dc61e2d9781d6a9be9baf1f9c1f8e8c3e
MD5 9c468e47c663aa5889796ae9a1d9a25c
BLAKE2b-256 6d10aec4c68eb812da1425db70583de4b8cb55c8d37b48024d203616d0995ca5

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ca649d185ce1850824a342e91d2270fd66d91bfc40e831cd73c93554139987d8
MD5 e3b3f0f4c1b588fa08b55cd9b0b4c6be
BLAKE2b-256 9053b3930f0e9669cdcff1a8451793391b6d3f7a4cc558df3d77e04283064716

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: mqt.syrec-0.1.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 286.8 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mqt.syrec-0.1.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8cfaaf6396743918ad26357f46add96152069582f66518cc30422ae2c11de685
MD5 86745577bb5f23e62e5e55cf8953f106
BLAKE2b-256 3cfca778c6ad048e136b318216a141305af39d824c2e8a5384c7cd3405897e1e

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp37-cp37m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp37-cp37m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b7e6461cdbf83c2bbd1afef79305dcb82144f9f3e340746c5cdfdf4803e05ed3
MD5 c8f6eebb659ddf414c691371fbcd122f
BLAKE2b-256 d73d032dac4b63dd36522f038964b140b9b9c203868183b7c4d4e48bb7f07fe3

See more details on using hashes here.

File details

Details for the file mqt.syrec-0.1.0-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mqt.syrec-0.1.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 265cc417596eea70fff23e6d9b9e0f4b0e207a5fb0cd2492964b90736531da4d
MD5 3bbe206bccb3ff40f352ef2c9f7d3139
BLAKE2b-256 89d0c6830a04a6697207e0d91eb9f039f2d53e18e063e4a1feb11715c7118160

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page