From b75704317a888ac89fbebce37c461094c5d920f9 Mon Sep 17 00:00:00 2001 From: nate stemen Date: Tue, 9 Jan 2024 07:52:01 -0800 Subject: [PATCH] fix precedence --- mitiq/shadows/shadows_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitiq/shadows/shadows_utils.py b/mitiq/shadows/shadows_utils.py index e278f80015..7a81b3ec18 100644 --- a/mitiq/shadows/shadows_utils.py +++ b/mitiq/shadows/shadows_utils.py @@ -66,7 +66,7 @@ def valid_bitstrings( bitstrings = { bin(i)[2:].zfill(num_qubits) for i in range(2**num_qubits) - if bin(i).count("1") <= max_hamming_weight or num_qubits + if bin(i).count("1") <= (max_hamming_weight or num_qubits) } return bitstrings