git: d68f3b7d7481 - main - science/py-dwave-system: New port: DWave: API for incorporating the D-Wave system as a sampler

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

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

commit d68f3b7d74814abb064a91b7340470f1ec705910
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-14 21:19:36 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-14 21:36:17 +0000

    science/py-dwave-system: New port: DWave: API for incorporating the D-Wave system as a sampler
---
 science/Makefile                  |   1 +
 science/py-dwave-system/Makefile  |  41 +++++++++++++++
 science/py-dwave-system/distinfo  |   3 ++
 science/py-dwave-system/pkg-descr |  10 ++++
 science/py-dwave-system/pkg-plist | 105 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 160 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index 9cd8bb93c0a2..6a3a53a85d18 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -289,6 +289,7 @@
     SUBDIR += py-dwave-networkx
     SUBDIR += py-dwave-preprocessing
     SUBDIR += py-dwave-samplers
+    SUBDIR += py-dwave-system
     SUBDIR += py-dwave-tabu
     SUBDIR += py-eccodes
     SUBDIR += py-esda
diff --git a/science/py-dwave-system/Makefile b/science/py-dwave-system/Makefile
new file mode 100644
index 000000000000..bbf53deeb7d3
--- /dev/null
+++ b/science/py-dwave-system/Makefile
@@ -0,0 +1,41 @@
+PORTNAME=	dwave-system
+DISTVERSION=	1.15.0
+CATEGORIES=	science python # quantum-computing
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	DWave: API for incorporating the D-Wave system as a sampler
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+PY_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dimod>0:science/py-dimod@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}dwave-cloud-client>=0.9.1,<0.11.0:science/py-dwave-cloud-client@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}dwave-networkx>0:science/py-dwave-networkx@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}dwave-preprocessing>0:science/py-dwave-preprocessing@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}dwave-tabu>=0.4.2:science/py-dwave-tabu@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}homebase>=1.0.0,<2.0.0:devel/py-homebase@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}minorminer>=0.2.8,<0.3.0:math/py-minorminer@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}networkx>=2.0:math/py-networkx@${PY_FLAVOR} \
+		${PYNUMPY}
+BUILD_DEPENDS=	${PY_DEPENDS}
+RUN_DEPENDS=	${PY_DEPENDS}
+
+USES=		python:3.7+
+USE_PYTHON=	distutils unittest # 1 test fails because the closed source dwave.drivers optional dependency is missing
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	dwavesystems
+
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_WRKSRC=	${WRKSRC}/tests
+
+NO_ARCH=	yes
+
+post-install:
+	# remove conflicting __init__.py, see https://github.com/dwavesystems/dwave-system/issues/462
+	@${RM} -r \
+		${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/__init__.py \
+		${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/__pycache__
+
+.include <bsd.port.mk>
diff --git a/science/py-dwave-system/distinfo b/science/py-dwave-system/distinfo
new file mode 100644
index 000000000000..c463bdf9a47e
--- /dev/null
+++ b/science/py-dwave-system/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660494303
+SHA256 (dwavesystems-dwave-system-1.15.0_GH0.tar.gz) = b5eec284a9231593e55dfe3e245fbafea80c926d5fb6d0c5ba2be1f3a84d36b5
+SIZE (dwavesystems-dwave-system-1.15.0_GH0.tar.gz) = 664932
diff --git a/science/py-dwave-system/pkg-descr b/science/py-dwave-system/pkg-descr
new file mode 100644
index 000000000000..0ccbbf9dfe23
--- /dev/null
+++ b/science/py-dwave-system/pkg-descr
@@ -0,0 +1,10 @@
+dwave-system is a basic API for easily incorporating the D-Wave system as a
+sampler in the D-Wave Ocean software stack, directly or through Leap's
+cloud-based hybrid solvers. It includes DWaveSampler, a dimod sampler that
+accepts and passes system parameters such as system identification and
+authentication down the stack, LeapHybridSampler, for Leap's hybrid solvers,
+and other. It also includes several useful composites - layers of pre- and
+post-processing - that can be used with DWaveSampler to handle minor-embedding,
+optimize chain strength, etc.
+
+WWW: https://github.com/dwavesystems/dwave-system
diff --git a/science/py-dwave-system/pkg-plist b/science/py-dwave-system/pkg-plist
new file mode 100644
index 000000000000..5e66dd88d220
--- /dev/null
+++ b/science/py-dwave-system/pkg-plist
@@ -0,0 +1,105 @@
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__init__.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/chain_breaks%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/chain_breaks%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/chain_strength%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/chain_strength%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/chimera%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/chimera%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/diagnostic%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/diagnostic%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/drawing%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/drawing%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/exceptions%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/exceptions%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/pegasus%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/pegasus%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/polynomialembedder%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/polynomialembedder%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/transforms%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/transforms%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/utils%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/utils%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/zephyr%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/__pycache__/zephyr%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/embedding/chain_breaks.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/chain_strength.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/chimera.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/diagnostic.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/drawing.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/exceptions.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/pegasus.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/polynomialembedder.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/transforms.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/utils.py
+%%PYTHON_SITELIBDIR%%/dwave/embedding/zephyr.py
+%%PYTHON_SITELIBDIR%%/dwave/system/__init__.py
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/coupling_groups%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/coupling_groups%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/exceptions%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/exceptions%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/flux_bias_offsets%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/flux_bias_offsets%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/package_info%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/package_info%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/schedules%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/schedules%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/testing%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/testing%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/utilities%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/utilities%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/warnings%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/__pycache__/warnings%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/__init__.py
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/__pycache__/cache_manager%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/__pycache__/cache_manager%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/__pycache__/database_manager%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/__pycache__/database_manager%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/__pycache__/schema%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/__pycache__/schema%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/cache_manager.py
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/database_manager.py
+%%PYTHON_SITELIBDIR%%/dwave/system/cache/schema.py
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__init__.py
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/cutoffcomposite%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/cutoffcomposite%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/embedding%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/embedding%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/reversecomposite%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/reversecomposite%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/tiling%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/tiling%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/virtual_graph%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/__pycache__/virtual_graph%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/cutoffcomposite.py
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/embedding.py
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/reversecomposite.py
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/tiling.py
+%%PYTHON_SITELIBDIR%%/dwave/system/composites/virtual_graph.py
+%%PYTHON_SITELIBDIR%%/dwave/system/coupling_groups.py
+%%PYTHON_SITELIBDIR%%/dwave/system/exceptions.py
+%%PYTHON_SITELIBDIR%%/dwave/system/flux_bias_offsets.py
+%%PYTHON_SITELIBDIR%%/dwave/system/package_info.py
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/__init__.py
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/__pycache__/clique%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/__pycache__/clique%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/__pycache__/dwave_sampler%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/__pycache__/dwave_sampler%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/__pycache__/leap_hybrid_sampler%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/__pycache__/leap_hybrid_sampler%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/clique.py
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/dwave_sampler.py
+%%PYTHON_SITELIBDIR%%/dwave/system/samplers/leap_hybrid_sampler.py
+%%PYTHON_SITELIBDIR%%/dwave/system/schedules.py
+%%PYTHON_SITELIBDIR%%/dwave/system/testing.py
+%%PYTHON_SITELIBDIR%%/dwave/system/utilities.py
+%%PYTHON_SITELIBDIR%%/dwave/system/warnings.py