Commit Graph

48 Commits

Author SHA1 Message Date
Frank Harkins bb36c508d9 Rename notebook 2024-07-12 16:30:31 +01:00
Frank Harkins 4780bf3ea4 Merge branch 'main' of https://github.com/Qiskit/documentation into tutorial-housekeeping-transpiled-circuits 2024-07-12 16:28:57 +01:00
Rebecca Dimock 49e1a24f28 Initial changes for Mode (#1598)
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>
2024-07-10 18:43:45 +00:00
Frank Harkins 8819a813c5 Resize image for compatibility with learning platform (#1679)
Resizes an image down 50% so the learning platform can display it.
2024-07-10 15:57:16 +00:00
Frank Harkins 735b1d6542 More QAOA notebook fixes (#1676)
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.
2024-07-10 12:08:48 +00:00
Frank Harkins f6859c64c0 More QAOA tutorial fixes (#1669)
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.
2024-07-09 16:09:21 +00:00
Frank Harkins 77499115c9 Fix formatting in new QAOA tutorial (#1668)
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.
2024-07-09 10:40:29 +00:00
Frank Harkins 0dabb0559d Rewrite learning uploader (#1421)
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>
2024-07-09 09:36:21 +00:00
Mirko Amico 8b02455828 Utility scale QAOA tutorial (#1238)
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>
2024-07-08 11:04:30 -04:00
dependabot[bot] 5e2f3f29ee Update qiskit-ibm-runtime requirement from ~=0.24.1 to ~=0.25.0 in /scripts/nb-tester (#1652)
Updates the requirements on
[qiskit-ibm-runtime](https://github.com/Qiskit/qiskit-ibm-runtime) to
permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Qiskit/qiskit-ibm-runtime/releases">qiskit-ibm-runtime's
releases</a>.</em></p>
<blockquote>
<h2>Qiskit IBM Runtime 0.25.0</h2>
<h1>Changelog</h1>
<h2>Deprecated</h2>
<ul>
<li>Deprecate interim results (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1776">#1776</a>)</li>
<li>Deprecate optimization_level (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1748">#1748</a>)</li>
</ul>
<h2>Added</h2>
<ul>
<li>Add instance property to job (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1771">#1771</a>)</li>
<li>Support <code>default_shots</code> in EstimatorV2 local mode (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1773">#1773</a>)</li>
<li>Adding backend related methods to
<code>QiskitRuntimeLocalService</code> (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1764">#1764</a>)</li>
<li>Add client-side validations (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1730">#1730</a>)</li>
<li>Add refresh method to fake backends (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1740">#1740</a>)</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Backend required param when using cloud channel (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1739">#1739</a>)</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>Change use_fractional_gates default to False (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1755">#1755</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9abf8411a4"><code>9abf841</code></a>
Prepare release 0.25.0 (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1785">#1785</a>)</li>
<li><a
href="040f8af7cf"><code>040f8af</code></a>
Set _active flag to false if session already closed (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1780">#1780</a>)</li>
<li><a
href="c607150241"><code>c607150</code></a>
Use polling for job status instead of websockets (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1778">#1778</a>)</li>
<li><a
href="b6865b4a3e"><code>b6865b4</code></a>
Deprecate interim results (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1776">#1776</a>)</li>
<li><a
href="21e3ba6ed9"><code>21e3ba6</code></a>
Skip job instance test on cloud (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1779">#1779</a>)</li>
<li><a
href="10b21f4f22"><code>10b21f4</code></a>
Add instance property to job (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1771">#1771</a>)</li>
<li><a
href="b01a1b6339"><code>b01a1b6</code></a>
Support <code>default_shots</code> in EstimatorV2 local mode (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1773">#1773</a>)</li>
<li><a
href="17749b8958"><code>17749b8</code></a>
Improve save_account() error msg (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1772">#1772</a>)</li>
<li><a
href="42bcec40f7"><code>42bcec4</code></a>
Adding backend related methods to <code>QiskitRuntimeLocalService</code>
(<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1764">#1764</a>)</li>
<li><a
href="eea7df4b3d"><code>eea7df4</code></a>
Fixing the docstring of <code>Batch</code> (<a
href="https://redirect.github.com/Qiskit/qiskit-ibm-runtime/issues/1761">#1761</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/Qiskit/qiskit-ibm-runtime/compare/0.24.1...0.25.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
2024-07-05 16:40:18 +00:00
Frank Harkins 91500802ea Update code for runtime 0.24.1 (#1580)
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>
2024-06-20 16:46:06 +00:00
ABBY CROSS 6fec45147b tox -e fix 2024-06-17 12:05:13 -04:00
Frank Harkins 0db573465a Update tutorial ID 2024-06-14 11:08:59 +01:00
Rebecca Dimock 52552f42dc add information about changing tutorial title (#1544)
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
2024-06-13 16:39:47 +00:00
abbycross 55618503a7 Tutorial housecleaning: VQE (#1379)
Related to #1286

---------

Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
2024-06-13 15:51:47 +00:00
Rebecca Dimock 9bdb5bcd27 Tutorial housekeeping - submit transpiled circuits 2024-06-12 17:34:26 -05:00
Rebecca Dimock e02a3735b5 Tutorial housekeeping: Grovers (#1531) 2024-06-12 19:20:56 +00:00
Rebecca Dimock 207e0f4597 Tutorial housekeeping: Repeat until success (#1521)
related to #1286
2024-06-10 20:52:15 +00:00
Rebecca Dimock 221f22a872 Tutorial housekeeping: Build repetition codes (#1519)
Related to #1286
2024-06-10 20:51:42 +00:00
Rebecca Dimock 0381d720d8 Add QPU estimate to CHSH (#1518)
Part of #1286
2024-06-10 16:16:09 +00:00
abbycross 2616f10366 Update header titles in tutorials readme (#1506)
Minor fix for clarity: make headers parallel
2024-06-07 16:57:47 +00:00
Rebecca Dimock 40dc2fbf2b Remove mention of simulated results in CHSH tutorial (#1447)
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.
2024-05-29 14:39:52 +00:00
Frank Harkins 6d3044e725 Remove invalid link (#1445) (#1452)
Our CI can't run on forks so making a PR from within the repo.

Co-authored-by: Abdón Rodríguez <a@abdonrd.com>
2024-05-29 12:41:57 +00:00
Rebecca Dimock 0a6d2fe87b Update Build repetition codes tutorial (#1157)
Closes #1137 

FYI @RoyElkabetz
2024-05-28 19:51:50 +00:00
abbycross 36e911754a Stylistic updates to the Error mitigation w/ Estimator tutorial (#1378) 2024-05-16 19:37:20 +00:00
Rebecca Dimock f0d37ce50a remove callback section (#1393)
closes #1353
2024-05-16 16:46:38 +00:00
Frank Harkins 7831eac0d1 Refresh notebook outputs (#1391)
Uses the results of the most recent cron job to refresh notebook outputs
so they match user expectations.
2024-05-15 16:26:04 +00:00
Frank Harkins 6e3ed3372e Update URL (#1377) 2024-05-14 18:10:52 +00:00
Frank Harkins 903c4eed9e Update learning-api.conf.yaml (#1376) 2024-05-14 17:53:10 +00:00
Kevin J. Sung 9d87e26d5a Add tutorial for error mitigation with Qiskit Runtime Estimator (#1313)
Fixes #1168

---------

Co-authored-by: Abdullah Ash- Saki <44783187+ashsaki@users.noreply.github.com>
Co-authored-by: Pedro Rivero <pedro.rivero.ramirez@gmail.com>
Co-authored-by: Ritajit Majumdar <majumdar.ritajit@gmail.com>
Co-authored-by: haimeng-zhang <33587226+haimeng-zhang@users.noreply.github.com>
2024-05-14 17:27:49 +00:00
Rebecca Dimock 7d1970e610 Remove "warning suppression" code (#1307)
Closes #1279 
Closes #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>
2024-05-10 18:52:25 +00:00
Kevin J. Sung 7733c41e17 rename repitition -> repetition (#1261) 2024-04-30 21:55:54 +00:00
Eric Arellano 11652d3318 Rename tutorial notebooks to be unique (#1224)
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.
2024-04-23 20:10:53 +00:00
Frank Harkins a99f2f88be Fix tutorial deployment process (#1222)
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)).
2024-04-23 16:26:57 +00:00
Eric Arellano 297470be02 Describe staging vs prod for tutorials deploys (#1220) 2024-04-22 20:13:42 +00:00
Rebecca Dimock c00db462d9 Update Repeat until success notebook (#1192)
closes #1138

copy over edits from learning repo made by @RoyElkabetz and myself:
***REMOVED***

---------

Co-authored-by: ABBY CROSS <across@us.ibm.com>
2024-04-22 18:21:23 +00:00
Frank Harkins f108c23c8d Warn about tutorial titles (#1185)
Today's meeting reminded me of this gotcha. Adding it to the readme to
save someone a headache in the future.
2024-04-16 16:15:11 +00:00
Frank Harkins dcd1fedef0 Add tutorial deployment process (#1154)
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>
2024-04-16 12:18:33 +00:00
Frank Harkins 0bcf81330b Add tutorials to notebook tests (#1155)
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
2024-04-11 13:07:00 +00:00
Frank Harkins 66aa265f7f Migrate runtime tutorials (#1149)
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.
2024-04-09 17:21:40 +01:00
Sanket Panda 97e694d791 Add explore-composer notebook
This file originally existed in an inner-source repository.
2024-04-09 17:06:00 +01:00
Sanket Panda a5cd406576 Add repeat-until-success notebook
This file originally existed in an inner-source repository.

Co-authored-by: Roy Elkabetz <elkabetzroy@gmail.com>
2024-04-09 17:06:00 +01:00
Sanket Panda 4090385c1f Add build-repitition-codes notebook
This file originally existed in an inner-source repository.

Co-authored-by: Roy Elkabetz <elkabetzroy@gmail.com>
2024-04-09 17:05:54 +01:00
Junye Huang 040a33f487 Add grovers-algorithm.ipynb
Originally created in Qiskit/qiskit-ibm-runtime#236

Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
Co-authored-by: Ikko Hamamura <ikkoham@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
Co-authored-by: Paul Nation <nonhermitian@gmail.com>
Co-authored-by: Rathish Cholarajan <rathish.c@ibm.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Co-authored-by: Sanket Panda <pandasa123@gmail.com>
Co-authored-by: beckykd <66339736+beckykd@users.noreply.github.com>
Co-authored-by: kevin-tian <kevin.tian@ibm.com>
2024-04-09 15:46:54 +01:00
Junye Huang 56fe19292f Add chsh-inequality.ipynb
Originally created in Qiskit/qiskit-ibm-runtime#416

Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
Co-authored-by: Ikko Hamamura <ikkoham@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
Co-authored-by: Paul Nation <nonhermitian@gmail.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Co-authored-by: Sanket Panda <pandasa123@gmail.com>
Co-authored-by: Tushar Mittal <37920727+tmittal947@users.noreply.github.com>
Co-authored-by: adcorcol <1413901+adcorcol@users.noreply.github.com>
2024-04-09 15:46:31 +01:00
Jessie Yu 63bd9af807 Add quantum-approximate-optimization-algorithm.ipynb
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>
2024-04-09 15:45:58 +01:00
Owen Lockwood 36d50126d7 Add variational-quantum-eigensolver.ipynb
Originally created in Qiskit/qiskit-ibm-runtime#235

Co-authored-by: ElePT <epenatap@gmail.com>
Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
Co-authored-by: Ikko Hamamura <ikkoham@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Junye Huang <h.jun.ye@gmail.com>
Co-authored-by: Kevin Tian <kt474@cornell.edu>
Co-authored-by: Paul Nation <nonhermitian@gmail.com>
Co-authored-by: Rathish Cholarajan <rathish.c@ibm.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Co-authored-by: Sanket Panda <pandasa123@gmail.com>
Co-authored-by: jspark971 <jspark971@gmail.com>
Co-authored-by: kevin-tian <kevin.tian@ibm.com>
Co-authored-by: lerongil <leron_1234@yahoo.com>
2024-04-09 15:45:20 +01:00
Frank Harkins 81158fe1ac Add submitting-transpiled-circuits.ipynb
Originally created in Qiskit/qiskit-ibm-runtime#231

Co-authored-by: Ikko Hamamura <ikkoham@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
Co-authored-by: Junye Huang <h.jun.ye@gmail.com>
Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Co-authored-by: Sanket Panda <pandasa123@gmail.com>
2024-04-09 15:44:27 +01:00