Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/pulse-ir
Browse files Browse the repository at this point in the history
  • Loading branch information
nkanazawa1989 committed Feb 7, 2024
2 parents 4aeb4c4 + d8ef5c3 commit 8edc216
Show file tree
Hide file tree
Showing 976 changed files with 18,258 additions and 14,747 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
2eee56616d50a9e26756f855ef4aa0135920ad78
3763e61f16f97598cb0fa317277ad85fa15db738
9aa2982aacdd39ca3bc2994d7103992059a105d3
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ body:
- type: textarea
attributes:
label: Environment
description: For the version of Terra, please give the actual version number (_e.g._ 0.18.3) if you are using a release version, or the first 7-8 characters of the commit hash if you have installed from `git`. If anything else is relevant, you can add it to the list.
description: For the version of Qiskit, please give the actual version number (_e.g._ 0.45.2) if you are using a release version, or the first 7-8 characters of the commit hash if you have installed from `git`. If anything else is relevant, you can add it to the list.
# The trailing spaces on the following lines are to make filling the form
# in easier. The type is 'textarea' rather than three separate 'input's
# to make the resulting issue body less noisy with headings.
value: |
- **Qiskit Terra version**:
- **Qiskit version**:
- **Python version**:
- **Operating system**:
validations:
Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
labels:
- "Rust"
- "dependencies"
- "Changelog: None"
121 changes: 0 additions & 121 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,19 @@ on:
# Only match non-prerelease tags.
- '[0-9]+.[0-9]+.[0-9]'
workflow_dispatch:
inputs:
deploy_prefix:
description: "Deployment prefix (leave blank for the root): https://qiskit.org/documentation/<prefix>."
required: false
type: string
do_deployment:
description: "Push to qiskit.org?"
required: false
type: boolean

jobs:
build:
if: github.repository_owner == 'Qiskit'
name: Build
runs-on: ubuntu-latest

outputs:
latest_tag: ${{ steps.latest_tag.outputs.latest_tag }}

steps:
- uses: actions/checkout@v4
with:
# We need to fetch the whole history so 'reno' can do its job and we can inspect tags.
fetch-depth: 0

- name: Determine latest full release tag
id: latest_tag
run: |
set -e
latest_tag=$(git tag --list --sort=-version:refname | sed -n '/^[0-9]\+\.[0-9]\+\.[0-9]\+$/p' | head -n 1)
echo "Latest release tag: '$latest_tag'"
echo "latest_tag=$latest_tag" >> "$GITHUB_OUTPUT"
- uses: actions/setup-python@v4
name: Install Python
with:
Expand All @@ -61,104 +41,3 @@ jobs:
!**/.doctrees
!**/.buildinfo
if-no-files-found: error

deploy:
if: github.event_name != 'workflow_dispatch' || inputs.do_deployment
name: Deploy to qiskit.org
needs: [build]
runs-on: ubuntu-latest

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

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

- id: choose
name: Choose deployment location(s)
run: |
set -e
declare -a prefixes
case ${{ github.event_name }} in
push)
case ${{ github.ref_type }} in
branch)
if [[ "$GITHUB_REF_NAME" != "main" ]]; then
echo "Push to unhandled branch '$GITHUB_REF_NAME'" >&2
exit 1
fi
prefixes+=( "dev" )
;;
tag)
tag=$GITHUB_REF_NAME
echo "Full tag: ${tag}"
IFS=. read -ra version <<< "$tag"
minor_version="${version[0]}.${version[1]}"
echo "Minor version: ${minor_version}"
prefixes+=( "stable/${minor_version}" )
if [[ "$tag" == "$LATEST_TAG" ]]; then
# Deploy to the root as well.
prefixes+=( "" )
fi
;;
*)
echo "Unhandled reference type '${{ github.ref_type }}'" >&2
exit 1
;;
esac
;;
workflow_dispatch)
prefixes+=( "$WORKFLOW_DISPATCH_PREFIX" )
;;
*)
echo "Unhandled GitHub event ${{ github.event_name }}" >&2
exit 1
;;
esac
# Join the array of prefixes into a colon-delimited list for
# serialisation. This includes a trailing colon, so we can detect
# the presence of the empty string, even if it's the only prefix.
if [[ "${#prefixes[@]}" -gt 0 ]]; then
joined_prefixes=$(printf "%s:" "${prefixes[@]}")
echo "Chosen deployment prefixes: '$joined_prefixes'"
echo "joined_prefixes=$joined_prefixes" >> "$GITHUB_OUTPUT"
else
echo "Nothing to deploy to."
fi
env:
LATEST_TAG: ${{ needs.build.outputs.latest_tag }}
GITHUB_REF_NAME: ${{ github.ref_name }}
WORKFLOW_DISPATCH_PREFIX: ${{ inputs.deploy_prefix }}

