From 7d46da4c1a8b0b28362b842769ded7183ede25da Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 22 May 2024 17:13:00 +0400 Subject: [PATCH] fix: Fix pylint --- src/qibojit/custom_operators/ops.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qibojit/custom_operators/ops.py b/src/qibojit/custom_operators/ops.py index 215d75fe..47fd07af 100644 --- a/src/qibojit/custom_operators/ops.py +++ b/src/qibojit/custom_operators/ops.py @@ -109,10 +109,11 @@ def measure_frequencies(frequencies, probs, nshots, nqubits, seed, nthreads): for n in prange(nthreads): # pylint: disable=not-an-iterable frequencies_private = thread_frequencies[n] np.random.seed(thread_seed[n]) + shot = probs.argmax() for i in range(thread_nshots[n]): - if i == 0: - # Initial bitstring is the one with the maximum probability - shot = probs.argmax() + # if i == 0: + # # Initial bitstring is the one with the maximum probability + # shot = probs.argmax() new_shot = (shot + np.random.randint(0, nstates)) % nstates # accept or reject move if probs[new_shot] / probs[shot] > np.random.random():