Skip to content

More serverless tweaks#4715

Draft
abbycross wants to merge 13 commits intomainfrom
ajc/serverless-feedback
Draft

More serverless tweaks#4715
abbycross wants to merge 13 commits intomainfrom
ajc/serverless-feedback

Conversation

@abbycross
Copy link
Collaborator

@abbycross abbycross commented Feb 24, 2026

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.

@abbycross abbycross requested a review from a team February 24, 2026 16:15
@qiskit-bot
Copy link
Contributor

One or more of the following people are relevant to this code:

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@acastellane
Copy link
Contributor

Much better user experience at the beginning ! Thank you !

  • I would recommend to move the cell containing the code:
    Path("./source_files").mkdir(exist_ok=True)
    after the "Create the directory" cell

  • For some reason on my notebook the commented line preceding the magic command prevents it to operate.

# Each circuit is being transpiled and will populate the array
%%writefile --append ./source_files/transpile_remote.py

generates:
UsageError: Line magic function %%writefile not found.

  • what prevents to provide the magic commands in the main text ? That would add consistency and simplify flow.
    If we can't, then the sentence: "a hidden cell will create the source_files directory" would better be "cells contain IPython magic commands to create or append the file of concern ..." or something like this as nothing is hidden ?
    And then the code should not be "executable" or "copied as a runnable code", since technically it is just raw text to be used in an editor. That will reduce misunderstanding risks for light readers.

  • Here : https://qiskit.github.io/documentation/main/docs/guides/serverless-first-program#upload-to-qiskit-serverless
    I would remove
    "(which is demonstrated in the Run your first Qiskit Serverless workload remotely guide)." as it leads user's mind to a future that he can't run now.

  • This following tips is too early and has its place in the run section (which is already the case)

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

@abbycross
Copy link
Collaborator Author

* I would recommend to move the cell containing the code:
  `Path("./source_files").mkdir(exist_ok=True)`
  after the "Create the directory" cell

done in f5d5d55

@abbycross
Copy link
Collaborator Author

This following tips is too early and has its place in the run section (which is already the case)

Removed in 89b577b

@abbycross
Copy link
Collaborator Author

Here : https://qiskit.github.io/documentation/main/docs/guides/serverless-first-program#upload-to-qiskit-serverless
I would remove
"(which is demonstrated in the Run your first Qiskit Serverless workload remotely guide)." as it leads user's mind to a future that he can't run now.

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

@abbycross
Copy link
Collaborator Author

For some reason on my notebook the commented line preceding the magic command prevents it to operate.
.
.
.
what prevents to provide the magic commands in the main text ? That would add consistency and simplify flow.
If we can't, then the sentence: "a hidden cell will create the source_files directory" would better be "cells contain IPython magic commands to create or append the file of concern ..." or something like this as nothing is hidden ?
And then the code should not be "executable" or "copied as a runnable code", since technically it is just raw text to be used in an editor. That will reduce misunderstanding risks for light readers.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants