-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate open source docs (attempt #2) #118
Conversation
* fixes Qiskit/qiskit-metapackage#113 * added link to install instructions fixed some styles * Review changes - Add Q&A Format
* Updated Getting Started * Removed trailing whitespaces and long lines * Removed typo * eliminated build warnings * eliminated build warnings in getting started * edit getting_started * edit executing quantum programs * Update executing_quantum_programs.rst line length * fix code block formatting * fix circuit drawings * fix plain text code block syntax * update IBM Q Experience link
* Update install docs * Load.account() updates * Update get.backend * Add update link * Fix link * Fix typos * Address review comments * Fix line length
* Standardized hyperlinks and underscores * Fixed lint errors
…other_optims Add other optimization notebooks and fixes
* Set up CI with Azure Pipelines This commit adds the CI configuration for running sphinx builds in CI. [skip ci] * Add missing dep and start caching pip * Install pandoc and graphviz * Add cvxpy install for aer noise transformations * Move aqua tutorials that depend on CPLEX to legacy_tutorials There are 2 aqua tutorials that do not work unless CPLEX is installed. CPLEX is too involved and difficult to install in CI. It is also proprietary software which prohibits installing it in CI (since a CI system can't agree to the license terms). Honestly, I'm not entirely sure why aqua has modules in it that depend solely on having proprietary software installed, it feels like there should be an open alternative or if there is one already the tutorial should leverage that. To make the docs buildable this commit moves these problematic tutorials to the legacy directory so they're not built/run by default. * Workaround terra mpl drawer bug There is a bug in the mpl drawer in 0.19.0 (and 0.19.1) release where a custom instruction does not draw without a label parameter set. This will need to be fixed in terra, but in the meantime this worksaround the bug by manually setting a label. * Add texlive to installed packages * Install correct texlive metapackage with qcircuit * Correct package name again * Add another missing binary dep * Update qcircuit version as packaged version is too old * Try using tlmgr instead of manually downloading qcircuit * Try using more from tlmgr instead of apt * Fix typo * Use bash directly * Adjust texlive update script usage * Give up on tlmgr and try to manual install qcircuit again * Fix typo * revert aqua tutorial move and remove latex install * Remove section of aqua notebook 2 that requires cplex * Remove another notebook with cplex
…terra_adv_1 fix terra adv 1
Generated docs look good.
…circuits_1 fix spacing around equations in circuits_1
…transpiler_notebook Update 4_transpiler_passes_and_passmanager.ipynb
I found it confusing when reading initially, and hence wanted to reiterate that the qubit representing the MSB is left-most, indexed with 0.
Minor improvements to Getting Started tutorials.
DeprecationWarning: The module 'qiskit.test.mock' is deprecated since Qiskit Terra 0.21.0, and will be removed 3 months or more later. Instead, you should import the desired object directly 'qiskit.providers.fake_provider'. #from qiskit.test.mock import FakeVigo --> from qiskit.providers.fake_provider import FakeVigo (https://qiskit.org/documentation/apidoc/providers_fake_provider.html) <!--⚠️ If you do not respect this template, your pull request will be closed.⚠️ Your pull request title should be short detailed and understandable for all.⚠️ If your pull request fixes an open issue, please link to the issue. ✅ I have added the tests to cover my changes. ✅ I have updated the documentation accordingly. ✅ I have read the CONTRIBUTING document. --> ### Summary DeprecationWarning: The module 'qiskit.test.mock' ### Details and comments DeprecationWarning: The module 'qiskit.test.mock' is deprecated since Qiskit Terra 0.21.0, and will be removed 3 months or more later. Instead, you should import the desired object directly 'qiskit.providers.fake_provider'. #from qiskit.test.mock import FakeVigo --> from qiskit.providers.fake_provider import FakeVigo (https://qiskit.org/documentation/apidoc/providers_fake_provider.html) --------- Co-authored-by: Junye Huang <[email protected]> Co-authored-by: Eric Arellano <[email protected]>
…it-tutorials#1165) <!--⚠️ If you do not respect this template, your pull request will be closed.⚠️ Your pull request title should be short detailed and understandable for all.⚠️ Also, please add it in the CHANGELOG file under Unreleased section.⚠️ If your pull request fixes an open issue, please link to the issue. ✅ I have added the tests to cover my changes. ✅ I have updated the documentation accordingly. ✅ I have read the CONTRIBUTING document. --> ### Summary Fixing layer description in "Implementing a BasicMapper Pass" ### Details and comments Original sentence stated "each layer is a group of operations that does not act on independent qubits, so in theory all operations in a layer can be done independently", which is incorrect. Every layer is a group of operations specifically acting on separate qubits each. The new sentence clarifies that with "each layer is a group of operations acting on independent qubits..." Co-authored-by: Eric Arellano <[email protected]>
<!--⚠️ If you do not respect this template, your pull request will be closed.⚠️ Your pull request title should be short detailed and understandable for all.⚠️ If your pull request fixes an open issue, please link to the issue. ✅ I have added the tests to cover my changes. ✅ I have updated the documentation accordingly. ✅ I have read the CONTRIBUTING document. --> ### Summary I have coded a script which (when directory is specified) checks for the broken links in the Jupyter notebooks and tells its exact place and the error it shows. ``` import os import nbformat as nbf import re import requests # Code to populate file_list with relevant .ipynb files file_list = [] for root, dirs, files in os.walk("qiskit-tutorials/tutorials/"): for file in files: if file.endswith(".ipynb"): file_list.append(os.path.join(root, file)) # Including the relative path of the file INLINE_LINK_RE = re.compile(r'\[([^\]]+)\]\(([^)]+)\)') for file_path in file_list: try: with open(file_path) as file: nb = nbf.read(file, 4) except OSError as e: print(f"Error occurred while reading file: {file_path}") print("Error message:", str(e)) print() continue for cell in nb["cells"]: if cell["cell_type"] != "markdown": continue links = list(INLINE_LINK_RE.findall(cell["source"])) for link in links: if not link: continue link_text, link_url = link if link_url.lower().endswith(('.png', '.jpg', '.jpeg', '.gif')): continue # Skip image links try: response = requests.get(link_url) if response.status_code != 200: print(f"Broken link found in file: {file_path}") print(f"Link: {link_text}") print(f"URL: {link_url}") print("HTTP status code:", response.status_code) print() except requests.RequestException as e: print(f"Error occurred while checking link in file: {file_path}") print(f"Link: {link_text}") print(f"URL: {link_url}") print("Error message:", str(e)) print() ``` ### Details and comments This code is part of QAMP Project [Issues in Qiskit Tutorials Qiskit/qiskit-tutorials#37](qiskit-advocate/qamp-spring-23#37) which can read many files at once and can find broken links with their exact position and error code it is showing. I ran this above code throughout the repo and checked each and every Jupyter notebook files, based on the output I have fixed many links. This PR is just the Last PR of the of project, which fixes the remaining broken links. All the other broken links are already fixed in the past PRs which are made throughout this project. Qiskit/qiskit-tutorials#1445 Qiskit/qiskit-tutorials#1446 Qiskit/qiskit-tutorials#1467 Qiskit/qiskit-tutorials#1483 Qiskit/qiskit-tutorials#1484. This project also fixes Qiskit/qiskit-tutorials#1402
) ### Summary The function plot_histogram() in the text should be `plot_histogram()` ### Details and comments --------- Co-authored-by: Eric Arellano <[email protected]>
This cross-repository merge unifies the documentation, benchmarks and code of conduct from the metapackage into Qiskit/Terra's build. There are very non-trivial merge conflicts that have been resolved by this commit. The summary is: - `CODE_OF_CONDUCT.md`: taken directly from the metapackage's version. - `docs/conf.py`: strongly unified, albeit without the translations components that are added in a separate commit. - `docs/index.rst`: taken almost verbatim from the metapackage. All the API documentation RST files on Terra are moved to `docs/apidoc` (without the trailing 's') to match the metapackage expectation, so the URLs of built documentation will not change. - `docs/release_notes.rst`: The metapackage's version is renamed to `docs/legacy_release_notes.rst`, given a small introductory header, and made an orphan linked only from a _new_ `docs/release_notes.rst` that uses `reno`. - `docs/tutorials.rst`: Mostly these were the same already. Updated to include Qiskit/Terra's correction that it's not an orphan, and contain the metapackage's extra intro tutorial. - `docs/apidoc/terra.rst`: renamed to `docs/apidoc/index.rst` and retitled to be correctly just "API Documentation". - `requirements-dev.txt`: the version of the Sphinx theme is bumped to 1.14 to match the metapackage expectation.
…10611) ### Summary This cross-repository merge unifies the documentation, benchmarks and code of conduct from the metapackage into Qiskit/Terra's build. There are very non-trivial merge conflicts that have been resolved by this commit. The summary is: - `CODE_OF_CONDUCT.md`: taken directly from the metapackage's version. - `docs/conf.py`: strongly unified, albeit without the translations components that are added in a separate commit. - `docs/index.rst`: taken almost verbatim from the metapackage. All the API documentation RST files on Terra are moved to `docs/apidoc` (without the trailing 's') to match the metapackage expectation, so the URLs of built documentation will not change. - `docs/release_notes.rst`: The metapackage's version is renamed to `docs/legacy_release_notes.rst`, given a small introductory header, and made an orphan linked only from a _new_ `docs/release_notes.rst` that uses `reno`. - `docs/tutorials.rst`: Mostly these were the same already. Updated to include Qiskit/Terra's correction that it's not an orphan, and contain the metapackage's extra intro tutorial. - `docs/apidoc/terra.rst`: renamed to `docs/apidoc/index.rst` and retitled to be correctly just "API Documentation". - `requirements-dev.txt`: the version of the Sphinx theme is bumped to 1.14 to match the metapackage expectation. Following merge commit 22a406c, there is a commit 66a5d9fe0 that fixes the ASV build for use in Terra, which is the rollup of the post-merge commits of Qiskit/qiskit#10546, which this PR supersedes. ### Details and comments This should probably be merged ASAP before `main` moves on. Resolutions on the metapackage: - Fix Qiskit/qiskit-metapackage#1723 - Fix Qiskit/qiskit-metapackage#1722 - Fix Qiskit/qiskit-metapackage#1746 After this has merged, Qiskit/qiskit#10610 should merge which will close the remaining migration-related issues from the metapackage. The metapackage was prepared for the migration using [`git-filter-repo`](https://github.com/newren/git-filter-repo), with the scripts and configuration files contained within [metapackage_migration.zip](https://github.com/Qiskit/qiskit-terra/files/12324298/metapackage_migration.zip). If you extract that zip, you need to activate a Python 3.11 `venv` then run `metapackage_rewrite.bash` which will prepare the repo in the exact state I merged to create this PR. *edit*: In retrospect writing this, you might need to modify my script so that it pulls only starting from commit Qiskit/qiskit-metapackage@f131daf, which was the tip of `master` at the time I ran this. I tested the docs build locally and it looks as correct as I can tell. There's still big cards pointing to experiments, dynamics etc on the landing page, but I figured that enough's enough, and we can just fix those last two things in Terra. This PR does not include Qiskit/qiskit-metapackage#1791, which should be now cherry-picked onto Terra.
…ity matrix' (Qiskit/qiskit-tutorials#1196) <!--⚠️ If you do not respect this template, your pull request will be closed.⚠️ Your pull request title should be short detailed and understandable for all.⚠️ Also, please add it in the CHANGELOG file under Unreleased section.⚠️ If your pull request fixes an open issue, please link to the issue. ✅ I have added the tests to cover my changes. ✅ I have updated the documentation accordingly. ✅ I have read the CONTRIBUTING document. --> ### Summary As described in issue Qiskit/qiskit-tutorials#1189, "state matrix" has been replaced by "density matrix" in `plot_state_city` and `plot_state_hinton` fotutorials/circuits/2_plotting_data_in_qiskit.html. Additionally I have also changed it at other plot functions. ### Details and comments "State matrix" has a different physical meaning and doesn't go with the definition given in the documentation. Hence "density matrix" seems like a better option to use instead of "state matrix". Co-authored-by: Eric Arellano <[email protected]>
…ials#1231) <!--⚠️ If you do not respect this template, your pull request will be closed.⚠️ Your pull request title should be short detailed and understandable for all.⚠️ Also, please add it in the CHANGELOG file under Unreleased section.⚠️ If your pull request fixes an open issue, please link to the issue. ✅ I have added the tests to cover my changes. ✅ I have updated the documentation accordingly. ✅ I have read the CONTRIBUTING document. --> ### Summary Fix a typo, in cell with description "# Compose YX in front of the previous operator". The code compose XZ in front of the previous operator, while it should be YX. ### Details and comments `op.compose(XZ, qargs=[0, 2], front=True)` is changed with `op.compose(YX, qargs=[0, 2], front=True)`, and add the correct output. --------- Co-authored-by: Eric Arellano <[email protected]>
…t-tutorials#1494) Built on top of Qiskit/qiskit-tutorials#1239. --------- Co-authored-by: Bochen "Daniel" Tan <[email protected]>
* update doc * hooray for spellchecker * Apply suggestions from code review Co-authored-by: Rebecca Dimock <[email protected]> * Update docs/faqs/max_execution_time.rst Co-authored-by: Rebecca Dimock <[email protected]> --------- Co-authored-by: Rebecca Dimock <[email protected]>
https://github.com/Qiskit/qiskit-tutorials has been archived because the docs are now built in this repository and we want to simplify our docs infrastructure. This PR merges the qiskit-tutorials repository here for the relevant tutorials, preserving its Git history. It uses `git-filter-repo` to tweak the Git history of `qiskit-tutorials` to be consumable in this repository, such as changing of `tutorials/` to be `docs/tutorials`. It also prunes irrelevant commits since we only copy over the tutorials that are currently in use and we ignore files like README.md that aren't copied over. See [tutorials_migration.zip](https://github.com/Qiskit/qiskit/files/12442282/tutorials_migration.zip) for how the migration was generated; credit to @jakelishman for the original script used in Qiskit/qiskit#10611. Then, I used `git merge --allow-unrelated-histories qiskit-tutorials/master`, with the remote `qiskit-tutorials` pointed at the prepared local repository. The merge was clean. This PR adds two commits on tip: * Removes the `prepare_tutorials.bash` script and placeholder tutorials that were used to download the tutorials from `qiskit-tutorials` dynamically. No need now that they live in the same repository. * Updates the tutorials with the most recently executed versions from CI.
* Initial edits * edit * Update docs/faqs/max_execution_time.rst * Update docs/faqs/max_execution_time.rst * Update docs/faqs/max_execution_time.rst * Update docs/faqs/max_execution_time.rst * Update docs/faqs/max_execution_time.rst * Update docs/faqs/max_execution_time.rst Co-authored-by: Jessie Yu <[email protected]> * Jessie comments * Update docs/faqs/max_execution_time.rst Co-authored-by: Jessie Yu <[email protected]> * Update docs/faqs/max_execution_time.rst Co-authored-by: Jessie Yu <[email protected]> * Update docs/sessions.rst * Update docs/faqs/max_execution_time.rst --------- Co-authored-by: Jessie Yu <[email protected]>
* Don't use QPU complex * don't use the word 'limit' * Update docs/faqs/max_execution_time.rst * Update qiskit_ibm_runtime/options/options.py * Update qiskit_ibm_runtime/runtime_job.py * Update releasenotes/notes/0.11/job-cost-estimation-d0ba83dbc95c3f67.yaml * Clarify usage * reclarify reset time * rogue comma * fix whitespace & formatting * job -> system execution time --------- Co-authored-by: Kevin Tian <[email protected]>
* Changes for Qiskit/qiskit-ibm-runtime#1806 * Update docs/faqs/max_execution_time.rst Co-authored-by: Jessie Yu <[email protected]> --------- Co-authored-by: Kevin Tian <[email protected]> Co-authored-by: Jessie Yu <[email protected]> Co-authored-by: Kevin Tian <[email protected]>
* big moves, import still works * most tests pass (some I cannot seem to run locally) * fix tests -- how to remove DiagonalGate? * typehints and docs * more type hints * Deprecate SQU * deprecate Snapshot * Fix missing future annotations import * minimize deprecation effort * Change to pending deprecation, no exact-location import supported * fix MCG<->MGC typo and snapshot deprecation * fix pylint, try fixing docs * remove gates from extensions toctree * Add reno, fully deprecate SQU and Snapshot * Apply Sasha's review comments - fix usage of .squ and .snapshot w/o import - fix docstring usage of extensions - fix tests * capture snapshot deprecation warning * review comments - capture warning of SQU - update reno to explicitly mention pending deprecation, add DiagonalGate and ExtensionError * missed `diagonal` method --------- Co-authored-by: Alexander Ivrii <[email protected]>
|
For some reason, this wasn't brought in via #118. This uses `git cherry-pick` to bring in the relevant commit. Co-authored-by: Guillermo-Mijares-Vilarino <[email protected]> Co-authored-by: Steve Wood <[email protected]> Co-authored-by: Junye Huang <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]> Co-authored-by: Luciano Bello <[email protected]>
Recreates Qiskit#91, but without squash merging.
…skit#128) For some reason, this wasn't brought in via Qiskit#118. This uses `git cherry-pick` to bring in the relevant commit. Co-authored-by: Guillermo-Mijares-Vilarino <[email protected]> Co-authored-by: Steve Wood <[email protected]> Co-authored-by: Junye Huang <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]> Co-authored-by: Luciano Bello <[email protected]>
Recreates #91, but without squash merging.