The Quantum Exact Simulation Toolkit v4.0.0
Loading...
Searching...
No Matches
🔧  Compilers

QuEST separates compilation of the frontend, backend and the tests, which have progressively stricter compiler requirements. This page details the specialised compilers necessary to enable specific features hardware accelerators, and lists such compilers which are known to be compatible with QuEST.

TOC:

See also:

  • compile.md for a guide to compiling QuEST.
  • cmake.md for the full list of passable compiler variables.
  • qtechtheory.org for help downloading the compilers listed on this page.
Remarks
QuEST's Github Actions regularly test QuEST compilation using a broad combination of compilers; presently 108 combinations! This can provide a clue as to which modern compiler versions are supported, and be a concrete example of how to compile in a sanitised, virtual setting. Check out the compile.yml workflow.

Frontend

Languages Languages

User code can be written in either C11 or C++14, and has so far been tested with compilers

‍The standards are imposed by the QuEST header's use of C11 generics and C++14 complex arithmetic overloads. Each can be relaxed to enable compatibility with C99 and C++11 by simple modifications to the headers - ask us for help!


Backend

Languages

The backend is divided into subdirectories api/, core/, comm/, cpu/ and gpu/. All can be compiled with a generic C++17 compiler, but enabling distribution, multithreading and GPU-acceleration requires using specialised compilers for the latter three. Each can be toggled and compiled independently. Note however that tightly-coupled multi-GPU simulations (comm + gpu) can be accelerated using bespoke compilers, and use of cuQuantum requires modern compilers (gpu + cuquantum), detailed below.

comm

Enabling distribution requires compiling comm/ with an MPI-compatible compiler, which has so far been tested with

when wrapping all previously mentioned compilers.

cpu

Enabling multithreading requires compiling cpu/ with an OpenMP-compatible compiler. Versions

have been explicitly tested, as used by the aforementioned compilers.

gpu

Enabling acceleration on NVIDIA or AMD GPUs requires compiling gpu/ with a CUDA or ROCm compiler respectively. These must be compatible with Thrust and rocThrust respectively. QuEST v4 has been so far tested with

comm + gpu

Simultaneously emabling both distribution and GPU-acceleration is possible with use of the separate compilers above. However, simulation can be accelerated by using a CUDA-aware MPI compiler, enabling QuEST to use GPUDirect and avoid superfluous exchanges of CPU and GPU memories. So far, QuEST has been tested with:

gpu + cuquantum

Enabling cuQuantum on NVIDIA GPUs with compute-capability >= 7.0 requires use of a modern CUDA compiler, specifically


Tests

Languages

QuEST's tests/ make use of several C++20 features and may not be compatible with older compilers. So far, they have been tested with