Skip to content

softwareQinc/stab

Repository files navigation

stab

GitHub actions

Efficient simulation of Clifford circuits using the method described in Niel de Beaudrap and Steven Herbert's paper "Fast Stabiliser Simulation with Quadratic Form Expansions". Most functions are implemented from the pseudocode described in the paper.


Pre-requisites

  • C++17 compliant compiler, e.g., GNU gcc (sudo apt install build-essential to install on Ubuntu/Debian Linux)
  • CMake build system (sudo apt install cmake to install on Ubuntu/Debian Linux, or brew install cmake to install on macOS)
  • Eigen3 matrix library version 3.4 or later (sudo apt install libeigen3-dev to install on Ubuntu/Debian Linux, or brew install eigen to install on macOS)

Optional

To install Quantum++, execute

git clone --depth=1 https://github.com/softwareqinc/qpp 
cmake -S qpp -B qpp/build
sudo cmake --build qpp/build --target install

or brew install quantum++ to install on macOS, or sudo pkg install quantum++ to install on FreeBSD.


Setup

From inside the project's root directory, execute

cmake -B build [-DUSE_QPP=ON/OFF]
cmake --build build --parallel 8

The flag USE_QPP in the square bracket is optional, set to OFF by default.

Note that on Windows you may need to set the EIGEN3_INSTALL_DIR environment variable to point to your Eigen installation, and add the path to stab-common.dll (usually .\build\Debug or .\build\Release) to your PATH environmnt variable. Check out the GitHub actions file .github/workflows/cmake.yml for more details and a full stab setup on Windows.


Unit testing

To build the unit tests, execute

cmake --build build --target unit_tests --parallel 8

To run the unit tests, execute

ctest --test-dir build

About

Fast simulation of stabilizer circuits

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published