From 8fbe90868b9f92180d0eea13b5707cb45bc6184f Mon Sep 17 00:00:00 2001 From: Soolu Thomas Date: Wed, 30 Aug 2023 08:42:53 -0400 Subject: [PATCH 1/4] Change `master` -> `main` for qiskit-translations repo (#294) --- tools/deploy_translatable_strings.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/deploy_translatable_strings.sh b/tools/deploy_translatable_strings.sh index 2f462f5..e08d713 100755 --- a/tools/deploy_translatable_strings.sh +++ b/tools/deploy_translatable_strings.sh @@ -20,7 +20,7 @@ SOURCE_DIR=`pwd` SOURCE_LANG='en' TARGET_REPOSITORY="git@github.com:qiskit-community/qiskit-translations.git" -TARGET_BRANCH_PO="master" +TARGET_BRANCH_PO="main" DOC_DIR_PO="docs/locale/" From 14e7cc0ea7c37f4038ac873c3df25a079ee3f3c2 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 31 Aug 2023 17:18:55 -0400 Subject: [PATCH 2/4] Rotate poBranch deploy key (#298) This commit rotates the poBranch deploy key used for pushing translation files to the qiskit-translations repository. The old key being used was no longer valid so it needs to be updated to the new one. --- tools/github_poBranch_update_key.enc | Bin 3408 -> 416 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tools/github_poBranch_update_key.enc b/tools/github_poBranch_update_key.enc index dcdfb55197c4ed4c70716f4027e698386af6683c..cbffab9d408971216d3ce5825ef3583cee9c0dfa 100644 GIT binary patch delta 345 zcmV-f0jB=Y8lVG^P=D>7Von_zg<_mS7SBatMqHTz4Pm$0On9>-6BPZ;R6}(gaNbkGFx2X0lix r?s5qOB{YKVdR3Hr4(aDNS?4#r$Q@^pEQZ@VR`7r50f+o%f@d^}y(R=j`5r~41 zKio0|4`L8ukl**QDJbi^n6t-!U1VJcRt0jm>I$cVII5(&N5`{fIn>j{$T$t`dqFmi z*L1AbI1iqnxqOr+|HyJwI<9isO8f1B#mK&|J7|qIcfHm@$A3{ML{-@Zwian&XiOGT z{}wu~X^eUW&95Lc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&S0D)riSn6zf*-~1fC6O3h-hsgB*D<6e=k~IzppEo zO>$NQc)6pjk=ZQ{(S(T=z4#1z(g`c?$@_;OJu4^htNvwZxo3YSeHD$gu&XIMNkk>X zHwxG3n}1&uA*_Ok}>O0|R0cIzG2tGuC zUhtfR~%xAJAndKHyuUkx^tbV62`n819vM zc7^v%_tNrJu&EdwQ4G+HSH|*@pD^p4ckIz0x_|loG_>DiWezG9HQvItVk3D(-WSex zw%mqNlPgWU8idc{Op#jM8T z>bC|LjH=FVIFZDAq;F+uKQ?931s_0SG|YHz8*+5&7$vGG>q4dLNX?{;C88AiDpF>4 zu759%&gOk&H|Gl&%(->b>)N9b5;%H-hwA|-jq=ZSEB2LP2evHzsdn4|^iM2*{o#~I<vGOZT*A@VGz#q+iE9{fGIxq*C=>0B9apm?ovB`<#?DO*G;os9Dnv8 zGGyo)BKolqhW_v4JiFS1KU3`DtQU#gUE(Ym#dw3ltHIJ#?f(MdVGgh@D34rnQynq9 zhU%>x?Zy25%k^{;+vul2LlsidM*E86oYKN9z|D~v{CLjS|k+J@-=&Y6gg)R=YYD8f3cuYDQ zb5n+@<7d@VUDcWT)(`kVUw_8A8dlb3MZ`(dn#<3GH^~AV_i|-l^oK8ZE3K_iz5-4@tFSAHh7 z(%+gvbC({=tE4x&??Z3_hMt<9tvQpG#Wpw>ca@;(aJxVgG;sjuMbnKZBjSr{ From f07a02430006061a144e028e369a4d5cdc72d696 Mon Sep 17 00:00:00 2001 From: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> Date: Thu, 31 Aug 2023 22:31:05 -0400 Subject: [PATCH 3/4] Switch from qiskit-terra to qiskit (#297) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../install-main-dependencies/action.yml | 34 ++++++------ .github/workflows/deploy-docs.yml | 4 +- .github/workflows/main.yml | 6 +-- CONTRIBUTING.md | 54 ++++--------------- requirements.txt | 2 +- tox.ini | 2 +- 6 files changed, 33 insertions(+), 69 deletions(-) diff --git a/.github/actions/install-main-dependencies/action.yml b/.github/actions/install-main-dependencies/action.yml index c826329..60b17e5 100644 --- a/.github/actions/install-main-dependencies/action.yml +++ b/.github/actions/install-main-dependencies/action.yml @@ -19,25 +19,25 @@ inputs: python-version: description: 'Python version' required: true - terra-main: - description: 'Use Terra main' + qiskit-main: + description: 'Use Qiskit main' required: true runs: using: "composite" steps: - name: Get main last commit ids run: | - echo "TERRA_HASH=$(git ls-remote --heads https://github.com/Qiskit/qiskit-terra.git refs/heads/main | awk '{print $1}')" >> $GITHUB_ENV + echo "QISKIT_HASH=$(git ls-remote --heads https://github.com/Qiskit/qiskit.git refs/heads/main | awk '{print $1}')" >> $GITHUB_ENV echo "OPTIMIZATION_HASH=$(git ls-remote --heads https://github.com/Qiskit/qiskit-optimization.git refs/heads/main | awk '{print $1}')" >> $GITHUB_ENV shell: bash - - name: Terra Cache + - name: Qiskit Cache env: CACHE_VERSION: v1 - id: terra-cache + id: qiskit-cache uses: actions/cache@v3 with: - path: terra-cache - key: terra-cache-${{ inputs.os }}-${{ inputs.python-version }}-${{ env.TERRA_HASH }}-${{ env.CACHE_VERSION }} + path: qiskit-cache + key: qiskit-cache-${{ inputs.os }}-${{ inputs.python-version }}-${{ env.QISKIT_HASH }}-${{ env.CACHE_VERSION }} - name: Optimization Cache env: CACHE_VERSION: v1 @@ -46,19 +46,19 @@ runs: with: path: optimization-cache key: optimization-cache-${{ inputs.os }}-${{ inputs.python-version }}-${{ env.OPTIMIZATION_HASH }}-${{ env.CACHE_VERSION }} - - name: Install Terra from Main + - name: Install Qiskit from Main env: MACOSX_DEPLOYMENT_TARGET: 10.15 run: | - if [ "${{ inputs.terra-main }}" == "true" ]; then - echo 'Install Terra from Main' + if [ "${{ inputs.qiskit-main }}" == "true" ]; then + echo 'Install Qiskit from Main' if [ "${{ inputs.os }}" == "windows-2019" ]; then source "$CONDA/etc/profile.d/conda.sh" conda activate scsenv fi - BASE_DIR=terra-cache + BASE_DIR=qiskit-cache build_from_main=true - cache_hit=${{ steps.terra-cache.outputs.cache-hit }} + cache_hit=${{ steps.qiskit-cache.outputs.cache-hit }} echo "cache hit: ${cache_hit}" if [ "$cache_hit" == "true" ]; then pip_result=0 @@ -74,23 +74,23 @@ runs: if [ "$build_from_main" == "true" ]; then echo 'Create wheel file from main' pip install -U wheel setuptools_rust - git clone --depth 1 --branch main https://github.com/Qiskit/qiskit-terra.git /tmp/qiskit-terra - pushd /tmp/qiskit-terra + git clone --depth 1 --branch main https://github.com/Qiskit/qiskit.git /tmp/qiskit + pushd /tmp/qiskit python setup.py bdist_wheel popd - cp -rf /tmp/qiskit-terra/dist/*.whl "${BASE_DIR}" + cp -rf /tmp/qiskit/dist/*.whl "${BASE_DIR}" pushd "${BASE_DIR}" python -m pip install *.whl popd pip uninstall -y setuptools_rust fi else - echo 'Install Terra from Stable' + echo 'Install Qiskit from Stable' if [ "${{ inputs.os }}" == "windows-2019" ]; then source "$CONDA/etc/profile.d/conda.sh" conda activate scsenv fi - pip install -U qiskit-terra + pip install -U qiskit fi shell: bash - name: Install stable Aer diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index fef5504..85b2553 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -38,7 +38,7 @@ jobs: os: ${{ matrix.os }} - name: Install Dependencies run: | - pip install jupyter qiskit-terra[visualization] + pip install jupyter qiskit[visualization] sudo apt-get install -y pandoc graphviz shell: bash - name: Build and publish @@ -69,7 +69,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install jupyter qiskit-terra[visualization] torchvision tox + pip install jupyter qiskit[visualization] torchvision tox sudo apt-get install -y pandoc graphviz shell: bash - name: Build and publish diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8d83a38..00a584a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,14 +60,14 @@ jobs: with: os: ${{ matrix.os }} python-version: ${{ matrix.python-version }} - terra-main: "false" + qiskit-main: "false" if: ${{ !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }} - uses: ./.github/actions/install-finance with: os: ${{ matrix.os }} - name: Install Dependencies run: | - pip install jupyter qiskit-terra[visualization] + pip install jupyter qiskit[visualization] sudo apt-get -y install pandoc graphviz sudo apt-get -y install python3-enchant sudo apt-get -y install hunspell-en-us @@ -230,7 +230,7 @@ jobs: os: ${{ matrix.os }} - name: Install Dependencies run: | - pip install jupyter qiskit-terra[visualization] + pip install jupyter qiskit[visualization] sudo apt-get install -y pandoc graphviz shell: bash - name: Run Finance Tutorials diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 911629f..1f759d7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -98,26 +98,7 @@ please ensure that: ### Changelog generation -The changelog is automatically generated as part of the release process -automation. This works through a combination of the git log and the pull -request. When a release is tagged and pushed to github the release automation -bot looks at all commit messages from the git log for the release. It takes the -PR numbers from the git log (assuming a squash merge) and checks if that PR had -a `Changelog:` label on it. If there is a label it will add the git commit -message summary line from the git log for the release to the changelog. - -If there are multiple `Changelog:` tags on a PR the git commit message summary -line from the git log will be used for each changelog category tagged. - -The current categories for each label are as follows: - -| PR Label | Changelog Category | -| -----------------------|--------------------| -| Changelog: Deprecation | Deprecated | -| Changelog: New Feature | Added | -| Changelog: API Change | Changed | -| Changelog: Removal | Removed | -| Changelog: Bugfix | Fixed | +A changelog is manually generated as part of the release process from the release notes. ### Release Notes @@ -201,8 +182,8 @@ deprecations: You can also look at other release notes for other examples. You can use any restructured text feature in them (code sections, tables, -enumerated lists, bulleted list, etc) to express what is being changed as -needed. In general you want the release notes to include as much detail as +enumerated lists, bulleted list, etc.) to express what is being changed as +needed. In general, you want the release notes to include as much detail as needed so that users will understand what has changed, why it changed, and how they'll have to update their code. @@ -245,10 +226,8 @@ Please see the [Installing Qiskit Finance from Source](https://github.com/qiskit-community/qiskit-finance#installatione) section of the Qiskit documentation. -Note: Finance depends on Terra, and has optional dependence on Aer and IBM Q Provider, so -these should be installed too. The main branch of Finance is kept working with those other element -main branches so these should be installed from source too following the instructions at -the same location +Note: Finance depends on Qiskit, and has an optional dependence, so +should be installed too. Finance also has some other optional dependents see [Finance optional installs](https://github.com/qiskit-community/qiskit-finance#optional-installs) for @@ -266,12 +245,12 @@ The test suite can be run from a command line or via your IDE. You can run `make run all unit tests. Another way to run the test suite is to use [**tox**](https://tox.readthedocs.io/en/latest/#). For more information about using tox please refer to -[Terra CONTRIBUTING](https://github.com/Qiskit/qiskit-terra/blob/main/CONTRIBUTING.md#test) +[Qiskit CONTRIBUTING](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md#test) Test section. However please note Finance does not have any -[online tests](https://github.com/Qiskit/qiskit-terra/blob/main/CONTRIBUTING.md#online-tests) +[online tests](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md#online-tests) nor does it have [test skip - options](https://github.com/Qiskit/qiskit-terra/blob/main/CONTRIBUTING.md#test-skip-options). + options](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md#test-skip-options). ### Development Cycle @@ -294,24 +273,9 @@ stable and the only changes merged to it are bugfixes. ### Release Cycle -From time to time, we will release brand new versions of Qiskit Finance. These +From time to time, we will release brand-new versions of Qiskit Finance. These are well-tested versions of the software. -When the time for a new release has come, we will: - -1. Create a new tag with the version number and push it to github -2. Change the `main` version to the next release version. - -The release automation processes will be triggered by the new tag and perform -the following steps: - -1. Create a stable branch for the new minor version from the release tag - on the `main` branch -2. Build and upload binary wheels to pypi -3. Create a github release page with a generated changelog -4. Generate a PR on the meta-repository to bump the terra version and - meta-package version. - The `stable/*` branches should only receive changes in the form of bug fixes. diff --git a/requirements.txt b/requirements.txt index 1839cc5..8761df5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -qiskit-terra>=0.20.0 +qiskit>=0.44 qiskit-optimization>=0.2.0 scipy>=1.4 numpy>=1.17 diff --git a/tox.ini b/tox.ini index d31dc45..4f61afa 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ setenv = LANGUAGE=en_US LC_ALL=en_US.utf-8 ARGS="-V" -deps = git+https://github.com/Qiskit/qiskit-terra.git +deps = git+https://github.com/Qiskit/qiskit.git git+https://github.com/Qiskit/qiskit-aer.git git+https://github.com/Qiskit/qiskit-optimization.git -r{toxinidir}/requirements.txt From ec584a19764cada731135e4f886fef833f0c84d7 Mon Sep 17 00:00:00 2001 From: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> Date: Mon, 4 Sep 2023 00:52:30 -0400 Subject: [PATCH 4/4] Update Getting Started page (#300) --- docs/getting_started.rst | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 5ca7e0b..620d2e7 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -7,9 +7,9 @@ Getting started Installation ============ -Qiskit Finance depends on the main Qiskit package which has its own +Qiskit Finance depends on Qiskit, which has its own `Qiskit Getting Started `__ detailing the -installation options for Qiskit and its supported environments/platforms. You should refer to +installation options and its supported environments/platforms. You should refer to that first. Then the information here can be followed which focuses on the additional installation specific to Qiskit Finance. @@ -17,24 +17,20 @@ specific to Qiskit Finance. .. tab-item:: Start locally - The simplest way to get started is to follow the `getting started 'Start locally' guide for + The simplest way to get started is to first follow the `getting started 'Start locally' guide for Qiskit `__ - In your virtual environment where you installed Qiskit simply add ``finance`` to the - extra list in a similar manner to how the extra ``visualization`` support is installed for - Qiskit, i.e: + In your virtual environment, where you installed Qiskit, install Qiskit Finance as follows: .. code:: sh - pip install qiskit[finance] + pip install qiskit-finance - It is worth pointing out that if you're a zsh user (which is the default shell on newer - versions of macOS), you'll need to put ``qiskit[finance]`` in quotes: - - .. code:: sh - - pip install 'qiskit[finance]' + .. note:: + As Qiskit Finance depends on Qiskit, you can though simply install it into your + environment, as above, and pip will automatically install a compatible version of Qiskit + if one is not already installed. .. tab-item:: Install from source