Skip to content

Commit

Permalink
fix: Fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-pasquale committed May 22, 2024
1 parent d06c76c commit 7d46da4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/qibojit/custom_operators/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 7d46da4

Please sign in to comment.