Skip to content

✨ Implement single- and two-qubit gate decomposition pass #7021

✨ Implement single- and two-qubit gate decomposition pass

✨ Implement single- and two-qubit gate decomposition pass #7021

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
change-detection:
name: 🔍 Change
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
cpp-tests-ubuntu:
name: 🇨‌ Test 🐧
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && !contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
compiler: [gcc]
config: [Release]
include:
- runs-on: ubuntu-24.04
compiler: gcc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cpp-tests-macos:
name: 🇨‌ Test 🍎
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && !contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [macos-15-intel, macos-14]
compiler: [clang]
config: [Release]
include:
- runs-on: macos-14
compiler: clang
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cmake-args: -DMQT_CORE_WITH_GMP=ON
cpp-tests-windows:
name: 🇨‌ Test 🏁
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && !contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [windows-2022, windows-11-arm]
compiler: [msvc]
config: [Release]
include:
- runs-on: windows-2022
compiler: msvc
config: Debug
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
# run extensive C++ tests on PRs labeled with the `extensive-cpp-ci` label
cpp-tests-extensive-ubuntu:
name: 🇨‌ Test (Extensive) 🐧
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
compiler: [gcc, clang, clang-20, clang-21]
config: [Release, Debug]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
# run extensive C++ tests on PRs labeled with the `extensive-cpp-ci` label
cpp-tests-extensive-macos:
name: 🇨‌ Test (Extensive) 🍎
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [macos-14, macos-15, macos-15-intel]
compiler: [clang, clang-20, clang-21, gcc-14, gcc-15]
config: [Release, Debug]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cmake-args: -DMQT_CORE_WITH_GMP=ON
# run extensive C++ tests on PRs labeled with the `extensive-cpp-ci` label
cpp-tests-extensive-windows:
name: 🇨‌ Test (Extensive) 🏁
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
strategy:
fail-fast: false
matrix:
runs-on: [windows-2022, windows-2025, windows-11-arm]
compiler: [msvc, clang]
config: [Release]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
cpp-coverage:
name: 🇨‌ Coverage
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
permissions:
contents: read
id-token: write
cpp-linter:
name: 🇨‌ Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
cmake-args: -DBUILD_MQT_CORE_BENCHMARKS=ON -DBUILD_MQT_CORE_MLIR=ON -DBUILD_MQT_CORE_BINDINGS=ON
clang-version: 21
build-project: true
files-changed-only: true
setup-python: true
install-pkgs: "nanobind==2.10.2"
cpp-linter-extra-args: "-std=c++20"
setup-mlir: true
python-tests:
name: 🐍 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
strategy:
fail-fast: false
matrix:
runs-on:
[
ubuntu-24.04,
ubuntu-24.04-arm,
macos-15-intel,
macos-14,
windows-2022,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
runs-on: ${{ matrix.runs-on }}
python-coverage:
name: 🐍 Coverage
needs: [change-detection, python-tests]
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
permissions:
contents: read
id-token: write
# run extensive Python tests on PRs labeled with the `extensive-python-ci` label
python-tests-extensive:
name: 🐍 Test (Extensive)
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-python-ci')
strategy:
fail-fast: false
matrix:
runs-on: [macos-15, windows-2025]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
runs-on: ${{ matrix.runs-on }}
python-linter:
name: 🐍 Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
check-stubs: true
enable-ty: true
build-sdist:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
build-wheel:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
strategy:
fail-fast: false
matrix:
runs-on:
[
ubuntu-24.04,
ubuntu-24.04-arm,
macos-15-intel,
macos-14,
windows-2022,
windows-11-arm,
]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@7f8eeed7a3dba08e1e9be54966e5722f5753d0df # v1.17.7
with:
runs-on: ${{ matrix.runs-on }}
mlir-tests:
name: 🐉 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-mlir)
uses: ./.github/workflows/reusable-mlir-tests.yml
# this job does nothing and is only used for branch protection
required-checks-pass:
name: 🚦 Check
if: always()
needs:
- change-detection
- cpp-tests-ubuntu
- cpp-tests-macos
- cpp-tests-windows
- cpp-tests-extensive-ubuntu
- cpp-tests-extensive-macos
- cpp-tests-extensive-windows
- cpp-coverage
- cpp-linter
- python-tests
- python-tests-extensive
- python-linter
- build-sdist
- build-wheel
- mlir-tests
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
allowed-skips: >-
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests) && !contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
&& '' || 'cpp-tests-ubuntu,cpp-tests-macos,cpp-tests-windows,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci')
&& '' || 'cpp-tests-extensive-ubuntu,cpp-tests-extensive-macos,cpp-tests-extensive-windows,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-tests)
&& '' || 'cpp-coverage,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cpp-linter)
&& '' || 'cpp-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-python-tests)
&& '' || 'python-tests,python-coverage,python-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-python-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-python-ci')
&& '' || 'python-tests-extensive,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cd)
&& '' || 'build-sdist,build-wheel,'
}}
${{
fromJSON(needs.change-detection.outputs.run-mlir)
&& '' || 'mlir-tests,'
}}
jobs: ${{ toJSON(needs) }}