Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't use row_swap_images() #4

Open
omarcostahamido opened this issue Apr 30, 2021 · 0 comments
Open

can't use row_swap_images() #4

omarcostahamido opened this issue Apr 30, 2021 · 0 comments

Comments

@omarcostahamido
Copy link
Member

I'm getting this error:

Traceback (most recent call last):
  File "<ipython-input-14-654be539333f>", line 1, in <module>
    new_ac, new_cc = qb.row_swap_images(ac,cc,0.333)
  File "/opt/conda/lib/python3.8/site-packages/quantumblur/quantumblur.py", line 832, in row_swap_images
    rows[0][y], rows[1][y] = swap_images(rows[0][y], rows[1][y], fraction, log=log)
  File "/opt/conda/lib/python3.8/site-packages/quantumblur/quantumblur.py", line 687, in swap_images
    nh0, nh1 = swap_heights(heights0[j], heights1[j], fraction, log=log)
  File "/opt/conda/lib/python3.8/site-packages/quantumblur/quantumblur.py", line 587, in swap_heights
    circuits = [height2circuit(height) for height in [height0,height1]]
  File "/opt/conda/lib/python3.8/site-packages/quantumblur/quantumblur.py", line 587, in <listcomp>
    circuits = [height2circuit(height) for height in [height0,height1]]
  File "/opt/conda/lib/python3.8/site-packages/quantumblur/quantumblur.py", line 382, in height2circuit
    state = normalize(state)
  File "/opt/conda/lib/python3.8/site-packages/quantumblur/quantumblur.py", line 303, in normalize
    ket[j] = float(amp)/math.sqrt(N)
ZeroDivisionError: float division by zero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant