Skip to content

Commit

Permalink
Merge pull request #607 from SRI-International/master
Browse files Browse the repository at this point in the history
Merge recent changes from master
  • Loading branch information
rtvuser1 authored Aug 14, 2024
2 parents 0dec92c + 50f8d17 commit abf82c9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bernstein-vazirani/qiskit/bv_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ def execution_handler (qc, result, num_qubits, s_int, num_shots):
# create selection larger than needed and remove duplicates
s_range = np.random.randint(1, 2**(input_size), num_circuits + 2)
s_range = list(set(s_range))[0:max_circuits]


# If mid circuit, then add 2 to new qubit group since the circuit only uses 2 qubits
if method == 2:
mid_circuit_qubit_group.append(2)

# loop over limited # of secret strings for this
for s_int in s_range:
s_int = int(s_int)
Expand All @@ -155,10 +159,6 @@ def execution_handler (qc, result, num_qubits, s_int, num_shots):
# convert the secret int string to array of integers, each representing one bit
bitset = str_to_ivec(input_size, s_int)
if verbose: print(f"... s_int={s_int} bitset={bitset}")

# If mid circuit, then add 2 to new qubit group since the circuit only uses 2 qubits
if method == 2:
mid_circuit_qubit_group.append(2)

# create the circuit for given qubit size and secret string, store time metric
ts = time.time()
Expand Down

0 comments on commit abf82c9

Please sign in to comment.