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 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.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-1.0.0.tar.gz (2.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-1.0.0-cp311-cp311-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.11Windows x86-64

mqt.qusat-1.0.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.0.0-cp311-cp311-macosx_11_0_arm64.whl (376.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

mqt.qusat-1.0.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.0.0-cp310-cp310-macosx_11_0_arm64.whl (376.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

mqt.qusat-1.0.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.0.0-cp39-cp39-macosx_11_0_arm64.whl (376.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.8Windows x86-64

mqt.qusat-1.0.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.0.0-cp38-cp38-macosx_11_0_arm64.whl (376.6 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

mqt.qusat-1.0.0-cp37-cp37m-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.7mWindows x86-64

mqt.qusat-1.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: mqt.qusat-1.0.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for mqt.qusat-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4743c95836dc6e7a29c3f8dffec063358136c2a135b143e62dbc7a0f814f9084
MD5 9fb3e54f70f8cf48e5ecce1aae590137
BLAKE2b-256 0f13c2cf22e795ea8eb116b22d84b1cd037c30b3586f3f3ca2724c092e1ce940

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mqt.qusat-1.0.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.1 CPython/3.9.15

File hashes

Hashes for mqt.qusat-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 87325ba7998961a42de9999a68d5482b291d9a10d16762fe6da1fd3f6e89dc6a
MD5 5e44ece7f12c3951fa74be225582e477
BLAKE2b-256 6c2497c8c48ae7489e2af15b9375494e6830d031d49714fc075dce8372e7d569

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9a97c873bdf53638c93744d7bfe0a09fa2f3a96302e77fdf41b48168b22ca3a1
MD5 de19858f1ac216c1b559f8c6e4bfc150
BLAKE2b-256 19194cb35790ec2ed2634af8f016e34e080462395aaaf8d328ef2dcbe4deab5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 12ca4df3821027b2a04dca46f7269dd0b076f3d531a1022cf3f2d32f9c46c514
MD5 bcf70142e87b10d1d49d84c8f689f8d9
BLAKE2b-256 0a4940d4d409b572661848a56b881afdbfe91f32a8a8b8d1b8ff88b396f5aede

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mqt.qusat-1.0.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.1 CPython/3.9.15

File hashes

Hashes for mqt.qusat-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c7da665779138758b7b01f4676e4a174578b30bc964b96bd0bc2d707846e9330
MD5 720022cb07b6e33068214d37ffb21ad2
BLAKE2b-256 b668dd5fd949c9e8764aafbe76bc0aac715ecc2f06fc57cd0a3ce6c949b8ac73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eb579676a6250fefc12ca1b6290f6bf15475fdaa284977c1f2ca38d498f7dc3c
MD5 205a8c3652cc7631413852814ba48788
BLAKE2b-256 270a1ce9602cceb130597ae4a5092a64c8df38d56702e3724a6c5ae280f01250

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fb519f0964f7513b0b401601a1ef8da2ed7e645b36c82263aed90a4594dfd6cb
MD5 ee77394f140e5df0e816e46f4570c7a3
BLAKE2b-256 dc6377264dc72dd21c76322b2137c19251d57ad8506003ebcf93b34db2dc8617

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mqt.qusat-1.0.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.1 CPython/3.9.15

File hashes

Hashes for mqt.qusat-1.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6d6df38aebd0111b8ad44f576a6f0d2337c7bc42168ad1a8a07d3febadff006d
MD5 56589248dba54a0649d87ea6c469f794
BLAKE2b-256 2a79463ad1b66447496a0497b6dca765f150c5dfb2a815bea46b4fb5229d42bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a645857fb6ebf989e7c64a6dc800966bc0a3ecaea9f7e4f014d8da8def2d1e65
MD5 2126ab29cf7a5d5f8dffd1ca1b0af278
BLAKE2b-256 d35d143b652ff8bf11c13509b50e71813c0457a7b9a007a475b85ab3c31e2df5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.0.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9993c87ec0e4356a7f35b255bd94115822607b25feccd9933337b9437fc1e851
MD5 008fef443f1a320e1907c368c414a5db
BLAKE2b-256 c4b78b2c2fce5620e2e6ca6fc25490fd11502fb9e1906e766fcd5c372ec6494e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mqt.qusat-1.0.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.1 CPython/3.9.15

File hashes

Hashes for mqt.qusat-1.0.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 752f5ab124aef48b90fac46878309ccce8ce2b5ab549242c873007c102347d6c
MD5 f8419e18bf3fbdf15cd2bfd75319f813
BLAKE2b-256 211d6a778e64fbb5e5005e204018bd055b0427cb3357e062ae33aa5cd44e615a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f980831c4b5ad4e75fdcdbc501d3b6fe9a687105cbb4b722365783b489c44a64
MD5 9d8269da91fd7fd57b4359e50d02f4d9
BLAKE2b-256 d04218592ca97cbf0f4f79570b6e8cca4f2290622b18ca33aca9320e61408750

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.0.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b528a58872e57a7898d760d75be503f2642e1693c3e0c75d47aee58de7c722d8
MD5 23ca9aa8ff0fe4e78e00d20c97adc5ca
BLAKE2b-256 b8d8addcb3e7e09ade6b323886995306e7114d5dd14015731dbad40a840e36ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mqt.qusat-1.0.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for mqt.qusat-1.0.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 28c8529dab382e8c30b7a8f1339b3051ceaec6a319d238a9311b22d65d7f3285
MD5 1384e3b35c6c8500805646876da77a9d
BLAKE2b-256 2c74816493a3d97a83d66d8f5c618a6e7369f32732a165ace3377289bccde0cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mqt.qusat-1.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 72646dfab3af1b23cd196b6270c6f248c576621833fecf10e6b1c05fdda0fdcd
MD5 18bec584b5666ff4ff48ae87f7287bea
BLAKE2b-256 ccff7773ba544850e7d257ae6717eebf94fcad4b1ef9bfdf4c4a96ed9cd1db3c

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