[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "pyqtorch"
description = "An efficient, large-scale emulator designed for quantum machine learning, seamlessly integrated with a PyTorch backend. Please refer to https://pyqtorch.readthedocs.io/en/latest/ for setup and usage info, along with the full documentation."
authors = [
    { name = "Slimane Thabet", email = "slimane.thabet@pasqal.com" },
    { name = "Aleksander Wennersteen", email = "aleksander.wennersteen@pasqal.com" },
    { name = "Mario Dagrada", email = "mario.dagrada@pasqal.com" },
    { name = "Dominik Seitz", email = "dominik.seitz@pasqal.com" },
    { name = "Niklas Heim", email = "niklas.heim@pasqal.com" },
]
requires-python = ">=3.8.1,<3.11"
license = {text = "Proprietary"}
version = "0.2.5"
classifiers=[
    "License :: Other/Proprietary License",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: Implementation :: CPython",
    "Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
    "openfermion>=1.5",
    "torch"
]

[project.optional-dependencies]
dev = ["black", "pytest", "pytest-cov", "flake8", "mypy", "pre-commit", "ruff"]
converters = ["qiskit"]

[tool.hatch.envs.tests]
features = [
  "dev",
  "converters",
]

[tool.hatch.envs.tests.scripts]
test = "pytest {args} && hatch -e docs run mkdocs build --clean --strict"

[tool.hatch.envs.docs]
dependencies = [
  "mkdocs",
  "mkdocs-material",
  "mkdocstrings",
  "mkdocstrings-python",
  "mkdocs-section-index",
  "mkdocs-jupyter",
  "mkdocs-exclude",
  "markdown-exec",
]

[tool.hatch.envs.docs.scripts]
build = "mkdocs build --clean --strict"

[tool.ruff]
select = ["E", "F", "I", "Q"]
extend-ignore = ["F841"]
line-length = 100

[tool.ruff.isort]
required-imports = ["from __future__ import annotations"]

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]

[tool.ruff.mccabe]
max-complexity = 15

[tool.ruff.flake8-quotes]
docstring-quotes = "double"

[tool.black]
line-length = 100
include = '\.pyi?$'
exclude = '''
/(
    \.git
  | \.hg
  | \.mypy_cache
  | \.tox
  | \.venv
  | _build
  | buck-out
  | build
  | dist
)/
'''

[tool.isort]
line_length = 100
combine_as_imports = true
balanced_wrapping = true
lines_after_imports = 2
include_trailing_comma = true
multi_line_output = 5

[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
no_implicit_optional = false
ignore_missing_imports = true
