tequilahub / tequila

A High-Level Abstraction Framework for Quantum Algorithms
MIT License
362 stars 101 forks source link

Remove deprecated usage of numpy.float #286

Closed doomspec closed 1 year ago

doomspec commented 1 year ago

numpy.float has been deprecated since NumPy 1.20. When using Python 3.8 with conda automatically installed NumPy, there will be an error in the following code

import numpy
a = numpy.float(1)

The current version of tq includes many such usages https://github.com/search?q=repo%3Atequilahub%2Ftequila%20numpy.float&type=code

Whenever these codes are executed, the program just stops.

We might need to change all numpy.float to float for higher version numpy

kottmanj commented 1 year ago

I'm just getting a warning, no error (numpy v.1.23.5). I potentially silenced them. Updating is however a good idea. I'll put it on the todo list. If you have time to do it yourself, let me know.

doomspec commented 1 year ago

287