- name: Install rclone
run: |
set -e
curl https://downloads.rclone.org/rclone-current-linux-amd64.deb -o rclone.deb
sudo apt-get install -y ./rclone.deb
- name: Deploy to qiskit.org
if: ${{ steps.choose.outputs.joined_prefixes != '' }}
run: |
set -e
RCLONE_CONFIG=$(rclone config file | tail -1)
openssl aes-256-cbc -K "$RCLONE_KEY" -iv "$RCLONE_IV" -in qiskit/tools/rclone.conf.enc -out "$RCLONE_CONFIG" -d
IFS=: read -ra prefixes <<< "$JOINED_PREFIXES"
for prefix in "${prefixes[@]}"; do
# The 'documentation' bit of the prefix is hard-coded in this step
# rather than being chosen during the prefix-choosing portion
# because we don't want to allow the 'workflow_dispatch' event
# trigger to accidentally allow a deployment to a dodgy prefix that
# wipes out _everything_ on qiskit.org.
location=documentation/$prefix
echo "Deploying to 'qiskit.org/$location'"
rclone sync --progress --exclude-from qiskit/tools/docs_exclude.txt deploy "IBMCOS:qiskit-org-web-resources/$location"
done
env:
JOINED_PREFIXES: ${{ steps.choose.outputs.joined_prefixes }}
RCLONE_KEY: ${{ secrets.ENCRYPTED_RCLONE_KEY}}
RCLONE_IV: ${{ secrets.ENCRYPTED_RCLONE_IV }}
44 changes: 38 additions & 6 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,40 @@ jobs:
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_BEFORE_BUILD: 'bash ./tools/build_pgo.sh /tmp/pgo-data/merged.profdata'
CIBW_BEFORE_BUILD_WINDOWS: 'bash ./tools/build_pgo.sh /tmp/pgo-data/merged.profdata && cp /tmp/pgo-data/merged.profdata ~/.'
CIBW_ENVIRONMENT: 'RUSTUP_TOOLCHAIN="stable" RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function"'
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true" RUSTUP_TOOLCHAIN="stable" RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function"'
CIBW_ENVIRONMENT_WINDOWS: 'RUSTUP_TOOLCHAIN="stable" RUSTFLAGS="-Cprofile-use=c:\\Users\\runneradmin\\merged.profdata -Cllvm-args=-pgo-warn-missing-function"'
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
name: shared-wheel-builds
build_wheels_32bit:
name: Build wheels 32bit
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_SKIP: 'pp* cp36-* cp37-* *musllinux* *amd64 *x86_64'
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
Expand All @@ -42,7 +74,7 @@ jobs:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_BEFORE_ALL: rustup target add aarch64-apple-darwin
CIBW_ARCHS_MACOS: arm64 universal2
Expand All @@ -59,7 +91,7 @@ jobs:
environment: release
permissions:
id-token: write
needs: ["build_wheels", "build_wheels_macos_arm"]
needs: ["build_wheels", "build_wheels_macos_arm", "build_wheels_32bit"]
steps:
- uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -91,7 +123,7 @@ jobs:
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS_LINUX: s390x
CIBW_TEST_SKIP: "cp*"
Expand Down Expand Up @@ -124,7 +156,7 @@ jobs:
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS_LINUX: ppc64le
CIBW_TEST_SKIP: "cp*"
Expand Down Expand Up @@ -157,7 +189,7 @@ jobs:
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ pull_request_rules:
actions:
backport:
branches:
- stable/0.45
- stable/1.0
Loading

0 comments on commit 8edc216

Please sign in to comment.