[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "qibotn"
version = "0.0.7"
description = "A tensor-network translation module for Qibo"
authors = ["The Qibo team"]
license = "Apache License 2.0"
readme = "README.md"
homepage = "https://qibo.science/"
repository = "https://github.com/qiboteam/qibotn/"
documentation = "https://qibo.science/docs/qibotn/stable"
keywords = []
classifiers = [
  "Programming Language :: Python :: 3",
  "Topic :: Scientific/Engineering :: Physics",
]
packages = [{ include = "qibotn", from = "src" }]

[tool.poetry.dependencies]
python = ">=3.11,<3.14"
qibo = "^0.3.0"
qibojit = "^0.1.13"
quimb = { version = "^1.10.0", extras = ["tensor"] }
cupy-cuda12x = { version = "^13.6.0", optional = true }
cuda-toolkit = {extras = ["all"], version = "^12.9.1"}
nvidia-nccl-cu12 = { version = "^2.16.5", optional = true }
cuquantum-python-cu12 = { version = "^25.9.1", optional = true }
qmatchatea = { version = "^1.4.3", optional = true }
qiskit = { version = "^1.4.0", optional = true }
qtealeaves = { version = "^1.5.20", optional = true }
distributed = { version = ">=2024", optional = true }


[tool.poetry.extras]
cuda = ["cupy-cuda12x", "cuda-toolkit", "nvidia-nccl-cu12", "cuquantum-python-cu12", "mpi4py"]
qmatchatea = ["qmatchatea"]
dask = ["distributed"]

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
Sphinx = "^5.3.0"
furo = "^2023.3.27"
sphinxcontrib-bibtex = "^2.5.0"
sphinx-copybutton = "^0.5.2"
sphinxcontrib-katex = "^0.9.9"

[tool.poetry.group.dev.dependencies]
ipython = "^8.34.0"

[tool.poetry.group.tests]
optional = true

[tool.poetry.group.tests.dependencies]
pytest = ">=8,<10"
pytest-cov = "^4.1.0"
pytest-env = "^1.1.3"

[tool.poetry.group.analysis]
optional = true

[tool.poetry.group.analysis.dependencies]
pylint = "^3.0.3"

[tool.poe.tasks]
test = "pytest"
lint = "pylint src --errors-only"
lint-warnings = "pylint src --exit-zero"
docs = "make -C doc html"
docs-clean = "make -C doc clean"
test-docs = "make -C doc doctest"

[tool.pylint.main]
ignored-modules = ["cupy", "cuquantum", "mpi4py"]

[tool.pylint.reports]
output-format = "colorized"

[tool.pytest.ini_options]
testpaths = ["tests/"]
addopts = ["--cov=qibotn", "--cov-report=xml"]
env = ["D:NUMBA_DISABLE_JIT=1"]
