Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
One or more of the following people are relevant to this code: |
abbycross
left a comment
There was a problem hiding this comment.
All good from copyediting! (I didn't look at the hidden cells other than to check for copyedit-relevant stuff.)
frankharkins
left a comment
There was a problem hiding this comment.
Awesome work, thank you!
To pass CI, you'll need to add this to the test-eagle or the cron-job-only group:
documentation/scripts/config/notebook-testing.toml
Lines 99 to 102 in 98eb71e
Because this notebook submits jobs and we don't want to submit jobs in CI (it uses a lot of device time and can cause CI to flake).
I have some suggestions, but they're not blocking.
| "token = os.getenv(\"IBM_CLOUD_TEST_TOKEN\")\n", | ||
| "crn = os.getenv(\"IBM_CLOUD_TEST_CRN\")\n", | ||
| "url = \"https://quantum.cloud.ibm.com/api/v1/jobs\"\n", | ||
| "service = QiskitRuntimeService()\n", |
There was a problem hiding this comment.
Sorry I didn't think of this earlier, but you could do this instead and remove the env vars from the github action step:
crn = service.active_account()['instance']
token = service.active_account()['token']We use this approach in qunova-chemistry.ipynb and functions.ipynb
| "The following examples demonstrate the default options for dynamical decoupling, twirling, and TREX + ZNE. Find more options and further details in the [Error mitigation and suppression techniques](./error-mitigation-and-suppression-techniques) topic.\n", | ||
| "\n", | ||
| "\n", | ||
| "<Tabs>\n", |
There was a problem hiding this comment.
If you wanted to keep the tabs, you could use the CodeCellPlaceholder component. You'd basically just split the cell into three, give each an id- tag, and put the <CodeCellPlaceholder tag="id-..." /> component inside the tab components in the markdown.
| "id": "3814b809-3012-4498-adc8-efa1f1f5c959", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Get job results:" |
There was a problem hiding this comment.
| "Get job results:" | |
| "Once the job has completed, get job results:" |
| "name": "stdout", | ||
| "output_type": "stream", | ||
| "text": [ | ||
| "Job created: {\"id\":\"d6147vao8gvs73f0h12g\",\"backend\":\"ibm_pittsburgh\"}\n" |
There was a problem hiding this comment.
I think we create this job but never use it, maybe we should cancel it immediately afterwards in a hidden cell?
Same for the other "Work with Runtime options" job.
Closes #4381
This replaces the markdown code examples to testable ones. I also had to include a few hidden cells to support testing (mostly to generate Bearer tokens and wait for job results to come back before continuing to execute other cells). The content itself hasn't really changed, but I would especially appreciate a review on the hidden cells since they're somewhat involved.