Skip to main content

MQT QuSAT - A Tool for Utilizing SAT in Quantum Computing

Project description

PyPI OS License: MIT CI Bindings codecov

MQT QuSAT - A Tool for Utilizing SAT in Quantum Computing

A tool for utilizing satisfiablity testing (SAT) techniques in quantum computing developed by the Chair for Design Automation at the Technical University of Munich based on methods proposed in:

  • [1] L. Berent, L. Burgholzer, and R. Wille. Towards a Satisfiability Encoding for Quantum Circuits. 2022.

QuSAT is part of the Munich Quantum Toolkit (MQT) and builds upon our quantum functionality representation (QFR).

The project is in active development and can currently be used to

  • Encode Clifford circuits in SAT
  • Check the equivalence of Clifford circuits using SAT

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

Towards a Satisfiability Encoding for Quantum Circuits

The results from the paper can be reproduced by first building the project as described below and then executing the resulting qusat_test executable in the build directory. In order to replicate the full range of results, the test/test_satencoder.cpp needs to be modified before building the project. The corresponding lines to be changed are marked with a // Paper Evaluation: comment.

Running the executable, produces several .json files containing the experimental data. The python script /results/visualizer.py can be used to plot the respective data.

Note that, as we use a randomized procedure to generate input data, the exact experimental data will slightly vary everytime the benchmarks are run. The experimental data used in the paper is available in /results directory.

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.

The SMT Solver Z3 >= 4.8.3 has to be installed and the dynamic linker has to be able to find the library. This can be accomplished in a multitude of ways:

  • Under Ubuntu 20.04 and newer: sudo apt-get install libz3-dev
  • Under macOS: brew install z3
  • Alternatively: pip install z3-solver and then append the corresponding path to the library path (LD_LIBRARY_PATH under Linux, DYLD_LIBRARY_PATH under macOS), e.g. via
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(python -c "import z3; print(z3.__path__[0]+'/lib')")
    
  • Download pre-built binaries from https://github.com/Z3Prover/z3/releases and copy the files to the respective system directories
  • Build Z3 from source and install it to the system

Configuration and Build

To start off, clone this repository using

git clone https://github.com/cda-tum/qusat --recursive

Note the --recursive 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.

The project uses 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 -DBUILD_QUSAT_TESTS=ON -DZ3_ROOT=/path/to/z3/

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). If your installation of Z3 is recent enough, the Z3_ROOT can typically be omitted.

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

cmake --build build

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.

Reference

If you use our tool for your research, we would appreciate if you refer to it by citing the appropriate publication:

@inproceedings{berent2022sat,
      title={Towards a SAT Encoding for Quantum Circuits: A Journey From Classical Circuits to Clifford Circuits and Beyond}, 
      author={Lucas Berent and Lukas Burgholzer and Robert Wille},
      year={2022},
      booktitle={International Conference on Theory and Applications of Satisfiability Testing}
}

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.qusat-0.1.1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mqt.qusat-0.1.1-cp310-cp310-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.10Windows x86-64

mqt.qusat-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

