-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'ibm/main' into direct-pass-call
- Loading branch information
Showing
643 changed files
with
18,986 additions
and
41,064 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
BasedOnStyle: LLVM | ||
ColumnLimit: '100' | ||
IndentWidth: '4' | ||
Language: Cpp | ||
TabWidth: '4' | ||
UseTab: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Tests | ||
on: | ||
push: | ||
branches: [ main, 'stable/*' ] | ||
pull_request: | ||
branches: [ main, 'stable/*' ] | ||
merge_group: | ||
|
||
jobs: | ||
tests: | ||
if: github.repository_owner == 'Qiskit' | ||
name: linux-tests-c | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: cargo install cbindgen | ||
- name: Run tests | ||
run: make ctest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,19 +13,15 @@ concurrency: | |
jobs: | ||
tests: | ||
if: github.repository_owner == 'Qiskit' | ||
name: macOS-arm64-tests-Python-${{ matrix.python-version }} | ||
runs-on: macOS-14 | ||
name: ${{ matrix.os }}-arm64-tests-Python-${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Normally we test min and max version but we can't run python | ||
# 3.9 on arm64 until actions/setup-python#808 is resolved | ||
python-version: ["3.10", "3.13"] | ||
python-version: ["3.9", "3.13"] | ||
os: ["macOS-14", "ubuntu-24.04-arm"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/[email protected] | ||
if: matrix.python-version == '3.10' | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -36,7 +32,7 @@ jobs: | |
python -m pip install -U -r requirements.txt -c constraints.txt | ||
python -m pip install -U -r requirements-dev.txt -c constraints.txt | ||
python -m pip install -c constraints.txt -e . | ||
if: matrix.python-version == '3.10' | ||
if: matrix.python-version == '3.9' | ||
env: | ||
QISKIT_NO_CACHE_GATES: 1 | ||
- name: 'Install dependencies' | ||
|
@@ -49,6 +45,9 @@ jobs: | |
run: | | ||
python -m pip install -r requirements-optional.txt -c constraints.txt | ||
python tools/report_numpy_state.py | ||
if: matrix.python-version == '3.10' | ||
if: matrix.python-version == '3.9' | ||
- name: 'Run tests' | ||
run: stestr run | ||
env: | ||
QISKIT_PARALLEL: FALSE | ||
QISKIT_IGNORE_USER_SETTINGS: TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,14 +43,6 @@ on: | |
default: "default" | ||
required: false | ||
|
||
wheels-linux-aarch64: | ||
description: >- | ||
The action to take for Linux AArch64 wheels. | ||
Choose from 'default', 'build' or 'skip'. | ||
type: string | ||
default: "default" | ||
required: false | ||
|
||
artifact-prefix: | ||
description: "A prefix to give all artifacts uploaded with 'actions/upload-artifact'." | ||
type: string | ||
|
@@ -85,12 +77,12 @@ jobs: | |
# Used for the ARM builds. | ||
- macos-14 | ||
- windows-latest | ||
- ubuntu-24.04-arm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
architecture: ${{ matrix.os == 'macos-14' && 'arm64' || 'x64' }} | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools-preview | ||
|
@@ -108,22 +100,28 @@ jobs: | |
run: | | ||
set -e | ||
mkdir -p "$PGO_WORK_DIR" | ||
if [[ `uname -m` == "aarch64" ]] ; then | ||
INSTALL_RUST_PATH=tools/install_rust_msrv.sh | ||
RUST_TOOLCHAIN=1.79 | ||
else | ||
INSTALL_RUST_PATH=tools/install_rust.sh | ||
RUST_TOOLCHAIN=stable | ||
fi | ||
cat >>"$GITHUB_ENV" <<EOF | ||
CIBW_BEFORE_ALL_LINUX=yum install -y wget && {package}/$INSTALL_RUST_PATH | ||
CIBW_BEFORE_BUILD=bash ./tools/build_pgo.sh $PGO_WORK_DIR $PGO_OUT_PATH | ||
CIBW_ENVIRONMENT=RUSTUP_TOOLCHAIN=stable RUSTFLAGS='-Cprofile-use=$PGO_OUT_PATH -Cllvm-args=-pgo-warn-missing-function' | ||
CIBW_ENVIRONMENT_MACOS=MACOSX_DEPLOYMENT_TARGET='10.12' RUSTUP_TOOLCHAIN=stable RUSTFLAGS='-Cprofile-use=$PGO_OUT_PATH -Cllvm-args=-pgo-warn-missing-function' | ||
CIBW_ENVIRONMENT_LINUX=RUSTUP_TOOLCHAIN=stable RUSTFLAGS='-Cprofile-use=$PGO_OUT_PATH -Cllvm-args=-pgo-warn-missing-function' PATH="\$PATH:\$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true" | ||
CIBW_ENVIRONMENT_LINUX=RUSTUP_TOOLCHAIN=$RUST_TOOLCHAIN RUSTFLAGS='-Cprofile-use=$PGO_OUT_PATH -Cllvm-args=-pgo-warn-missing-function' PATH="\$PATH:\$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true" | ||
EOF | ||
env: | ||
PGO_WORK_DIR: ${{ github.workspace }}/pgo-data | ||
PGO_OUT_PATH: ${{ github.workspace }}/merged.profdata | ||
- uses: pypa/cibuildwheel@v2.22.0 | ||
- uses: pypa/cibuildwheel@v2.23.0 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
name: ${{ inputs.artifact-prefix }}wheels-tier-1-${{ matrix.os }} | ||
|
||
wheels-linux-s390x: | ||
name: "Wheels / Linux s390x" | ||
if: (inputs.wheels-linux-s390x == 'default' && inputs.default-action || inputs.wheels-linux-s390x) == 'build' | ||
|
@@ -138,7 +136,7 @@ jobs: | |
- uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
- uses: pypa/cibuildwheel@v2.22.0 | ||
- uses: pypa/cibuildwheel@v2.23.0 | ||
env: | ||
CIBW_ARCHS_LINUX: s390x | ||
CIBW_TEST_SKIP: "cp*" | ||
|
@@ -161,7 +159,7 @@ jobs: | |
- uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
- uses: pypa/cibuildwheel@v2.22.0 | ||
- uses: pypa/cibuildwheel@v2.23.0 | ||
env: | ||
CIBW_ARCHS_LINUX: ppc64le | ||
CIBW_TEST_SKIP: "cp*" | ||
|
@@ -170,22 +168,6 @@ jobs: | |
path: ./wheelhouse/*.whl | ||
name: ${{ inputs.artifact-prefix }}wheels-linux-ppc64le | ||
|
||
wheels-linux-aarch64: | ||
name: "Wheels / Linux AArch64" | ||
if: (inputs.wheels-linux-aarch64 == 'default' && inputs.default-action || inputs.wheels-linux-aarch64) == 'build' | ||
runs-on: ubuntu-24.04-arm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: pypa/[email protected] | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
name: ${{ inputs.artifact-prefix }}wheels-linux-aarch64 | ||
|
||
sdist: | ||
name: "sdist" | ||
if: (inputs.sdist == 'default' && inputs.default-action || inputs.sdist) == 'build' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ pull_request_rules: | |
actions: | ||
backport: | ||
branches: | ||
- stable/1.3 | ||
- stable/1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cmake_minimum_required (VERSION 3.27) | ||
project (Qiskit) | ||
|
||
# We are using CMake to build our C API test suite, and we leverage ctest to run | ||
# those tests. | ||
enable_testing () | ||
|
||
# The C API is provided by the qiskit_cext Rust crate. Its header gets | ||
# generated by cbindgen (see `make cheader`). It is important that this done as | ||
# a Release-build for cbindgen to work properly. | ||
find_library (qiskit qiskit_cext PATHS target/release REQUIRED) | ||
|
||
# Generally include the directory for the ``qiskit.h`` file. | ||
include_directories (dist/c/include) | ||
|
||
# The remaining CMake configuration is done inside of the C API test suite. | ||
add_subdirectory (test/c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.