aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-08-09 21:24:07 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-08-09 21:24:47 +0000
commit713541e233d6c0bc5f706e550b5c6144840bed79 (patch)
tree921f5cc127315a1d5a76e5505abb283e6c955124
parent4a72f0e0421858d2e55e81e89d9b29a7d1a57530 (diff)
downloadports-713541e233d6c0bc5f706e550b5c6144840bed79.tar.gz
ports-713541e233d6c0bc5f706e550b5c6144840bed79.zip
science/py-qiskit-nature: New port: Natural science submodule for Quiskit framework for quantum computing
-rw-r--r--science/Makefile1
-rw-r--r--science/py-qiskit-nature/Makefile46
-rw-r--r--science/py-qiskit-nature/distinfo3
-rw-r--r--science/py-qiskit-nature/pkg-descr23
-rw-r--r--science/py-qiskit/Makefile10
5 files changed, 79 insertions, 4 deletions
diff --git a/science/Makefile b/science/Makefile
index 7f1bde19d29f..183fb939e6cf 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -342,6 +342,7 @@
SUBDIR += py-qiskit-aer
SUBDIR += py-qiskit-ibm-provider
SUBDIR += py-qiskit-ibmq-provider
+ SUBDIR += py-qiskit-nature
SUBDIR += py-qiskit-optimization
SUBDIR += py-qiskit-terra
SUBDIR += py-qspin
diff --git a/science/py-qiskit-nature/Makefile b/science/py-qiskit-nature/Makefile
new file mode 100644
index 000000000000..9ac7f26270ef
--- /dev/null
+++ b/science/py-qiskit-nature/Makefile
@@ -0,0 +1,46 @@
+PORTNAME= qiskit-nature
+DISTVERSION= 0.4.0-29
+DISTVERSIONSUFFIX= -gfaacc94
+CATEGORIES= science python # quantum-computing, quantum-chemistry
+#MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Natural science submodule for Quiskit framework for quantum computing
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}h5py>0:science/py-h5py@${PY_FLAVOR} \
+ ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}psutil>=5:sysutils/py-psutil@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}qiskit-terra>=0.20.0:science/py-qiskit-terra@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}rustworkx>=0.10.1:math/py-rustworkx@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}scikit-learn>=0.20.0:science/py-scikit-learn@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}scipy>=1.4:science/py-scipy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR}
+QC_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyscf>0:science/py-pyscf@${PY_FLAVOR} # quantum-chemistry drivers, other supported drivers are PyQuante, PSI4
+BUILD_DEPENDS= ${PY_DEPENDS}
+RUN_DEPENDS= ${PY_DEPENDS} \
+ ${QC_DEPENDS}
+
+USES= python:3.7+
+USE_PYTHON= distutils autoplist pytest # several tests fail with "No module named 'threadpoolctl'", see https://reviews.freebsd.org/D35513
+
+USE_GITHUB= yes
+GH_ACCOUNT= Qiskit
+
+NO_ARCH= yes
+
+POST_PLIST= fix-plist
+
+post-patch: # project was renamed, see https://github.com/Qiskit/rustworkx/issues/656
+ @${FIND} ${WRKSRC} -name "*.py" | ${XARGS} ${REINPLACE_CMD} -i '' -e 's|retworkx|rustworkx|'
+
+post-install: # installs many binaries accessing commercial Gaussian software not available on FreeBSD, see https://github.com/Qiskit/qiskit-nature/issues/778
+ @${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -name "qcmatrixio.cpython-*.so" -delete
+
+fix-plist: # see post-install
+ @${REINPLACE_CMD} -e "s|.*/qcmatrixio\.cpython-.*\.so$$||" ${TMPPLIST}
+
+.include <bsd.port.mk>
diff --git a/science/py-qiskit-nature/distinfo b/science/py-qiskit-nature/distinfo
new file mode 100644
index 000000000000..d89f65e3b30c
--- /dev/null
+++ b/science/py-qiskit-nature/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660075414
+SHA256 (Qiskit-qiskit-nature-0.4.0-29-gfaacc94_GH0.tar.gz) = 6a189b5729ceb703ae8d805aea880f6441b86aec427f91818de0be3b3461868c
+SIZE (Qiskit-qiskit-nature-0.4.0-29-gfaacc94_GH0.tar.gz) = 4678066
diff --git a/science/py-qiskit-nature/pkg-descr b/science/py-qiskit-nature/pkg-descr
new file mode 100644
index 000000000000..36cdb1b40940
--- /dev/null
+++ b/science/py-qiskit-nature/pkg-descr
@@ -0,0 +1,23 @@
+Qiskit [quiss-kit] is an open-source SDK for working with quantum computers
+at the level of pulses, circuits, and application modules.
+
+Qiskit Nature is one of Qiskit components. Qiskit Nature is an open-source
+framework which supports solving quantum mechanical natural science problems
+using quantum computing algorithms. This includes finding ground and excited
+states of electronic and vibrational structure problems, measuring the dipole
+moments of molecular systems, solving the Ising and Fermi-Hubbard models on
+lattices, and much more.
+
+The code comprises chemistry drivers, which when provided with a molecular
+configuration will return one- and two-body integrals as well as other data that
+is efficiently computed classically. This output data from a driver can then be
+used as input in Qiskit Nature that contains logic which is able to translate
+this into a form that is suitable for quantum algorithms.
+
+For the solution of electronic structure problems, the problem Hamiltonian is
+first expressed in the second quantization formalism, comprising fermionic
+excitation and annihilation operators. These can then be mapped to the qubit
+formalism using a variety of mappings such as Jordan-Wigner, Parity, and more,
+in readiness for the quantum computation.
+
+WWW: https://qiskit.org/
diff --git a/science/py-qiskit/Makefile b/science/py-qiskit/Makefile
index 5ca42cd04fbd..d30fa0af83c1 100644
--- a/science/py-qiskit/Makefile
+++ b/science/py-qiskit/Makefile
@@ -1,6 +1,6 @@
PORTNAME= qiskit
DISTVERSION= 0.37.1-4
-PORTREVISION= 1
+PORTREVISION= 2
DISTVERSIONSUFFIX= -gf178fcc98
CATEGORIES= science python # quantum-computing
MASTER_SITES= CHEESESHOP
@@ -16,11 +16,13 @@ PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}qiskit-aer>0:science/py-qiskit-aer@${PY_FLAVO
${PYTHON_PKGNAMEPREFIX}qiskit-terra>0:science/py-qiskit-terra@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}qiskit-ibmq-provider>0:science/py-qiskit-ibmq-provider@${PY_FLAVOR}
# optional submodules (list: https://github.com/Qiskit/qiskit#optional-components)
-PY_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}qiskit-optimization>0:science/py-qiskit-optimization@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}qiskit-machine-learning>0:misc/py-qiskit-machine-learning@${PY_FLAVOR}
+OPT_DEPENDS= ${PYTHON_PKGNAMEPREFIX}qiskit-optimization>0:science/py-qiskit-optimization@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}qiskit-machine-learning>0:misc/py-qiskit-machine-learning@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}qiskit-nature>0:science/py-qiskit-nature@${PY_FLAVOR}
BUILD_DEPENDS= ${PY_DEPENDS}
-RUN_DEPENDS= ${PY_DEPENDS}
+RUN_DEPENDS= ${PY_DEPENDS} \
+ ${OPT_DEPENDS}
USES= python:3.7+
USE_PYTHON= distutils autoplist