Functions update - #5630
Merged
Merged
Conversation
This PR updates all dev APIs that changed since the last sync. If there is a merge conflict, usually you can close the PR and use the next dev docs PR. > [!NOTE] > This pull request was created by a GitHub action. ### What is this PR? We host "dev" API docs (e.g. https://quantum.cloud.ibm.com/docs/en/api/qiskit-ibm-runtime/dev), which are generated from the branch of the project's repo. This helps us preview upcoming changes and helps any users that are using the branch rather than a specific release. This PR updates the dev API docs ### How to deal with this PR 1. Glance through the diff and check things look reasonable. Only the dev docs and supporting images should be changed. It's common for there to be new pages. While sometimes a page or API will be removed, we should not be deleting a substantial portion of the docs. 2. If it looks good, approve the PR. 3. Close and re-open this PR to trigger CI; the action is not allowed to trigger CI properly so we need a human with write access to trigger it. 4. Once CI has passed, you can merge this PR. If something goes wrong, consider asking an engineer for help. With broken links, we sometimes need to update the original API docs to fix the bad link, such as updating the Qiskit SDK in Qiskit/qiskit. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
### Summary Fixes the projected-quantum-kernels tutorial so it runs end to end. It currently fails at the preprocessing step with `FileNotFoundError: './train_data.csv'`, and would fail again further down even if that were fixed. Three problems, all in the tutorial's own data handling: 1. **Wrong data directory.** The download cell writes the CSVs into `data_tutorial/pqk/`, but `dir_root` was `"./"`, so `preprocess_data` looked for the files in the working directory. 2. **Wrong projections file names.** With `run_experiment = False` (the default), the notebook loaded `projections_train.txt` / `projections_test.txt`, which are never downloaded. The downloaded files are `projections_train.csv` / `projections_test.csv` in `data_tutorial/pqk/`. 3. **Malformed dataset files.** The four CSVs under `datasets/tutorials/pqk/` had a UTF-8 BOM, CRLF line endings, and every line of `train_data.csv` / `test_data.csv` wrapped in double quotes. pandas parsed each row as a single string column of NaNs, and `np.loadtxt` rejected the BOM. The stored notebook output (`14:0:15`) shows the author's original data parsed correctly, so the files were mangled on export. ### Changes - `dir_root` now points at `./data_tutorial/pqk/`, and the projections are loaded from the downloaded `.csv` files. - The `!mkdir` / `!wget` shell cells are replaced with `urllib.request.urlretrieve`, matching the approach in `quantum-kernel-training` and `simulate-kicked-ising-tem`. This works on Windows and on runners without `wget`. - The dataset CSVs are rewritten as plain UTF-8 with LF line endings and no wrapping quotes. Values are unchanged. ### Testing - Ran the notebook locally as a script with `run_experiment = False` (no jobs submitted) against the fixed dataset files. Download, preprocessing, backend selection, and transpilation all succeed. The preprocessing output matches the notebook's stored output (`14:0:15`), and the projections load with shapes (172, 180) and (74, 180). I stopped the run during the tutorial's grid search, which is untouched by this change. - `ruff check`, `ruff format --check`, and `squeaky --check` pass on the notebook with the repo's `docs/ruff.toml`. Note: this notebook is in the `exclude` group of `scripts/config/notebook-testing.toml`, so docs CI does not execute it. The failure was observed in the internal tutorial-tests suite.
Standardizes prerequisite wording across 32 tutorials to match the SQD tutorial: > We recommend that users familiarize themselves with the following topics before going through this tutorial: Preserves singular wording where appropriate. No code, notebook outputs, or metadata changes. Validation: Markdown, spelling, and diff checks passed. Fixes #5621.
Fixes #5626 . - demonstrate usage of `max_dim` - use square lattice connectivity and higher number of reps in small-scale example, to improve energies - in hardware example, determine connectivity from backend processor family - don't limit optimization iterations for compressed factorization for LUCJ, since it's much faster in `ffsim >= 0.0.81`. - put nitrogen atoms symmetrically around Z axis to eliminate warning in newer PySCF versions - set "chemical accuracy" to 1.6 mHa and simplify y axis plotting logic
## Summary Adds a new tutorial, *Probabilistic error cancellation with logical noise models*, ported from the internal ibm-quantum-learning-enablement repo. The tutorial combines mediator-qubit error detection with PEC on a 49-qubit hexagonal Ising circuit, showing that QED+PEC converges with far fewer shots than PEC alone. ## Changes - Add `docs/tutorials/probabilistic-error-cancellation-with-logical-noise-models.ipynb` and its hero image under `public/docs/images/tutorials/`. - Extract the 10 embedded plot outputs to `extracted-outputs/*.avif` via `tox -e fix`. - Add the tutorial to `_toc.json` and `index.mdx` under **Error mitigation**. - Add a `qiskit_bot.yaml` ownership entry. - Exclude the notebook from notebook CI in `notebook-testing.toml`, since it runs on hardware (`ibm_boston`, ~28 min). ## Notes for reviewers - The notebook installs `qiskit-noise-learning` and `qiskit-mitigation` from git, as neither is on PyPI yet. The `qiskit-mitigation` install pins the `postselection-rename` branch until that module lands on `main`. Both install lines should be updated once the packages are released. --------- Co-authored-by: abbycross <across@us.ibm.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Contributor
|
One or more of the following people are relevant to this code:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.