Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Infrastructure Update without Windows Support #270

Merged
merged 17 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
path: dist
merge-multiple: true
- name: Generate artifact attestation for sdist and wheel(s)
uses: actions/attest-build-provenance@v1.4.0
uses: actions/attest-build-provenance@v1.4.2
with:
subject-path: "dist/*"
- uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
change-detection:
name: 🔍 Change
uses: cda-tum/mqt-workflows/.github/workflows/reusable-change-detection.yml@v1.1.5
uses: cda-tum/mqt-workflows/.github/workflows/reusable-change-detection.yml@v1.3

cpp-tests:
name: 🇨‌ Test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable-python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ jobs:
fail-fast: false
matrix:
runs-on: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
include:
- runs-on: macos-13
python-version: "3.8"
python-version: "3.9"
- runs-on: macos-13
python-version: "3.12"
- runs-on: macos-14
python-version: "3.10"
python-version: "3.9"
- runs-on: macos-14
python-version: "3.12"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-python-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- if: runner.os == 'macOS'
uses: yezz123/setup-uv@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.19
uses: pypa/cibuildwheel@v2.20
- name: Verify clean directory
run: git diff --exit-code
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-mqt-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ concurrency:
jobs:
update-mqt-core:
name: ⬆️ Update MQT Core
uses: cda-tum/mqt-workflows/.github/workflows/reusable-mqt-core-update.yml@v1.1.5
uses: cda-tum/mqt-workflows/.github/workflows/reusable-mqt-core-update.yml@v1.3
with:
update-to-head: ${{ fromJSON(github.event.inputs.update-to-head) || false }}
update-to-head: ${{ github.event.inputs.update-to-head || false }}
17 changes: 7 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:

# Handling unwanted unicode characters
- repo: https://github.com/sirosen/texthooks
rev: 0.6.6
rev: 0.6.7
hooks:
- id: fix-ligatures
- id: fix-smartquotes
Expand All @@ -58,13 +58,11 @@ repos:

# Python linting and formatting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.6.2
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]

# Also run Black on examples in the documentation
- repo: https://github.com/adamchainz/blacken-docs
Expand All @@ -75,7 +73,7 @@ repos:

# Check static types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
rev: v1.11.2
hooks:
- id: mypy
files: ^(src/mqt|test/python)
Expand All @@ -85,11 +83,10 @@ repos:
- numpy
- pytest
- pytest-mock
- numba

# Check for spelling
- repo: https://github.com/crate-ci/typos
rev: v1.23.6
rev: v1.24.1
hooks:
- id: typos

Expand Down Expand Up @@ -127,21 +124,21 @@ repos:

# Check best practices for scientific Python code
- repo: https://github.com/scientific-python/cookie
rev: 2024.04.23
rev: 2024.08.19
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]

# Check JSON schemata
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.1
rev: 0.29.2
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

# Check the pyproject.toml file
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2024.08.08
rev: 2024.08.26
hooks:
- id: validate-pyproject
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19...3.28)
cmake_minimum_required(VERSION 3.19...3.30)

