-
-
Notifications
You must be signed in to change notification settings - Fork 53
docs: Add AGENTS.md with repository instructions for AI tooling #1516
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
Open
mhmohona
wants to merge
15
commits into
munich-quantum-toolkit:main
Choose a base branch
from
mhmohona:ai_agent
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+102
−0
Open
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a6ddd09
add agents file
mhmohona 5c81c47
🎨 pre-commit fixes
pre-commit-ci[bot] 93c50b0
Apply suggestion from @denialhaag
mhmohona 74502e8
Apply suggestion from @coderabbitai[bot]
mhmohona 7fb71ea
updated as per feedback
mhmohona f02775e
Update AGENTS.md
mhmohona bd40091
Update AGENTS.md
mhmohona 2b05fd6
Merge branch 'main' into ai_agent
mhmohona 8552272
enrich file
mhmohona cc042d0
Resolve merge conflict in AGENTS.md
mhmohona 39e27cf
🎨 pre-commit fixes
pre-commit-ci[bot] 0b96a4a
Update AGENTS.md
mhmohona 74cd62b
updated python version
mhmohona 7c3827d
Merge branch 'ai_agent' of https://github.com/mhmohona/core into ai_a…
mhmohona 26e041e
Merge branch 'main' into ai_agent
mhmohona File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # MQT Core | ||
|
|
||
| MQT Core is the backbone of the [Munich Quantum Toolkit](https://mqt.readthedocs.io/). | ||
| It provides the core data structures, algorithms, and Python bindings for quantum computing applications. | ||
| The C++ library lives in `src/` and `include/`, Python bindings in `python/`, tests in `test/`, and documentation in `docs/`. | ||
|
|
||
| ## Dev environment tips | ||
|
|
||
| - Use `uv sync --all-extras` to install dependencies and lock the environment. | ||
| **Do not use pip or venv manually.** | ||
| - Run `uv pip install -e . --no-build-isolation` to build the Python package in development mode. | ||
| - Check `build/{wheel_tag}/{build_type}` for Python build artifacts. | ||
| - To build Python bindings in debug mode, use `uv pip install -e . --no-build-isolation --config-settings=cmake.build-type=Debug`. | ||
| - For C++ only — `cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_MQT_CORE_TESTS=ON`, then `cmake --build build`. | ||
| - For C++ debug builds: pass `-DCMAKE_BUILD_TYPE=Debug` instead. | ||
| - C++ build artifacts land in `build/src/` (libraries) and `build/test/` (test executables). | ||
| - We require **C++20**, **CMake 3.24+**, **Python 3.10+**, and **LLVM 21+**. | ||
| - We support Linux, macOS, and Windows (x86 & arm64). | ||
| Ensure changes work cross-platform. | ||
| - See [`docs/contributing.md`](docs/contributing.md) for the full contributor guide and [`docs/installation.md`](docs/installation.md) for setup details. | ||
|
|
||
| ## Testing instructions | ||
|
|
||
| - Run `uvx nox -s tests` to execute the full Python test suite. | ||
| - To focus on one test: `uvx nox -s tests -- -k "<test_name>"`. | ||
| - Run `uvx nox -s minimums` to test with the lowest supported dependency versions. | ||
| - Run `uvx nox -s qiskit` to verify compatibility with the latest Qiskit. | ||
| - For C++ tests, run `ctest -C Release --test-dir build` from the project root after building. | ||
| - To run a single C++ test: `ctest -C Release --test-dir build -R <test_name>`. | ||
| - Ensure `BUILD_MQT_CORE_BINDINGS=ON` and `BUILD_MQT_CORE_TESTS=ON` were set during CMake configuration. | ||
| - Add or update tests for the code you change, even if nobody asked. | ||
|
|
||
| ## Linting and formatting | ||
|
|
||
| - Always run `uvx nox -s lint` (or equivalently `uvx prek run -a`) before committing. | ||
| - We use `ruff` for Python linting and formatting — not pylint, black, or isort. | ||
| Our config enables **ALL** rules by default and only selectively disables some in [`pyproject.toml`](pyproject.toml). | ||
| - We use `ty` for static type checking — not mypy. | ||
| - C++ code uses `clang-format` and `clang-tidy` for formatting and linting. | ||
| - Spell checking across the codebase is handled by `typos`. | ||
| - Do NOT edit `.pyi` stub files manually; regenerate them with `uvx nox -s stubs`. | ||
|
|
||
| ## Docs instructions | ||
|
|
||
| - Run `uvx nox -s docs` to build the documentation. | ||
| - Use `uvx nox -s docs -- -b html` to build the HTML docs locally for preview. | ||
| - (Optional) Serve locally via `python -m http.server` from `docs/_build/html`. | ||
| - Find generated HTML files in `docs/_build/html`. | ||
| - Documentation entry point is [`docs/index.md`](docs/index.md). | ||
|
|
||
| ## Development guidelines | ||
|
|
||
| - All changes must be tested. | ||
| If you're not testing your changes, you're not done. | ||
| - Follow existing code style. | ||
| Check neighboring files for patterns. | ||
| - Prefer C++20 `std::` features over custom implementations. | ||
| Avoid unnecessary complexity. | ||
| - Python code must be fully typed and pass `ty` static analysis. | ||
| - Use Google-style docstrings for Python and Doxygen comments for C++. | ||
| - Always run `uvx prek run -a` at the end of a task. | ||
|
|
||
| ## PR instructions | ||
|
|
||
| - Always run `uvx nox -s lint` and the relevant test suite before committing. | ||
| - If `uvx nox -s lint` fails, your code is not ready. | ||
| Fix formatting and types first. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.