Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Lint runner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterkemeny committed Feb 12, 2024
1 parent d8738d9 commit 5db3dac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions red_queen/runner.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This module contains the Runner class, which is responsible for
This module contains the Runner class, which is responsible for
running benchmarks on a given backend using a given compiler.
"""

Expand Down Expand Up @@ -222,7 +222,7 @@ def save_results(self):
with open(results_path, "w", encoding="utf-8") as json_file:
json.dump([self.metric_data], json_file)

def transpile_in_process(self, benchmark, optimization_level):
def transpile_in_process(self, benchmark: QuantumCircuit, optimization_level: int):
"""
Transpile a circuit in a separate process to get memory usage.
Expand All @@ -243,7 +243,7 @@ def transpile_in_process(self, benchmark, optimization_level):
memory = end_mem - start_mem
return memory

def profile_func(self, benchmark):
def profile_func(self, benchmark: QuantumCircuit):
"""
Profile a function to get memory usage.
Expand All @@ -257,11 +257,11 @@ def profile_func(self, benchmark):
)
return memory

def run_benchmark(self, benchmark):
def run_benchmark(self, benchmark: dict):
"""
Run a single benchmark.
:param benchmark: name of benchmark to be used
:param benchmark: Name and circuit of benchmark to be run
"""

benchmark_name = list(benchmark.keys())[0]
Expand Down

0 comments on commit 5db3dac

Please sign in to comment.