Commit Graph

1107 Commits

Author SHA1 Message Date
Eric Arellano e701cac882 Add index page to left ToC for Runtime and Provider (#1269)
Closes https://github.com/Qiskit/documentation/issues/1249. 

Some of the reasons we decided to make this change:

1. Consistency with Qiskit SDK
2. It's useful to show the currently selected page in the left ToC when
you land on the index

Before:

<img width="272" alt="Screenshot 2024-05-01 at 11 31 00 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/b80da918-526f-45ff-bd96-49a5585b3fbf">

After:

<img width="266" alt="Screenshot 2024-05-01 at 11 32 41 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/396fa470-68a8-470d-b9d4-4f4f5c08cec6">
2024-05-02 14:27:02 +00:00
Frank Harkins d3a402ffd2 Add tabs back into "Plot quantum states" (#1278)
This is possible with the new `CodeCellPlaceholder` components. [Check
it
out](https://qiskit-docs-preview-pr-1278.1799mxdls7qz.us-south.codeengine.appdomain.cloud/verify/plot-quantum-states).

***

Closes #1219
2024-05-02 14:19:46 +00:00
Eric Arellano c95b08814c Shorten page title for channel set up (#1277)
Requested by Abby M in a meeting.
2024-05-02 14:10:27 +00:00
Frank Harkins 3f33dfda8d Update learning uploader README.md (#1271)
The script has undergone some changes that weren't reflected in the
docs.
2024-05-02 08:58:12 +00:00
Eric Arellano eb51244319 Regenerate Runtime docs to use module reorganization (#1270)
Applies the changes made in
https://github.com/Qiskit/documentation/issues/1240.

Also updates the dev docs more generally.

Before:

<img width="272" alt="Screenshot 2024-05-01 at 11 46 46 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/d3655237-7a1e-4d3a-bc51-f8465b520b84">

After:

<img width="271" alt="Screenshot 2024-05-01 at 11 48 22 AM"
src="https://github.com/Qiskit/documentation/assets/14852634/748bfbbc-6610-47c8-8d2d-4826feb0e20f">
2024-05-01 16:08:32 +00:00
Eric Arellano 8a33b4ab1a Refactor generateToc tests to use normal project structure (#1267)
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()`.
2024-05-01 15:22:12 +00:00
Rebecca Dimock 4cf6688414 delete unwanted content (#1264)
This should have been deleted yesterday.
2024-04-30 21:58:12 +00:00
Kevin J. Sung 7733c41e17 rename repitition -> repetition (#1261) 2024-04-30 21:55:54 +00:00
Eric Arellano e719d6ecf5 Add mechanism to group API ToC into sections (#1256)
Prework for https://github.com/Qiskit/documentation/pull/1255. This PR
only adds the generic mechanism but doesn't yet use it for Qiskit to
keep the diff smaller.
2024-04-30 21:02:29 +00:00
abbycross 07e1f7091d fix format of issue template (#1263)
I mistakenly put a dash in front of each line of the new issue template
code, rather than just the first line, so the template isn't showing up.
2024-04-30 20:51:50 +00:00
abbycross e1825eec86 Update feedback issue template to point straight to new feedback form (#1260)
In conversation with @JulesMurphy - remove the current "Impressions and
feedback" form in the issue templates, and instead link out directly to
the new feedback form at
https://ibmxm.iad1.qualtrics.com/jfe/form/SV_7Uq9FCMjZPyTsFM?Q_PopulateResponse={%22QID20%22:%223%22}
2024-04-30 20:25:14 +00:00
Eric Arellano c1c328095e Refactor generateToc.ts to not use dictionary type (#1259)
Prework for https://github.com/Qiskit/documentation/pull/1256. It was
confusing how we pass both `tocModules: TocEntry[]` and
`tocModulesByTitle: Dictionary<TocEntry>`. It wasn't clear how those
values relate, and `Dictionary` is an under-documented API by Lodash.

Also adds `hasPrefix`, which we will need in
https://github.com/Qiskit/documentation/pull/1256.
2024-04-30 20:04:05 +00:00
abbycross 0f9249e274 Falcon processors retirement on 30 April (#1257)
Algiers, Cairo, and Hanoi (27-qubit systems) to be retired on 30 April.
Add to retired systems page.
2024-04-30 18:35:18 +00:00
Rebecca Dimock b866913dd4 Hardware recommendations for simulation (#1236)
Closes #1206

---------

Co-authored-by: abbycross <across@us.ibm.com>
2024-04-30 17:35:33 +00:00
Eric Arellano 34ce7ca60e Remove confusing API index pages in Qiskit 0.19 (#1258)
## Problem

This is how Qiskit 0.19 looks:

<img width="260" alt="Screenshot 2024-04-29 at 5 00 14 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/151d56df-09d2-47c6-885b-a8ce6f6e931a">

The three `qiskit` entries are:

https://docs.quantum.ibm.com/api/qiskit/0.19
https://docs.quantum.ibm.com/api/qiskit/0.19/ibmq-provider
https://docs.quantum.ibm.com/api/qiskit/0.19/aqua

0.19 is the only version like that, e.g. Qiskit 0.24 doesn't have
duplicates:

<img width="266" alt="Screenshot 2024-04-29 at 5 00 36 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/93f4c64e-7427-41d3-9deb-ae8f5ebcd758">

In 0.19 docs, the first two `qiskit` entries are index pages for Qiskit
Aqua and Qiskit IBMQ Provider. Those are index pages that simply list
all modules, rather than module overview pages that describe the modules
`qiskit.aqua` and `qiskit.providers.ibmq`.

Having the three duplicate `qiskit` entries is going to be a problem
with https://github.com/Qiskit/documentation/issues/1211 when we group
modules.

## Solution

I simply deleted the two index files from the HTML and regenerated the
docs. If we like this PR, I will upload that HTML change to Box.

I went with deletion because it's the simplest fix. We don't have these
index pages in every version after 0.19, and it works fine.
https://github.com/Qiskit/documentation/issues/1211 will also help with
module discovery through better grouping.

We could instead rewrite the HTML for the two problematic files, but I
figured it's fine to do the simpler approach that's consistent with
later versions.
2024-04-30 13:29:53 +00:00
Eric Arellano 1b3ae6d6b9 Truncate left ToC entries for Runtime and Provider (#1250)
Closes https://github.com/Qiskit/documentation/issues/1242. We decided
with design that the simplest solution to the visual clutter is to
truncate.

Before:

<img width="264" alt="Screenshot 2024-04-26 at 5 04 55 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/df90b11d-d779-4832-9541-92220e39d0c7">

After:

<img width="269" alt="Screenshot 2024-04-26 at 5 05 51 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/d4643c74-c711-4219-a297-845864f09ca2">

## Does not add a hover

We were hoping to allow you to hover to see the full text, like you do
with links via `title`, where we show you the full module path.

But I could not see an easy way to do this because this is plain text
rather than a hover. We'd need to add a new mechanism to `_toc.json`
where you can set something like `hoverTitle` for each entry, and then
we'd need to add a new mechanism to the docs app. So, I didn't add this
for now.

I think it's obvious enough, especially because we show you the full
import path at the top of the module overview page:
<img width="654" alt="Screenshot 2024-04-26 at 5 06 14 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/dd3c9c6b-9274-4317-b090-8804c1725a23">
2024-04-30 13:29:13 +00:00
Rebecca Dimock a835da8844 Advanced Runtime topic edits (#1254) 2024-04-29 20:48:12 +00:00
Rebecca Dimock 41d05617d8 Add runtime options table (#1188)
closes #1124
2024-04-29 18:02:26 +00:00
Arnau Casau 4e07b5c301 Remove the extra `=` character from the attribute's default value prop (#1233)
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.
2024-04-29 16:40:34 +00:00
Eric Arellano 6fa973d6b3 Remove duplicate entries in Migration Guides ToC (#1253)
* `/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>
2024-04-29 16:27:25 +00:00
Rebecca Dimock 017be70f20 Sessions migration guide (#783)
Closes #595  
Closes #1041 
Closes #582 
Closes #780
Closes #582
Closes #1156 
Closes #577 
Closes #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>
2024-04-29 15:32:27 +00:00
Eric Arellano 7cd0235796 Rename "Overview" page to "Module overview" in API ToC (#1246)
We discussed in a team meeting that "Module overview" is more clear what
we're referring to.

Before:

<img width="270" alt="Screenshot 2024-04-26 at 1 48 19 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/87febc2c-15d6-41ff-9752-8934ef34dbec">

After:

<img width="268" alt="Screenshot 2024-04-26 at 1 48 34 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/660b52e2-45fe-4462-8e2f-da5abb10fa38">
2024-04-29 12:25:01 +00:00
Rebecca Dimock a118fd8e98 Update style-guide.md (#1244)
Add info about writing for AI

---------

Co-authored-by: ABBY CROSS <across@us.ibm.com>
2024-04-26 22:10:11 +00:00
abbycross 631be2cd3f Specify command to run Prettier (#1245)
Clarify the options for fixing a file with a Prettier error.

---------

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
2024-04-26 18:34:13 +00:00
Eric Arellano 4cd9729831 Flatten left table of contents for Runtime and Provider (#1241)
Closes https://github.com/Qiskit/documentation/issues/1212. As explained
there, this is because:

1. Qiskit SDK is getting a bigger revamp in
https://github.com/Qiskit/documentation/issues/1211 and it will also
flatten submodules, so we want to be consistent.
2. The module list is so short that it's useful to have the navbar be
flatter. It makes things less crowded and more discoverable.

Note that some of the Runtime provider pages aren't very useful...I
opened https://github.com/Qiskit/documentation/issues/1240 to track
that.

For now, this is implemented as the `Pkg` constructor setting a boolean
argument for whether modules should be nested or not. I'm coming up with
an alternative—but similar factoring—while working on
https://github.com/Qiskit/documentation/issues/1211. This PR is
~prework.

<img width="253" alt="Screenshot 2024-04-24 at 4 02 34 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/2bbbaa7f-e187-4170-b2c5-02273e340b07">

<img width="257" alt="Screenshot 2024-04-24 at 4 02 10 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/53816ee2-f7ee-4d1d-90a5-64d7795fd776">
2024-04-25 11:22:36 +00:00
Eric Arellano bc72f94e05 Switch to new Docker image for staging/PR builds (#1225)
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.
2024-04-24 20:46:26 +00:00
abbycross 88fb74db44 Fix url in Get started with primitives (#1237)
Broken link needs updating
2024-04-24 17:58:09 +00:00
abbycross 155ad58228 Install page updates (#1223)
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>
2024-04-24 15:54:51 +00:00
Frank Harkins 0290bfb588 Make notebook tester into package (#1208)
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>
2024-04-24 15:14:49 +00:00
Frank Harkins ee69a31c99 Improve code examples in "Save jobs" (#1231)
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.
2024-04-24 14:19:04 +00:00
Kaelyn Ferris c44f78f30b Update hello-world for 1.0 (#1158)
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>
2024-04-23 21:32:21 +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
Frank Harkins 6dfcb5c784 Remove code block inside `<details>` tag (#1221)
I missed this in #1218; removing for now while we work on a solution.
2024-04-23 11:49:50 +00:00
Eric Arellano 297470be02 Describe staging vs prod for tutorials deploys (#1220) 2024-04-22 20:13:42 +00:00
abbycross e26dea2588 Indicate metric for gate error: average gate fidelity (#1209)
Related to #636.

cc: @jyu00
2024-04-22 18:55:43 +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
Eric Arellano aca0d174dd Use asyncio to parallelize notebook testing (#1201)
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>
2024-04-22 17:55:02 +00:00
Frank Harkins 2b0ae5f73d Remove tabs from "Plot quantum states" (#1218)
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.
2024-04-22 17:04:58 +00:00
Frank Harkins bbc332bed2 Reorganise "Save jobs" page (#1203)
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>
2024-04-19 21:07:28 +00:00
Eric Arellano 4b9f05cf31 Fix Python version in CI (#1210)
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.
2024-04-19 15:04:06 -04:00
Rebecca Dimock a4964cfc43 Primitives (non runtime) changes for 1.0 (#812)
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>
2024-04-19 17:36:57 +00:00
Frank Harkins 667169dca0 Change how we specify Python versions for testing (#1207)
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).
2024-04-19 17:15:12 +00:00
Arnau Casau d5cc966939 Add the `isDedicatedPage` prop to the Class component (#1204)
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.
2024-04-19 14:14:23 +00:00
Jim Garrison 64c5056088 Fix typo in configure-runtime-compilation.mdx (double "by") (#1205) 2024-04-19 13:28:32 +00:00
Eric Arellano 4650f6da02 Upgrade Runtime and Provider for notebook testing (#1202)
Notebooks were tested locally with `tox`. Everything succeeded except
for `save-jobs.ipynb` because it doesn't work with other users'
accounts.
2024-04-19 13:16:11 +00:00
Eric Arellano 60d3e7352f Indicate IBM Provider is deprecated in left navbar (#1197)
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.
2024-04-18 17:21:25 +00:00
Frank Harkins cc02c7da47 Update notebook test list (#1198)
Fix oversight in #1160. This notebook no longer submits jobs so can be
removed from the list.
2024-04-18 15:20:12 +00:00
Frank Harkins 0697a8bffd Fit new notebooks into existing content (#1160)
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.
2024-04-18 14:47:46 +00:00
Eric Arellano c8534e1f0b Generate qiskit-ibm-provider 0.11 docs (#1191) 2024-04-18 13:03:02 +00:00