From e258703104bb91d9c4f919af8df198ed3ad9bd88 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 18:26:24 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20pre-commit=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mqt/bench/cli.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/mqt/bench/cli.py b/src/mqt/bench/cli.py index 807d24dd7..8810e9724 100644 --- a/src/mqt/bench/cli.py +++ b/src/mqt/bench/cli.py @@ -1,11 +1,14 @@ +from __future__ import annotations + import argparse -from mqt.bench import QiskitSettings, TKETSettings, get_benchmark, CompilerSettings from pytket import Circuit from pytket.qasm import circuit_to_qasm_str from qiskit import QuantumCircuit from qiskit.qasm2 import dumps as qiskit_circuit_to_str +from mqt.bench import CompilerSettings, QiskitSettings, TKETSettings, get_benchmark + def main() -> None: """ @@ -16,9 +19,12 @@ def main() -> None: """ parser = argparse.ArgumentParser(description="Generate a single benchmark") - parser.add_argument("--level", type=str, - help='Level to generate benchmarks for ("alg", "indep", "nativegates" or "mapped")', - required=True) + parser.add_argument( + "--level", + type=str, + help='Level to generate benchmarks for ("alg", "indep", "nativegates" or "mapped")', + required=True, + ) parser.add_argument("--algorithm", type=str, help="Name of the benchmark", required=True) parser.add_argument("--num-qubits", type=int, help="Number of Qubits") parser.add_argument("--compiler", type=str, help="Name of the compiler") @@ -56,6 +62,7 @@ def main() -> None: elif isinstance(result, Circuit): qasm_str = circuit_to_qasm_str(result) else: - raise TypeError(f"Got unknown circuit type from get_benchmark: {type(result)}") + msg = f"Got unknown circuit type from get_benchmark: {type(result)}" + raise TypeError(msg) print(qasm_str)