project(
mqt-qecc
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ The contributors to this tool are:
- Thomas Grurl
- Peter-Jan H.S. Derks
- Timo Hillmann
- Tom Peham

## Acknowledgements

Expand Down
6 changes: 3 additions & 3 deletions cmake/ExternalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ if(BUILD_MQT_QECC_BINDINGS)
endif()

# add pybind11 library
find_package(pybind11 CONFIG REQUIRED)
find_package(pybind11 2.13 CONFIG REQUIRED)
endif()

# cmake-format: off
set(MQT_CORE_VERSION 2.5.1
set(MQT_CORE_VERSION 2.6.1
CACHE STRING "MQT Core version")
set(MQT_CORE_REV "35e06ca3067ca3cf36bda1f0c38edf5bd7456fb6"
set(MQT_CORE_REV "5be1c3ec4efb773d0330298621704e876afa7c16"
CACHE STRING "MQT Core identifier (tag, branch or commit hash)")
set(MQT_CORE_REPO_OWNER "cda-tum"
CACHE STRING "MQT Core repository owner (change when using a fork)")
Expand Down
25 changes: 11 additions & 14 deletions include/DecodingSimulator.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
//
// Created by luca on 09/08/22.
//
#pragma once

#ifndef QECC_DECODINGSIMULATOR_HPP
#define QECC_DECODINGSIMULATOR_HPP

#include "Decoder.hpp"
#include "UFHeuristic.hpp"
#include "Code.hpp"

#include <cstddef>
#include <cstdint>
#include <nlohmann/json.hpp>
#include <stdexcept>
#include <string>
#include <utility>
using json = nlohmann::json;

enum DecoderType {
using json = nlohmann::basic_json<>;

enum DecoderType : std::uint8_t {
UfHeuristic,
UfDecoder
};
Expand All @@ -25,7 +23,8 @@ enum DecoderType {
}
throw std::invalid_argument("Invalid decodinger type: " + status);
}
NLOHMANN_JSON_SERIALIZE_ENUM(DecoderType, {{UfHeuristic, "UF_HEURISTIC"}, // NOLINT(cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays)
// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays,misc-include-cleaner)
NLOHMANN_JSON_SERIALIZE_ENUM(DecoderType, {{UfHeuristic, "UF_HEURISTIC"},
{UfDecoder, "UF_DECODER"}})

class DecodingSimulator {
Expand Down Expand Up @@ -72,5 +71,3 @@ class DecodingSimulator {
std::size_t nrSamples,
const DecoderType& decoderType);
};

#endif // QECC_DECODINGSIMULATOR_HPP
4 changes: 2 additions & 2 deletions include/ecc/Ecc.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "Definitions.hpp"
#include "QuantumComputation.hpp"
#include "operations/OpType.hpp"
#include "ir/QuantumComputation.hpp"
#include "ir/operations/OpType.hpp"

#include <cstddef>
#include <cstdint>
Expand Down
4 changes: 2 additions & 2 deletions include/ecc/Id.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "Ecc.hpp"
#include "QuantumComputation.hpp"
#include "operations/Operation.hpp"
#include "ir/QuantumComputation.hpp"
#include "ir/operations/Operation.hpp"

#include <cstddef>
#include <memory>
Expand Down
4 changes: 2 additions & 2 deletions include/ecc/Q18Surface.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "Ecc.hpp"
#include "QuantumComputation.hpp"
#include "operations/Operation.hpp"
#include "ir/QuantumComputation.hpp"
#include "ir/operations/Operation.hpp"

#include <array>
#include <cstddef>
Expand Down
8 changes: 4 additions & 4 deletions include/ecc/Q3Shor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include "Definitions.hpp"
#include "Ecc.hpp"
#include "QuantumComputation.hpp"
#include "operations/Control.hpp"
#include "operations/OpType.hpp"
#include "operations/Operation.hpp"
#include "ir/QuantumComputation.hpp"
#include "ir/operations/Control.hpp"
#include "ir/operations/OpType.hpp"
#include "ir/operations/Operation.hpp"

#include <cstddef>
#include <memory>
Expand Down
6 changes: 3 additions & 3 deletions include/ecc/Q5Laflamme.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include "Ecc.hpp"
#include "QuantumComputation.hpp"
#include "operations/OpType.hpp"
#include "operations/Operation.hpp"
#include "ir/QuantumComputation.hpp"
#include "ir/operations/OpType.hpp"
#include "ir/operations/Operation.hpp"

#include <array>
#include <cstddef>
Expand Down
8 changes: 4 additions & 4 deletions include/ecc/Q7Steane.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include "Definitions.hpp"
#include "Ecc.hpp"
#include "QuantumComputation.hpp"
#include "operations/Control.hpp"
#include "operations/OpType.hpp"
#include "operations/Operation.hpp"
#include "ir/QuantumComputation.hpp"
#include "ir/operations/Control.hpp"
#include "ir/operations/OpType.hpp"
#include "ir/operations/Operation.hpp"

#include <array>
#include <cstddef>
Expand Down
4 changes: 2 additions & 2 deletions include/ecc/Q9Shor.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "Ecc.hpp"
#include "QuantumComputation.hpp"
#include "operations/Operation.hpp"
#include "ir/QuantumComputation.hpp"
#include "ir/operations/Operation.hpp"

#include <cstddef>
#include <memory>
Expand Down
4 changes: 2 additions & 2 deletions include/ecc/Q9Surface.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "Ecc.hpp"
#include "QuantumComputation.hpp"
#include "operations/Operation.hpp"
#include "ir/QuantumComputation.hpp"
#include "ir/operations/Operation.hpp"

#include <array>
#include <cstddef>
Expand Down
10 changes: 5 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

nox.options.sessions = ["lint", "tests"]

PYTHON_ALL_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"]
PYTHON_ALL_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]

# The following lists all the build requirements for building the package.
# Note that this includes transitive build dependencies of package dependencies,
# since we use `--no-build-isolation` to install the package in editable mode
# and get better caching performance. This only concerns dependencies that are
# not available via wheels on PyPI (i.e., only as source distributions).
BUILD_REQUIREMENTS = [
"scikit-build-core[pyproject]>=0.8.1",
"scikit-build-core[pyproject]>=0.10.1",
"setuptools_scm>=7",
"pybind11>=2.12",
"pybind11>=2.13",
"wheel>=0.40", # transitive dependency of pytest on Windows
"Cython>=3; python_version > '3.11'", # required to build ldpc on Python 3.12+
"numpy>=1.26,<2; python_version > '3.11'", # required to build ldpc on Python 3.12+
Expand Down Expand Up @@ -73,7 +73,7 @@ def _run_tests(

session.install(*BUILD_REQUIREMENTS, *install_args, env=env)
install_arg = f"-ve.[{','.join(_extras)}]"
session.install("--no-build-isolation", install_arg, *install_args, env=env)
session.install("--no-build-isolation", "--reinstall-package", "mqt.qecc", install_arg, *install_args, env=env)
session.run("pytest", *run_args, *posargs, env=env)


Expand Down Expand Up @@ -104,7 +104,7 @@ def docs(session: nox.Session) -> None:
serve = args.builder == "html" and session.interactive
extra_installs = ["sphinx-autobuild"] if serve else []
session.install(*BUILD_REQUIREMENTS, *extra_installs)
session.install("--no-build-isolation", "-ve.[docs]")
session.install("--no-build-isolation", "-ve.[docs]", "--reinstall-package", "mqt.qecc")
session.chdir("docs")

if args.builder == "linkcheck":
Expand Down
Loading
Loading