Skip to content

Commit 2fb394a

Browse files
⬆️ Update nanobind to 2.11.0 (backport #1481) (#1488)
## Description This PR updates `nanobind` to 2.11.0. ## Checklist: - [x] The pull request only contains commits that are focused and relevant to this change. - [x] ~I have added appropriate tests that cover the new/changed functionality.~ - [x] ~I have updated the documentation to reflect these changes.~ - [x] ~I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.~ - [x] ~I have added migration instructions to the upgrade guide (if needed).~ - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes. (cherry picked from commit 603aae2) --------- Signed-off-by: Daniel Haag <[email protected]> Co-authored-by: Daniel Haag <[email protected]>
1 parent 583789c commit 2fb394a

File tree

14 files changed

+89
-72
lines changed

14 files changed

+89
-72
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ jobs:
169169
build-project: true
170170
files-changed-only: true
171171
setup-python: true
172-
install-pkgs: "nanobind==2.10.2"
172+
install-pkgs: "nanobind==2.11.0"
173173
cpp-linter-extra-args: "-std=c++20"
174174
setup-mlir: true
175175
llvm-version: 21.1.8

.license-tools-config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
".*\\.tex",
3535
"uv\\.lock",
3636
"py\\.typed",
37-
".*build.*",
38-
"core_patterns.txt"
37+
".*build.*"
3938
]
4039
}

bindings/core_patterns.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

bindings/dd/register_dd.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ using Matrix = nb::ndarray<nb::numpy, std::complex<dd::fp>, nb::ndim<2>>;
4141
Matrix getMatrix(const dd::mEdge& m, size_t numQubits, dd::fp threshold = 0.);
4242

4343
NB_MODULE(MQT_CORE_MODULE_NAME, m) {
44+
m.doc() = R"pb(MQT Core DD - The MQT Core Decision Diagram (DD) module.)pb";
45+
4446
nb::module_::import_("mqt.core.ir");
4547

4648
// Vector Decision Diagrams

bindings/ir/register_ir.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ void registerSymbolic(const nb::module_& m);
2222
void registerQuantumComputation(const nb::module_& m);
2323

2424
NB_MODULE(MQT_CORE_MODULE_NAME, m) {
25+
m.doc() =
26+
R"pb(MQT Core IR - The MQT Core Intermediate Representation (IR) module.)pb";
27+
2528
registerPermutation(m);
2629

2730
const nb::module_ symbolic = m.def_submodule("symbolic");

bindings/na/register_fomac.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ template <pyClass T> [[nodiscard]] auto repr(T c) -> std::string {
3636

3737
// NOLINTNEXTLINE(misc-use-internal-linkage)
3838
void registerFomac(nb::module_& m) {
39+
m.doc() = R"pb(Reconstruction of NADevice from QDMI's Device class.)pb";
40+
3941
nb::module_::import_("mqt.core.fomac");
4042

4143
auto device = nb::class_<na::Session::Device, fomac::Session::Device>(

bindings/na/register_na.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace nb = nanobind;
1818
void registerFomac(nb::module_& m);
1919

2020
NB_MODULE(MQT_CORE_MODULE_NAME, m) {
21-
m.doc() = R"pb(MQT Core NA - The MQT Core neutral atom module.
21+
m.doc() = R"pb(MQT Core NA - The MQT Core Neutral Atom module.
2222
2323
This module contains all neutral atom related functionality of MQT Core.)pb";
2424

noxfile.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ def stubs(session: nox.Session) -> None:
221221
)
222222

223223
package_root = Path(__file__).parent / "python" / "mqt" / "core"
224-
pattern_file = Path(__file__).parent / "bindings" / "core_patterns.txt"
225224

226225
session.run(
227226
"python",
@@ -231,8 +230,6 @@ def stubs(session: nox.Session) -> None:
231230
"--include-private",
232231
"--output-dir",
233232
str(package_root),
234-
"--pattern-file",
235-
str(pattern_file),
236233
"--module",
237234
"mqt.core.ir",
238235
"--module",

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[build-system]
1010
requires = [
11-
"nanobind>=2.10.2",
11+
"nanobind~=2.11.0",
1212
"scikit-build-core>=0.11.6",
1313
"setuptools-scm>=9.2.2",
1414
]
@@ -323,7 +323,7 @@ exclude = [
323323

324324
[dependency-groups]
325325
build = [
326-
"nanobind>=2.10.2",
326+
"nanobind~=2.11.0",
327327
"scikit-build-core>=0.11.6",
328328
"setuptools-scm>=9.2.2",
329329
]

python/mqt/core/dd.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#
77
# Licensed under the MIT License
88

9+
"""MQT Core DD - The MQT Core Decision Diagram (DD) module."""
10+
911
import enum
1012
from collections.abc import Sequence
1113
from collections.abc import Set as AbstractSet

0 commit comments

Comments
 (0)