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

NumPy warnings when loading FakeBackends #7804

Closed
nonhermitian opened this issue Mar 22, 2022 · 2 comments
Closed

NumPy warnings when loading FakeBackends #7804

nonhermitian opened this issue Mar 22, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@nonhermitian
Copy link
Contributor

Environment

  • Qiskit Terra version: master
  • Python version: 3.8
  • Operating system: Linux

What is happening?

In looking into #7789 I discovered that master is throwing a NumPy warning when importing a fake backend

from qiskit.test.mock import FakeWashington
backend = FakeWashington()
/home/paul/mambaforge/envs/qiskit/lib/python3.8/site-packages/numpy/core/getlimits.py:499: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
  setattr(self, word, getattr(machar, word).flat[0])
/home/paul/mambaforge/envs/qiskit/lib/python3.8/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
  return self._float_to_str(self.smallest_subnormal)
/home/paul/mambaforge/envs/qiskit/lib/python3.8/site-packages/numpy/core/getlimits.py:499: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
  setattr(self, word, getattr(machar, word).flat[0])
/home/paul/mambaforge/envs/qiskit/lib/python3.8/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
  return self._float_to_str(self.smallest_subnormal)

How can we reproduce the issue?

Run the above. My NumPy is 1.22.3

What should happen?

Now UserWarning

Any suggestions?

No response

@nonhermitian nonhermitian added the bug Something isn't working label Mar 22, 2022
@mtreinish
Copy link
Member

This is actually a qiskit-aer bug (it was compling with fast math by default): Qiskit/qiskit-aer#1461 It's fixed for inclusion in an upcoming bugfix release (which is in progress Qiskit/qiskit-aer#1481 ). It's triggered on the use of the fake backends because they internally import aer.

@jakelishman
Copy link
Member

(closing as fixed upstream)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants