Current code:
alice_key = []
bob_key = []
"""Vectorize generation of random publication decision"""
random_vals = np.random.uniform(0, 1, len(alice_bits))
"""Separate indices by basis"""
rect_indices = np.where(basis == 0)[0]
diag_indices = np.where(basis == 1)[0]
"""Determine which rectilinear and diagonal bits are published"""
rect_published = rect_indices[random_vals[rect_indices] < rect_pub_prob]
diag_published = diag_indices[random_vals[diag_indices] < diag_pub_prob]
"""Count errors and published bits for rectilinear and diagonal bases"""
rect_error = np.sum(alice_bits[rect_published] != bob_bits[rect_published])
diag_error = np.sum(alice_bits[diag_published] != bob_bits[diag_published])
This usage of numpy.where is deppreciated, update it. For more info look here: https://numpy.org/doc/stable/reference/generated/numpy.where.html
This should resolve the following error:

Current code:
This usage of
numpy.whereis deppreciated, update it. For more info look here: https://numpy.org/doc/stable/reference/generated/numpy.where.htmlThis should resolve the following error:
