Skip to content

Latest commit

 

History

History
113 lines (78 loc) · 2.69 KB

INSTALL.md

File metadata and controls

113 lines (78 loc) · 2.69 KB

Installation instructions

staq is a full-stack quantum processing toolkit that uses CMake as its build/install system. staq is platform-independent, supporting UNIX (including macOS) and UNIX-like operating systems (e.g., Linux), as well as Windows.


Pre-requisites

  • CMake

  • C++17 compliant compiler, e.g., gcc, clang, MSVC

  • Optional, GNU MP library for building the grid synth tools staq_grid_synth and staq_qasm_synth


UNIX/UNIX-like/Windows

To build both tool suite and the staq executable, execute (in a terminal/console/command prompt) under the project's root directory

cmake -B build

Important: If you want to build the grid synth tools staq_grid_synth and staq_qasm_synth, install the GNU MP library; cmake will take care of the rest. If cmake cannot detect GNU MP, then the grid synth tools will not be part of the build.

For more details about how to install and configure GNU MP on various platforms, see the GitHub Actions configuration file.

Next, build the staq system by executing

cmake --build build --parallel 8

The --parallel 8 instructs CMake to build in parallel using 8 threads, modify accordingly.

To build only the staq tool suite, execute

cmake --build build --target tools --parallel 8

To build only the staq executable, execute

cmake --build build --target staq --parallel 8

Unit tests can be built with the command

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

and run with

ctest --test-dir build

To (un)install, execute in a terminal/console (UNIX/UNIX-like systems)

sudo cmake --build build --target (un)install

or in an Administrator Command Prompt (Windows)

cmake --build build --target (un)install

macOS/Linux

If you are running macOS or Linux, you can install staq via Homebrew with

brew install staq

Python 3 wrapper

pystaq is a Python 3 wrapper for staq. pystaq can be installed using pip

pip install git+https://github.com/softwareQinc/staq

For more details, please see pystaq/README.md.