Skip to content

Commit

Permalink
Merge branch 'main' into oxidize-basis-translator
Browse files Browse the repository at this point in the history
  • Loading branch information
raynelfss committed Oct 31, 2024
2 parents e369460 + c6efb76 commit 444b400
Show file tree
Hide file tree
Showing 172 changed files with 6,699 additions and 2,308 deletions.
25 changes: 2 additions & 23 deletions .azure/lint_docs_qpy-linux.yml → .azure/lint_docs-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ parameters:
displayName: "Version of Python to use"

jobs:
- job: 'Lint_Docs_QPY'
displayName: 'Lint, documentation and QPY'
- job: 'Lint_Docs'
displayName: 'Lint and documentation'
pool: {vmImage: 'ubuntu-latest'}

variables:
Expand Down Expand Up @@ -43,24 +43,3 @@ jobs:
artifactName: 'html_docs'
Parallel: true
ParallelCount: 8

- task: Cache@2
inputs:
key: 'qpy | test/qpy_compat/test_qpy.py | "$(Build.BuildNumber)"'
restoreKeys: |
qpy | test/qpy_compat/test_qpy.py
path: qpy_files
displayName: Cache old QPY files

- bash: |
set -e
# Reuse the docs environment to avoid needing to rebuild another
# version of Qiskit.
source .tox/docs/bin/activate
mv qpy_files/* test/qpy_compat || :
pushd test/qpy_compat
./run_tests.sh
popd
mkdir -p qpy_files
mv test/qpy_compat/qpy_* qpy_files/.
displayName: 'Run QPY backwards compat tests'
39 changes: 39 additions & 0 deletions .github/workflows/qpy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: QPY

on:
push:
branches:
- 'main'
- 'stable/*'
pull_request:
merge_group:
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
backward_compat:
if: github.repository_owner == 'Qiskit'
name: Backwards compatibility
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'

- uses: dtolnay/rust-toolchain@stable

- uses: actions/cache@v4
with:
path: test/qpy_compat/qpy_cache
# The hashing is this key can be too eager to invalidate the cache,
# but since we risk the QPY tests failing to update if they're not in
# sync, it's better safe than sorry.
key: qpy-${{ hashFiles('test/qpy_compat/**') }}

- name: Run QPY backwards compatibility tests
working-directory: test/qpy_compat
run: ./run_tests.sh
115 changes: 12 additions & 103 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hashbrown.version = "0.14.5"
num-bigint = "0.4"
num-complex = "0.4"
ndarray = "0.15"
numpy = "0.22.0"
numpy = "0.22.1"
smallvec = "1.13"
thiserror = "1.0"
rustworkx-core = "0.15"
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ stages:
- stage: "Lint_Docs_Prelim_Tests"
displayName: "Preliminary tests"
jobs:
- template: ".azure/lint_docs_qpy-linux.yml"
- template: ".azure/lint_docs-linux.yml"
parameters:
pythonVersion: ${{ parameters.minimumPythonVersion }}

Expand Down Expand Up @@ -208,7 +208,7 @@ stages:
- stage: "Merge_Queue"
displayName: "Merge queue"
jobs:
- template: ".azure/lint_docs_qpy-linux.yml"
- template: ".azure/lint_docs-linux.yml"
parameters:
pythonVersion: ${{ parameters.minimumPythonVersion }}

Expand Down
Loading

0 comments on commit 444b400

Please sign in to comment.