Happened on some code, which I was hoping would run out of the box. However fails on the import

from qiskit.aqua.translators.ising import max_cut

I've not been able to find the module in the documentation. Any ideas how to solve this? Other then use an earlier version of Qiskit?

I get the following error:

from qiskit.aqua.translators.ising import max_cut
ModuleNotFoundError: No module named 'qiskit.aqua.translators'
  • 1
    $\begingroup$ What error do you receive? When I try running that import it doesn't give me any errors. $\endgroup$ – Matthew Stypulkoski Jan 10 at 22:07
  • 3
    $\begingroup$ I realized I did not have my Qiskit up to the newest version. I'm receiving the same error now. The max_cut class was moved to the following import path: from qiskit.optimization.ising import max_cut $\endgroup$ – Matthew Stypulkoski Jan 10 at 22:13

It seems that docplex class also was moved to from qiskit.optimization.ising import docplex

|improve this answer|||||
  • $\begingroup$ It would be more appropriate to use comments for posts like this. $\endgroup$ – Martin Vesely Jan 15 at 5:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.