qiskit: Segfault when testing test.python.quantum_info.operators.channel

Information

  • Qiskit Terra version: master
  • Python version: 3.5 and 3.7
  • Operating system: MacOS

What is the current behavior?

When testing test.python.quantum_info.operators.channel I’m getting a Segmentation fault: 11, speficically when test.python.quantum_info.operators.channel.test_kraus.TestKraus.test_circuit_init is being executed. Notice that I have not errors when executing only that test:

$ python -q -X faulthandler -m unittest  -v test.python.quantum_info.operators.channel.test_kraus.TestKraus.test_circuit_init
test_circuit_init (test.python.quantum_info.operators.channel.test_kraus.TestKraus)
Test initialization from a circuit. ... ok

----------------------------------------------------------------------
Ran 1 test in 0.058s

OK

Steps to reproduce the problem

 python -q -X faulthandler -m unittest  discover -v test.python.quantum_info.operators.channel
....
test_circuit_init (test.python.quantum_info.operators.channel.test_kraus.TestKraus)
Test initialization from a circuit. ... Fatal Python error: Segmentation fault

Current thread 0x0000000111c5c5c0 (most recent call first):
  File "/Users/lucianobello/repos/qiskit-terra/venv/lib/python3.5/site-packages/scipy/linalg/decomp.py", line 432 in eigh
  File "/Users/lucianobello/repos/qiskit-terra/qiskit/quantum_info/operators/channel/transformations.py", line 211 in _choi_to_kraus
  File "/Users/lucianobello/repos/qiskit-terra/qiskit/quantum_info/operators/channel/transformations.py", line 81 in _to_kraus
  File "/Users/lucianobello/repos/qiskit-terra/qiskit/quantum_info/operators/channel/kraus.py", line 144 in __init__
  File "/Users/lucianobello/repos/qiskit-terra/test/python/quantum_info/operators/channel/test_kraus.py", line 64 in test_circuit_init
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/case.py", line 605 in run
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/case.py", line 653 in __call__
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/suite.py", line 122 in run
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/suite.py", line 84 in __call__
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/suite.py", line 122 in run
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/suite.py", line 84 in __call__
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/suite.py", line 122 in run
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/suite.py", line 84 in __call__
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/runner.py", line 176 in run
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/main.py", line 256 in runTests
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/main.py", line 95 in __init__
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/unittest/__main__.py", line 18 in <module>
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/runpy.py", line 85 in _run_code
  File "/Users/lucianobello/.pyenv/versions/3.5.6/lib/python3.5/runpy.py", line 193 in _run_module_as_main
Segmentation fault: 11

Suggested solutions

No idea…

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (17 by maintainers)

Commits related to this issue

Most upvoted comments

Found the problem! (and the solution).

For future reference: The first line in the call stack is from scipy. I noticed that requirements.txt says scipy>=1.0. However, my envs has scipy-1.3.0. Therefore, pip install scipy==1.0 did the trick.

It seems that we are not compatible (in a very ugly way) with new versions of scipy.