Importing mthree raises the following error. mthree should add a constraint numpy<2 or compile cython with numpy 2.
import mthree
output
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "/Users/ima/tasks/4_2024/qiskit/mthree/tmp/import.py", line 1, in <module>
import mthree
File "/Users/ima/tasks/4_2024/qiskit/mthree/.venv/lib/python3.12/site-packages/mthree/__init__.py", line 31, in <module>
from .mitigation import M3Mitigation
File "/Users/ima/tasks/4_2024/qiskit/mthree/.venv/lib/python3.12/site-packages/mthree/mitigation.py", line 35, in <module>
from mthree.matrix import _reduced_cal_matrix, sdd_check
Traceback (most recent call last):
File "/Users/ima/tasks/4_2024/qiskit/mthree/tmp/import.py", line 1, in <module>
import mthree
File "/Users/ima/tasks/4_2024/qiskit/mthree/.venv/lib/python3.12/site-packages/mthree/__init__.py", line 31, in <module>
from .mitigation import M3Mitigation
File "/Users/ima/tasks/4_2024/qiskit/mthree/.venv/lib/python3.12/site-packages/mthree/mitigation.py", line 35, in <module>
from mthree.matrix import _reduced_cal_matrix, sdd_check
File "mthree/matrix.pyx", line 1, in init mthree.matrix
ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use '<void>numpy._import_array' to disable if you are certain you don't need it).
Importing mthree raises the following error. mthree should add a constraint
numpy<2
or compile cython with numpy 2.output