mqt-ddsim 2.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. mqt_ddsim-2.6.0/.clang-format +4 -0
  2. mqt_ddsim-2.6.0/.clang-tidy +76 -0
  3. mqt_ddsim-2.6.0/.cmake-format.yaml +7 -0
  4. mqt_ddsim-2.6.0/.git_archival.txt +3 -0
  5. mqt_ddsim-2.6.0/.gitattributes +1 -0
  6. mqt_ddsim-2.6.0/.gitignore +91 -0
  7. mqt_ddsim-2.6.0/.license-tools-config.json +42 -0
  8. mqt_ddsim-2.6.0/.pre-commit-config.yaml +172 -0
  9. mqt_ddsim-2.6.0/.readthedocs.yaml +28 -0
  10. mqt_ddsim-2.6.0/.rumdl.toml +21 -0
  11. mqt_ddsim-2.6.0/AGENTS.md +190 -0
  12. mqt_ddsim-2.6.0/CHANGELOG.md +253 -0
  13. mqt_ddsim-2.6.0/CMakeLists.txt +88 -0
  14. mqt_ddsim-2.6.0/CMakePresets.json +91 -0
  15. mqt_ddsim-2.6.0/LICENSE +22 -0
  16. mqt_ddsim-2.6.0/PKG-INFO +303 -0
  17. mqt_ddsim-2.6.0/README.md +266 -0
  18. mqt_ddsim-2.6.0/UPGRADING.md +218 -0
  19. mqt_ddsim-2.6.0/apps/CMakeLists.txt +21 -0
  20. mqt_ddsim-2.6.0/apps/noise_aware.cpp +164 -0
  21. mqt_ddsim-2.6.0/apps/simple.cpp +302 -0
  22. mqt_ddsim-2.6.0/bindings/CMakeLists.txt +37 -0
  23. mqt_ddsim-2.6.0/bindings/bindings.cpp +320 -0
  24. mqt_ddsim-2.6.0/cmake/ExternalDependencies.cmake +101 -0
  25. mqt_ddsim-2.6.0/cmake/cmake_uninstall.cmake.in +31 -0
  26. mqt_ddsim-2.6.0/include/CircuitSimulator.hpp +152 -0
  27. mqt_ddsim-2.6.0/include/DDMinimizer.hpp +39 -0
  28. mqt_ddsim-2.6.0/include/DensityComputeTable.hpp +144 -0
  29. mqt_ddsim-2.6.0/include/DensityDDPackage.hpp +182 -0
  30. mqt_ddsim-2.6.0/include/DensityNode.hpp +339 -0
  31. mqt_ddsim-2.6.0/include/DensityUniqueTable.hpp +132 -0
  32. mqt_ddsim-2.6.0/include/DeterministicNoiseSimulator.hpp +134 -0
  33. mqt_ddsim-2.6.0/include/GroverSimulator.hpp +98 -0
  34. mqt_ddsim-2.6.0/include/HybridSchrodingerFeynmanSimulator.hpp +133 -0
  35. mqt_ddsim-2.6.0/include/NoiseFunctionality.hpp +174 -0
  36. mqt_ddsim-2.6.0/include/PathSimulator.hpp +236 -0
  37. mqt_ddsim-2.6.0/include/ShorFastSimulator.hpp +137 -0
  38. mqt_ddsim-2.6.0/include/ShorSimulator.hpp +162 -0
  39. mqt_ddsim-2.6.0/include/Simulator.hpp +158 -0
  40. mqt_ddsim-2.6.0/include/StochasticNoiseOperationTable.hpp +90 -0
  41. mqt_ddsim-2.6.0/include/StochasticNoiseSimulator.hpp +113 -0
  42. mqt_ddsim-2.6.0/include/UnitarySimulator.hpp +49 -0
  43. mqt_ddsim-2.6.0/noxfile.py +247 -0
  44. mqt_ddsim-2.6.0/pyproject.toml +397 -0
  45. mqt_ddsim-2.6.0/python/mqt/ddsim/__init__.py +59 -0
  46. mqt_ddsim-2.6.0/python/mqt/ddsim/_version.py +24 -0
  47. mqt_ddsim-2.6.0/python/mqt/ddsim/_version.pyi +12 -0
  48. mqt_ddsim-2.6.0/python/mqt/ddsim/deterministic_noise_simulator_backend.py +88 -0
  49. mqt_ddsim-2.6.0/python/mqt/ddsim/experiment_header.py +63 -0
  50. mqt_ddsim-2.6.0/python/mqt/ddsim/hybrid_qam_simulator_backend.py +123 -0
  51. mqt_ddsim-2.6.0/python/mqt/ddsim/hybrid_statevector_simulator_backend.py +41 -0
  52. mqt_ddsim-2.6.0/python/mqt/ddsim/job.py +158 -0
  53. mqt_ddsim-2.6.0/python/mqt/ddsim/path_qasm_simulator_backend.py +127 -0
  54. mqt_ddsim-2.6.0/python/mqt/ddsim/path_statevector_simulator_backend.py +37 -0
  55. mqt_ddsim-2.6.0/python/mqt/ddsim/primitives/__init__.py +16 -0
  56. mqt_ddsim-2.6.0/python/mqt/ddsim/primitives/estimator.py +170 -0
  57. mqt_ddsim-2.6.0/python/mqt/ddsim/primitives/sampler.py +143 -0
  58. mqt_ddsim-2.6.0/python/mqt/ddsim/provider.py +86 -0
  59. mqt_ddsim-2.6.0/python/mqt/ddsim/py.typed +2 -0
  60. mqt_ddsim-2.6.0/python/mqt/ddsim/pyddsim.pyi +335 -0
  61. mqt_ddsim-2.6.0/python/mqt/ddsim/qasm_simulator_backend.py +223 -0
  62. mqt_ddsim-2.6.0/python/mqt/ddsim/statevector_simulator_backend.py +38 -0
  63. mqt_ddsim-2.6.0/python/mqt/ddsim/stochastic_noise_simulator_backend.py +97 -0
  64. mqt_ddsim-2.6.0/python/mqt/ddsim/target.py +157 -0
  65. mqt_ddsim-2.6.0/python/mqt/ddsim/unitary_simulator_backend.py +132 -0
  66. mqt_ddsim-2.6.0/scripts/README.md +8 -0
  67. mqt_ddsim-2.6.0/scripts/approximation.sh +113 -0
  68. mqt_ddsim-2.6.0/scripts/hybrid_simulation.sh +75 -0
  69. mqt_ddsim-2.6.0/scripts/primebases_timing_shor.sh +22 -0
  70. mqt_ddsim-2.6.0/sitecustomize.py +23 -0
  71. mqt_ddsim-2.6.0/src/CMakeLists.txt +31 -0
  72. mqt_ddsim-2.6.0/src/CircuitGenerators.cpp +373 -0
  73. mqt_ddsim-2.6.0/src/CircuitGenerators.hpp +48 -0
  74. mqt_ddsim-2.6.0/src/CircuitSimulator.cpp +282 -0
  75. mqt_ddsim-2.6.0/src/DDMinimizer.cpp +97 -0
  76. mqt_ddsim-2.6.0/src/DensityDDPackage.cpp +493 -0
  77. mqt_ddsim-2.6.0/src/DensityNode.cpp +381 -0
  78. mqt_ddsim-2.6.0/src/DensityUniqueTable.cpp +127 -0
  79. mqt_ddsim-2.6.0/src/DeterministicNoiseSimulator.cpp +90 -0
  80. mqt_ddsim-2.6.0/src/GroverSimulator.cpp +110 -0
  81. mqt_ddsim-2.6.0/src/HybridSchrodingerFeynmanSimulator.cpp +408 -0
  82. mqt_ddsim-2.6.0/src/NoiseFunctionality.cpp +486 -0
  83. mqt_ddsim-2.6.0/src/PathSimulator.cpp +531 -0
  84. mqt_ddsim-2.6.0/src/ShorFastSimulator.cpp +472 -0
  85. mqt_ddsim-2.6.0/src/ShorSimulator.cpp +474 -0
  86. mqt_ddsim-2.6.0/src/Simulator.cpp +378 -0
  87. mqt_ddsim-2.6.0/src/StochasticNoiseSimulator.cpp +169 -0
  88. mqt_ddsim-2.6.0/src/UnitarySimulator.cpp +113 -0
  89. mqt_ddsim-2.6.0/uv.lock +3399 -0
