-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (32 loc) · 1.75 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.ONESHELL:
N_THREADS?=1
PYTHON := PYTHONPATH=$(PYTHONPATH):. .venv/bin/python
PIP := .venv/bin/pip
ACTIVATE := .venv/bin/activate
install:
$(PIP) install -r requirements.txt
RESULTS_DIR := results
RESULTS_SCRIPTS := $(wildcard $(RESULTS_DIR)/*.bash)
RESULTS := $(patsubst $(RESULTS_DIR)/%.bash, $(RESULTS_DIR)/%.txt, $(RESULTS_SCRIPTS))
$(RESULTS_DIR)/%.txt: $(RESULTS_DIR)/%.bash
source $(ACTIVATE)
bash $< $(N_THREADS)
results: $(RESULTS)
csvs/algorithm_comparison_n_layers.csv: csvs/algorithm_comparison_n_layers.py results/main_evaluation.txt results/bounds.txt
$(PYTHON) $<
csvs/algorithm_comparison_n_qubits.csv: csvs/algorithm_comparison_n_qubits.py results/main_evaluation.txt results/bounds.txt
$(PYTHON) $<
csvs/layer_advantage.csv: csvs/layer_advantage.py results/main_evaluation.txt
$(PYTHON) $<
csvs/classical_approximation_benchmark.csv: csvs/classical_approximation_benchmark.py
$(PYTHON) $<
csvs/circuit_optimization_benchmark.csv: csvs/circuit_optimization_benchmark.py
$(PYTHON) $<
csvs/performance_by_runtime.csv: csvs/performance_by_runtime.py csvs/circuit_optimization_benchmark.csv csvs/classical_approximation_benchmark.csv results/main_evaluation.txt
$(PYTHON) $<
csvs/quantum_advantages.csv: csvs/quantum_advantages.py csvs/algorithm_comparison_n_layers.csv csvs/algorithm_comparison_n_qubits.csv
$(PYTHON) $<
csvs: csvs/algorithm_comparison_n_layers.csv csvs/algorithm_comparison_n_qubits.csv csvs/circuit_optimization_benchmark.csv csvs/classical_approximation_benchmark.csv csvs/layer_advantage.csv csvs/performance_by_runtime.csv csvs/quantum_advantages.csv
plots:
docker build -t noisy-qaoa . && docker run -v $(shell pwd)/img-pdf:/app/img-pdf -v $(shell pwd)/img-tikz:/app/img-tikz noisy-qaoa
.PHONY: install results csvs plots