The migration guide of qiskit 1.0 has some mistakes about SamplerV2
result.
- Method name: `get_bitstring` -> `get_bitstrings`
- This method returns a list of bitstrings not an ndarray.
Note: If you want to access the shape, you can do it by
`data_pub.meas.array.shape`.
---------
Co-authored-by: Toshinari Itoko <15028342+itoko@users.noreply.github.com>
Closes#1014
In the interest of readability, the list of allowed urls includes pages
that don't exist. There is a small risk of a false positive if there are
any new pages that get added to the api docs of the same name which
should actually be checked against their toc instead of ignored.
This is the only repository still using
https://github.com/Qiskit/gh-actions, so we can inline its logic and
then archive the repository. That allows us to make the workflow file
less generic and remove some indirection. It simplifies the overall
infrastructure.
I think PR previews might have been broken for a while, but I want to
address this in a follow up.
https://github.com/Qiskit/documentation/issues/1034
---------
Co-authored-by: Va Barbosa <va@us.ibm.com>
This finishes off the guide to interoperation with OpenQASM 2, including
more tutorial-like versions of how to work with custom quantum and
classical instructions, specific instructions on how to import programs
created by the (to-be-fixed) exporter, and how to export programs to
OpenQASM 2.
Close#240.
---------
Co-authored-by: abbycross <across@us.ibm.com>
API docs use Markdown components, and are about to use a lot more of
them with the new API components like
https://github.com/Qiskit/documentation/issues/1008. It's confusing to
pretend they're MD files.
This PR makes things consistent, which allows us to simplify some of our
scripts to only deal with MDX and IPYNB extensions.
The API docs were manually changed with this Bash snippet:
```bash
for file in docs/api/**/*.md; do
if [ -f "$file" ]; then
mv "$file" "${file%.md}.mdx"
fi
done
```
Part of #885
- Convert from MDX to Jupyter notebook
- Rewrite introduction to be more concise
- Use preset pass manager instead of `transpile`
- Use Eagle device and ECR gates instead of retired Falcon device and CX
gates
---------
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: Rebecca Dimock <66339736+beckykd@users.noreply.github.com>
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
Co-authored-by: Abby Mitchell <23662430+javabster@users.noreply.github.com>
Co-authored-by: nick bronn <ntbronn@us.ibm.com>
Adding this text wherever the notification about ISA circuits appears:
```
> **Exception**: When you initialize the Qiskit Runtime Service with the Q-CTRL channel strategy (example below), abstract circuits are still supported.
> ``` python
> service = QiskitRuntimeService(channel="ibm_cloud", channel_strategy="q-ctrl")
> ```
>
```
Files where the notification appears:
- [x] docs/run/primitives-examples.mdx
- [x] docs/run/primitives-get-started.mdx
- [x] docs/run/configure-error-mitigation.mdx
- [x] docs/start/hello-world.ipynb
- [x] docs/run/estimate-job-run-time.mdx
- [x] docs/run/advanced-runtime-options.mdx
- [x] docs/run/configure-runtime-compilation.mdx
- [x] docs/run/primitives.mdx
UPDATE: sync publishing this with blogs/announcements/banners
Closes#700
Reminder: Blog link added here is a placeholder -- to be replaced with
whatever new blog comes out!
---------
Co-authored-by: Abby Mitchell <23662430+javabster@users.noreply.github.com>
This PR refactors the `generateToc.ts` script splitting out the
`generateToc` function into some helper functions. It also removes the
if condition to check if the length of the modules is greater than 0
because it's not necessary.
The PR added a test to check the latter, and it was tested regenerating
every qiskit and provider versions.
Small PR to add some missing types to variables and merge two unified
plugins into one. Both unified plugins were using different phases of
the whole process (parse, run, and stringify).
Reverts the order changes when we set the metadata introduced by #954.
It turned out that setting the metadata outside the `map()` adds some
duplicated `<span>` tags for qiskit legacy versions. This PR moves the
code back to where it originally was.
- Removes unnecessary tabs
- Reword some sentences for clarity
- Move V2 explanatory prose outside of tabs so that it's easier to see
the difference between the tabs when switching between them.
### Summary
Part of #845
This PR creates more sections for the `htmlToMd.test.ts` and merges some
tests.
### Changes
- Merged `parse inline attributes section` and `convert method and
attributes to titles and handle inlined methods` into `handle inlined
methods and attributes`
- Merged `handle <` and `handle {` into `handle special characters: <
and {`.
- Created three new sections to classify some tests:
1. Transform methods and attributes
2. transform description HTML tags
3. transform admonitions
Close#388
I ended up not using `zxMain` and set a few different options for
choosing which api docs to look through (similar to
`checkPagesRender.ts`). @Eric-Arellano Let me know if there's anything
that needs fixed or should be refactored!
---------
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
### Summary
Part of #845
This PR refactors the `htmlToMd.test.ts` test file.
### Changes
- Three tests were removed
1. `merge contiguous emphasis` was merged with `remove spaces from
emphasis boundaries`. They were using the same HTML but only adding
spaces
2. `convert method and attributes to titles`. This test was incomplete
and it's implicitly checked at `convert inline methods`.
3. `convert class method with a problematic output`. The test wasn't
checking anything related to the script behavior. The problematic output
is due to a bad HTML that should be fixed in the original repo.
- Input HTML trimmed for some tests. We were using long inputs to test
certain behaviors that don't need it. For example, we were testing the
transformation of a table with 11 entries when the same test could use 2
or 3.
- Some tests have been organized into sections to easily find them
scanning the file. These sections can be found at the end of the test
file leaving the uncategorized tests at the beginning.
- We were using two helper functions for the tests named `toMd` and
`toMdWithMeta` with the only difference that in the first one, we
returned the markdown attribute of the transformation instead of the
whole object. I merged these two functions with an extra argument to
specify when we need to return the metadata.
This PR regenerates qiskit-ibm-runtime 0.22.0, 0.21.1, and makes 0.20.0
historical
---------
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
For pages mentioning specifically the Qiskit SDK, update the title and
first instance of the term "Qiskit" to be "Qiskit SDK".
---------
Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
This is to better clarify the word "Qiskit". This changes what shows up
in the left ToC.
Change was generated with `rg '"title": "Qiskit",' -l | xargs sd
'"title": "Qiskit",' '"title": "Qiskit SDK",'`
- [x] Remove various transpilation options for v2 primitives
- [x] Update code examples
- [x] Describe new features
- [x] Add migration guide to TOC and index
- [x] Check for outdated information
- [x] Check Cloud for outdated information
---------
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
To improve the squished feel of two admonition boxes sandwiching a small
paragraph, adding a header to the paragraph to space out the page and
make easier to read.
Closes https://github.com/Qiskit/documentation/issues/715.
This is useful generally for better testing of our conversion pipeline,
as it's our only test that tests the entire conversion pipeline.
It also is useful to allow us to easily compare Sphinx's behavior vs.
our app's behavior, like the PDFs I uploaded in
https://github.com/Qiskit/documentation/issues/947.
--
I didn't document this in the README because we don't talk about testing
in the README currently. Our README is already quite long, so I was
hesitant to add to it since most technical writers don't care about
testing, unlike Jupyter notebook testing that we do document.
Instead, I documented the test file itself. I'm not sure if this is
clear enough.
---------
Co-authored-by: Arnau Casau <47946624+arnaucasau@users.noreply.github.com>
Closes#941
This PR sets the `in_page_toc_max_heading_level` to 4 for legacy
versions of qiskit (< 0.45) and to 3 for 0.45+ versions. It also changes
the description of all the release notes to match the one we are using
in the API generation script: `Changes made in Qiskit {version}`
Given that we don't regenerate legacy release notes using the script, we
can set the `in_page_toc_max_heading_level` to 3 for all qiskit versions
and 2 for the rest of the APIs.
The changes to the latest release note were done by removing the file
and regenerating the 1.0.1 version. The rest of the files we manually
updated.
The `prepareGitHubLink` function calls `remove() `on the closest `<a>`.
This can be a problem when used before the following early return:
```ts
if (child.name !== "dt" || !apiType) {
return `<div>${$child.html()}</div>`;
}
```
Calling the function in a case where we should enter into the early
return leads us to remove the link for a child element when we
shouldn't. To fix this, this PR moves the `prepareGitHubLink` call to be
performed inside the `processMember` function.
The PR also regenerates all versions of qiskit, runtime, and provider to
add some links we were incorrectly removing.
This PR fixes the order of the operations we are doing in
`conversionPipeline.ts`. The important change is to call
`maybeUpdateReleaseNotesFolder` before `writeTocFile`. This is because,
in the former, we call to `addNewReleaseNotes`, which modifies the
`_toc.json` file that we write in the latter.
## Summary
This PR splits the `processMembersAndSetMeta` function from the
`processHtml.ts` script into several helper functions to process each
`apiType`.
## Changes
These changes are done to the `map()` used to create the `replacement`
variable (line 291). The map used to have all the logic to process each
child depending on its `apiType`. Now the map starts by early returning
in the case we are not processing a `<dt>` tag and calling to a new
helper function to process an individual child.
Before the `map()` was setting the metadata, the refactor moved the code
outside of it, given that the metadata doesn't depend on the elements
iterated.
The new helper function is called `processMember` and starts by
preparing the GitHub source link, removing the `apiType` from the
`em.property` selector, and calling other new helper functions to
process each of our available `apiType`.
All the process `apiType` functions have the same code as before but
`processAttribute`, which has been refactored to find the name, type,
and default value of an attribute in a more concise way