mqt.qusat-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (6.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mqt.qusat-0.1.1-cp310-cp310-macosx_10_15_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

mqt.qusat-0.1.1-cp39-cp39-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.9Windows x86-64

mqt.qusat-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

mqt.qusat-0.1.1-cp39-cp39-macosx_11_0_arm64.whl (6.7 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

mqt.qusat-0.1.1-cp39-cp39-macosx_10_15_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

mqt.qusat-0.1.1-cp38-cp38-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.8Windows x86-64

mqt.qusat-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

mqt.qusat-0.1.1-cp38-cp38-macosx_11_0_arm64.whl (6.7 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

mqt.qusat-0.1.1-cp38-cp38-macosx_10_15_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

mqt.qusat-0.1.1-cp37-cp37m-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.7mWindows x86-64

mqt.qusat-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

mqt.qusat-0.1.1-cp37-cp37m-macosx_10_15_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

mqt.qusat-0.1.1-cp36-cp36m-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.6mWindows x86-64

mqt.qusat-0.1.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

mqt.qusat-0.1.1-cp36-cp36m-macosx_10_15_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.6mmacOS 10.15+ x86-64

File details

Details for the file mqt.qusat-0.1.1.tar.gz.

File metadata

  • Download URL: mqt.qusat-0.1.1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mqt.qusat-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cc591ce76d4ceb22997f89583c3a7b9bf3fc38d0de2b703f736d543f71617a1d
MD5 cfb000eb1fddd2a69004905c81615c34
BLAKE2b-256 e68e2b9e4f7f18c3c4c019ae843afff6e7e53201c949bb1f4844805e54375324

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mqt.qusat-0.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mqt.qusat-0.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 998c5a169b29f5a64a722620599d22f0d1d09204637917f234cb3b7dfaf2f6d0
MD5 0d6ec0e0e7eb5c5408baec2368635da1
BLAKE2b-256 507e348dfd26a7381fa31405d1e6ff1d33ba9dcdf468524a3a8f06edfc449874

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5583991ba407779ab7af68b91060886e9f8b19dff3e2d0f97b2aabe5bcbccd95
MD5 b796a39e29af5213b81483707846f7d2
BLAKE2b-256 db24dec67d5182b154526b5b3fdcf19c64bafe71bd740ce8f9950d1bdec4be17

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa97a6b337c6badc6f0aa63208c0546990a06b4b4d0fe77886d7f936325293b5
MD5 352b92869d7bf357ba0ed64cbf63f2d6
BLAKE2b-256 bda78004b117585a8e97ee5bc5b219c156d687dde3e8779cd5135a6f83a0a041

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 41114e2e1df122aaa6eab4ece0f3ab1657343c6fd5bb5b2f1e2ed7acd3daf265
MD5 c1200653cdcac78067ab5b59b3a59c13
BLAKE2b-256 2355bff3b48049ff664540499523dadff0d41c7da3bd2c68cb0376825be3142e

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: mqt.qusat-0.1.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 6.3 MB
  • 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.qusat-0.1.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f0189a962829ad31dc547e9a37a7d32b6d3ecc675b1e3917a14c8fb0d462a912
MD5 e4a638266cddb8b24723e51569fed263
BLAKE2b-256 fe5a07f14919abee20e0cfd4627b7225a253774bb6ff2f3802e37d36032e04a4

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 67f97dd07cafdec779f22c3bd29aa69d02f4571f4fb3ee184f421e7dd27ae9d3
MD5 ef366fea88548b8b9c68e8ee3c10a029
BLAKE2b-256 209e2e6d197ca81285a63100f5f1120c28d155b0be66125b636131df1c636c1e

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd51823510bf57f9022de35c7f03e0120f341be40888cc55120e953cb114b698
MD5 f1c06997225b2d5ca870d617290832a1
BLAKE2b-256 9da0cbc684fbfe89dbed388349765b47b30186ab20a35afb0cefe7ee563ef2fa

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 1748391d36314fe8532d554d50c30707fec87b6eb1baef9bb30c3b6f1aad7538
MD5 a87c9b28ac7bb324290fdf011fa553c7
BLAKE2b-256 ae3fac893f707ed2da8e5a8734b44821c984e9ca97038c8378240c514d052363

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: mqt.qusat-0.1.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 6.3 MB
  • 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.qusat-0.1.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6be8ba06ffdcb08269718c77e19e5a742b41f02a69e9819d8ff9c191e72bcd89
MD5 ba2358efeac653871c5df12e0371757a
BLAKE2b-256 8cfd08c0e8bd3480ce402f96d2162e021ff971835c4f69c70f8c6a0c45c9baab

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a9bc957d1b04b933a01e2bda0591ab25254796fb85d57eed23b69add372e3eb
MD5 9f4998c18023477298218f725b87a0cc
BLAKE2b-256 80abf263fc5dfce87aba8ac67db189e11593fa347075da082a1efe855f9f7964

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 711f77eaff004860b1ace9fae7ea22ecf62554bf6e3c8f00e878b8e1038ac6ac
MD5 54dc961723a3e308297e8a068a097a55
BLAKE2b-256 6b9e33f1bd44e39b4756da3d282ad4f4d6eb5f146e55a4553af12e2c3d34c910

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f9544bc82ade07112137acf588c8c1b6b4c469567ad4d179810ba93b6a8e35dd
MD5 ba7c0d1f2c942f571ba32d70181f513b
BLAKE2b-256 9354f20d1fb1d67899091acf9f65fdf91a4f24b083b428cc4488c4023e2342f5

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: mqt.qusat-0.1.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 6.3 MB
  • 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.qusat-0.1.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 454e4aae74affcb6c375ebbb5ff65b9f6d4454fc43567dbb5b8fddb0511b0814
MD5 b9aafec61a6941cd98cd5af31ca211e9
BLAKE2b-256 112e6239b3372504cf2b9dc72b7a6e00b825b847b745854e265be3ce88f31115

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9ac2988f3bc0ec75c769a092d8a331999c6ce4fdb2e945c3667e4c5006a52400
MD5 9d5f4cd9e3f3bcd84baa6e7a9f240a19
BLAKE2b-256 e6b7cc92688489be88c17c8e62bdf4733031e242666cf8cb1a45d5c10821b8a3

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5351b366ed6003fb37f40f944074eb6a9967d0ab544e28983eaa4caad6fc00d8
MD5 752dbdbb21142a0241c1c6fa2756fc1b
BLAKE2b-256 8db9e0dd6827d3ce4d6b659b0ae837694910c19137dd4cc398509a8837cadcba

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: mqt.qusat-0.1.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mqt.qusat-0.1.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e2273083bb62ffbc60b549050b5f1dc87687933d7bf353670b1d173421084a25
MD5 b45a3fbad95e89fcf3ddc039d20161ad
BLAKE2b-256 e12f81a020825bb5676c195b17f4aade221eed7b9466608d608da1c1921a3819

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fef764a97a9d07afbea925fa61ec04bb08be2cd704df7e251a5527f0b3fbf1f0
MD5 2dc34932e90ab9e646a86abbd040d6c6
BLAKE2b-256 befef809caf9f3c9b8990c9b2ef7e6317f57bb873278cc2b44e1c3d831f9049d

See more details on using hashes here.

File details

Details for the file mqt.qusat-0.1.1-cp36-cp36m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-0.1.1-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5ce69c96172b1c6122d6bd780a83a13c727982ae53d446480850d6e524d49e5f
MD5 0586d096a03d48bfa748229eb1e4e147
BLAKE2b-256 95b5326b10c749e53c71e9cdf29430ad919db4d04e0c16668fc9a8eb76c39b7f

See more details on using hashes here.

Supported by

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