Conversation
|
One or more of the following people are relevant to this code:
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
Much better user experience at the beginning ! Thank you !
generates:
TIP: Currently, the Workloads table on IBM Quantum Platform only reflects Qiskit Runtime workloads. To see the status of your Qiskit Serverless workloads, use job.status(). Find an example in the Run your first Qiskit Serverless workload remotely guide. Thanks |
done in f5d5d55 |
Removed in 89b577b |
I had already removed this - just in case you're seeing an old version, be sure you're using this as the preview url: https://qiskit.github.io/documentation/pr-4715/docs/guides/serverless-first-program |
Turns out the magic commands only work when they are at the very top of a cell. In conversation with @frankharkins I got some history on the inclusion of magic commands in this file. When it was added, it was to make the notebook testable in our CI, and the expectation wasn't that the user would download and run the file start-to-end. Given the new confusion, Frank recommends that we remove them and instead put in regular Python that users can run end-to-end, AND be testable by our CI. We would reword a bit to make sure it's clear what the user is supposed to do. |
|
@acastellane here's some more context on the In #1861, we decided on a feature to indicate that code cells are referring to the contents of separate files. We implemented this by detecting the However, I understand it could be confusing if a user downloads the notebook and has never seen a Jupyter magic before. In #4793, I tried removing the magics and replacing them with standard Python, but I think this worsens the experience for most users as it's harder to read and removes syntax highlighting in the source program. (See preview). As an alternative, I created #4794, which instead adds an explanation for users reading/running the notebook locally (preview). I think this is a better solution; do you think this resolves the confusion?
FYI this is expected, see https://ipython.readthedocs.io/en/9.2.0/interactive/magics.html#cell-magics |
cc: @acastellane
It appears that the original guide was written with the expectation that the user would download the notebook and run it end-to-end, but hidden code and magic commands don't appear in the published docs, which can be confusing to the user. Clarifying the content to explain this and to make sure the workflow makes sense whether it is run from the downloaded version, or from a copy-and-paste notebook.