This is to unblock https://github.com/Qiskit/documentation/issues/1249.
We now use the project folder that `Pkg.mock().outputDir()` would use.
This also removes inline snapshots. They can't be updated via `npm test
-- -u` due to Prettier, so it's more helpful to use a normal
`expect().toEqual()`.
Part of #1216
The attributes will be redesigned, and we won't need to store the `=`
character as part of the default value prop. This character can be added
from the react component if it's needed again in the future, similar to
how we are already using the type hints.
* `/api/migration-guides/v2-primitives` is already in the ToC as a
top-level entry called "Migrate to the Qiskit Runtime V2 primitives"
* `/api/migration-guides/qiskit-runtime-from-provider` is already in the
section `Migrate to Qiskit Runtime`, but under the new URL
`qiskit-runtime-from-ibm-provider`
I think it was a bad merge conflict to duplicate the entries in the new
Runtime 0.20 section.
---------
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Closes#595Closes#1041Closes#582Closes#780Closes#582Closes#1156Closes#577Closes#576
- [x] Add text about job splitting, such as "If you split your workload
into multiple jobs and run them in Batch mode, you can get results from
individual jobs. You can, for example, decide to cancel the rest of the
jobs if the earlier job results don't meet your expectations. If one of
the jobs fail, you can also re-submit just that one instead of
re-running the entire workload."
There are several new and existing topics that are impacted:
- This documentation section has several topics about execution modes:
https://qiskit-docs-preview-pr-783.1799mxdls7qz.us-south.codeengine.appdomain.cloud/run/execution-modes
- This migration guide is new:
https://qiskit-docs-preview-pr-783.1799mxdls7qz.us-south.codeengine.appdomain.cloud/api/migration-guides/sessions
---------
Co-authored-by: Ashley Silva <asarver1@gmail.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
We use a new approach in closed source that sets `ENV HOSTNAME 0.0.0.0`
in the Dockerfile to work around
https://github.com/vercel/next.js/issues/53171 breaking IBM Code Engine
with IPv6.
Closes#1183, and also incorporates suggestions from #1163 (adds the
video and moves admonition statement "out of the way")
---------
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Makes the notebook tester into an installable package so we can re-use
it in other repos.
Main changes are:
* Adding `pyproject.toml` and moving script to
`qiskit_docs_notebook_tester/__init__.py`
* Moving the lists of notebooks to a config file
* Splitting the requirements needed for running the code in the
notebooks form those neeed by the testing script itself
The interface via `tox` should be unaffected.
---------
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
The "Save jobs" notebooks made a couple of assumptions that are not
always true:
1. It assumed the most recent job submitted has completed.
2. It assumed the most recent job submitted was a sampler job.
This PR changes the code examples to handle both these cases
(75c09f1a7a), and re-runs the notebook
(e6ff1cbc4e).
Fixes#1227.
Closes#699
Currently waiting for the job to finish in order to plot the last set of
data. However, all the other content should be there and updated to
support 1.0.
---------
Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
Co-authored-by: Rebecca Dimock <beckyd@us.ibm.com>
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Co-authored-by: abbycross <across@us.ibm.com>
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)).
An alternative to https://github.com/Qiskit/documentation/pull/1181.
This should help when executing many notebooks that submit jobs as
they'll all submit their jobs immediately and begin queueing in
parallel.
---------
Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
This page wrapped code blocks in `<TabItem>` tags to include them in the
tab component. This looks nice but unfortunately relied on some
implementation details of how the notebook is converted to the web page,
which is something we want to avoid.
This PR removes the tabs and uses headings instead to unblock publishing
the page while we work on a more robust solution.
This page originally submitted a simple job using the cloud simulator as
a demonstration. Since the simulators are being deprecated, #1160
removed the job-submitting step and hardcoded the `job_id` into the
notebook. This was a bad idea because it means the notebook breaks if
not run with my IBM Quantum account.
This PR reorganises the page to get `job_id` programatically first. This
lets us avoid hardcoding the `job_id` in the notebook, which means we
can run the notebook with any IBM account that has submitted at least
one job.
---------
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Fixes https://github.com/Qiskit/documentation/pull/1207. We use
`list[str]` in type hints rather than `List[str]`, which was only added
in Python 3.9. So it broke CI.
Python 3.9 is fine as a floor, given that Python 3.12 is newest.
Closes#1072
Some helpful background: from Jessie: The goal of this document is for
people to test their quantum program (that calls primitives) locally,
before sending them to Qiskit Runtime to run on a real QPU.
Most of this page uses the statevector simulator, and there is an
equivalent for V2, better named as
[StatevectorEstimator](https://github.com/Qiskit/qiskit/blob/main/qiskit/primitives/statevector_estimator.py#L31)
and
[StatevectorSampler](https://github.com/Qiskit/qiskit/blob/main/qiskit/primitives/statevector_sampler.py#L52).
---------
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: Elena Peña Tapia <epenatap@gmail.com>
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
We currently test everything with Python 3.11, but this is a problem as
not all writers have it available on their system. We also want to make
sure our docs work with as many versions of Python as possible.
This PR allows writers to test their docs with any version of Python,
and sets CI to test with Python 3.8 (the minimum version that Qiskit
supports).
This PR adds the `isDedicatedPage` prop we use for exceptions and
functions to the class component. This change will help us decide when
we need a blue left bar in inlined classes.
We're also changing other parts of the UI like the API dropdown in the
top nav bar. This will change the left ToC here:
<img width="326" alt="Screenshot 2024-04-18 at 10 49 23 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/4e357344-b1e2-44c6-93e9-179f5e99723b">
This PR also removes the version number from the H1 for the release
notes for Runtime and Provider to no longer have the version number in
them. That didn't make sense to do because they're the same release
notes for all versions.
PRs #977 and #1099 added some new pages in anticipation of a restructure
which has since been postponed. This PR fits those pages into our
current content structure.