diff --git a/pyproject.toml b/pyproject.toml index bfef342..536234c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,14 +103,14 @@ warn_return_any = true warn_unused_configs = true ignore_missing_imports = true -[tool.pylint.main] +[tool.pylint] py-version = "3.9" +load-plugins = ["pylint.extensions.no_self_use"] [tool.pylint."messages control"] disable = ["all"] enable = [ "reimported", - "no-self-use", "no-else-raise", "redefined-argument-from-local", "redefined-builtin", diff --git a/qiskit_addon_sqd/counts.py b/qiskit_addon_sqd/counts.py index 5426b43..be2b958 100644 --- a/qiskit_addon_sqd/counts.py +++ b/qiskit_addon_sqd/counts.py @@ -123,10 +123,9 @@ def generate_counts_bipartite_hamming( dn_flips = rng.choice(np.arange(num_bits // 2), hamming_left, replace=False).astype("int") # Create a bitstring with the chosen bits flipped - bts_arr = np.zeros(num_bits) + bts_arr = np.zeros(num_bits, dtype=int) bts_arr[dn_flips] = 1 bts_arr[up_flips + num_bits // 2] = 1 - bts_arr = bts_arr.astype("int") bts = "".join("1" if bit else "0" for bit in bts_arr) # Add the bitstring to the sample dict