aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-08-14 06:01:28 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-08-14 06:01:28 +0000
commit68abc573a4ef6ee56e4dbbe78d5a0340c86140cd (patch)
treebc006e49d2afabdbfe76db38ea84c0de8937c374
parent06ac78be58f2c94320969226e8187fa32bdf9815 (diff)
downloadports-68abc573a4ef6ee56e4dbbe78d5a0340c86140cd.tar.gz
ports-68abc573a4ef6ee56e4dbbe78d5a0340c86140cd.zip
science/py-dwave-tabu: New port: DWave: Tabu solver for QUBO/Ising problems
-rw-r--r--science/Makefile1
-rw-r--r--science/py-dwave-tabu/Makefile27
-rw-r--r--science/py-dwave-tabu/distinfo3
-rw-r--r--science/py-dwave-tabu/files/example.py3
-rw-r--r--science/py-dwave-tabu/pkg-descr5
5 files changed, 39 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile
index cd0d8cc5ec07..bdc55284f279 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -286,6 +286,7 @@
SUBDIR += py-dlib
SUBDIR += py-dwave-neal
SUBDIR += py-dwave-samplers
+ SUBDIR += py-dwave-tabu
SUBDIR += py-eccodes
SUBDIR += py-esda
SUBDIR += py-fresnel
diff --git a/science/py-dwave-tabu/Makefile b/science/py-dwave-tabu/Makefile
new file mode 100644
index 000000000000..6a37269532fe
--- /dev/null
+++ b/science/py-dwave-tabu/Makefile
@@ -0,0 +1,27 @@
+PORTNAME= dwave-tabu
+DISTVERSION= 0.4.5
+CATEGORIES= science graphics # quantum-computing
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= DWave: Tabu solver for QUBO/Ising problems
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dimod>0:science/py-dimod@${PY_FLAVOR} \
+ ${PYNUMPY}
+BUILD_DEPENDS= ${PY_DEPENDS} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0.30.0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PY_DEPENDS}
+
+USES= python:3.7+
+USE_PYTHON= distutils cython autoplist
+
+TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+do-test:
+ @${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${FILESDIR}/example.py
+
+.include <bsd.port.mk>
diff --git a/science/py-dwave-tabu/distinfo b/science/py-dwave-tabu/distinfo
new file mode 100644
index 000000000000..8e302e7c7f91
--- /dev/null
+++ b/science/py-dwave-tabu/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660455990
+SHA256 (dwave-tabu-0.4.5.tar.gz) = 110884dd5e68bb7c9a8e6813d5d1f220819ea6b49f3654e5e07e5f4b697c0ee0
+SIZE (dwave-tabu-0.4.5.tar.gz) = 121244
diff --git a/science/py-dwave-tabu/files/example.py b/science/py-dwave-tabu/files/example.py
new file mode 100644
index 000000000000..1148e23e9b0a
--- /dev/null
+++ b/science/py-dwave-tabu/files/example.py
@@ -0,0 +1,3 @@
+from tabu import TabuSampler
+response = TabuSampler().sample_ising({'a': -0.5, 'b': 1.0}, {('a', 'b'): -1})
+print(response)
diff --git a/science/py-dwave-tabu/pkg-descr b/science/py-dwave-tabu/pkg-descr
new file mode 100644
index 000000000000..7a45ca77feea
--- /dev/null
+++ b/science/py-dwave-tabu/pkg-descr
@@ -0,0 +1,5 @@
+dwave-tabu is a C/C++ implementation of the MST2 multistart tabu search
+algorithm for quadratic unconstrained binary optimization (QUBO) problems with a
+dimod sampler Python interface.
+
+WWW: https://github.com/dwavesystems/dwave-tabu