Skip to content

Commit e4d554d

Browse files
authored
Merge branch 'main' into remove-deprecated-bit-properties
2 parents 2b78dfc + e362da5 commit e4d554d

File tree

1,635 files changed

+360520
-25401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,635 files changed

+360520
-25401
lines changed

.azure/test-linux.yml

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ jobs:
112112
- bash: |
113113
set -e
114114
source test-job/bin/activate
115+
python tools/report_numpy_state.py
115116
mkdir -p /tmp/terra-tests
116117
cp -r test /tmp/terra-tests/.
117118
cp .stestr.conf /tmp/terra-tests/.

.azure/test-macos.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ parameters:
1010
jobs:
1111
- job: "MacOS_Tests_Python${{ replace(parameters.pythonVersion, '.', '') }}"
1212
displayName: "Test macOS Python ${{ parameters.pythonVersion }}"
13-
pool: {vmImage: 'macOS-11'}
13+
pool: {vmImage: 'macOS-13'}
1414

1515
variables:
1616
QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y
@@ -61,6 +61,7 @@ jobs:
6161
- bash: |
6262
set -e
6363
source test-job/bin/activate
64+
python tools/report_numpy_state.py
6465
export PYTHONHASHSEED=$(python -S -c "import random; print(random.randint(1, 4294967295))")
6566
echo "PYTHONHASHSEED=$PYTHONHASHSEED"
6667
stestr run

.azure/test-windows.yml

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
set -e
6363
chcp.com 65001
6464
source test-job/Scripts/activate
65+
python tools/report_numpy_state.py
6566
export PYTHONHASHSEED=$(python -S -c "import random; print(random.randint(1, 1024))")
6667
echo "PYTHONHASHSEED=$PYTHONHASHSEED"
6768
stestr run

.binder/postBuild

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# - pylatexenc: for MPL drawer
88
# - pillow: for image comparison
99
# - appmode: jupyter extension for executing the notebook
10-
# - seaborn: visualisation pacakge required for some graphs
10+
# - seaborn: visualization pacakge required for some graphs
1111
pip install matplotlib pylatexenc pillow appmode seaborn
1212
pip install .
1313

.cargo/config .cargo/config.toml

File renamed without changes.

.git-blame-ignore-revs

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
2eee56616d50a9e26756f855ef4aa0135920ad78
22
3763e61f16f97598cb0fa317277ad85fa15db738
3+
9aa2982aacdd39ca3bc2994d7103992059a105d3

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# Qiskit folders (also their corresponding tests)
2626
providers/ @Qiskit/terra-core @jyu00
27-
quantum_info/ @Qiskit/terra-core @ikkoham
27+
quantum_info/ @Qiskit/terra-core
2828
qpy/ @Qiskit/terra-core
2929
pulse/ @Qiskit/terra-core @eggerdj @wshanks
3030
synthesis/ @Qiskit/terra-core @alexanderivrii @ShellyGarion

.github/dependabot.yml

+16
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,19 @@ updates:
99
directory: "/" # Location of package manifests
1010
schedule:
1111
interval: "daily"
12+
labels:
13+
- "Rust"
14+
- "dependencies"
15+
- "Changelog: None"
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
groups:
19+
GitHub_Actions:
20+
patterns:
21+
- "*" # Group all Actions updates into a single larger pull request
22+
schedule:
23+
interval: weekly
24+
labels:
25+
- "type: qa"
26+
- "dependencies"
27+
- "Changelog: None"

.github/workflows/backport.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Backport metadata
22

3-
# Mergify manages the opening of the backport PR, this workflow is just to extend its behaviour to
3+
# Mergify manages the opening of the backport PR, this workflow is just to extend its behavior to
44
# do useful things like copying across the tagged labels and milestone from the base PR.
55

66
on:

.github/workflows/coverage.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
RUSTUP_TOOLCHAIN: stable
1919

2020
steps:
21-
- uses: actions/checkout@v3
22-
- uses: actions/setup-python@v4
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-python@v5
2323
name: Install Python
2424
with:
2525
python-version: '3.8'
@@ -53,6 +53,7 @@ jobs:
5353
run: |
5454
set -e
5555
python -m pip install -c constraints.txt -r requirements-dev.txt -r requirements-optional.txt
56+
python tools/report_numpy_state.py
5657
stestr run
5758
# We set the --source-dir to '.' because we want all paths to appear relative to the repo
5859
# root (we need to combine them with the Python ones), but we only care about `grcov`

.github/workflows/docs_deploy.yml

+15-124
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,20 @@ on:
77
# Only match non-prerelease tags.
88
- '[0-9]+.[0-9]+.[0-9]'
99
workflow_dispatch:
10-
inputs:
11-
deploy_prefix:
12-
description: "Deployment prefix (leave blank for the root): https://qiskit.org/documentation/<prefix>."
13-
required: false
14-
type: string
15-
do_deployment:
16-
description: "Push to qiskit.org?"
17-
required: false
18-
type: boolean
1910

