Skip to content

Commit

Permalink
Merge remote-tracking branch 'ibm/main' into fast-pauli-decomposition
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelishman committed Dec 13, 2023
2 parents 8a82510 + 7a41140 commit 87a8967
Show file tree
Hide file tree
Showing 820 changed files with 11,834 additions and 138,025 deletions.
6 changes: 4 additions & 2 deletions .azure/lint-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
-r requirements.txt \
-r requirements-dev.txt \
-e .
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
displayName: 'Install dependencies'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
Expand All @@ -35,7 +37,7 @@ jobs:
set -e
source test-job/bin/activate
echo "Running black, any errors reported can be fixed with 'tox -eblack'"
black --check qiskit test tools examples setup.py qiskit_pkg
black --check qiskit test tools examples setup.py
echo "Running rustfmt check, any errors reported can be fixed with 'cargo fmt'"
cargo fmt --check
displayName: "Formatting"
Expand All @@ -44,7 +46,7 @@ jobs:
set -e
source test-job/bin/activate
echo "Running ruff"
ruff qiskit test tools examples setup.py qiskit_pkg/setup.py
ruff qiskit test tools examples setup.py
echo "Running pylint"
pylint -rn qiskit test tools
echo "Running Cargo Clippy"
Expand Down
26 changes: 16 additions & 10 deletions .azure/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
QISKIT_TEST_CAPTURE_STREAMS: 1
HAVE_VISUAL_TESTS_RUN: false

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -70,15 +71,16 @@ jobs:
# Use stable Rust, rather than MSRV, to spot-check that stable builds properly.
rustup override set stable
source test-job/bin/activate
python -m pip install -U pip setuptools wheel
# Install setuptools-rust for building sdist
python -m pip install -U -c constraints.txt setuptools-rust
python setup.py sdist
python -m pip install -U pip
python -m pip install -U build
python -m build --sdist .
python -m pip install -U \
-c constraints.txt \
-r requirements.txt \
-r requirements-dev.txt \
dist/qiskit-terra*.tar.gz
dist/qiskit-*.tar.gz
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
displayName: "Install Terra from sdist"
- ${{ if eq(parameters.installFromSdist, false) }}:
Expand All @@ -90,6 +92,8 @@ jobs:
-r requirements.txt \
-r requirements-dev.txt \
-e .
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
displayName: "Install Terra directly"
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
Expand Down Expand Up @@ -197,7 +201,9 @@ jobs:
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- bash: image_tests/bin/python -m unittest discover -v test/visual
- bash: |
echo "##vso[task.setvariable variable=HAVE_VISUAL_TESTS_RUN;]true"
image_tests/bin/python -m unittest discover -v test/visual
displayName: 'Run image test'
env:
# Needed to suppress a warning in jupyter-core 5.x by eagerly migrating to
Expand All @@ -213,7 +219,7 @@ jobs:
archiveType: tar
archiveFile: '$(Build.ArtifactStagingDirectory)/visual_test_failures.tar.gz'
verbose: true
condition: failed()
condition: and(failed(), eq(variables.HAVE_VISUAL_TESTS_RUN, 'true'))

- task: ArchiveFiles@2
displayName: Archive circuit results
Expand All @@ -222,7 +228,7 @@ jobs:
archiveType: tar
archiveFile: '$(Build.ArtifactStagingDirectory)/circuit_results.tar.gz'
verbose: true
condition: failed()
condition: and(failed(), eq(variables.HAVE_VISUAL_TESTS_RUN, 'true'))

- task: ArchiveFiles@2
displayName: Archive graph results
Expand All @@ -231,7 +237,7 @@ jobs:
archiveType: tar
archiveFile: '$(Build.ArtifactStagingDirectory)/graph_results.tar.gz'
verbose: true
condition: failed()
condition: and(failed(), eq(variables.HAVE_VISUAL_TESTS_RUN, 'true'))

- task: PublishBuildArtifacts@1
displayName: 'Publish image test failure diffs'
Expand All @@ -240,4 +246,4 @@ jobs:
artifactName: 'image_test_failure_img_diffs'
Parallel: true
ParallelCount: 8
condition: failed()
condition: and(failed(), eq(variables.HAVE_VISUAL_TESTS_RUN, 'true'))
2 changes: 2 additions & 0 deletions .azure/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
-r requirements.txt \
-r requirements-dev.txt \
-e .
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
pip check
displayName: 'Install dependencies'
env:
Expand Down
2 changes: 2 additions & 0 deletions .azure/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
-r requirements.txt \
-r requirements-dev.txt \
-e .
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
pip check
displayName: 'Install dependencies'
env:
Expand Down
42 changes: 0 additions & 42 deletions .azure/tutorials-linux.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Non-API docs issues
url: https://github.com/Qiskit/documentation/issues/new/choose
about: Open an issue about documentation in the Start, Build, Transpile, Verify, Run, or Migration guides sections of docs.quantum.ibm.com (non-API documentation)
61 changes: 1 addition & 60 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ on:
description: "Push to qiskit.org?"
required: false
type: boolean
do_translatables:
description: "Push translatable strings?"
required: false
type: boolean