@@ -0,0 +1,4 @@
1
+ BasedOnStyle: LLVM
2
+ IncludeBlocks: Regroup
3
+ PointerAlignment: Left
4
+ Standard: c++20
@@ -0,0 +1,76 @@
1
+ FormatStyle: file
2
+
3
+ Checks: |
4
+ bugprone-*,
5
+ -bugprone-easily-swappable-parameters,
6
+ -bugprone-unchecked-optional-access,
7
+ clang-analyzer-*,
8
+ -clang-analyzer-core.NullDereference,
9
+ clang-diagnostic-*,
10
+ cppcoreguidelines-*,
11
+ -cppcoreguidelines-non-private-member-variables-in-classes,
12
+ -cppcoreguidelines-special-member-functions,
13
+ -cppcoreguidelines-avoid-magic-numbers,
14
+ -cppcoreguidelines-macro-usage,
15
+ -cppcoreguidelines-pro-type-reinterpret-cast,
16
+ -cppcoreguidelines-pro-bounds-constant-array-index,
17
+ -cppcoreguidelines-avoid-do-while,
18
+ google-*,
19
+ -google-readability-todo,
20
+ -google-build-using-namespace,
21
+ misc-*,
22
+ -misc-no-recursion,
23
+ -misc-non-private-member-variables-in-classes,
24
+ modernize-*,
25
+ -modernize-use-trailing-return-type,
26
+ performance-*,
27
+ -performance-no-int-to-ptr,
28
+ portability-*,
29
+ readability-*,
30
+ -readability-identifier-length,
31
+ -readability-magic-numbers,
32
+ -readability-function-cognitive-complexity
33
+
34
+ CheckOptions:
35
+ - key: readability-identifier-naming.ClassCase
36
+ value: CamelCase
37
+ - key: readability-identifier-naming.ClassIgnoredRegexp
38
+ value: ".*ZX.*|.*SWAP.*|.*CEX.*|.*DD.*|.*EQ.*"
39
+ - key: readability-identifier-naming.ConstantParameterCase
40
+ value: camelBack
41
+ - key: readability-identifier-naming.EnumCase
42
+ value: CamelCase
43
+ - key: readability-identifier-naming.EnumConstantCase
44
+ value: CamelCase
45
+ - key: readability-identifier-naming.FunctionCase
46
+ value: camelBack
47
+ - key: readability-identifier-naming.FunctionIgnoredRegexp
48
+ value: ".*ZX.*|.*SWAP.*|.*CEX.*|.*DD.*|.*EQ.*"
49
+ - key: readability-identifier-naming.GlobalConstantCase
50
+ value: UPPER_CASE
51
+ - key: readability-identifier-naming.IgnoreMainLikeFunctions
52
+ value: "true"
53
+ - key: readability-identifier-naming.LocalConstantCase
54
+ value: camelBack
55
+ - key: readability-identifier-naming.LocalVariableCase
56
+ value: camelBack
57
+ - key: readability-identifier-naming.MemberCase
58
+ value: camelBack
59
+ - key: readability-identifier-naming.MemberIgnoredRegexp
60
+ value: ".*ZX.*|.*SWAP.*|.*CEX.*|.*DD.*|.*EQ.*"
61
+ - key: readability-identifier-naming.MethodCase
62
+ value: camelBack
63
+ - key: readability-identifier-naming.ParameterCase
64
+ value: camelBack
65
+ - key: readability-identifier-naming.ParameterIgnoredRegexp
66
+ value: ".*ZX.*|.*SWAP.*|.*CEX.*|.*DD.*|.*EQ.*|.*_"
67
+ - key: readability-identifier-naming.ConstantParameterIgnoredRegexp
68
+ value: ".*ZX.*|.*SWAP.*|.*CEX.*|.*DD.*|.*EQ.*|.*_"
69
+ - key: readability-identifier-naming.NamespaceCase
70
+ value: lower_case
71
+ - key: readability-identifier-naming.StaticConstantCase
72
+ value: UPPER_CASE
73
+ - key: readability-identifier-naming.StructCase
74
+ value: CamelCase
75
+ - key: readability-identifier-naming.VariableCase
76
+ value: camelBack
@@ -0,0 +1,7 @@
1
+ format:
2
+ line_width: 100
3
+ keyword_case: "upper"
4
+ autosort: true
5
+
6
+ markup:
7
+ first_comment_is_literal: true
@@ -0,0 +1,3 @@
1
+ node: $Format:%H$
2
+ node-date: $Format:%cI$
3
+ describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
@@ -0,0 +1 @@
1
+ .git_archival.txt export-subst
@@ -0,0 +1,91 @@
1
+ # This file has been generated from an external template. Please do not modify it directly.
2
+ # Changes should be contributed to https://github.com/munich-quantum-toolkit/templates.
3
+
4
+ # Python
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+ *.so
9
+
10
+ # Packaging
11
+ /build/
12
+ /dist/
13
+ .eggs/
14
+ *.egg
15
+ *.egg-info/
16
+ /_skbuild/
17
+ /wheelhouse/
18
+
19
+ # Testing
20
+ .coverage
21
+ .coverage.*
22
+ .hypothesis/
23
+ .nox/
24
+ .pytest_cache/
25
+ .tox/
26
+ *.cover
27
+ *.profraw
28
+ coverage.xml
29
+ htmlcov/
30
+
31
+ # Documentation
32
+ docs/_build/
33
+ docs/**/build/
34
+ docs/api/
35
+
36
+ # Environments
37
+ .env
38
+ .env.*
39
+ !.env.example
40
+ !.env.*.example
41
+ .venv/
42
+ env/
43
+ venv/
44
+
45
+ # Tool caches
46
+ .cache/
47
+ .mypy_cache/
48
+ .pyre/
49
+ .pytype/
50
+ .ruff_cache/
51
+ .rumdl_cache/
52
+
53
+ # Jupyter
54
+ .ipynb_checkpoints/
55
+
56
+ # Versioning
57
+ python/**/_version.py
58
+ src/**/_version.py
59
+
60
+ # CMake
61
+ .ccache/
62
+ /build_*/
63
+ /cmake-build-*/
64
+ /out/build/
65
+ test/**/build/
66
+ CMakeCache.txt
67
+ CMakeFiles/
68
+ CMakeUserPresets.json
69
+ CTestTestfile.cmake
70
+ cmake_install.cmake
71
+ compile_commands.json
72
+
73
+ # Editors
74
+ .idea/
75
+ .vs/
76
+ .vscode/
77
+ *.swp
78
+ *~
79
+
80
+ # Claude
81
+ .claude/
82
+ CLAUDE.md
83
+
84
+ # Operating systems
85
+ .DS_Store
86
+ .DS_Store?
87
+ ._*
88
+ .Spotlight-V100
89
+ .Trashes
90
+ Thumbs.db
91
+ ehthumbs.db
@@ -0,0 +1,42 @@
1
+ {
2
+ "author": {
3
+ "name": "Chair for Design Automation, TUM\nCopyright (c) 2025 - 2026 Munich Quantum Software Company GmbH",
4
+ "years": [2023, 2026]
5
+ },
6
+ "force_author": true,
7
+ "force_license": true,
8
+ "license": "MIT",
9
+ "title": false,
10
+ "include": ["**/*"],
11
+ "style_override_for_suffix": {
12
+ ".pyi": "DOCSTRING_STYLE",
13
+ ".in": "POUND_STYLE",
14
+ ".mlir": "SLASH_STYLE",
15
+ ".td": "SLASH_STYLE",
16
+ ".yaml": "POUND_STYLE",
17
+ ".toml": "POUND_STYLE",
18
+ ".yml": "POUND_STYLE"
19
+ },
20
+ "exclude": [
21
+ "^\\.[^/]+",
22
+ "/\\.[^/]+",
23
+ ".*\\.qasm",
24
+ ".*\\.md",
25
+ ".*\\.bib",
26
+ ".*\\.cff",
27
+ ".*\\.css",
28
+ ".*\\.ipynb",
29
+ ".*\\.json",
30
+ ".*\\.html",
31
+ ".*\\.tfc",
32
+ ".*\\.qc",
33
+ ".*\\.real",
34
+ ".*\\.rst",
35
+ ".*\\.tex",
36
+ ".*\\.profile",
37
+ "uv\\.lock",
38
+ "py\\.typed",
39
+ ".*build.*",
40
+ "(^|/)LICENSE$"
41
+ ]
42
+ }
@@ -0,0 +1,172 @@
1
+ # To run all pre-commit checks, use:
2
+ #
3
+ # uvx prek run -a
4
+ #
5
+ # To install pre-commit hooks that run every time you commit:
6
+ #
7
+ # uv tool install prek
8
+ # prek install
9
+ #
10
+
11
+ ci:
12
+ autoupdate_commit_msg: "⬆️🪝 update pre-commit hooks"
13
+ autoupdate_schedule: quarterly
14
+ autofix_commit_msg: "🎨 pre-commit fixes"
15
+ skip: [ty]
16
+
17
+ repos:
18
+ ## Standard hooks
19
+ - repo: https://github.com/pre-commit/pre-commit-hooks
20
+ rev: v6.0.0
21
+ hooks:
22
+ - id: check-merge-conflict
23
+ priority: 0
24
+ - id: end-of-file-fixer
25
+ priority: 1
26
+ - id: trailing-whitespace
27
+ priority: 2
28
+
29
+ ## Check JSON schemata
30
+ - repo: https://github.com/python-jsonschema/check-jsonschema
31
+ rev: 0.38.0
32
+ hooks:
33
+ - id: check-codecov
34
+ priority: 0
35
+ - id: check-github-workflows
36
+ priority: 0
37
+ - id: check-readthedocs
38
+ priority: 0
39
+
40
+ ## Check for security issues in GitHub Actions workflows
41
+ - repo: https://github.com/zizmorcore/zizmor-pre-commit
42
+ rev: v1.30.1
43
+ hooks:
44
+ - id: zizmor
45
+ priority: 0
46
+
47
+ ## Check best practices for scientific Python code
48
+ - repo: https://github.com/scientific-python/cookie
49
+ rev: 2026.08.14
50
+ hooks:
51
+ - id: sp-repo-review
52
+ additional_dependencies: ["repo-review[cli]"]
53
+ priority: 0
54
+
55
+ ## Check pyproject.toml file
56
+ - repo: https://github.com/henryiii/validate-pyproject-schema-store
57
+ rev: 2026.09.11
58
+ hooks:
59
+ - id: validate-pyproject
60
+ priority: 0
61
+
62
+ ## Ensure uv.lock is up to date
63
+ - repo: https://github.com/astral-sh/uv-pre-commit
64
+ rev: 0.12.13
65
+ hooks:
66
+ - id: uv-lock
67
+ priority: 0
68
+
69
+ ## Check for common capitalization mistakes
70
+ - repo: local
71
+ hooks:
72
+ - id: disallow-caps
73
+ name: Disallow improper capitalization
74
+ language: pygrep
75
+ entry: \b(Nanobind|Numpy|Cmake|CCache|Github|PyTest|Mqt|Tum)\b
76
+ exclude: ^(\.pre-commit-config\.yaml)$
77
+ priority: 0
78
+
79
+ ## Check for typos
80
+ - repo: https://github.com/adhtruong/mirrors-typos
81
+ rev: v1.50.1
82
+ hooks:
83
+ - id: typos
84
+ priority: 3
85
+
86
+ ## Check license headers
87
+ - repo: https://github.com/emzeat/mz-lictools
88
+ rev: v2.9.0
89
+ hooks:
90
+ - id: license-tools
91
+ priority: 4
92
+
93
+ ## Format BibTeX files with bibtex-tidy
94
+ - repo: https://github.com/FlamingTempura/bibtex-tidy
95
+ rev: v1.14.0
96
+ hooks:
97
+ - id: bibtex-tidy
98
+ args:
99
+ [
100
+ "--align=20",
101
+ "--curly",
102
+ "--months",
103
+ "--blank-lines",
104
+ "--sort",
105
+ "--strip-enclosing-braces",
106
+ "--sort-fields",
107
+ "--trailing-commas",
108
+ "--remove-empty-fields",
109
+ ]
110
+ priority: 5
111
+
112
+ ## Format configuration files with prettier
113
+ - repo: https://github.com/rbubley/mirrors-prettier
114
+ rev: v3.9.6
115
+ hooks:
116
+ - id: prettier
117
+ types_or: [yaml, html, css, scss, javascript, json, json5]
118
+ priority: 5
119
+
120
+ ## Format Markdown files with rumdl
121
+ - repo: https://github.com/rvben/rumdl-pre-commit
122
+ rev: v0.2.72
123
+ hooks:
124
+ - id: rumdl
125
+ args: [--fix]
126
+ priority: 5
127
+ - id: rumdl-fmt
128
+ priority: 6
129
+
130
+ ## Format pyproject.toml with pyproject-fmt
131
+ - repo: https://github.com/tox-dev/pyproject-fmt
132
+ rev: v2.29.4
133
+ hooks:
134
+ - id: pyproject-fmt
135
+ priority: 5
136
+
137
+ ## Format CMake files with cmake-format
138
+ - repo: https://github.com/cheshirekow/cmake-format-precommit
139
+ rev: v0.6.13
140
+ hooks:
141
+ - id: cmake-format
142
+ additional_dependencies: [pyyaml]
143
+ types: [file]
144
+ files: (\.cmake|CMakeLists.txt)(.in)?$
145
+ priority: 5
146
+
147
+ ## Format C++ files with clang-format
148
+ - repo: https://github.com/pre-commit/mirrors-clang-format
149
+ rev: v23.1.1
150
+ hooks:
151
+ - id: clang-format
152
+ types_or: [c++, c, cuda]
153
+ priority: 5
154
+
155
+ ## Format and lint Python files with ruff
156
+ - repo: https://github.com/astral-sh/ruff-pre-commit
157
+ rev: v0.16.7
158
+ hooks:
159
+ - id: ruff-check
160
+ require_serial: true
161
+ priority: 6
162
+ - id: ruff-format
163
+ types_or: [python, pyi, jupyter, markdown]
164
+ priority: 7
165
+
166
+ ## Check Python types with ty
167
+ - repo: https://github.com/astral-sh/ty-pre-commit
168
+ rev: v0.0.80
169
+ hooks:
170
+ - id: ty
171
+ args: [--only-dev]
172
+ priority: 8
@@ -0,0 +1,28 @@
1
+ version: 2
2
+
3
+ formats:
4
+ - htmlzip
5
+
6
+ sphinx:
7
+ configuration: docs/conf.py
8
+
9
+ build:
10
+ os: ubuntu-24.04
11
+ tools:
12
+ python: "3.14"
13
+ apt_packages:
14
+ - cmake
15
+ - doxygen
16
+ - graphviz
17
+ jobs:
18
+ pre_build:
19
+ # Build the C++ API docs before Sphinx starts
20
+ - cd docs && mkdir -p _build/doxygen && doxygen
21
+ - cd docs && mkdir -p api/cpp && uv run --no-sync --no-dev breathe-apidoc -o api/cpp -m -f -g file _build/doxygen/xml/
22
+
23
+ python:
24
+ install:
25
+ - method: uv
26
+ command: sync
27
+ groups:
28
+ - docs
@@ -0,0 +1,21 @@
1
+ [per-file-ignores]
2
+ # The PR template is not a Markdown document in that sense
3
+ "**/pull_request_template.md" = ["MD013", "MD041"]
4
+ # The docs files may include HTML and do not need to start with a top-level heading
5
+ "docs/**" = ["MD033", "MD041"]
6
+ # The README may include HTML and does not need to start with a top-level heading
7
+ "README.md" = ["MD033", "MD041"]
8
+
9
+ [per-file-flavor]
10
+ "docs/**" = "myst"
11
+
12
+ [MD013]
13
+ line-length = 80
14
+ code-blocks = false
15
+ headings = false
16
+ reflow = true
17
+ reflow-mode = "normalize"
18
+
19
+ [MD060]
20
+ enabled = true
21
+ style = "aligned"
@@ -0,0 +1,190 @@
1
+ <!--- This file has been generated from an external template. Please do not modify it directly. -->
2
+ <!--- Changes should be contributed to https://github.com/munich-quantum-toolkit/templates. -->
3
+
4
+ # MQT DDSIM
5
+
6
+ ## C++
7
+
8
+ - Configure: `cmake --preset release`
9
+ - Build: `cmake --build --preset release`
10
+ - Test: `ctest --preset release`
11
+ - Single test binary: `./build/release/test/path/to/binary`
12
+ - For debug builds, replace `release` with `debug`.
13
+ - For more presets, see `CMakePresets.json`.
14
+
15
+ ## Python
16
+
17
+ - Set up build and test dependencies:
18
+ `uv sync --inexact --only-group build --only-group test`
19
+ - Install package without build isolation (fast rebuilds):
20
+ `uv sync --inexact --no-dev --no-build-isolation-package mqt-ddsim`
21
+ - Run tests: `uv run --no-sync pytest`
22
+ - Nox test shortcuts: `uvx nox -s tests`, `uvx nox -s minimums`
23
+ - Python 3.14 variants: `uvx nox -s tests-3.14`, `uvx nox -s minimums-3.14`
24
+
25
+ ## Documentation
26
+
27
+ - Sources: `docs/`
28
+ - Build docs locally: `uvx nox --non-interactive -s docs`
29
+ - Link check: `uvx nox -s docs -- -b linkcheck`
30
+
31
+ ## Tech Stack
32
+
33
+ ### General
34
+
35
+ - `prek` for pre-commit hooks
36
+
37
+ ### C++
38
+
39
+ - Targets Linux (glibc 2.28+), macOS (11.0+), and Windows on x86_64 and arm64
40
+ architectures
41
+ - C++20
42
+ - CMake 3.28+
43
+ - `FetchContent` for dependency management (configured in
44
+ `cmake/ExternalDependencies.cmake`)
45
+ - `clang-format` and `clang-tidy` for formatting/linting (see `.clang-format`
46
+ and `.clang-tidy`)
47
+ - GoogleTest for unit tests (located in `test/`)
48
+
49
+ ### Python
50
+
51
+ - Python 3.11+
52
+ - Split-mode Stable ABI wheels: `cp311-abi3` for GIL-enabled CPython 3.11+ and
53
+ `cp315-abi3t` for free-threaded CPython 3.15+
54
+ - `scikit-build-core` as build backend
55
+ - `nanobind` for bindings
56
+ - `uv` for installation, packaging, and tooling
57
+ - `ruff` for formatting/linting (configured in `pyproject.toml`)
58
+ - `ty` for type checking
59
+ - `pytest` for unit tests (located in `test/python/`)
60
+ - `nox` for task orchestration (tests, linting, docs)
61
+
62
+ ### Documentation
63
+
64
+ - `sphinx`
65
+ - MyST (Markdown)
66
+ - Furo theme
67
+ - `breathe` for C++ API docs
68
+
69
+ ## Development Guidelines
70
+
71
+ ### General
72
+
73
+ - MUST read and follow `docs/ai_usage.md`. A human must review and understand
74
+ all AI-assisted work. AI assistance must not be used for contributions to
75
+ issues labeled `good first issue`.
76
+ - MUST run `uvx nox -s lint` after every batch of changes. This runs the full
77
+ `prek` hook set from `.pre-commit-config.yaml` (including `ruff`, `typos`,
78
+ `ty`, formatting, and metadata checks). All hooks must pass before submitting.
79
+ - MUST add or update tests for every code change, even if not explicitly
80
+ requested.
81
+ - MUST write tests that protect intended behavior or reproduce a concrete
82
+ regression. NEVER test provisional implementation choices that are not part of
83
+ the supported contract.
84
+ - MUST place tests in the repository's corresponding test tree, organized by the
85
+ component that owns the behavior. NEVER place tests or test fixtures in
86
+ production source or tool directories. Reserve tool- or CLI-level subprocess
87
+ tests for contracts that cannot be exercised meaningfully through a lower-
88
+ level public API. Normal test targets and dependencies belong in the test
89
+ build; avoid promoting an otherwise optional production tool into the default
90
+ build solely for subprocess testing.
91
+ - MUST follow existing code style by checking neighboring files for patterns.
92
+ - MUST write code comments, documentation, tests, changelog entries, and public
93
+ text for the final design. NEVER preserve prompts, review chronology, former
94
+ names, or abandoned approaches unless they remain necessary user-facing
95
+ context.
96
+ - MUST apply
97
+ [Orwell's six rules for writing](https://www.orwellfoundation.com/the-orwell-foundation/orwell/essays-and-other-works/politics-and-the-english-language/)
98
+ to every category of prose, including reasoning, descriptions, commit
99
+ messages, documentation, docstrings, comments, test text, diagnostics, and
100
+ handoffs:
101
+
102
+ 1. Do not use a familiar metaphor, simile, or other figure of speech.
103
+ 2. Use a short word when it has the same meaning as a long word.
104
+ 3. Remove every word that does not add meaning.
105
+ 4. Use active voice when possible.
106
+ 5. Use everyday English instead of a foreign phrase, scientific word, or
107
+ jargon term when this does not reduce precision.
108
+ 6. Break a rule before it makes the text unclear, incorrect, or needlessly
109
+ difficult to read.
110
+
111
+ - MUST apply the relevant principles of
112
+ [ASD-STE100 Simplified Technical English](https://www.asd-ste100.org/): use
113
+ short, direct sentences; give each sentence one main idea; use one term for
114
+ one meaning; and use explicit nouns instead of vague pronouns. These are
115
+ mandatory style rules, not a claim of formal ASD-STE100 compliance.
116
+ - MUST base terminology and phrasing on existing usage in the repository and on
117
+ established precedents in the communities the repository draws from. Use the
118
+ established term that most precisely matches the concept. If communities use
119
+ different terms, explain the mapping once. NEVER invent synonyms for variety.
120
+ - MUST remove obsolete scaffolding and diagnostic suppressions before handoff.
121
+ Keep a workaround or suppression only when it is still necessary, scope it as
122
+ narrowly as possible, and document the technical reason.
123
+ - MUST update `CHANGELOG.md` and `UPGRADING.md` when changes are user-facing,
124
+ breaking, or otherwise noteworthy.
125
+ - MUST format changelog entries with the pull request reference and every
126
+ contributing author, for example `([#123]) ([**@username**])`, and define the
127
+ corresponding links at the bottom of `CHANGELOG.md`.
128
+ - AI assistance MUST be disclosed in the PR description.
129
+ - Commit-level `Assisted-by: [Model Name] via [Tool Name]` trailers are
130
+ recommended, not required. For example:
131
+ `Assisted-by: Claude Sonnet 4.6 via GitHub Copilot`. Do not rewrite otherwise
132
+ valid history solely to add one.
133
+ - NEVER modify files that start with "This file has been generated from an
134
+ external template. Please do not modify it directly." These files are managed
135
+ by
136
+ [the MQT templates action](https://github.com/munich-quantum-toolkit/templates)
137
+ and changes will be overwritten.
138
+ - PREFER running targeted tests over the full test suite during development.
139
+
140
+ ### GitHub Issues and Pull Requests
141
+
142
+ - MAY create, submit, and edit pull requests; create and manage issues; and
143
+ comment on issues or pull requests when the task explicitly authorizes that
144
+ external action. A single authorization may cover a clearly scoped task;
145
+ per-message approval is not required. Actions outside that scope require fresh
146
+ authorization. The human remains responsible for reviewing all submitted work.
147
+ - MUST use the repository's pull request template when one is present.
148
+ - Every agent-authored or agent-edited public text body MUST begin with
149
+ `🤖 *AI text below* 🤖` on its first line. This applies to issue and pull
150
+ request descriptions, review bodies, inline review comments, issue comments,
151
+ replies, and other submitted text bodies; titles are exempt.
152
+ - When editing human-authored public text, preserve its original content and add
153
+ the disclosure at the beginning of the edited field.
154
+ - MUST keep external communication accurate, specific, and non-repetitive; do
155
+ not post low-quality or unsolicited comments.
156
+ - When reviewing a contribution, MUST focus findings on substantive correctness,
157
+ contracts, maintainability, tests, documentation, licensing, and validation.
158
+ NEVER report a missing optional AI-attribution trailer as a review finding.
159
+
160
+ ### C++
161
+
162
+ - MUST use Doxygen-style comments.
163
+ - MUST use `#pragma once` for header guards.
164
+ - MUST regenerate stubs via `uvx nox -s stubs` when files in `bindings/` are
165
+ added or modified.
166
+ - NEVER edit `.pyi` files in `python/mqt/ddsim/` manually; they are
167
+ auto-generated by `nanobind.stubgen`.
168
+ - PREFER C++20 STL features over custom implementations.
169
+
170
+ ### Python
171
+
172
+ - MUST use Google-style docstrings
173
+ - PREFER running a single Python version over the full test suite during
174
+ development.
175
+ - PREFER fixing reported warnings over suppressing them (e.g., with `# noqa`
176
+ comments for ruff); only add ignore rules when necessary and document why.
177
+ - PREFER fixing typing issues reported by `ty` before adding suppression
178
+ comments (`# ty: ignore[code]`); suppressions are sometimes necessary for
179
+ incompletely typed libraries (e.g., Qiskit).
180
+
181
+ ## Self-Review Checklist
182
+
183
+ - Did `uvx nox -s lint` pass without errors?
184
+ - Are all changes covered by at least one automated test?
185
+ - Were any agent-authored issue or pull request texts explicitly authorized and
186
+ marked with the required visible disclosure?
187
+ - Were Python stubs regenerated via `uvx nox -s stubs` if bindings were
188
+ modified?
189
+ - Are `CHANGELOG.md` and `UPGRADING.md` updated when changes are user-facing,
190
+ breaking, or otherwise noteworthy?