2011
jobs:
2112
build:
2213
if: github.repository_owner == 'Qiskit'
2314
name: Build
2415
runs-on: ubuntu-latest
2516

26-
outputs:
27-
latest_tag: ${{ steps.latest_tag.outputs.latest_tag }}
28-
2917
steps:
3018
- uses: actions/checkout@v4
3119
with:
3220
# We need to fetch the whole history so 'reno' can do its job and we can inspect tags.
3321
fetch-depth: 0
3422

35-
- name: Determine latest full release tag
36-
id: latest_tag
37-
run: |
38-
set -e
39-
latest_tag=$(git tag --list --sort=-version:refname | sed -n '/^[0-9]\+\.[0-9]\+\.[0-9]\+$/p' | head -n 1)
40-
echo "Latest release tag: '$latest_tag'"
41-
echo "latest_tag=$latest_tag" >> "$GITHUB_OUTPUT"
42-
43-
- uses: actions/setup-python@v4
23+
- uses: actions/setup-python@v5
4424
name: Install Python
4525
with:
4626
# Sync with 'documentationPythonVersion' in 'azure-pipelines.yml'.
@@ -49,116 +29,27 @@ jobs:
4929
- name: Install dependencies
5030
run: tools/install_ubuntu_docs_dependencies.sh
5131

32+
- name: Determine GitHub branch name
33+
run: |
34+
# Tags like 1.0.0 and 1.0.0rc1 should point to their stable branch. We do this
35+
# to reduce the diff in the qiskit/documentation repository between generating
36+
# the API docs from a tag release versus a workflow_dispatch.
37+
if [[ $GITHUB_REF_NAME =~ ^([0-9]+\.[0-9]+) ]]; then
38+
BRANCH_NAME="stable/${BASH_REMATCH[1]}"
39+
else
40+
BRANCH_NAME="$GITHUB_REF_NAME"
41+
fi
42+
echo "Using branch '${BRANCH_NAME}' for GitHub source code links"
43+
echo "QISKIT_DOCS_GITHUB_BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
44+
5245
- name: Build documentation
5346
run: tox run -e docs
54-
5547
- name: Store built documentation artifact
56-
uses: actions/upload-artifact@v3
48+
uses: actions/upload-artifact@v4
5749
with:
5850
name: qiskit-docs
5951
path: |
6052
./docs/_build/html/*
6153
!**/.doctrees
6254
!**/.buildinfo
6355
if-no-files-found: error
64-
65-
deploy:
66-
if: github.event_name != 'workflow_dispatch' || inputs.do_deployment
67-
name: Deploy to qiskit.org
68-
needs: [build]
69-
runs-on: ubuntu-latest
70-
71-
steps:
72-
- uses: actions/checkout@v4
73-
with:
74-
path: qiskit
75-
76-
- uses: actions/download-artifact@v3
77-
with:
78-
name: qiskit-docs
79-
path: deploy
80-
81-
- id: choose
82-
name: Choose deployment location(s)
83-
run: |
84-
set -e
85-
declare -a prefixes
86-
case ${{ github.event_name }} in
87-
push)
88-
case ${{ github.ref_type }} in
89-
branch)
90-
if [[ "$GITHUB_REF_NAME" != "main" ]]; then
91-
echo "Push to unhandled branch '$GITHUB_REF_NAME'" >&2
92-
exit 1
93-
fi
94-
95-
prefixes+=( "dev" )
96-
;;
97-
tag)
98-
tag=$GITHUB_REF_NAME
99-
echo "Full tag: ${tag}"
100-
IFS=. read -ra version <<< "$tag"
101-
minor_version="${version[0]}.${version[1]}"
102-
echo "Minor version: ${minor_version}"
103-
prefixes+=( "stable/${minor_version}" )
104-
if [[ "$tag" == "$LATEST_TAG" ]]; then
105-
# Deploy to the root as well.
106-
prefixes+=( "" )
107-
fi
108-
;;
109-
*)
110-
echo "Unhandled reference type '${{ github.ref_type }}'" >&2
111-
exit 1
112-
;;
113-
esac
114-
;;
115-
workflow_dispatch)
116-
prefixes+=( "$WORKFLOW_DISPATCH_PREFIX" )
117-
;;
118-
*)
119-
echo "Unhandled GitHub event ${{ github.event_name }}" >&2
120-
exit 1
121-
;;
122-
esac
123-
# Join the array of prefixes into a colon-delimited list for
124-
# serialisation. This includes a trailing colon, so we can detect
125-
# the presence of the empty string, even if it's the only prefix.
126-
if [[ "${#prefixes[@]}" -gt 0 ]]; then
127-
joined_prefixes=$(printf "%s:" "${prefixes[@]}")
128-
echo "Chosen deployment prefixes: '$joined_prefixes'"
129-
echo "joined_prefixes=$joined_prefixes" >> "$GITHUB_OUTPUT"
130-
else
131-
echo "Nothing to deploy to."
132-
fi
133-
env:
134-
LATEST_TAG: ${{ needs.build.outputs.latest_tag }}
135-
GITHUB_REF_NAME: ${{ github.ref_name }}
136-
WORKFLOW_DISPATCH_PREFIX: ${{ inputs.deploy_prefix }}
137-
138-
- name: Install rclone
139-
run: |
140-
set -e
141-
curl https://downloads.rclone.org/rclone-current-linux-amd64.deb -o rclone.deb
142-
sudo apt-get install -y ./rclone.deb
143-
144-
- name: Deploy to qiskit.org
145-
if: ${{ steps.choose.outputs.joined_prefixes != '' }}
146-
run: |
147-
set -e
148-
RCLONE_CONFIG=$(rclone config file | tail -1)
149-
openssl aes-256-cbc -K "$RCLONE_KEY" -iv "$RCLONE_IV" -in qiskit/tools/rclone.conf.enc -out "$RCLONE_CONFIG" -d
150-
IFS=: read -ra prefixes <<< "$JOINED_PREFIXES"
151-
for prefix in "${prefixes[@]}"; do
152-
# The 'documentation' bit of the prefix is hard-coded in this step
153-
# rather than being chosen during the prefix-choosing portion
154-
# because we don't want to allow the 'workflow_dispatch' event
155-
# trigger to accidentally allow a deployment to a dodgy prefix that
156-
# wipes out _everything_ on qiskit.org.
157-
location=documentation/$prefix
158-
echo "Deploying to 'qiskit.org/$location'"
159-
rclone sync --progress --exclude-from qiskit/tools/docs_exclude.txt deploy "IBMCOS:qiskit-org-web-resources/$location"
160-
done
161-
env:
162-
JOINED_PREFIXES: ${{ steps.choose.outputs.joined_prefixes }}
163-
RCLONE_KEY: ${{ secrets.ENCRYPTED_RCLONE_KEY}}
164-
RCLONE_IV: ${{ secrets.ENCRYPTED_RCLONE_IV }}

