0

So I am following the instructions on this site, https://qiskit.org/documentation/stubs/qiskit.algorithms.optimizers.nlopts.html#module-qiskit.algorithms.optimizers.nlopts

However, I am able to run this command

./configure --enable-shared --with-python

As there is no file nor repository named with configure. I have qiskit and installed NLopt already. It will be great if anyone can help me with that ><

I expect to be able to follow the instruction and run NLopt on my qiskit code

This is my current situation:

nlopt-2.7.1 % ./configure --enable-shared --with-python

zsh: no such file or directory: ./configure

1 Answers1

0

The docs above also include a link to nlopt's installation instructions. You should be able to follow things from there to install it to your Python environment that you are using with Qiskit. As you can see from the nlopt version listed there the instructions were written some time ago given the version shown there and it seems the installation overview given there may be outdated given the latest nlopt version.

BUT... from checking it now seems to be on PyPi so doing a pip install nlopt should do it - it was not available via PyPi when the instructions were written.

FYI:: As it seems the instructions need to be reviewed I created this issue to have the instructions revised https://github.com/Qiskit/qiskit-terra/issues/9011

Steve Wood
  • 266
  • 1
  • 3
  • This is working for me. Thanks a lot. Note that you may need to update your numpy to the latest version before you can actually use the nlopt in your code. – Ren Namkit Oct 28 '22 at 16:23