Skip to content

Commit 88199f4

Browse files
committed
linting
1 parent 471573a commit 88199f4

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

tensorflow_quantum/core/ops/tfq_simulate_ops_cuda.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414
# =============================================================================
1515
"""Module to register cuda simulation python op."""
16-
import os
1716
import tensorflow as tf
1817
from tensorflow_quantum.core.ops.load_module import load_module
1918

tensorflow_quantum/core/ops/tfq_simulate_ops_cuquantum.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414
# =============================================================================
1515
"""Module to register cuQuantum simulation python op."""
16-
import os
1716
import tensorflow as tf
1817
from tensorflow_quantum.core.ops.load_module import load_module
1918

tensorflow_quantum/core/ops/tfq_simulate_ops_gpu_test.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
# limitations under the License.
1414
# =============================================================================
1515
"""Tests that specifically target tfq_simulate_ops_cu*."""
16-
import os
1716
import time
1817
import numpy as np
19-
from absl.testing import parameterized
2018
import tensorflow as tf
2119
import cirq
2220

@@ -26,6 +24,17 @@
2624
from tensorflow_quantum.python import util
2725

2826
def measure_average_runtime(fn, tag, num_samples=10):
27+
"""
28+
Measure the average runtime of a function.
29+
30+
Args:
31+
fn: A function to measure.
32+
tag: A string to print.
33+
num_samples: Number of samples to measure.
34+
35+
Returns:
36+
A tuple of (average runtime, function result).
37+
"""
2938
avg_time = []
3039
for _ in range(num_samples):
3140
begin_time = time.time()

0 commit comments

Comments
 (0)