- Python 3.9.16
- QLM 1.9.1
- Docker 24.0.5
- Make
- Git
- Clone this repository
- Download the Qiskit repository (for
search_backends.py) by runninggit submodule update --init --recursiveorsource clone_qiskit_repository.shin case you only have the standalone version of this reproduction package (without Git). - Create virtual environment
python3 -m venv .venv- Install Python dependencies
make installImportant: Benchmark are executed using the proprietary QLM library. We refer to this website for more details.
Raw noisy QAOA benchmark results are generated by *.bash in the results directory and stored as results/*.txt files with the same name as the corrsponding Bash script.
Each benchmark result file can be created with make results/FILENAME.txt. Alternatively, you can run all benchmarks using make results.
The degree of parallelism used for the benchmarks can be selected with the environment variable N_THREADS.
For instance, N_THREADS=10 make results runs all benchmarks using 10 threads.
The default value is N_THREADS=1.
Be aware that executing all benchmarks takes a very long time.
We ran the benchmarks on a Qaptiva 800 with 192 threads, which took over a week.
Plot data, which is generated from the benchmark results, is stored as CSV files in the csvs/ directory.
The CSV files needed for the plots are already part of the repository.
CSV file csvs/FILENAME.csv can be generated with make csvs/FILENAME.csv.
Be aware that this automatically generates the benchmark results required for the plot if they do not already exist.
Alternatively, one can create all csvs files with make csvs.
To generate the plots, run make plots.
This creates two directories img-pdf and img-tikz and builds and runs a Docker container, which generates the plots, both as PDF and as Tikz graphics.
run_benchmarks.py: Main script to run the noisy QAOA benchmarkssearch_backends.py: Search noise parameters of the Qiskit fake backends
create_optimized_qaoa_circuit.py: Reduce problem Hamiltonian circuit depth using Misra-Gries edge coloringfilter_results.py: Filter benchmark results using a simple query languagegenerate_param_sets.py: generates multiple parameter sets from a JSON document using Cartesian productparse_params.py: Specification of benchmark parametersrqaoa.py: Implementation of Recursive QAOA for QLMterms.py: QUBO/Ising conversion logic and variable substitution for Recursive QAOAtranspile_to_sx_rz.py: Circuit transpilation for QAOA circuits into the IMB-Q native gate set
results/: Stores benchmark results and Bash scripts to run the respective benchmarkscsvs/: Stores plot data, obtained from theresults/, as CSV files as well as Python scripts to create these files.r/: R scripts to generate the plots from thecsv/filesqiskit-terra/: Qiskit submodule, which is searched bysearch_backends.py