Skip to content

ntu-paslab/QAOA_simulator

 
 

Repository files navigation

QAOA Simulator

Getting started

  1. Clone this repository and navigate to the corresponding directory.

  2. Create the build directory and navigate to it.

    mkdir build
    cd build
  3. Configure the build environment.

    # On CPU, no AVX
    cmake .. -DUSER_SOURCE=<target> -DPRECISION=1
    # On CPU, with AVX
    cmake .. -DUSER_SOURCE=<target> -DPRECISION=1 -DVECTORIZED
    # On GPU
    cmake .. -DUSER_SOURCE=<target> -DGPUACCELERATED=1 -DGPU_COMPUTE_CAPABILITY=<CC>

    where

    • <target> refer to the source file to compile (quest.c, weighted.c, unweighted.c)
    • <CC> refer to the compute capability of your cuda device. You can find your device's compute capability on the this website.
  4. Build

    make
  5. Execute ./demo. The output will show one of the stateVector and the eclapsed time for each qubits.

Acknowledgements

The following repos are used in our simulator.

QuEST Simulator: The base of our simulator, with version 3.5.0.

sse-popcount: The method to implement AVX popcount.

avx_mathfun: The implementation of AVX sincos function.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 51.8%
  • C 36.1%
  • Cuda 7.2%
  • JavaScript 3.0%
  • CMake 1.2%
  • CSS 0.6%
  • HTML 0.1%