qiskit-community / qiskit-nature

Qiskit Nature is an open-source, quantum computing, framework for solving quantum mechanical natural science problems.
https://qiskit-community.github.io/qiskit-nature/
Apache License 2.0
291 stars 197 forks source link

Tutorial 07_leveraging_qiskit_runtime should be removed #1294

Closed woodsp-ibm closed 4 months ago

woodsp-ibm commented 7 months ago

This tutorial, 07_leveraging_qiskit_runtime.ipynb, still exists in the docs. It should be removed, since its no longer valid, and the docs republished. I guess it slipped under the radar as this is not run by CI as it required remote system etc.

julenl commented 7 months ago

@woodsp-ibm: I think this tutorial is crucial to have. I would propose, either:

The first option would keep all the previous work, but the second one could be more "direct to the point".

If you like the idea, I can take care of either of them.

woodsp-ibm commented 7 months ago

The switching of primitives in the tutorials to those from another provider, so circuits are executed elsewhere, is more part of core Qiskit that should be covered there in its docs/tutorials/howtos since its affects simple/direct use of the primitives with a circuit of the users choice as well as the indirect use when it comes to algorithms, which use the primitive internally to execute circuits, I see the same questions/issue come up in how do I run my X on a real device where X can be an ML algo, and Optimization one etc etc.

I know there were tutorials/howtos done, and in process, around better explaining primitives and the providers. The runtime provider tutorials also had something that showed going from a local primitive to a runtime one. And of course with Runtime comes the extra aspect of Session.

Bottom line for me the basics ought to be elsewhere. There are caveats around the circuit if you are going to be using a near term noisy device, and also the optimizer choice if its a variational algo that it can deal with finding a minimum of a noisy function. Maybe there could be some overall text at some point referring to the primitives and these items to take into consideration noting that any tutorial in theory can be run using a different provider primitive but presently in practice with near term noisy devices things may not be so successful.

So my take is that the tutorial, which was specific to VQEClient, should be removed. As to anything else, as the main Qiskit docs have just been migrated to a new home, I think I would check/wait on those for whatever is said on primitives and review things in the future based on that. Having tutorials though which show the actual usage, I am not in favor of, unless they can be run in CI. As you can see with this runtime one it is not run in CI and without that it will not be quickly noticed if things change and they no longer run properly and/or throw errors as happened here.

julenl commented 6 months ago

I do totally agree that the proper primitive documentation and tutorials belong in Qiskit, but maybe you agree with me in that somebody (like me) coming directly to Nature, will potentially have a hard time connecting the dots between so many complex components. I agree that a solid background on Nature definitely includes a more or less solid background in Qiskit, but come on... we all like copy/paste "Hello World!" examples, just to see that the thing works for the first time. I also agree that not being able to CI Runtime examples might be an issue, but in my personal opinion, the risk of having an slightly outdated tutorial is well compensated with the benefit of saving plenty of time of everyone trying to figure out how to get it working. Besides, maybe there is some workaround to skip just the session and the calculation part, so that the rest would be covered. I could personally take care of writing and maintaining a minimal tutorial, at least for some time.