git: ad61700fd52b - main - science/py-dwave-greedy: New port: DWave: Greedy binary quadratic model solvers

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 14 Aug 2022 21:36:26 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ad61700fd52b561895c3678513714ba5ca86ce13

commit ad61700fd52b561895c3678513714ba5ca86ce13
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-14 21:35:38 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-14 21:36:18 +0000

    science/py-dwave-greedy: New port: DWave: Greedy binary quadratic model solvers
---
 science/Makefile                  |  1 +
 science/py-dwave-greedy/Makefile  | 33 +++++++++++++++++++++++++++++++++
 science/py-dwave-greedy/distinfo  |  3 +++
 science/py-dwave-greedy/pkg-descr |  9 +++++++++
 4 files changed, 46 insertions(+)

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/