Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.19 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.19 KB

Quantum State Simulator Benchmarks

Requirements

Run

# Run pennylane benchmark
cd pennylane && rm -rf env && conda env create -f environment.yml --prefix env
conda activate ./env
python run.py -o results.json
conda deactivate

# Run spinoza benchmark
cd spinoza && rm -rf env && conda env create -f environment.yml --prefix env
conda activate ./env
python run.py -o results.json
conda deactivate

# Run qiskit benchmark
cd qiskit && rm -rf env && conda env create -f environment.yml --prefix env
conda activate ./env
python run.py -o results.json
conda deactivate

Visualize results

To plot the results run the plot.py script. Ensure that the libraries you would like to include are listed on line 16.

Additional notes

If you are unable to install the mkl package on your machine (M2 mac), you can set the single-thread limit single-thread environment variables by adding the following code to the beginning of the respective Python script:

import os
nthreads = 1
os.environ["OMP_NUM_THREADS"] = str(nthreads)
os.environ["OPENBLAS_NUM_THREADS"] = str(nthreads)
os.environ["MKL_NUM_THREADS"] = str(nthreads)