[build-system]
requires = [
    "setuptools>=61",
    "setuptools_scm[toml]>=7",
    "ninja>=1.10; sys_platform != 'win32'",
    "cmake>=3.14",
]
build-backend = "setuptools.build_meta"

[project]
name = "mqt.ddsim"
description = "A quantum simulator based on decision diagrams written in C++"
readme = "README.md"
authors = [
    { name = "Stefan Hillmich", email = "stefan.hillmich@jku.at"},
    { name = "Lukas Burgholzer", email = "lukas.burgholzer@jku.at"}
]
keywords = ["MQT", "quantum computing", "design automation", "quantum circuit simulation", "simulation"]
license = { file = "LICENSE" }

classifiers=[
    "Development Status :: 5 - Production/Stable",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: C++",
    "License :: OSI Approved :: MIT License",
    "Operating System :: Microsoft :: Windows",
    "Operating System :: MacOS",
    "Operating System :: POSIX :: Linux",
    "Intended Audience :: Science/Research",
    "Natural Language :: English",
    "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
]
requires-python = ">=3.8"
dependencies = [
    "qiskit-terra>=0.20.0"
]
dynamic = ["version"]

[project.optional-dependencies]
tnflow = [
    "sparse",
    "opt-einsum",
    "quimb",
    "pandas",
    "numpy"
]
tests = [
    "pytest>=7"
]
coverage = [
    "mqt.ddsim[tests]",
    "pytest-cov"
]
docs = [
    "sphinx>=5",
    "sphinx-rtd-theme",
    "sphinx-rtd-dark-mode",
    "sphinxcontrib-bibtex>=2.4.2",
    "sphinx-copybutton",
    "sphinxext-opengraph",
    "ipython",
    "ipykernel",
    "nbsphinx",
    "breathe",
    "qiskit-terra[visualization]",
]
dev = ["mqt.ddsim[tnflow, coverage, docs]"]

[project.urls]
Homepage = "https://github.com/cda-tum/ddsim"
Documentation = "https://ddsim.readthedocs.io"
"Bug Tracker" = "https://github.com/cda-tum/ddsim/issues"
Discussions = "https://github.com/cda-tum/ddsim/discussions"
Research = "https://www.cda.cit.tum.de/research/quantum_simulation/"

[tool.setuptools.packages.find]
include = ["mqt.*"]


[tool.setuptools_scm]


[tool.cibuildwheel]
build = "cp3*"
skip = "*-musllinux_*"
archs = "auto64"
test-extras = ["test"]
test-command = "python -c \"from mqt import ddsim\""
environment = { DEPLOY = "ON" }
build-frontend = "build"
build-verbosity = 3

[tool.cibuildwheel.linux]

[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET = "10.15", DEPLOY = "ON" }

[tool.cibuildwheel.windows]
before-build = "pip install delvewheel"
repair-wheel-command = "delvewheel repair -v -w {dest_dir} {wheel}"


[tool.ruff]
select = [
    "E", "F", "W", # flake8
    "A",           # flake8-builtins
    "ARG",         # flake8-unused-arguments
    "B",  "B904",  # flake8-bugbear
    "C4",          # flake8-comprehensions
    "EM",          # flake8-errmsg
    "EXE",         # flake8-executable
    "I",           # isort
    "ICN",         # flake8-import-conventions
    "ISC",         # flake8-implicit-str-concat
    "N",           # flake8-naming
    "PGH",         # pygrep-hooks
    "PIE",         # flake8-pie
    "PL",          # pylint
    "PT",          # flake8-pytest-style
    "PTH",         # flake8-use-pathlib
    "PYI",         # flake8-pyi
    "Q",           # flake8-quotes
    "RET",         # flake8-return
    "RSE",         # flake8-raise
    "RUF",         # Ruff-specific
    "SIM",         # flake8-simplify
    "TCH",         # flake8-type-checking
    "TID",         # flake8-tidy-imports
    "TRY",         # tryceratops
    "UP",          # pyupgrade
    "YTT",         # flake8-2020
]
ignore = [
    "E501",    # Line too long (Black is enough)
    "PLR2004", # Magic values
    "PLR0913", # Too many arguments
]
target-version = "py38"

# Exclude a variety of commonly ignored directories.
exclude = [
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".hg",
    ".mypy_cache",
    ".nox",
    ".pants.d",
    ".ruff_cache",
    ".svn",
    ".tox",
    ".venv",
    "__pypackages__",
    "_build",
    "buck-out",
    "build",
    "dist",
    "node_modules",
    "venv",
    "extern",
]

line-length = 120

[tool.black]
line-length = 120
