From 51e7096ccd44fbb8bd05c5d814ae8ff964b555db Mon Sep 17 00:00:00 2001 From: Jim Garrison Date: Tue, 10 Sep 2024 10:20:10 -0400 Subject: [PATCH] Rename package to qiskit-addon-cutting (#678) * Rename package to qiskit-addon-cutting This is a follow-up to #661, which contained only the necessary source code changes. * Update the Docker registry, don't specify a particular python version * Update description --- .github/workflows/docs.yml | 4 +- CITATION.bib | 8 +- CONTRIBUTING.md | 5 +- Dockerfile | 8 +- INSTALL.rst | 34 ++++---- README.md | 40 ++++----- SECURITY.md | 7 +- compose.yaml | 10 +-- docs/apidocs/index.rst | 6 +- docs/conf.py | 86 ++++++++++++++++--- .../explanation/index.rst | 26 +++--- docs/{circuit_cutting => }/how-tos/README.rst | 4 +- ...erate_exact_quasi_dists_from_sampler.ipynb | 0 ...generate_exact_sampling_coefficients.ipynb | 0 .../how-tos/how_to_specify_cut_wires.ipynb | 0 docs/{circuit_cutting => }/how-tos/index.rst | 0 docs/index.rst | 49 +++++------ ...gate_cutting_to_reduce_circuit_width.ipynb | 0 ...gate_cutting_to_reduce_circuit_depth.ipynb | 0 ...03_wire_cutting_via_move_instruction.ipynb | 0 .../tutorials/04_automatic_cut_finding.ipynb | 2 +- .../tutorials/README.rst | 4 +- .../{circuit_cutting => }/tutorials/index.rst | 0 pyproject.toml | 8 +- .../cut_finding/circuit_interface.py | 2 +- .../cut_finding/cutting_actions.py | 2 +- qiskit_addon_cutting/cutting_experiments.py | 4 +- qiskit_addon_cutting/instructions/move.py | 2 +- .../utils/observable_grouping.py | 2 +- .../0.7/prepare-0.7.0-48b344ae77523c34.yaml | 2 +- test/conftest.py | 2 +- test/test_cutting_roundtrip.py | 2 +- test/test_find_cuts.py | 2 +- test/utils/test_transpiler_passes.py | 2 +- 34 files changed, 186 insertions(+), 137 deletions(-) rename docs/{circuit_cutting => }/explanation/index.rst (91%) rename docs/{circuit_cutting => }/how-tos/README.rst (91%) rename docs/{circuit_cutting => }/how-tos/how_to_generate_exact_quasi_dists_from_sampler.ipynb (100%) rename docs/{circuit_cutting => }/how-tos/how_to_generate_exact_sampling_coefficients.ipynb (100%) rename docs/{circuit_cutting => }/how-tos/how_to_specify_cut_wires.ipynb (100%) rename docs/{circuit_cutting => }/how-tos/index.rst (100%) rename docs/{circuit_cutting => }/tutorials/01_gate_cutting_to_reduce_circuit_width.ipynb (100%) rename docs/{circuit_cutting => }/tutorials/02_gate_cutting_to_reduce_circuit_depth.ipynb (100%) rename docs/{circuit_cutting => }/tutorials/03_wire_cutting_via_move_instruction.ipynb (100%) rename docs/{circuit_cutting => }/tutorials/04_automatic_cut_finding.ipynb (99%) rename docs/{circuit_cutting => }/tutorials/README.rst (90%) rename docs/{circuit_cutting => }/tutorials/index.rst (100%) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e181deadf..b9e124a26 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -44,12 +44,12 @@ jobs: shell: bash run: | mkdir artifact - cp -a docs/_build/html artifact/ckt_html_docs + cp -a docs/_build/html artifact/qiskit-addon-cutting-htmldocs - name: Upload docs artifact if: always() uses: actions/upload-artifact@v4 with: - name: ckt_html_docs + name: qiskit-addon-cutting-htmldocs path: ./artifact - name: Deploy docs if: ${{ github.ref == 'refs/heads/stable/0.7' }} diff --git a/CITATION.bib b/CITATION.bib index 7f90b42a3..06b82f1f5 100644 --- a/CITATION.bib +++ b/CITATION.bib @@ -1,4 +1,4 @@ -@misc{circuit-knitting-toolbox, +@misc{qiskit-addon-cutting, author = { Agata M. Bra\'{n}czyk and Almudena {Carrera Vazquez} @@ -15,8 +15,8 @@ @misc{circuit-knitting-toolbox and Ibrahim Shehzad and Stefan Woerner }, - title = {{Circuit Knitting Toolbox}}, - howpublished = {\url{https://github.com/Qiskit-Extensions/circuit-knitting-toolbox}}, - year = {2023}, + title = {{Qiskit addon: circuit cutting}}, + howpublished = {\url{https://github.com/Qiskit/qiskit-addon-cutting}}, + year = {2024}, doi = {10.5281/zenodo.7987997} } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 19f3f18a3..8ce24fb67 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ # Developer guide -Development of the Circuit Knitting Toolbox takes place [on GitHub](https://github.com/Qiskit-Extensions/circuit-knitting-toolbox). The [Contributing to Qiskit](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md) guide may serve as a useful starting point, as the toolbox builds on [Qiskit] and is part of the [Qiskit Ecosystem]. +Development of the `qiskit-addon-cutting` package takes place [on GitHub](https://github.com/Qiskit/qiskit-addon-cutting). The [Contributing to Qiskit](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md) guide may serve as a useful starting point, as this package builds on [Qiskit]. -The toolbox is written in [Python] and uses [tox] as a testing framework. A description of the available `tox` test environments is located at [`test/README.md`](test/README.md). These environments are used in the CI workflows, which are described at [`.github/workflows/README.md`](.github/workflows/README.md). +This package is written in [Python] and uses [tox] as a testing framework. A description of the available `tox` test environments is located at [`test/README.md`](test/README.md). These environments are used in the CI workflows, which are described at [`.github/workflows/README.md`](.github/workflows/README.md). Project configuration, including information about dependencies, is stored in [`pyproject.toml`](pyproject.toml). @@ -11,7 +11,6 @@ We use [Sphinx] for documentation and [reno] for release notes. We use [Google We require 100% coverage in all new code. In rare cases where it is not possible to test a code block, we mark it with ``# pragma: no cover`` so that the ``coverage`` tests will pass. [Qiskit]: https://www.ibm.com/quantum/qiskit -[Qiskit Ecosystem]: https://qiskit.github.io/ecosystem/ [Python]: https://www.python.org/ [tox]: https://github.com/tox-dev/tox [Sphinx]: https://www.sphinx-doc.org/ diff --git a/Dockerfile b/Dockerfile index 8a607a1dd..55806e286 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM jupyter/minimal-notebook:python-3.11 +FROM quay.io/jupyter/minimal-notebook LABEL maintainer="Jim Garrison " @@ -7,7 +7,7 @@ LABEL maintainer="Jim Garrison " RUN rm -rf work && \ mkdir .src -COPY . .src/circuit-knitting-toolbox +COPY . .src/qiskit-addon-cutting # Fix the permissions of ~/.src and ~/persistent-volume USER root @@ -17,7 +17,7 @@ USER ${NB_UID} # Consolidate the docs into the home directory RUN mkdir docs && \ - cp -a .src/circuit-knitting-toolbox/docs docs/circuit-knitting-toolbox + cp -a .src/qiskit-addon-cutting/docs docs/qiskit-addon-cutting # Pip install everything -RUN pip install -e '.src/circuit-knitting-toolbox[notebook-dependencies]' +RUN pip install -e '.src/qiskit-addon-cutting[notebook-dependencies]' diff --git a/INSTALL.rst b/INSTALL.rst index 0d84681b5..60b613f46 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -1,7 +1,7 @@ Installation Instructions ========================= -Let's see how to install the Circuit Knitting Toolbox (CKT). The first +Let's see how to install the Qiskit addon for circuit cutting. The first thing to do is choose how you're going to run and install the packages. There are three primary ways to do this: @@ -17,7 +17,7 @@ Pre-Installation Users who wish to install locally (using either :ref:`Option 1` or :ref:`Option 2`) are encouraged to follow a brief set of common instructions to prepare a Python environment for -installation of CKT: +installation: First, create a minimal environment with only Python installed in it. We recommend using `Python virtual environments `__. @@ -41,15 +41,15 @@ Note: If you are using Windows, use the following commands in PowerShell: .. _Option 1: -Option 1: Pip Installation -^^^^^^^^^^^^^^^^^^^^^^^^^^ +Option 1: Install from PyPI +^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Upgrade pip and install the CKT package. +The most straightforward way to install the ``qiskit-addon-cutting`` package is via PyPI. .. code:: sh pip install --upgrade pip - pip install circuit-knitting-toolbox + pip install qiskit-addon-cutting .. _Option 2: @@ -57,22 +57,22 @@ Upgrade pip and install the CKT package. Option 2: Install from Source ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Users who wish to develop in the repository or run the tutorials locally may want to install from source. +Users who wish to develop in the repository or run the notebooks locally may want to install from source. -In either case, the first step is to clone the CKT repository. +In either case, the first step is to clone the ``qiskit-addon-cutting`` repository. .. code:: sh - git clone git@github.com:Qiskit-Extensions/circuit-knitting-toolbox.git + git clone git@github.com:Qiskit/qiskit-addon-cutting.git Next, upgrade pip and enter the repository. .. code:: sh pip install --upgrade pip - cd circuit-knitting-toolbox + cd qiskit-addon-cutting -The next step is to install CKT to the virtual environment. If you plan on running the tutorials, install the +The next step is to install to the virtual environment. If you plan on running the notebooks, install the notebook dependencies in order to run all the visualizations in the notebooks. If you plan on developing in the repository, you may want to install the ``dev`` dependencies. @@ -82,7 +82,7 @@ Adjust the options below to suit your needs. pip install tox notebook -e '.[notebook-dependencies,dev]' -If you installed the notebook dependencies, you can get started with CKT by running the notebooks in the docs. +If you installed the notebook dependencies, you can get started with the addon by running the notebooks in the docs. .. code:: @@ -95,15 +95,15 @@ If you installed the notebook dependencies, you can get started with CKT by runn Option 3: Use within Docker ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -We have provided a `Dockerfile `__, which can be used to +We have provided a `Dockerfile `__, which can be used to build a Docker image, as well as a -`compose.yaml `__ file, which allows one +`compose.yaml `__ file, which allows one to use the Docker image with just a few simple commands. .. code:: sh - git clone git@github.com:Qiskit-Extensions/circuit-knitting-toolbox.git - cd circuit-knitting-toolbox + git clone git@github.com:Qiskit/qiskit-addon-cutting.git + cd qiskit-addon-cutting docker compose build docker compose up @@ -148,4 +148,4 @@ Platform Support We expect this package to work on `any platform supported by Qiskit `__. If you are experiencing issues running the software on your device, you -may consider :ref:`using the toolbox within Docker