diff --git a/src/mqt/bench/utils.py b/src/mqt/bench/utils.py index 509f9d626..c36576019 100644 --- a/src/mqt/bench/utils.py +++ b/src/mqt/bench/utils.py @@ -19,8 +19,6 @@ from qiskit.converters import circuit_to_dag from qiskit_optimization.applications import Maxcut -from mqt.bench.devices import OQCProvider - if TYPE_CHECKING or sys.version_info >= (3, 10, 0): # pragma: no cover from importlib import metadata, resources else: @@ -210,22 +208,9 @@ def save_as_qasm( f.write(qc_str) f.close() - if gate_set == OQCProvider.get_native_gates(): - postprocess_single_oqc_file(str(file)) return True -def postprocess_single_oqc_file(filename: str) -> None: - with Path(filename).open() as f: - lines = f.readlines() - with Path(filename).open("w") as f: - for line in lines: - if not ("gate rzx" in line.strip("\n") or "gate ecr" in line.strip("\n")): - f.write(line) - if 'include "qelib1.inc"' in line.strip("\n"): - f.write("opaque ecr q0,q1;\n") - - def create_zip_file(zip_path: str | None = None, qasm_path: str | None = None) -> int: if zip_path is None: zip_path = get_zip_file_path() diff --git a/tests/test_bench.py b/tests/test_bench.py index 60b865077..108fecfdf 100644 --- a/tests/test_bench.py +++ b/tests/test_bench.py @@ -942,7 +942,7 @@ def test_saving_qasm_to_alternative_location_with_alternative_filename( path.unlink() -def test_oqc_postprocessing() -> None: +def test_oqc_benchmarks() -> None: qc = get_benchmark("ghz", 1, 5) directory = "." filename = "ghz_oqc"