-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 documentation and benchmarks from metapackage #10611
Conversation
* Bump version for qiskit-aer==0.5.1 Bump the meta repo version to include: qiskit-aer==0.5.1 * Add release notes for aer 0.5.1 * Fix release note versions Co-authored-by: Matthew Treinish <[email protected]>
* point to IQX for error codes * update link and layout * cleanup
* Add benchmarks for bind_parameters This commit adds a synthetic benchmark for running bind_parameters on a parameterized circuit. It is basically a dual of the circuit construction benchmark except that it adds a sweep on the number of parameters. * Reduce number of permutations * Add parameterized construction bench and fix lint Co-authored-by: Paul Nation <[email protected]> Co-authored-by: Jay Gambetta <[email protected]>
Merging this before new release. Generated docs look as expected.
Fix typo and spelling in rst files under docs directory and in python file under test directory * fix typo * revert changes based on comment * correct peake_... since they were not executed
* Bump version for qiskit-terra==0.14.0 Bump the meta repo version to include: qiskit-terra==0.14.0 * Add terra release notes * Bump version for qiskit-ibmq-provider==0.7.0 * Add placeholder for other elements * Add aqua release notes prelude * qiskit-ibmq-provider release note (Qiskit/qiskit-metapackage#909) * Workaround terra backwards compat bug This commit works around an issue introduce in the most recent terra release where the deprecated gate classes are no longer being exported, see Qiskit#4365 for more details. This will be fixed soon in a followup 0.14.1 release but until that time this commit makes the necessary change to the benchmarks so they'll work with the 0.14.0 release. * Fix title level * Bump version for qiskit-aqua==0.7.0 Bump the meta repo version to include: qiskit-aqua==0.7.0 Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: Jessie Yu <[email protected]>
Bump the meta repo version to include: qiskit-terra==0.14.1
…ckage#914) This option should fix about 2500 of the doc warnings happening in Aqua.
…package#922) This commit adds a new custome extension to the sphinx build's conf.py that will clone master of the tutorials to the documentation and use nbsphinx to build them as part of the documentation. Currently the notebooks are not being executed and it will rely on the tutorials repo including the cell output in the in-repo copy. What's missing from this is an index and inclusion in the toc so while the tutorials are built they aren't navigable and have to be manually opened.
* tutorials try 1 * update jupyter-execute import * update copyright year
Merging as looks good.
* bump to 0.19.2 * Bump version for qiskit-aqua==0.7.1 Bump the meta repo version to include: qiskit-aqua==0.7.1 Co-authored-by: Matthew Treinish <[email protected]>
* Bump version for qiskit-ibmq-provider==0.7.2 Bump the meta repo version to include: qiskit-ibmq-provider==0.7.2 * Bump version for qiskit-aer==0.5.2 Bump the meta repo version to include: qiskit-aer==0.5.2 * Add release notes * Touch up the GPU simulator release note * Fix Aer version in release notes Co-authored-by: Matthew Treinish <[email protected]>
* Bump Meta Bump the meta repo version to include: qiskit-terra==0.14.2 * Add release notes * Bump version for qiskit-aqua==0.7.2 Bump the meta repo version to include: qiskit-aqua==0.7.2 * Add aqua release notes * Fix typo Co-authored-by: Qiskit Bot <[email protected]>
* updates to translation documentation * Update docs/contributing_to_qiskit.rst Emphasizing "3 contributors" * Fix lints and adding Yuri's name beside the provided email * Abby's review comments Co-authored-by: abbycross <[email protected]> * Fix lint Co-authored-by: SooluThomas <[email protected]> Co-authored-by: abbycross <[email protected]>
* Bump version for qiskit-aqua==0.7.3 Bump the meta repo version to include: qiskit-aqua==0.7.3 * Add aqua release notes * Bump version for qiskit-ignis==0.3.1 Bump the meta repo version to include: qiskit-ignis==0.3.1 * Add ignis release notes * Fix typo * Really fix the typo * Fix typo in aqua release notes * Apply suggestions from code review Co-authored-by: Christopher J. Wood <[email protected]> * Fix yet another release note typo * Bump version for qiskit-ignis==0.3.2 Bump the meta repo version to include: qiskit-ignis==0.3.2 * Bump ignis version in release notes * Fix lint failure Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: Christopher J. Wood <[email protected]>
a couple repeated words I came across when doing the crowdin translation. Co-authored-by: Paul Nation <[email protected]>
Co-authored-by: Matthew Treinish <[email protected]>
* Bump version for qiskit-ignis==0.3.3 Bump the meta repo version to include: qiskit-ignis==0.3.3 * Add release notes Co-authored-by: Matthew Treinish <[email protected]>
…metapackage#961) * worthless change * add optim images
Output doesn't show and FrameChange is removed
Going to push this through since it looks fine, and allows me to PR for the chem tutorial
pushing through as verified the docs are good.
The docs look good. Latex all fixed and new finance added. It seems there is still an unknown formatting issue in the finance docs causing bold font in the menu, but since that is minor, pushing through.
Docs look good, pushing through
…kit/qiskit-metapackage#989) This commit adds support for configuring the execution of the tutorials via an env variable 'QISKIT_DOCS_BUILD_TUTORIALS'. When set the value is used as the nbsphinx_execute value in the sphinx config, this will let users or CI jobs change the default value of 'never' to enable executing the tutorials as part of the documentation builds. The default of 'never' was used because we do not have a sufficient CI time budget in test jobs for running a full doc build and executing the tutorials. However, the publish job running in gha has a 6 hour time limit and doesn't have the slow feedback time concern so we can let it spin building documentation. Having the sphinx build run the notebook provides a uniform environment for all the notebook output and it ensures that environment differences from tutorial contributors don't lead to inconsistent rendered documentation. We already have a tutorials job that executes the notebooks on PRs to ensure that they always work. So the docs publish jobs shouldn't be wedged by a broken notebook.
* Bump version for qiskit-terra==0.15.0 Bump the meta repo version to include: qiskit-terra==0.15.0 * Add terra release notes * Bump version for qiskit-ignis==0.4.0 Bump the meta repo version to include: qiskit-ignis==0.4.0 * Add ignis release notes * Bump version for qiskit-ibmq-provider==0.8.0 Bump the meta repo version to include: qiskit-ibmq-provider==0.8.0 * Bump version for qiskit-aqua==0.7.4 Bump the meta repo version to include: qiskit-aqua==0.7.4 * Fix lint * Add pyscf to tutorials job * Add missing quotes from pyscf * Fix broken release note * Remove faulty qubits release note This feature is being reverted so lets not include the release note, also it was failing lint. * Add release notes for provider 0.8 (Qiskit/qiskit-metapackage#999) * add provider 0.8 release notes * remove header * retrigger check * Add aqua release notes * Fix doc8 lint * Bump version for qiskit-aer==0.6.0 Bump the meta repo version to include: qiskit-aer==0.6.0 * Add aer release notes * Remove duplicated aer release notes * Bump version for qiskit-aqua==0.7.5 Bump the meta repo version to include: qiskit-aqua==0.7.5 * Add release notes for aqua 0.7.5 release * Apply suggestions from code review Co-authored-by: Luciano Bello <[email protected]> * Update docs/release_notes.rst Co-authored-by: Luciano Bello <[email protected]> * Add conc to aer 0.6.0 release notes Adds conan release notes for aer 0.6.0 which were added in Qiskit/qiskit-aer#870. * Bump version for qiskit-terra==0.15.1 Bump the meta repo version to include: qiskit-terra==0.15.1 * Bump version for qiskit-aer==0.6.1 Bump the meta repo version to include: qiskit-aer==0.6.1 * Bump Terra and Aer release note versions Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: Jessie Yu <[email protected]> Co-authored-by: Luciano Bello <[email protected]>
Prior to Qiskit/qiskit-metapackage#989 we were just deploying prebuilt tutorials in the docs publish jobs so the per cell timeout was set to 60sec which should have been plenty since nothing was executed. However after Qiskit/qiskit-metapackage#989 in the docs deploy job we started executing all the cells. The 60 sec timeout is not sufficient for that, especially considering the tutorials repo has a 3min per cell timeout. This commit bumps the timeout to 5min to give a healthy margin on the publish job, where there isn't really any time pressure.
Adds the Qiskit version info to the main Qiskit index page. Also removed the double import of os and sys in the docs conf.py.
One or more of the the following people are requested to review this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, it seems to have the history preserved correctly and the content looks right. We'll have a bit of follow up to do for the documentation on the 0.25.1 release but as a bulk import this looks correct. I'll do a manual merge commit for this to preserve the history.
Oh, for posterity: the CLA isn't an issue here because all contributors to the metapackage also signed the same one. That's why the bot isn't (shouldn't be) complaining. |
Pull Request Test Coverage Report for Build 5836074410
💛 - Coveralls |
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 ec5c9ca, there is a commit 66a5d9f that fixes the ASV build for use in Terra, which is the rollup of the post-merge commits of Qiskit#10546, which this PR supersedes. 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#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. (cherry picked from commit 965fd23)
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 ec5c9ca, there is a commit 66a5d9f that fixes the ASV build for use in Terra, which is the rollup of the post-merge commits of #10546, which this PR supersedes. 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, #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. (cherry picked from commit 965fd23)
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 #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.
…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.
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.
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.
First part of #22 and #23. This copies over the open source files we plan to use in this repository. They are not actually used yet and still require some work like converting RST to MDX, but it gets the files and their Git history here to start the process. Qiskit docs are placed in the folder `qiskit-docs/` and Runtime docs in `runtime-docs`. These are only for unprocessed docs. Once a document is ready, we will move it to the official `docs/` folder and have it go live. This uses `git-filter-repo` to preserve all the Git history and author attribution from the respective open source repositories. It uses the below Python script and this [zipped folder](https://github.com/Qiskit/documentation/files/12835669/migrate-open-source.zip), using an approach very similar to @jakelishman's original work in Qiskit/qiskit#10611. This PR has no additional commits. It solely copies over the other repositories into this one. ``` # Runtime files docs/faqs/max_execution_time.rst docs/faqs/open_source_vs_ibm_cloud_primitives.rst ``` ``` # Qiskit files # start/ docs/migration_guides/algorithms_migration.rst docs/migration_guides/opflow_migration.rst docs/migration_guides/qi_migration.rst # build/ docs/tutorials/circuits/01_circuit_basics.ipynb docs/tutorials/circuits/1_getting_started_with_qiskit.ipynb docs/tutorials/circuits/2_plotting_data_in_qiskit.ipynb docs/tutorials/circuits_advanced/01_advanced_circuits.ipynb docs/tutorials/circuits_advanced/02_operators_overview.ipynb docs/tutorials/circuits_advanced/05_pulse_gates.ipynb docs/tutorials/circuits_advanced/06_building_pulse_schedules.ipynb docs/tutorials/circuits_advanced/07_pulse_scheduler.ipynb docs/explanation/endianness.rst # transpile/ docs/tutorials/circuits_advanced/04_transpiler_passes_and_passmanager.ipynb # test/ docs/how_to/use_estimator.rst docs/how_to/use_sampler.rst # run/ docs/tutorials/circuits_advanced/08_gathering_system_information.ipynb # other/ docs/faq.rst # Tutorial renames from the original qiskit-tutorials repo docs/tutorials/terra/fundamentals/1_getting_started_with_qiskit.ipynb docs/tutorials/terra/fundamentals/2_plotting_data_in_qiskit.ipynb docs/tutorials/terra/fundamentals/3_summary_of_quantum_operations.ipynb docs/tutorials/terra/advanced/1_advanced_circuits.ipynb docs/tutorials/terra/advanced/2_operators_overview.ipynb docs/tutorials/terra/advanced/3_advanced_circuit_visualization.ipynb docs/tutorials/terra/advanced/4_transpiler_passes_and_passmanager.ipynb docs/tutorials/circuits_advanced/1_advanced_circuits.ipynb docs/tutorials/circuits_advanced/2_operators_overview.ipynb docs/tutorials/circuits_advanced/3_advanced_circuit_visualization.ipynb docs/tutorials/circuits_advanced/4_transpiler_passes_and_passmanager.ipynb ``` Migration script: ```python import subprocess from tempfile import TemporaryDirectory from pathlib import Path QISKIT_ROOT = Path("../qiskit") RUNTIME_ROOT = Path("../qiskit-ibm-runtime") DOCS_ROOT = Path("./").resolve() # Expects script author to have this folder created. MIGRATION_FOLDER = DOCS_ROOT / "migrate-open-source" MAILMAP = MIGRATION_FOLDER / "mailmap.txt" def main() -> None: with TemporaryDirectory() as tmpdir: qiskit_dir = clone_repo(tmpdir, repo_name="qiskit") git_filter_repo( qiskit_dir, "qiskit-files.txt", "qiskit-messages.txt", dest_folder="qiskit-docs", ) merge_repo(qiskit_dir, remote_name="qiskit") runtime_dir = clone_repo(tmpdir, repo_name="qiskit-ibm-runtime") git_filter_repo( runtime_dir, "runtime-files.txt", "runtime-messages.txt", dest_folder="runtime-docs", ) merge_repo(runtime_dir, remote_name="runtime") def clone_repo(tmpdir: str, repo_name: str) -> Path: subprocess.run( [ "git", "clone", "--no-tags", "--single-branch", f"https://github.com/Qiskit/{repo_name}.git", ], check=True, cwd=tmpdir, ) return Path(tmpdir, repo_name) def git_filter_repo( repo_path: str, files_txt_name: str, msg_txt_file: str, dest_folder: str ) -> None: subprocess.run( [ "python3", MIGRATION_FOLDER / "git-filter-repo", "--paths-from-file", MIGRATION_FOLDER / files_txt_name, "--replace-message", MIGRATION_FOLDER / msg_txt_file, "--mailmap", MAILMAP, "--path-rename", f"docs/:{dest_folder}/", ], check=True, cwd=repo_path, ) def merge_repo(repo_path: str, remote_name: str) -> None: subprocess.run(["git", "remote", "add", remote_name, repo_path], check=True) subprocess.run(["git", "fetch", remote_name]) subprocess.run( ["git", "merge", "--allow-unrelated-histories", f"{remote_name}/main"] ) subprocess.run(["git", "remote", "remove", remote_name]) main() ``` --------- Co-authored-by: Paul Kassebaum <[email protected]> Co-authored-by: Soolu Thomas <[email protected]> Co-authored-by: Laura Zdanski <[email protected]> Co-authored-by: Jay M. Gambetta <[email protected]> Co-authored-by: Diego M. Rodríguez <[email protected]> Co-authored-by: Paul Nation <[email protected]> Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: 3yakuya <[email protected]> Co-authored-by: Sristy Sangskriti <[email protected]> Co-authored-by: Vismai Khanderao <[email protected]> Co-authored-by: Wei Hu <[email protected]> Co-authored-by: gunchamalik <[email protected]> Co-authored-by: zodiacfireworks <[email protected]> Co-authored-by: Emixem <[email protected]> Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: wagnersj <[email protected]> Co-authored-by: Bruno E. Ramírez Galindo <[email protected]> Co-authored-by: Peter J <[email protected]> Co-authored-by: Kevin Krsulich <[email protected]> Co-authored-by: Lauren Capelluto <[email protected]> Co-authored-by: Luciano Bello <[email protected]> Co-authored-by: Thomas Alexander <[email protected]> Co-authored-by: Divyanshu Singh <[email protected]> Co-authored-by: Takashi Imamichi <[email protected]> Co-authored-by: jaleipekoglu <[email protected]> Co-authored-by: SooluThomas <[email protected]> Co-authored-by: Manoel Marques <[email protected]> Co-authored-by: Eli Arbel <[email protected]> Co-authored-by: Parmeet Singh <[email protected]> Co-authored-by: Aurélien Pupier <[email protected]> Co-authored-by: Ali Javadi-Abhari <[email protected]> Co-authored-by: Kevin Krsulich <[email protected]> Co-authored-by: Naoki Kanazawa <[email protected]> Co-authored-by: Claudia Zendejas-Morales <[email protected]> Co-authored-by: Glen <[email protected]> Co-authored-by: Edwin Navarro <[email protected]> Co-authored-by: Junye Huang <[email protected]> Co-authored-by: Rathish Cholarajan <[email protected]> Co-authored-by: Kazuki Tsuoka <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: InfamousPlatypus <[email protected]> Co-authored-by: Luciano Bello <[email protected]> Co-authored-by: Filippo Tramonto <[email protected]> Co-authored-by: Kazuki Tsuoka <[email protected]> Co-authored-by: Kevin Hartman <[email protected]> Co-authored-by: Frank Harkins <[email protected]> Co-authored-by: Rebecca Dimock <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]> Co-authored-by: Steve Wood <[email protected]> Co-authored-by: Declan Millar <[email protected]> Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: Guillermo-Mijares-Vilarino <[email protected]> Co-authored-by: Kevin Tian <[email protected]> Co-authored-by: Emil Magni <[email protected]> Co-authored-by: Will Shanks <[email protected]> Co-authored-by: Jim Garrison <[email protected]> Co-authored-by: Abby Mitchell <[email protected]> Co-authored-by: Frank Harkins <[email protected]> Co-authored-by: Jessie Yu <[email protected]> Co-authored-by: Ikko Eltociear Ashimine <[email protected]> Co-authored-by: Mehmet Keçeci <[email protected]> Co-authored-by: Kuba Pilch <[email protected]> Co-authored-by: Soon Teh <[email protected]> Co-authored-by: Jake Lishman <[email protected]> Co-authored-by: Shilpa Mahato <[email protected]> Co-authored-by: Elbert <[email protected]> Co-authored-by: Bochen "Daniel" Tan <[email protected]> Co-authored-by: Kevin Tian <[email protected]> Co-authored-by: Alexander Ivrii <[email protected]> Co-authored-by: rht <[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.
First part of Qiskit#22 and Qiskit#23. This copies over the open source files we plan to use in this repository. They are not actually used yet and still require some work like converting RST to MDX, but it gets the files and their Git history here to start the process. Qiskit docs are placed in the folder `qiskit-docs/` and Runtime docs in `runtime-docs`. These are only for unprocessed docs. Once a document is ready, we will move it to the official `docs/` folder and have it go live. This uses `git-filter-repo` to preserve all the Git history and author attribution from the respective open source repositories. It uses the below Python script and this [zipped folder](https://github.com/Qiskit/documentation/files/12835669/migrate-open-source.zip), using an approach very similar to @jakelishman's original work in Qiskit/qiskit#10611. This PR has no additional commits. It solely copies over the other repositories into this one. ``` # Runtime files docs/faqs/max_execution_time.rst docs/faqs/open_source_vs_ibm_cloud_primitives.rst ``` ``` # Qiskit files # start/ docs/migration_guides/algorithms_migration.rst docs/migration_guides/opflow_migration.rst docs/migration_guides/qi_migration.rst # build/ docs/tutorials/circuits/01_circuit_basics.ipynb docs/tutorials/circuits/1_getting_started_with_qiskit.ipynb docs/tutorials/circuits/2_plotting_data_in_qiskit.ipynb docs/tutorials/circuits_advanced/01_advanced_circuits.ipynb docs/tutorials/circuits_advanced/02_operators_overview.ipynb docs/tutorials/circuits_advanced/05_pulse_gates.ipynb docs/tutorials/circuits_advanced/06_building_pulse_schedules.ipynb docs/tutorials/circuits_advanced/07_pulse_scheduler.ipynb docs/explanation/endianness.rst # transpile/ docs/tutorials/circuits_advanced/04_transpiler_passes_and_passmanager.ipynb # test/ docs/how_to/use_estimator.rst docs/how_to/use_sampler.rst # run/ docs/tutorials/circuits_advanced/08_gathering_system_information.ipynb # other/ docs/faq.rst # Tutorial renames from the original qiskit-tutorials repo docs/tutorials/terra/fundamentals/1_getting_started_with_qiskit.ipynb docs/tutorials/terra/fundamentals/2_plotting_data_in_qiskit.ipynb docs/tutorials/terra/fundamentals/3_summary_of_quantum_operations.ipynb docs/tutorials/terra/advanced/1_advanced_circuits.ipynb docs/tutorials/terra/advanced/2_operators_overview.ipynb docs/tutorials/terra/advanced/3_advanced_circuit_visualization.ipynb docs/tutorials/terra/advanced/4_transpiler_passes_and_passmanager.ipynb docs/tutorials/circuits_advanced/1_advanced_circuits.ipynb docs/tutorials/circuits_advanced/2_operators_overview.ipynb docs/tutorials/circuits_advanced/3_advanced_circuit_visualization.ipynb docs/tutorials/circuits_advanced/4_transpiler_passes_and_passmanager.ipynb ``` Migration script: ```python import subprocess from tempfile import TemporaryDirectory from pathlib import Path QISKIT_ROOT = Path("../qiskit") RUNTIME_ROOT = Path("../qiskit-ibm-runtime") DOCS_ROOT = Path("./").resolve() # Expects script author to have this folder created. MIGRATION_FOLDER = DOCS_ROOT / "migrate-open-source" MAILMAP = MIGRATION_FOLDER / "mailmap.txt" def main() -> None: with TemporaryDirectory() as tmpdir: qiskit_dir = clone_repo(tmpdir, repo_name="qiskit") git_filter_repo( qiskit_dir, "qiskit-files.txt", "qiskit-messages.txt", dest_folder="qiskit-docs", ) merge_repo(qiskit_dir, remote_name="qiskit") runtime_dir = clone_repo(tmpdir, repo_name="qiskit-ibm-runtime") git_filter_repo( runtime_dir, "runtime-files.txt", "runtime-messages.txt", dest_folder="runtime-docs", ) merge_repo(runtime_dir, remote_name="runtime") def clone_repo(tmpdir: str, repo_name: str) -> Path: subprocess.run( [ "git", "clone", "--no-tags", "--single-branch", f"https://github.com/Qiskit/{repo_name}.git", ], check=True, cwd=tmpdir, ) return Path(tmpdir, repo_name) def git_filter_repo( repo_path: str, files_txt_name: str, msg_txt_file: str, dest_folder: str ) -> None: subprocess.run( [ "python3", MIGRATION_FOLDER / "git-filter-repo", "--paths-from-file", MIGRATION_FOLDER / files_txt_name, "--replace-message", MIGRATION_FOLDER / msg_txt_file, "--mailmap", MAILMAP, "--path-rename", f"docs/:{dest_folder}/", ], check=True, cwd=repo_path, ) def merge_repo(repo_path: str, remote_name: str) -> None: subprocess.run(["git", "remote", "add", remote_name, repo_path], check=True) subprocess.run(["git", "fetch", remote_name]) subprocess.run( ["git", "merge", "--allow-unrelated-histories", f"{remote_name}/main"] ) subprocess.run(["git", "remote", "remove", remote_name]) main() ``` --------- Co-authored-by: Paul Kassebaum <[email protected]> Co-authored-by: Soolu Thomas <[email protected]> Co-authored-by: Laura Zdanski <[email protected]> Co-authored-by: Jay M. Gambetta <[email protected]> Co-authored-by: Diego M. Rodríguez <[email protected]> Co-authored-by: Paul Nation <[email protected]> Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: 3yakuya <[email protected]> Co-authored-by: Sristy Sangskriti <[email protected]> Co-authored-by: Vismai Khanderao <[email protected]> Co-authored-by: Wei Hu <[email protected]> Co-authored-by: gunchamalik <[email protected]> Co-authored-by: zodiacfireworks <[email protected]> Co-authored-by: Emixem <[email protected]> Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: wagnersj <[email protected]> Co-authored-by: Bruno E. Ramírez Galindo <[email protected]> Co-authored-by: Peter J <[email protected]> Co-authored-by: Kevin Krsulich <[email protected]> Co-authored-by: Lauren Capelluto <[email protected]> Co-authored-by: Luciano Bello <[email protected]> Co-authored-by: Thomas Alexander <[email protected]> Co-authored-by: Divyanshu Singh <[email protected]> Co-authored-by: Takashi Imamichi <[email protected]> Co-authored-by: jaleipekoglu <[email protected]> Co-authored-by: SooluThomas <[email protected]> Co-authored-by: Manoel Marques <[email protected]> Co-authored-by: Eli Arbel <[email protected]> Co-authored-by: Parmeet Singh <[email protected]> Co-authored-by: Aurélien Pupier <[email protected]> Co-authored-by: Ali Javadi-Abhari <[email protected]> Co-authored-by: Kevin Krsulich <[email protected]> Co-authored-by: Naoki Kanazawa <[email protected]> Co-authored-by: Claudia Zendejas-Morales <[email protected]> Co-authored-by: Glen <[email protected]> Co-authored-by: Edwin Navarro <[email protected]> Co-authored-by: Junye Huang <[email protected]> Co-authored-by: Rathish Cholarajan <[email protected]> Co-authored-by: Kazuki Tsuoka <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: InfamousPlatypus <[email protected]> Co-authored-by: Luciano Bello <[email protected]> Co-authored-by: Filippo Tramonto <[email protected]> Co-authored-by: Kazuki Tsuoka <[email protected]> Co-authored-by: Kevin Hartman <[email protected]> Co-authored-by: Frank Harkins <[email protected]> Co-authored-by: Rebecca Dimock <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]> Co-authored-by: Steve Wood <[email protected]> Co-authored-by: Declan Millar <[email protected]> Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: Guillermo-Mijares-Vilarino <[email protected]> Co-authored-by: Kevin Tian <[email protected]> Co-authored-by: Emil Magni <[email protected]> Co-authored-by: Will Shanks <[email protected]> Co-authored-by: Jim Garrison <[email protected]> Co-authored-by: Abby Mitchell <[email protected]> Co-authored-by: Frank Harkins <[email protected]> Co-authored-by: Jessie Yu <[email protected]> Co-authored-by: Ikko Eltociear Ashimine <[email protected]> Co-authored-by: Mehmet Keçeci <[email protected]> Co-authored-by: Kuba Pilch <[email protected]> Co-authored-by: Soon Teh <[email protected]> Co-authored-by: Jake Lishman <[email protected]> Co-authored-by: Shilpa Mahato <[email protected]> Co-authored-by: Elbert <[email protected]> Co-authored-by: Bochen "Daniel" Tan <[email protected]> Co-authored-by: Kevin Tian <[email protected]> Co-authored-by: Alexander Ivrii <[email protected]> Co-authored-by: rht <[email protected]>
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 todocs/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 todocs/legacy_release_notes.rst
, given a small introductory header, and made an orphan linked only from a newdocs/release_notes.rst
that usesreno
.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 todocs/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 ec5c9ca, there is a commit 66a5d9f that fixes the ASV build for use in Terra, which is the rollup of the post-merge commits of #10546, which this PR supersedes.
Details and comments
This should probably be merged ASAP before
main
moves on.Resolutions on the metapackage:
qiskit/qiskit-metapackage
toqiskit/qiskit-terra
qiskit-metapackage#1722After this has merged, #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
, with the scripts and configuration files contained within metapackage_migration.zip. If you extract that zip, you need to activate a Python 3.11venv
then runmetapackage_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.