Thanks for considering a contribution. This document explains how to set up your development environment, the project's code standards, and how to propose a change.
- Development setup
- Code standards
- Adding a new QML algorithm
- Adding a new dataset
- Commit conventions
- Pull request checklist
- Release process
git clone https://github.com/orbion-life/quantum-ml-comparator.git
cd quantum-ml-comparator
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pre-commit install # once .pre-commit-config.yaml is added (see ROADMAP)Run tests and lint before opening a PR:
pytest tests/ -v
ruff check qmc/ tests/For notebooks that touch quantum chemistry (H2, LiH, H2O):
pip install -e ".[molecules]" # adds pyscf- Line length: 100 characters (ruff-enforced).
- Docstrings: NumPy style. Every public function, class, and module gets a docstring.
- Type hints: required on all new public signatures. Use
numpy.typing.NDArray,torch.Tensor, andLiteral[...]where appropriate. - Public API: anything exported from
qmc/__init__.pyor a submodule__init__.py. Breaking changes here bump the minor version (seeCHANGELOG.md). - Testing: new features need tests. Target coverage for the
qmc/package is 80%+.
- Create
qmc/circuits/<algorithm_name>.py. - Implement a class inheriting from
sklearn.base.BaseEstimatorandsklearn.base.ClassifierMixin(orRegressorMixin). It should exposefit(X, y),predict(X), andpredict_proba(X). - Register the class in
qmc/circuits/__init__.py. - Add an entry to the
MAPPINGSdict inqmc/recommender.pyso the recommender knows when to suggest it. Include rationale, difficulty, and circuit config. - Add a test in
tests/test_circuits.pyverifying:- The estimator fits on 100 samples of
make_moonswithin 30 s. - Test accuracy > 0.7 on the moons dataset.
get_params()/set_params()round-trip correctly.sklearn.utils.estimator_checks.check_estimatorpasses (or document explicit xfails).
- The estimator fits on 100 samples of
- Document the algorithm on the MkDocs site under
docs/algorithms/<algorithm_name>.mdwith the four standard sections: mathematical formulation, circuit diagram, complexity, limitations.
- Add a loader function to
qmc/datasets/builtin.py:def load_<name>() -> tuple[np.ndarray, np.ndarray, DatasetMeta]: """<one-line description>.""" ...
- Register it in the
DATASETSdict in the same module. - Add a row to the README's "Built-in datasets" table.
- Add a smoke test in
tests/test_benchmark.pyconfirming the loader returns arrays of the documented shape. - Datasets must be loadable without network access (bundled or generated from sklearn).
We use Conventional Commits:
feat: ...— new featurefix: ...— bug fixdocs: ...— documentation onlytest: ...— adding or improving testsrefactor: ...— internal restructuring without behavior changechore: ...— tooling, CI, dependenciesbench: ...— benchmark additions or changes
Breaking changes get a ! suffix on the type (feat!:) and a
BREAKING CHANGE: footer.
Before requesting review:
- Tests added or updated for your change.
-
pytest tests/passes locally. -
ruff check qmc/ tests/is clean. - No proprietary data or references introduced — the CI proprietary- reference grep must stay green.
- Public API changes documented in
CHANGELOG.mdunder[Unreleased]. - If the change adds a new algorithm, docs page and test coverage follow the standards above.
- Open a
release: prepare vX.Y.ZPR that:- Moves
[Unreleased]entries inCHANGELOG.mdinto a new[X.Y.Z] - YYYY-MM-DDsection. - Bumps
versioninpyproject.toml,qmc/__init__.py, andCITATION.cff.
- Moves
- After merge, tag and push:
git tag vX.Y.Z git push origin vX.Y.Z
- The tag push triggers
.github/workflows/release.yml, which builds the sdist / wheel and publishes to PyPI via Trusted Publishing.
Open a GitHub Discussion
or email aniruddh.goteti@orbion.life.