Date: Mon, 26 Jul 2021 22:36:31 GMT From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: e1f12f98d320 - main - science/py-{core, google}: New ports: Writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators Message-ID: <202107262236.16QMaVP2014642@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=e1f12f98d320c589b57a40436d627796945065bb commit e1f12f98d320c589b57a40436d627796945065bb Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2021-07-26 22:34:51 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2021-07-26 22:36:19 +0000 science/py-{core,google}: New ports: Writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators --- science/Makefile | 2 ++ science/py-cirq-core/Makefile | 36 +++++++++++++++++++++++++++++++++++ science/py-cirq-core/distinfo | 3 +++ science/py-cirq-core/files/example.py | 18 ++++++++++++++++++ science/py-cirq-core/pkg-descr | 4 ++++ science/py-cirq-google/Makefile | 27 ++++++++++++++++++++++++++ science/py-cirq-google/distinfo | 3 +++ science/py-cirq-google/pkg-descr | 5 +++++ 8 files changed, 98 insertions(+) diff --git a/science/Makefile b/science/Makefile index 17618e77c829..7cf6897ba403 100644 --- a/science/Makefile +++ b/science/Makefile @@ -231,6 +231,8 @@ SUBDIR += py-chainer SUBDIR += py-chainer-chemistry SUBDIR += py-chempy + SUBDIR += py-cirq-core + SUBDIR += py-cirq-google SUBDIR += py-coards SUBDIR += py-dipy SUBDIR += py-dlib diff --git a/science/py-cirq-core/Makefile b/science/py-cirq-core/Makefile new file mode 100644 index 000000000000..899d14f831a1 --- /dev/null +++ b/science/py-cirq-core/Makefile @@ -0,0 +1,36 @@ +PORTNAME= cirq-core +DISTVERSIONPREFIX= v +DISTVERSION= 0.11.1 +CATEGORIES= science python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Framework for Noisy Intermediate Scale Quantum (NISQ) circuits + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}cirq-google>0:science/py-cirq-google@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}networkx>0:math/py-networkx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pandas>0:math/py-pandas@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sortedcontainers>0:devel/py-sortedcontainers@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sympy>0:math/py-sympy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tqdm>=0:misc/py-tqdm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} + +USES= python:3.8+ +USE_PYTHON= distutils autoplist + +USE_GITHUB= yes +GH_ACCOUNT= quantumlib +GH_PROJECT= Cirq + +WRKSRC_SUBDIR= cirq-core + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/science/py-cirq-core/distinfo b/science/py-cirq-core/distinfo new file mode 100644 index 000000000000..960f88936229 --- /dev/null +++ b/science/py-cirq-core/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1627331168 +SHA256 (quantumlib-Cirq-v0.11.1_GH0.tar.gz) = fb956fd075f86847e20816d1320b5eaaa479ab126b6dce10cfea1c7cf4dd9067 +SIZE (quantumlib-Cirq-v0.11.1_GH0.tar.gz) = 6384560 diff --git a/science/py-cirq-core/files/example.py b/science/py-cirq-core/files/example.py new file mode 100644 index 000000000000..d93432d5d3bf --- /dev/null +++ b/science/py-cirq-core/files/example.py @@ -0,0 +1,18 @@ +import cirq + +# Pick a qubit. +qubit = cirq.GridQubit(0, 0) + +# Create a circuit +circuit = cirq.Circuit( + cirq.X(qubit)**0.5, # Square root of NOT. + cirq.measure(qubit, key='m') # Measurement. +) +print("Circuit:") +print(circuit) + +# Simulate the circuit several times. +simulator = cirq.Simulator() +result = simulator.run(circuit, repetitions=20) +print("Results:") +print(result) diff --git a/science/py-cirq-core/pkg-descr b/science/py-cirq-core/pkg-descr new file mode 100644 index 000000000000..69d0f6d7563b --- /dev/null +++ b/science/py-cirq-core/pkg-descr @@ -0,0 +1,4 @@ +Cirq is a Python library for writing, manipulating, and optimizing quantum +circuits and running them against quantum computers and simulators. + +WWW: https://github.com/quantumlib/cirq diff --git a/science/py-cirq-google/Makefile b/science/py-cirq-google/Makefile new file mode 100644 index 000000000000..f721bb6a5b5b --- /dev/null +++ b/science/py-cirq-google/Makefile @@ -0,0 +1,27 @@ +PORTNAME= cirq-google +DISTVERSIONPREFIX= v +DISTVERSION= 0.11.1 +CATEGORIES= science python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Google Cirq adapter for IQM's quantum architectures + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}google-api-core>=1.14.0:www/py-google-api-core@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}protobuf>0:devel/py-protobuf@${PY_FLAVOR} + +USES= python:3.8+ +USE_PYTHON= distutils autoplist + +USE_GITHUB= yes +GH_ACCOUNT= quantumlib +GH_PROJECT= Cirq + +WRKSRC_SUBDIR= cirq-google + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/science/py-cirq-google/distinfo b/science/py-cirq-google/distinfo new file mode 100644 index 000000000000..960f88936229 --- /dev/null +++ b/science/py-cirq-google/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1627331168 +SHA256 (quantumlib-Cirq-v0.11.1_GH0.tar.gz) = fb956fd075f86847e20816d1320b5eaaa479ab126b6dce10cfea1c7cf4dd9067 +SIZE (quantumlib-Cirq-v0.11.1_GH0.tar.gz) = 6384560 diff --git a/science/py-cirq-google/pkg-descr b/science/py-cirq-google/pkg-descr new file mode 100644 index 000000000000..4da714b04b3c --- /dev/null +++ b/science/py-cirq-google/pkg-descr @@ -0,0 +1,5 @@ +Google Cirq adapter for IQM's quantum architectures. + +Part of the Cirq quantum computing framework. + +WWW: https://github.com/quantumlib/Cirq
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107262236.16QMaVP2014642>