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 MQT Core.

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 every time 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.19.

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-1.1.0.tar.gz (2.5 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-1.1.0-cp312-cp312-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.12Windows x86-64

mqt.qusat-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

mqt.qusat-1.1.0-cp312-cp312-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mqt.qusat-1.1.0-cp311-cp311-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.11Windows x86-64

mqt.qusat-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

mqt.qusat-1.1.0-cp311-cp311-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mqt.qusat-1.1.0-cp310-cp310-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.10Windows x86-64

mqt.qusat-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

mqt.qusat-1.1.0-cp310-cp310-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mqt.qusat-1.1.0-cp39-cp39-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.9Windows x86-64

mqt.qusat-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

mqt.qusat-1.1.0-cp39-cp39-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

mqt.qusat-1.1.0-cp38-cp38-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.8Windows x86-64

mqt.qusat-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

mqt.qusat-1.1.0-cp38-cp38-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: mqt.qusat-1.1.0.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for mqt.qusat-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7af87df1bfa181ee7bc370bf4b94f5ed475badf5d979ea2f1561f7c4245b474c
MD5 a1cda8dba6854da685e793905fb3d2c1
BLAKE2b-256 09a3b8e4aaf59d54bdb4ced7c4fda772c78ba013f9541ff6069a946531a4656f

See more details on using hashes here.

File details

Details for the file mqt.qusat-1.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mqt.qusat-1.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for mqt.qusat-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2f5d9392706608dc36986be301824c12f6e2b63025cfb50661916d1861ffe36e
MD5 3f1068e72aaa25bc6b5544a75e3dab26
BLAKE2b-256 c0a1853b7b03feb913938fad4191c21169e1d4be4380934987f2c349322cb7ab

See more details on using hashes here.

File details

Details for the file mqt.qusat-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44d01fca4196685175b0fcfff92cdbf738b1f77d9c145b2fdf3bb5d83251457a
MD5 64fe75728f1b9c47183da1ffa3781e86
BLAKE2b-256 b71b746c764e88c06d3f15f7e9e2b77e4c208614f302b505b88d86972550935e

See more details on using hashes here.

File details

Details for the file mqt.qusat-1.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6a3bdd7e53b40e7507dcb6ccf2449a985f6d95b906d6b677d217d6234922741
MD5 c55cba63574a6cc61dddb3981062a42a
BLAKE2b-256 39e8ef2a19042881143349bac9c4245c92936a36f6db575a42a8818ee389b31c

See more details on using hashes here.

File details

Details for the file mqt.qusat-1.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mqt.qusat-1.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for mqt.qusat-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 60c1247e12efc4d18f421e41dcfb2fb0d258379f5afce59fa49f30e22a18ef4e
MD5 d147469aba865f00b2f176e30d0612a7
BLAKE2b-256 0ae5776bceada74f77d494dc193c19236a1cd0b72fb8ade746c967b3317f881c

See more details on using hashes here.

File details

Details for the file mqt.qusat-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8243db4ca53ae622dea8f7e0610f9b2f618d150bb67fd3e2eeab62f678de48f
MD5 d588c05598aa2ce40a56b3cb7cc7b41d
BLAKE2b-256 3f4a769de656f1fcdaca62468b6f4627bfef4fda2b0a34cf4fd616efd619da53

See more details on using hashes here.

File details

Details for the file mqt.qusat-1.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 45489f6a82205cd898085320ca064f998ac11c078ef1afc6c5e07f9ee0129496
MD5 1179f381200389e8c2f1505248ffa774
BLAKE2b-256 4fb3ccbf873f8a04c759ed2385a69316a7593727a213a1f7758ef21e219e9861

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mqt.qusat-1.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for mqt.qusat-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7bb5a3ecf08ec8905a950bd01b1177e7f647c5b36fa81a747119dbdb506766d9
MD5 43669292c7f5bcee4fbf688becf5063f
BLAKE2b-256 e2342a00b9519531d01f3ce649a053066aab9af147c5117042108fd948a95c07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 40e8b0b5aff3564ad17a13adbe1cd8dcc5e9af47427e395234484f23c88b1216
MD5 54d2eb436e47139e353fce0f35392b3f
BLAKE2b-256 f2c29a1156c75a393060805cee40477978d8fce2c2c0426e7f5ee88e57b5e90e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4fcb8a8ee591bd04de34bbda62d8c74684ec85c8cf233e68fbb8949b6fcc9ae2
MD5 1a42bd1468581b36612175392506ca80
BLAKE2b-256 6df63434edb29ff884d3cc9639cff9cee00d5c020f1b21c5936cc89ebfa5cf8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mqt.qusat-1.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for mqt.qusat-1.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e8b6c3058c46572cb06441c745cad7ef35a5b9e1deb439e240ee3384f782e332
MD5 990faaa846309b06ea6f51cfc28cd9cb
BLAKE2b-256 05814d5ce696f5059ccca077e5570a4089453ca6ff0f711830f35074e0382b82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 191b5c4336faaecc61c89ea2c11abd38f819464e48aba017648453aee31f7199
MD5 ddfdda3a8ec3ce659dbd74fc0242c82f
BLAKE2b-256 93e0e48f6bc166ce9813fd5ef3afeb1ad69df9367a669846d0deef626c1dc79b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f50374289c1d6d8328bce10e8d14e50c4437c6f9a3b082ecccccdaa9dad96fa8
MD5 1accc834f3882c9f8b1ddcd3ceae0df6
BLAKE2b-256 b6ca0f183b89f0e75856b4de4341dc83f41a2a20e6b567724d2e40205befa897

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mqt.qusat-1.1.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for mqt.qusat-1.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2587e66bddab158d4b12639c49548afd3b2cde112a7b2a2affdb5574d3c12a72
MD5 229a4e8d5d0b82af1e31fbda19b079a2
BLAKE2b-256 efc3a7e30e1a99026dc7deb2e319f7757a82f5086e5cd2346903bcf24ee660f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1884fe9c37854228a23f14a0b5201f33645193efbaca4a54748823d0d41c1ae1
MD5 d3df4ef2de6a5101c92bcc46136bdb75
BLAKE2b-256 02c1efce2ba813c6e4c9f440cdbe81825a41b5a887734184a00e1512a554c88e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.1.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f271dbee622ee58b654c88c90931b6a8d590f47f0fb168ad1c7f322a2754a1e1
MD5 2c74e1b3b829b20480e683f8a020517a
BLAKE2b-256 db37ec70252ba86ab487654fee4c174236260f32ac2ba454a4a31b9c781789dd

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