7
.github/workflows/rules.yml
vendored
7
.github/workflows/rules.yml
vendored
@@ -15,11 +15,10 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
python-version: [3.8, 3.9, "3.10"]
|
python-version: [3.8, 3.9, "3.10", "3.11"]
|
||||||
uses: qiboteam/workflows/.github/workflows/rules.yml@main
|
uses: qiboteam/workflows/.github/workflows/rules-poetry.yml@main
|
||||||
with:
|
with:
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
environment: "qibotn"
|
poetry-extras: "--with analysis,tests"
|
||||||
pip-extras: "analysis,tests"
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
11
flake.nix
11
flake.nix
@@ -41,12 +41,11 @@
|
|||||||
|
|
||||||
languages.python = {
|
languages.python = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# poetry = {
|
poetry = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# install.enable = true;
|
install.enable = true;
|
||||||
# install.groups = ["dev" "tests"];
|
install.groups = ["dev" "tests"];
|
||||||
# install.allExtras = true;
|
};
|
||||||
# };
|
|
||||||
version = "3.11";
|
version = "3.11";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
1735
poetry.lock
generated
Normal file
1735
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,56 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
[tool.poetry]
|
||||||
|
name = "qibotn"
|
||||||
|
version = "0.0.1"
|
||||||
|
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.9,<3.12"
|
||||||
|
qibo = "^0.2.4"
|
||||||
|
quimb = { version = "^1.6.0", extras = ["tensor"] }
|
||||||
|
cupy = { version = "^11.6.0", optional = true }
|
||||||
|
cuquantum-python-cu11 = { version = "^23.3.0", optional = true }
|
||||||
|
|
||||||
|
[tool.poetry.extras]
|
||||||
|
cuda = ["cupy", "cuquantum-python-cu11"]
|
||||||
|
|
||||||
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
ipython = "^7.0.0"
|
||||||
|
|
||||||
|
[tool.poetry.group.tests]
|
||||||
|
optional = true
|
||||||
|
|
||||||
|
[tool.poetry.group.tests.dependencies]
|
||||||
|
pytest = "^8.0.0"
|
||||||
|
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"
|
||||||
|
|
||||||
[tool.pylint.main]
|
[tool.pylint.main]
|
||||||
ignored-modules = ["cupy", "cuquantum", "mpi4py"]
|
ignored-modules = ["cupy", "cuquantum", "mpi4py"]
|
||||||
|
|
||||||
|
|||||||
65
setup.py
65
setup.py
@@ -1,65 +0,0 @@
|
|||||||
import pathlib
|
|
||||||
import re
|
|
||||||
|
|
||||||
from setuptools import find_packages, setup
|
|
||||||
|
|
||||||
HERE = pathlib.Path(__file__).parent.absolute()
|
|
||||||
PACKAGE = "qibotn"
|
|
||||||
|
|
||||||
|
|
||||||
# Returns the qibotn version
|
|
||||||
def version():
|
|
||||||
"""Gets the version from the package's __init__ file if there is some
|
|
||||||
problem, let it happily fail."""
|
|
||||||
version_file = HERE / "src" / PACKAGE / "__init__.py"
|
|
||||||
version_regex = r"^__version__ = ['\"]([^'\"]*)['\"]"
|
|
||||||
|
|
||||||
initfile = version_file.read_text(encoding="utf-8")
|
|
||||||
matched = re.search(version_regex, initfile, re.M)
|
|
||||||
|
|
||||||
if matched is not None:
|
|
||||||
return matched.group(1)
|
|
||||||
return "0.0.0"
|
|
||||||
|
|
||||||
|
|
||||||
# load long description from README
|
|
||||||
setup(
|
|
||||||
name="qibotn",
|
|
||||||
version=version(),
|
|
||||||
description="A tensor-network translation module for quantum computing",
|
|
||||||
author="The Qibo team",
|
|
||||||
author_email="",
|
|
||||||
url="https://github.com/qiboteam/qibotn",
|
|
||||||
packages=find_packages("src"),
|
|
||||||
package_dir={"": "src"},
|
|
||||||
package_data={"": ["*.out", "*.yml"]},
|
|
||||||
include_package_data=True,
|
|
||||||
zip_safe=False,
|
|
||||||
classifiers=[
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"Topic :: Scientific/Engineering :: Physics",
|
|
||||||
],
|
|
||||||
install_requires=[
|
|
||||||
"qibo>=0.1.10",
|
|
||||||
"qibojit>=0.0.7",
|
|
||||||
"quimb[tensor]>=1.6.0",
|
|
||||||
],
|
|
||||||
extras_require={
|
|
||||||
"docs": [],
|
|
||||||
"tests": [
|
|
||||||
"pytest>=7.2.0",
|
|
||||||
"pytest-cov>=4.0.0",
|
|
||||||
"pytest-env>=0.8.1",
|
|
||||||
],
|
|
||||||
"analysis": [
|
|
||||||
"pylint>=2.16.0",
|
|
||||||
],
|
|
||||||
"cuda": [
|
|
||||||
"cupy>=11.6.0",
|
|
||||||
"cuquantum-python-cu11>=23.3.0",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
python_requires=">=3.8.0",
|
|
||||||
long_description=(HERE / "README.md").read_text(encoding="utf-8"),
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
)
|
|
||||||
Reference in New Issue
Block a user