Skip to content

Commit

Permalink
Update qiskit/circuit/library/data_preparation/state_preparation.py
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Gacon <[email protected]>
  • Loading branch information
Hirmay and Cryoris authored Jul 2, 2024
1 parent c32bb8c commit 1bac836
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def _define(self):
l_value = [index for (index, item) in enumerate(n_value) if item == 1] # Locations of '1's

qc.x(l_value[1:k])
m_current_value = 2 ** (l_value[0])
m_current_value = 2 ** l_value[0]
theta = -2 * np.arccos(np.sqrt(m_current_value / num_superpos_states))

if l_value[0] > 0: # if num_superpos_states is even
Expand Down

0 comments on commit 1bac836

Please sign in to comment.