I meet the error message shown below, would you please help to solve the problem?
$ python vis.py
/local1/rogers/anaconda/envs/quantum/lib/python3.7/site-packages/qiskit/optimization/init.py:92: DeprecationWarning: The package qiskit.optimization is deprecated. It was moved/refactored to qiskit_optimization (pip install qiskit-optimization). For more information see https://github.com/Qiskit/qiskit-aqua/blob/master/README.md#migration-guide
warn_package('optimization', 'qiskit_optimization', 'qiskit-optimization')
Traceback (most recent call last):
File "vis.py", line 26, in
from sensor_selection import activate_sensors
File "/local1/rogers/work/Application-of-quantum-optimization/sensor_selection.py", line 14, in
from qiskit.optimization.converters import IsingToQuadraticProgram
ImportError: cannot import name 'IsingToQuadraticProgram' from 'qiskit.optimization.converters' (/local1/rogers/anaconda/envs/quantum/lib/python3.7/site-packages/qiskit/optimization/converters/init.py)
I'm assuming you are using qiskit.
First, you have to install importation modules , every time you need to restart kernel
Run again code vis.py and enjoy!
I meet the error message shown below, would you please help to solve the problem?
$ python vis.py /local1/rogers/anaconda/envs/quantum/lib/python3.7/site-packages/qiskit/optimization/init.py:92: DeprecationWarning: The package qiskit.optimization is deprecated. It was moved/refactored to qiskit_optimization (pip install qiskit-optimization). For more information see https://github.com/Qiskit/qiskit-aqua/blob/master/README.md#migration-guide warn_package('optimization', 'qiskit_optimization', 'qiskit-optimization') Traceback (most recent call last): File "vis.py", line 26, in
from sensor_selection import activate_sensors
File "/local1/rogers/work/Application-of-quantum-optimization/sensor_selection.py", line 14, in
from qiskit.optimization.converters import IsingToQuadraticProgram
ImportError: cannot import name 'IsingToQuadraticProgram' from 'qiskit.optimization.converters' (/local1/rogers/anaconda/envs/quantum/lib/python3.7/site-packages/qiskit/optimization/converters/init.py)