You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installing Terra 0.18.0 via published wheel file qiskit_terra-0.18.0-cp39-cp39-macosx_10_9_universal2.whl or building from source results in the following ImportError:
Traceback (most recent call last):
File "/Users/joelbierman/Desktop/Qiskit ARM64/H2_Statevector_Convergence.py", line 3, in <module>
from qiskit import Aer
File "/Users/joelbierman/opt/anaconda3/envs/Qiskit_0280_ARM64/lib/python3.9/site-packages/qiskit/__init__.py", line 26, in <module>
from qiskit.circuit import ClassicalRegister
File "/Users/joelbierman/opt/anaconda3/envs/Qiskit_0280_ARM64/lib/python3.9/site-packages/qiskit/circuit/__init__.py", line 231, in <module>
from .classicalfunction.types import Int1, Int2
File "/Users/joelbierman/opt/anaconda3/envs/Qiskit_0280_ARM64/lib/python3.9/site-packages/qiskit/circuit/classicalfunction/__init__.py", line 98, in <module>
from .classicalfunction import ClassicalFunction
File "/Users/joelbierman/opt/anaconda3/envs/Qiskit_0280_ARM64/lib/python3.9/site-packages/qiskit/circuit/classicalfunction/classicalfunction.py", line 18, in <module>
from tweedledum.classical import simulate
File "/Users/joelbierman/opt/anaconda3/envs/Qiskit_0280_ARM64/lib/python3.9/site-packages/tweedledum/__init__.py", line 5, in <module>
from ._tweedledum import *
ImportError: dlopen(/Users/joelbierman/opt/anaconda3/envs/Qiskit_0280_ARM64/lib/python3.9/site-packages/tweedledum/_tweedledum.cpython-39-darwin.so, 2): no suitable image found. Did find:
/Users/joelbierman/opt/anaconda3/envs/Qiskit_0280_ARM64/lib/python3.9/site-packages/tweedledum/_tweedledum.cpython-39-darwin.so: mach-o, but wrong architecture
/Users/joelbierman/opt/anaconda3/envs/Qiskit_0280_ARM64/lib/python3.9/site-packages/tweedledum/_tweedledum.cpython-39-darwin.so: mach-o, but wrong architecture
Steps to reproduce the problem
Install Terra either via pip or build from source native to macosx-arm64 and run code with packages in Terra.
What is the expected behavior?
No ImportError.
Suggested solutions
Building Tweedledum from source in a conda environment as described in Qiskit/qiskit-aer#1286 with the openmp fix seems to resolve this issue. Given that this issue is similar to the ImportError issue with Aer, it seems that it's likely a version issue with either Tweedledum or openmp.
The text was updated successfully, but these errors were encountered:
Had the same error with my qiskit upgrade from 0.27.0 to 0.28.0 probably by updating terra (to 0.18.0?). The upgrade installed tweedledum 1.1.0 which failed as described. pip install tweedledum also resulted in a non importable tweedledum package on my M1, using Miniforge. pip install tweedledum==1.0.0 (not meeting terra 0.18.0 requirements) installed an importable tweedledum (didn't test qiskit). Building from source indeed worked to get a tweedledum 1.1.0, e.g. by pip install tweedledum --no-binary :all:
Information
What is the current behavior?
Installing Terra 0.18.0 via published wheel file
qiskit_terra-0.18.0-cp39-cp39-macosx_10_9_universal2.whl
or building from source results in the following ImportError:Steps to reproduce the problem
Install Terra either via pip or build from source native to macosx-arm64 and run code with packages in Terra.
What is the expected behavior?
No ImportError.
Suggested solutions
Building
Tweedledum
from source in a conda environment as described in Qiskit/qiskit-aer#1286 with theopenmp
fix seems to resolve this issue. Given that this issue is similar to the ImportError issue with Aer, it seems that it's likely a version issue with eitherTweedledum
oropenmp
.The text was updated successfully, but these errors were encountered: