Giter VIP home page Giter VIP logo

mqt-syrec's Introduction

PyPI OS License: MIT CI Bindings codecov

Note

This project is currently in low maintenance mode. We will still fix bugs and accept pull requests, but we will not actively develop new features.

SyReC Synthesizer: A Tool for HDL-based Synthesis of Reversible Circuits

A tool for HDL-based synthesis of reversible circuits developed as part of the Munich Quantum Toolkit (MQT) by the Chair for Design Automation at the Technical University of Munich. It builds upon MQT Core, which forms the backbone of the MQT.

Documentation

If you have any questions, feel free to contact us by creating an issue on GitHub.

Getting Started

The SyReC Synthesizer 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 mqt.syrec
  • Once installed, start the SyReC Synthesizer GUI by running:
    (venv) $ syrec-editor

Detailed documentation on all available methods, options, and input formats is available at ReadTheDocs.

System Requirements and Building

The implementation is compatible with any C++17 compiler and a minimum CMake version of 3.19. Please refer to the documentation on how to build the project.

Building (and running) is continuously tested under Linux, macOS, and Windows using the latest available system versions for GitHub Actions.

References

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

[1] S. Adarsh, L. Burgholzer, T. Manjunath and R. Wille. SyReC Synthesizer: An MQT tool for synthesis of reversible circuits. Software Impacts, 2022.

[2] R. Wille, S. Offermann, and R. Drechsler. SyReC: A Programming Language for Synthesis of Reversible Circuits. In Forum on Specification and Design Languages (FDL), 2010.

[3] R. Wille, E. Schönborn, M. Soeken, and R. Drechsler. SyReC: A hardware description language for the specification and synthesis of reversible circuits. Integration (The VLSI Journal), 2016.

[4] R. Wille, M. Haghparast, S. Adarsh, and T. Manjunath. Towards HDL-based Synthesis of Reversible Circuits with No Additional Lines. In International Conference on Computer Aided Design (ICCAD), 2019.


Acknowledgements

The Munich Quantum Toolkit has been supported by the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus.

mqt-syrec's People

Contributors

burgholzer avatar dependabot[bot] avatar lsschmid avatar pre-commit-ci[bot] avatar smarantum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mqt-syrec's Issues

UI/UX Improvements

At the moment the graphical editor is functional, yet not very user-friendly and pretty. The following represents a non-complete list of possible improvements:

  • The UI is not really responsive, e.g., the circuit that is displayed should, in general, fit the display area as a whole and not be cut off. The editor should also resize appropriately to fit its content.
  • The Log Messages sub-element can be moved around arbitrarily. It would be great if this was also possible for the circuit view.
  • The costs window can easily be integrated into the main UI by making the Log Messages Window smaller.
  • Cost calculation should probably always be performed in combination with synthesis, since it takes practically no time and provides useful information. This also fits nicely with integrating this information directly in the UI.
  • In a similar fashion, the statistics about the resulting circuit should most probably also include what is currently printed to the console: number of lines, inputs, constants, outputs, garbage values.
  • The simulation result could/should also be integrated into the main UI. It could be placed instead/besides of the Log Messages since they do not occur that often.
  • The simulation result does not look very appealing and is hard to read in general. there is definitely a way to format this in a nicer fashion (grouping of signal variables, spacing between in and out, removal or summary of const_0 inputs, etc.)
  • On the implementation side, it is rather inefficient to synthesize the circuit again for the simulation and the calculation of the cost. If a circuit has already been synthesized, the resulting circuit can be used for the simulation. if a new circuit shall be simulated, it first has to be synthesized anyway.

Each of these task can be a separate pull request and any further feedback is welcome!

setup.py + pyproject.toml breaking

Editable installs of the project are currently broken with recent versions of setuptools [(>=64)]

The following PR tries to work around that issue.

https://github.com/cda-tum/qcec/pull/112

The error message is as follows:

raise DistutilsFileError(
distutils.errors.DistutilsFileError: can't copy '/tmp/tmpj41k2l6r.build-lib/pysyrec.cpython-38-x86_64-linux-gnu.so': doesn't exist or not a regular file
error: Support for editable installs via PEP 660 was recently introduced
in setuptools. If you are seeing this error, please report to:

  https://github.com/pypa/setuptools/issues

  Meanwhile you can try the legacy behavior by setting an
  environment variable and trying to install again:

  SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building editable for mqt.syrec
Failed to build mqt.syrec

Getting rid of the Boost dependency

At the moment, the project still relies on Boost for some parts. Since Boost causes all kinds of troubles for deploying packages and getting libraries to run on different machines, it would be great to get rid of this dependency entirely.

In particular, this concerns:

After all these changes have been incorporated, all the workflows in https://github.com/cda-tum/syrec/tree/main/.github/workflows and https://github.com/cda-tum/syrec/blob/main/pyproject.toml can be alleviated of the Boost dependency.

Transition to MQT QFR

At the moment, the SyReC library uses its own gate and circuit class. However, the project readily build upon our QFR library (mainly for the external dependencies). It should be rather straight-forward to replace the SyReC classes with the respective Operations (Toffoli's are just multi-controlled X gates, Fredkin gates are multi-controlled SWAP gates).

The QFR library also already features a .real file parser. At the moment this does not handle constant and garbage values properly (see cda-tum/mqt-core#88). However, this should be easy to fix.

The simulation routine should be straight-forward to adapt as well.

I also see no real obstacle for the synthesis method to be refactored to use the QFR library.

One major change considers the Python bindings. At the moment, the QFR library does not provide Python bindings for the QuantumComputation class (see cda-tum/mqt-core#89). This is most certainly required for refactoring the SyReC-editor.

It might be required to get rid of some of the Boost dependencies first (see #27), such as the dependency on boost::signal2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.