From nobody Sun Aug 14 05:41:54 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M55rf6789z4Z08d; Sun, 14 Aug 2022 05:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M55rf4yynz3Kqc; Sun, 14 Aug 2022 05:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660455714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hA3D21D8PuT/ao48hAYs7Upjy6FJN6G4iWcp750HYWI=; b=MQWBz4ZTZxceWCjrDPZliwqfUvO5JzwSvQjNb3pDBZ5H7gvmSG1w94SuQnrTEJMx0FVpqN MbLI44sOL80heBpoiFE9QLiaP6Fz4IgVP4ydKisH1PK5Fgy+Rd0laluQCMjyGjmq73W/vq FHVU0x0HSUHYDZHsTNHllQUGSV8rK6AvmIpHL5UOdz0iz6SSpUh1BCk1cW8t8LteVsiy2s J//FBXxHdrlM3NumGvhALwiSMMYl9XdXqtoSudQ9jrKW4cQOnfjOrBKfHUGsyQIYDrkZhg KgZc8jIK2K0pW4jx7CO5qw/tVY/XDLGkbj6J/bwztmtCw5VJEf3aUjmJIk045w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M55rf43GPzfbX; Sun, 14 Aug 2022 05:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27E5fsvS085208; Sun, 14 Aug 2022 05:41:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27E5fsPT085207; Sun, 14 Aug 2022 05:41:54 GMT (envelope-from git) Date: Sun, 14 Aug 2022 05:41:54 GMT Message-Id: <202208140541.27E5fsPT085207@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 06ac78be58f2 - main - science/py-dwave-neal: New port: DWave: Simulated annealing sampler for general Ising model graphs List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06ac78be58f2c94320969226e8187fa32bdf9815 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660455714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hA3D21D8PuT/ao48hAYs7Upjy6FJN6G4iWcp750HYWI=; b=XrnYEhOVZhOWW2m2qGGFWqt1T1ko/4v1+fp5aaeCZKHQj8RJTe5YGGmq+gBolSQUQRgHeM zcoxcczotVQYI83O5GH9MvHeCpaDgTVpcz1k1z+WmC4UVVUngqEABb2Lthty9oL7oh1M7U gka8F70bE2vtkU1nWpUa6aKzeN3oRPFgZ/Qi53cYqy8aWeYGXb1eD9Ka2am5FmksB0STTc qR6JodJo6gHv22u4prqpg7RYPlixH8Th7PtnBC/JdsWId2m0IZ8Jzlc92xK9sWgKz6tecf gjs3EN24CA3ZtONCzw1nzFsKu/7Vwo454T2UxzoVJW6ymMHp2Fk3TpHlEJc8fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660455714; a=rsa-sha256; cv=none; b=hG/xDwDctIzfd8+4jWgoNPB/wNX9Ro/OrhIos9tmBhOwgOjSYL6HUoeecHNOOlz0sxqwJv 20rMQEHzO7VruuvRgIoKNZqPsP3S91csZ6ZM1xwBd6/sjsCJBnkvd/1xyssM9zMxsuDi6d Clq9bLCpYq/tKM3jETFKVHQQoErwJwbW6i4cQ/HWgF2cqn7E6UdmDwzsmIy5FRcMwX8B0K WArUWN6F7+r0IUXiHSOfrEsoeAAehIMY0s9aP0pMFb9qa4dzY36XhI7GBl06mUzoC3o2I0 pJLBEOfaRKS+fKiSMx1f3GHABhL3BgaxW7ylNHLSGffaT4nxLfqgTQbTIbf48w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=06ac78be58f2c94320969226e8187fa32bdf9815 commit 06ac78be58f2c94320969226e8187fa32bdf9815 Author: Yuri Victorovich AuthorDate: 2022-08-14 05:41:24 +0000 Commit: Yuri Victorovich CommitDate: 2022-08-14 05:41:24 +0000 science/py-dwave-neal: New port: DWave: Simulated annealing sampler for general Ising model graphs --- science/Makefile | 1 + science/py-dwave-neal/Makefile | 28 ++++++++++++++++++++++++++++ science/py-dwave-neal/distinfo | 3 +++ science/py-dwave-neal/files/example.py | 9 +++++++++ science/py-dwave-neal/pkg-descr | 12 ++++++++++++ 5 files changed, 53 insertions(+) diff --git a/science/Makefile b/science/Makefile index b9924879e109..cd0d8cc5ec07 100644 --- a/science/Makefile +++ b/science/Makefile @@ -284,6 +284,7 @@ SUBDIR += py-dimod SUBDIR += py-dipy SUBDIR += py-dlib + SUBDIR += py-dwave-neal SUBDIR += py-dwave-samplers SUBDIR += py-eccodes SUBDIR += py-esda diff --git a/science/py-dwave-neal/Makefile b/science/py-dwave-neal/Makefile new file mode 100644 index 000000000000..5bb7dad7ae25 --- /dev/null +++ b/science/py-dwave-neal/Makefile @@ -0,0 +1,28 @@ +PORTNAME= dwave-neal +DISTVERSION= 0.6.0.dev0 +CATEGORIES= science graphics # quantum-computing +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= DWave: Simulated annealing sampler for general Ising model graphs + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dimod>0:science/py-dimod@${PY_FLAVOR} \ + ${PYNUMPY} +BUILD_DEPENDS= ${PY_DEPENDS} +RUN_DEPENDS= ${PY_DEPENDS} + +USES= python:3.7+ +USE_PYTHON= distutils autoplist unittest + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +NO_ARCH= yes + +do-test: + @${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${FILESDIR}/example.py + +.include diff --git a/science/py-dwave-neal/distinfo b/science/py-dwave-neal/distinfo new file mode 100644 index 000000000000..3affefba0cad --- /dev/null +++ b/science/py-dwave-neal/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1660454526 +SHA256 (dwave-neal-0.6.0.dev0.tar.gz) = 209e872c325cbdd79f05364624ff562abdf7e3cd0c52ac8b7657fa4ae165b742 +SIZE (dwave-neal-0.6.0.dev0.tar.gz) = 6500 diff --git a/science/py-dwave-neal/files/example.py b/science/py-dwave-neal/files/example.py new file mode 100644 index 000000000000..be734d9f7229 --- /dev/null +++ b/science/py-dwave-neal/files/example.py @@ -0,0 +1,9 @@ +import neal + +sampler = neal.SimulatedAnnealingSampler() + +h = {0: -1, 1: -1} +J = {(0, 1): -1} +sampleset = sampler.sample_ising(h, J) + +print(sampleset) diff --git a/science/py-dwave-neal/pkg-descr b/science/py-dwave-neal/pkg-descr new file mode 100644 index 000000000000..4232cdcfec2a --- /dev/null +++ b/science/py-dwave-neal/pkg-descr @@ -0,0 +1,12 @@ +An implementation of a simulated annealing sampler. + +A simulated annealing sampler can be used for approximate Boltzmann sampling or +heuristic optimization. This implementation approaches the equilibrium +distribution by performing updates at a sequence of increasing beta values, +beta_schedule, terminating at the target beta. Each spin is updated once in a +fixed order per point in the beta_schedule according to a Metropolis- Hastings +update. When beta is large the target distribution concentrates, at equilibrium, +over ground states of the model. Samples are guaranteed to match the equilibrium +for long 'smooth' beta schedules. + +WWW: https://github.com/dwavesystems/dwave-neal