diff --git a/src/mqt/bench/benchmark_generator.py b/src/mqt/bench/benchmark_generator.py index 811f58031..3ea6d4d0e 100644 --- a/src/mqt/bench/benchmark_generator.py +++ b/src/mqt/bench/benchmark_generator.py @@ -67,7 +67,9 @@ class CompilerSettings: class BenchmarkGenerator: - def __init__(self, cfg_path: str = "./config.json", qasm_output_path: str | None = None) -> None: + def __init__(self, cfg_path: str | None = None, qasm_output_path: str | None = None) -> None: + if cfg_path is None: + cfg_path = utils.get_default_config_path() with Path(cfg_path).open() as jsonfile: self.cfg = json.load(jsonfile) print("Read config successful") @@ -453,7 +455,7 @@ def get_benchmark( def generate(num_jobs: int = -1) -> None: parser = argparse.ArgumentParser(description="Create Configuration") - parser.add_argument("--file-name", type=str, help="optional filename", default="./config.json") + parser.add_argument("--file-name", type=str, help="optional filename", default=None) args = parser.parse_args() benchmark_generator = BenchmarkGenerator(args.file_name) benchmark_generator.create_benchmarks_from_config(num_jobs) diff --git a/config.json b/src/mqt/bench/config.json similarity index 98% rename from config.json rename to src/mqt/bench/config.json index 11f01c081..b7222a339 100644 --- a/config.json +++ b/src/mqt/bench/config.json @@ -1,5 +1,5 @@ { - "timeout": 65, + "timeout": 70, "benchmarks": [ { "name": "ae", @@ -52,7 +52,7 @@ "name": "portfolioqaoa", "include": true, "min_qubits": 3, - "max_qubits": 131, + "max_qubits": 14, "stepsize": 1, "precheck_possible": true }, @@ -60,7 +60,7 @@ "name": "portfoliovqe", "include": true, "min_qubits": 3, - "max_qubits": 131, + "max_qubits": 14, "stepsize": 1, "precheck_possible": true }, diff --git a/src/mqt/bench/utils.py b/src/mqt/bench/utils.py index 4152eb040..98cf4391c 100644 --- a/src/mqt/bench/utils.py +++ b/src/mqt/bench/utils.py @@ -86,6 +86,10 @@ def get_supported_compilers() -> list[str]: return ["qiskit", "tket"] +def get_default_config_path() -> str: + return str(resources.files("mqt.bench") / "config.json") + + def get_default_qasm_output_path() -> str: """Returns the path where all .qasm files are stored.""" return str(resources.files("mqt.benchviewer") / "static" / "files" / "qasm_output")