I have qiskit installed in my colab runtime and can import qiskit, but I can not import anything from qiskit.optimization. Am I missing something?

EDIT: It seems that qiskit.optimization uses qiskit-aqua. Installing aqua resolved the import issues.


1 Answer 1


Run !pip install qiskit-optimization to install it and import it as qiskit_optimization. Read more about the framework on the GitHub repo.

  • $\begingroup$ Im trying to use qiskit.optimization.applications.ising.stable_set.get_operator() from the documentation here, but there doesn't seem to be an analogue in this package. Have you seen this before? $\endgroup$
    – Mudi Yang
    Apr 29 at 0:02
  • $\begingroup$ @MudiYang I think you can use the StableSet object, convert it into a QuadraticProgram and then use the to_ising() method. $\endgroup$
    – epelaaez
    Apr 29 at 7:02

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.