.github/workflows/miri.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Miri
2+
on:
3+
push:
4+
pull_request:
5+
concurrency:
6+
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}
7+
# Only cancel in PR mode. In push mode, don't cancel so we don't see spurious test "failures",
8+
# and we get coverage reports on Coveralls for every push.
9+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
10+
11+
jobs:
12+
miri:
13+
if: github.repository_owner == 'Qiskit'
14+
name: Miri
15+
runs-on: ubuntu-latest
16+
env:
17+
RUSTUP_TOOLCHAIN: nightly-2024-05-24
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install Rust toolchain
23+
uses: dtolnay/rust-toolchain@master
24+
with:
25+
toolchain: nightly-2024-05-24
26+
components: miri
27+
28+
- name: Prepare Miri
29+
run: |
30+
set -e
31+
# Some of our dependencies aren't Miri-safe with their current release versions. These
32+
# need overriding with known-good versions to run against until the Miri-safe versions are
33+
# released and updated in our Cargo.lock.
34+
cat >>Cargo.toml <<EOF
35+
36+
[patch.crates-io]
37+
crossbeam-epoch = { git = "https://github.com/crossbeam-rs/crossbeam", rev = "9e859610" }
38+
EOF
39+
cargo miri setup
40+
41+
- name: Run Miri
42+
run: cargo miri test
43+
env:
44+
# - `tree-borrows` is required for crossbeam components.
45+
# - `symbolic-alignment-check` is extra checking.
46+
# - `strict-provenance` is extra checking.
47+
MIRIFLAGS: '-Zmiri-tree-borrows -Zmiri-symbolic-alignment-check -Zmiri-strict-provenance'

.github/workflows/neko.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
test_selection: terra
1919
# We have to forcibly uninstall any old version of qiskit or qiskit-terra during the
2020
# changeover, because it's not possible to safely upgrade an existing installation to 1.0.
21-
repo_install_command: "pip uninstall qiskit qiskit-terra && pip install -c constraints.txt ."
21+
repo_install_command: "pip uninstall -y qiskit qiskit-terra && pip install -c constraints.txt ."

.github/workflows/randomized_tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
name: Randomized tests
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-python@v4
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
1414
name: Install Python
1515
with:
1616
python-version: '3.8'
@@ -30,7 +30,7 @@ jobs:
3030
RUST_BACKTRACE: 1
3131
- name: Create comment on failed test run
3232
if: ${{ failure() }}
33-
uses: peter-evans/create-or-update-comment@v2
33+
uses: peter-evans/create-or-update-comment@v4
3434
with:
3535
issue-number: 2645
3636
body: |

.github/workflows/slow.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
name: Full-test-run-with-slow
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-python@v4
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
1414
name: Install Python
1515
with:
1616
python-version: '3.10'
@@ -30,7 +30,7 @@ jobs:
3030
QISKIT_TESTS: "run_slow"
3131
- name: Create comment on failed test run
3232
if: ${{ failure() }}
33-
uses: peter-evans/create-or-update-comment@v2
33+
uses: peter-evans/create-or-update-comment@v4
3434
with:
3535
issue-number: 7864
3636
body: |

0 commit comments

Comments
 (0)