closes#1542
Frank did a lot of the code changes already (#1580 ), but the migration
guides weren't included, so I still need to update that code.
---------
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
We've found some more problems in the QAOA notebook after second review.
You may find it easier to review this commit-wise.
* Bit embarassed about this, but there were still two attached images in
the QAOA notebook, which are not supported by the learning platform. The
file no longer contains the string "attach" so there shouldn't be any
more.
* The `<details>` tag appeared to work, but on closer inspection it
turns out it was mangling the markdown inside the tag. I've replaced it
with a blockquote to visually separate it from the rest of the page.
* Some other minor formatting I noticed when reviewing the page.
A couple of issues slipped past in #1668.
- Minor formatting fix which was breaking math
- Removed image attachments as they aren't handled by the learning
platform. I saved the first image to file, I also had to reduce its
resolution by 50%. The other attachment was literally just text so I
transcribed it into a code block as an accessibility best practice.
Fixes a number of formatting problems in the new tutorial that became
apparent after previewing on staging. I've uploaded the this fixed
notebook to staging. To view, go to
`<staging-url>/tutorial/quantum-approximate-optimization-algorithm`.
## Changes
* **Wrap math in `$$` and remove `align`:** The learning platform
requires `$$` to recognize math. I believe Jupyter notebooks are more
forgiving which is why this probably didn't cause any problems in
review. I also removed the `align` environment because it's for aligning
lines of equations and we only have one line at a time.
* **Removed HTML:** The learning platform doesn't support HTML, it
either gets stripped or escaped. I've replaced any HTML with the closest
standard markdown.
* **Replaced top-level headings:** All top-level headings are stripped
by the learning platform and replaced with the title from the CMS. In
general, it's best practice to only have one top-level heading anyway.
* Ran linter on the notebook.
The requirements for the learning uploader have changed since it was
first created.
It was originally intended to be used locally by writers to quickly push
content to the platform. I wrote it in Python so writers would not need
to install node, and using string manipulations to interact with the
REST API was good enough for just uploading the zip and linking the new
file. It also included functionality for a writer to log into the
database through a CLI.
Now, the uploader is only used in CI, so we don't care about logging in
or sticking to Python, and we want to be able to do more complex
manipulations such as adding new lessons and changing metadata. For this
reason, this PR rewrites the uploader using the official [Directus
SDK](https://docs.directus.io/guides/sdk/), which makes interacting with
the API a lot easier.
---------
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Co-authored-by: Arnau Casau <47946624+arnaucasau@users.noreply.github.com>
Co-authored-by: Abby Mitchell <23662430+javabster@users.noreply.github.com>
Adds a new tutorial for QAOA with code for running experiment at utility
scale. All dependencies from Application modules are removed
---------
Co-authored-by: ABBY CROSS <across@us.ibm.com>
Co-authored-by: Kaelyn Ferris <43348706+kaelynj@users.noreply.github.com>
This PR bumps the `qiskit_ibm_runtime` version to the most recent, and
updates our code examples to work with that version.
---------
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
First part of #1443
Still need to figure out how to change the tags on the platform.
- [ ] The CHSH tutorial is tagged "scheduling", but there is no
scheduling involved.
Closes#1279Closes#1331
I removed the "ignore warning" code from all relevant tutorials (in
addition to VQE and CHSH) and ran them all locally on simulators to make
sure we aren't getting warnings. I also added Requirements sections to
VQE and CHSH.
Working on re-generating the output for CHSH since it currently runs on
a 27Q system, but I'm in the queue for 16 hrs.
---------
Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
We can name the notebook file what we want. So, we were using
`notebook.ipynb` to not repeat the tutorial name both in its parent
folder and the notebook file.
But repeating `notebook.ipynb` has been annoying. It makes it harder in
your IDE to know which file is which. It also makes the CI artifact
upload less useful because the artifact only has the file names without
the parent folder name.
I thought I'd tested this in #1154 but I actually only tested the
uploader test workflow. I'd forgotten to pass the environment from the
input to the job.
Something which wasn't my fault is that some tutorial UUIDs seem to have
changed, I'm not sure why this is but am investigating.
With the new UUIDs, the workflow is working ([see
run](https://github.com/Qiskit/documentation/actions/runs/8798350887/job/24145159885)).
Adds a workflow to deploy tutorials from `main`, and documentation on
how to do it. This PR also switches to using environment secrets rather
than actions secrets, which should be more secure as we can limit who
can run them and which branches they can run on. See
https://github.com/Qiskit/documentation/actions/runs/8647825547/job/23710189504
for an example of the action using the staging environment.
---------
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Adds the new tutorial notebooks to the same tests as the documentation
notebooks. Most tutorials run jobs on IBM Quantum so will only be tested
fortnightly in the cron job workflow.
Part of #1136
Adds the runtime tutorial notebooks as per #1135. I couldn't use the
same approach as #91 as the file history is broken in the runtime repo,
but since there were few enough files I used `git log --follow` to find
the original PR and all authors that touched the files.
Originally created in Qiskit/qiskit-ibm-runtime#888
Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
Co-authored-by: Hwajung Kang <hwajungkang@gmail.com>
Co-authored-by: Ikko Hamamura <ikkoham@users.noreply.github.com>
Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Co-authored-by: Sanket Panda <pandasa123@gmail.com>