jobs:
build:
Expand Down Expand Up @@ -53,33 +49,8 @@ jobs:
- name: Install dependencies
run: tools/install_ubuntu_docs_dependencies.sh

# This is just to have tox create the environment, so we can use it to execute the tutorials.
# We want to re-use it later for the build, hence 'tox run --notest' instead of 'tox devenv'.
- name: Prepare Python environment
run: tox run -e docs --notest

# The reason to use the custom script rather than letting 'nbsphinx' do its thing normally
# within the Sphinx build is so that the execution process is the same as in the test CI.
- name: Execute tutorials in place
run: .tox/docs/bin/python tools/execute_tutorials.py docs/tutorials
env:
QISKIT_CELL_TIMEOUT: "300"

- name: Build documentation
# We can skip re-installing the package, since we just did it a couple of steps ago.
run: tox run -e docs --skip-pkg-install
env:
QISKIT_ENABLE_ANALYTICS: "true"
# We've already built them.
QISKIT_DOCS_BUILD_TUTORIALS: "never"
DOCS_PROD_BUILD: "true"

- name: Build translatable strings
run: tox run -e gettext
env:
# We've already built them.
QISKIT_DOCS_BUILD_TUTORIALS: "never"
DOCS_PROD_BUILD: "true"
run: tox run -e docs

- name: Store built documentation artifact
uses: actions/upload-artifact@v3
Expand All @@ -91,13 +62,6 @@ jobs:
!**/.buildinfo
if-no-files-found: error

- name: Store translatable strings artifact
uses: actions/upload-artifact@v3
with:
name: qiskit-translatables
path: ./docs/locale/en/*
if-no-files-found: error

deploy:
if: github.event_name != 'workflow_dispatch' || inputs.do_deployment
name: Deploy to qiskit.org
Expand Down Expand Up @@ -198,26 +162,3 @@ jobs:
JOINED_PREFIXES: ${{ steps.choose.outputs.joined_prefixes }}
RCLONE_KEY: ${{ secrets.ENCRYPTED_RCLONE_KEY}}
RCLONE_IV: ${{ secrets.ENCRYPTED_RCLONE_IV }}

deploy_translatables:
if: (github.event_name == 'workflow_dispatch' && inputs.do_translatables) || (github.event_name == 'push' && github.ref_type == 'tag' && github.ref_name == needs.build.outputs.latest_tag)
name: Push translatable strings
needs: [build]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
path: 'qiskit'

- uses: actions/download-artifact@v3
with:
name: qiskit-translatables
path: 'deploy'

- name: Deploy translations
id: ssh_key
run: qiskit/tools/deploy_translatable_strings.sh "${{ github.workspace }}/deploy"
env:
encrypted_deploy_po_branch_key: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_KEY }}
encrypted_deploy_po_branch_iv: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_IV }}
4 changes: 3 additions & 1 deletion .github/workflows/neko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ jobs:
- uses: Qiskit/qiskit-neko@main
with:
test_selection: terra
repo_install_command: "pip install -c constraints.txt ."
# We have to forcibly uninstall any old version of qiskit or qiskit-terra during the
# changeover, because it's not possible to safely upgrade an existing installation to 1.0.
repo_install_command: "pip uninstall qiskit qiskit-terra && pip install -c constraints.txt ."
42 changes: 7 additions & 35 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
Expand All @@ -42,7 +42,7 @@ jobs:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_BEFORE_ALL: rustup target add aarch64-apple-darwin
CIBW_ARCHS_MACOS: arm64 universal2
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ARCHS_LINUX: s390x
CIBW_TEST_SKIP: "cp*"
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ARCHS_LINUX: ppc64le
CIBW_TEST_SKIP: "cp*"
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v3
Expand All @@ -168,7 +168,7 @@ jobs:
with:
packages-dir: wheelhouse/
sdist:
name: Build and publish terra sdist
name: Build and publish sdist
runs-on: ${{ matrix.os }}
needs: ["upload_shared_wheels"]
environment: release
Expand All @@ -185,36 +185,8 @@ jobs:
with:
python-version: '3.10'
- name: Install deps
run: pip install -U twine setuptools-rust wheel build
run: pip install -U build
- name: Build sdist
run: python -m build . --sdist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
metapackage:
name: Build and publish terra sdist
runs-on: ${{ matrix.os }}
needs: ["sdist"]
environment: release
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- name: Install deps
run: pip install -U twine setuptools-rust wheel build
- name: Build packages
run: |
set -e
cd qiskit_pkg
python -m build .
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: qiskit_pkg/dist
Loading

0 comments on commit 87a8967

Please sign in to comment.