aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-08-14 21:35:38 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-08-14 21:36:18 +0000
commitad61700fd52b561895c3678513714ba5ca86ce13 (patch)
tree33691e30fa057fea56b806ca7c12581423540889
parentb966478736c57e282de767b1255f411fda49c691 (diff)
downloadports-ad61700fd52b561895c3678513714ba5ca86ce13.tar.gz
ports-ad61700fd52b561895c3678513714ba5ca86ce13.zip
science/py-dwave-greedy: New port: DWave: Greedy binary quadratic model solvers
-rw-r--r--science/Makefile1
-rw-r--r--science/py-dwave-greedy/Makefile33
-rw-r--r--science/py-dwave-greedy/distinfo3
-rw-r--r--science/py-dwave-greedy/pkg-descr9
4 files changed, 46 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile
index 6a3a53a85d18..365949ba8278 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -285,6 +285,7 @@
SUBDIR += py-dipy
SUBDIR += py-dlib
SUBDIR += py-dwave-cloud-client
+ SUBDIR += py-dwave-greedy
SUBDIR += py-dwave-neal
SUBDIR += py-dwave-networkx
SUBDIR += py-dwave-preprocessing
diff --git a/science/py-dwave-greedy/Makefile b/science/py-dwave-greedy/Makefile
new file mode 100644
index 000000000000..931330ea1044
--- /dev/null
+++ b/science/py-dwave-greedy/Makefile
@@ -0,0 +1,33 @@
+PORTNAME= dwave-greedy
+DISTVERSION= 0.2.5
+CATEGORIES= science python # quantum-computing
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= DWave: Greedy binary quadratic model solvers
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dimod>0:science/py-dimod@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.0:devel/py-importlib-metadata@${PY_FLAVOR} \
+ ${PYNUMPY}
+BUILD_DEPENDS= ${PY_DEPENDS} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0.30.0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PY_DEPENDS}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dwave-system>0:science/py-dwave-system@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}parameterized>0:devel/py-parameterized@${PY_FLAVOR}
+
+USES= python:3.7+
+USE_PYTHON= distutils cython autoplist unittest
+
+USE_GITHUB= yes
+GH_ACCOUNT= dwavesystems
+
+TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_WRKSRC= ${WRKSRC}/tests
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/greedy/descent${PYTHON_EXT_SUFFIX}.so
+
+.include <bsd.port.mk>
diff --git a/science/py-dwave-greedy/distinfo b/science/py-dwave-greedy/distinfo
new file mode 100644
index 000000000000..7e0c8a1fff77
--- /dev/null
+++ b/science/py-dwave-greedy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660466486
+SHA256 (dwavesystems-dwave-greedy-0.2.5_GH0.tar.gz) = 5b64041d1b6de713f11ea3c5c810ceebfb588c9cb9f8d687727fd9a8e85fcbeb
+SIZE (dwavesystems-dwave-greedy-0.2.5_GH0.tar.gz) = 29039
diff --git a/science/py-dwave-greedy/pkg-descr b/science/py-dwave-greedy/pkg-descr
new file mode 100644
index 000000000000..64bdfff93506
--- /dev/null
+++ b/science/py-dwave-greedy/pkg-descr
@@ -0,0 +1,9 @@
+dwave-greedy is an implementation of a steepest descent solver for binary
+quadratic models.
+
+Steepest descent is the discrete analogue of gradient descent, but the best move
+is computed using a local minimization rather rather than computing a gradient.
+At each step, we determine the dimension along which to descend based on the
+highest energy drop caused by a variable flip.
+
+WWW: https://docs.ocean.dwavesys.com/projects/greedy/en/latest/