Skip to content

Commit 6f9224c

Browse files
committed
gen_func -> executable_generator_func
Change-Id: I7c23fa8eac6d0b04cc7a480ac6a81cf4cb29f308
1 parent 7c7faa1 commit 6f9224c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

recirq/algorithmic_benchmark_library.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class AlgorithmicBenchmark:
2323
for this AlgorithmicBenchmark lives.
2424
spec_class: The ExecutableSpec subclass for this AlgorithmicBenchmark.
2525
data_class: The class which can contain ETL-ed data for this AlgorithmicBenchmark.
26-
gen_func: The function that returns a QuantumExecutableGroup for a given Config.
26+
executable_generator_func: The function that returns a QuantumExecutableGroup for a
27+
given Config.
2728
configs: A list of available `BenchmarkConfig` for this benchmark.
2829
"""
2930

@@ -32,15 +33,15 @@ class AlgorithmicBenchmark:
3233
executable_family: str
3334
spec_class: Type[ExecutableSpec]
3435
data_class: Type
35-
gen_func: Callable[[...], QuantumExecutableGroup]
36+
executable_generator_func: Callable[[...], QuantumExecutableGroup]
3637
configs: List['BenchmarkConfig']
3738

3839
def as_strings(self):
3940
"""Get values of this class as strings suitable for printing."""
4041
ret = {k: str(v) for k, v in dataclasses.asdict(self).items()}
4142
ret['spec_class'] = self.spec_class.__name__
4243
ret['data_class'] = self.data_class.__name__
43-
ret['gen_func'] = self.gen_func.__name__
44+
ret['executable_generator_func'] = self.executable_generator_func.__name__
4445
return ret
4546

4647

recirq/algorithmic_benchmark_library_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_classes_and_funcs(algo):
4343
mod = import_module(algo.executable_family)
4444
assert algo.spec_class == getattr(mod, algo.spec_class.__name__)
4545
assert algo.data_class == getattr(mod, algo.data_class.__name__)
46-
assert algo.gen_func == getattr(mod, algo.gen_func.__name__)
46+
assert algo.executable_generator_func == getattr(mod, algo.executable_generator_func.__name__)
4747

4848

4949
def test_globally_unique_executable_family():

0 commit comments

Comments
 (0)