git: 567f4fd6037f - main - science/py-cirq-web: New port: Cirq module to run on pasqal quantum computers

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Mon, 13 Oct 2025 15:46:47 UTC
The branch main has been updated by yuri:

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

commit 567f4fd6037fc4ce64a4afb86e4aa3af7958b21b
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-10-13 15:40:59 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-10-13 15:46:45 +0000

    science/py-cirq-web: New port: Cirq module to run on pasqal quantum computers
---
 science/Makefile                     |  1 +
 science/py-cirq-web/Makefile         | 25 +++++++++++++++++++++++++
 science/py-cirq-web/distinfo         |  3 +++
 science/py-cirq-web/files/example.py | 18 ++++++++++++++++++
 science/py-cirq-web/pkg-descr        |  4 ++++
 5 files changed, 51 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index f5f1d4578d3b..240f468caabb 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -313,6 +313,7 @@
     SUBDIR += py-cirq-google
     SUBDIR += py-cirq-ionq
     SUBDIR += py-cirq-pasqal
+    SUBDIR += py-cirq-web
     SUBDIR += py-coards
     SUBDIR += py-dftbplus
     SUBDIR += py-dftd4
diff --git a/science/py-cirq-web/Makefile b/science/py-cirq-web/Makefile
new file mode 100644
index 000000000000..d537afc2c21d
--- /dev/null
+++ b/science/py-cirq-web/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	cirq-web
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.6.1
+CATEGORIES=	science python # quantum-computing
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Cirq module to visualize quantum circuits in 3D in a web browser
+WWW=		https://github.com/quantumlib/cirq
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python
+USE_PYTHON=	distutils autoplist
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	quantumlib
+GH_PROJECT=	Cirq
+
+WRKSRC_SUBDIR=	cirq-web
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/science/py-cirq-web/distinfo b/science/py-cirq-web/distinfo
new file mode 100644
index 000000000000..bea87b2b10aa
--- /dev/null
+++ b/science/py-cirq-web/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1760339430
+SHA256 (quantumlib-Cirq-v1.6.1_GH0.tar.gz) = 65da567eea507b5a2b2609fea8cb5e6a2b4e92a6622fad9c2a5c406761b09475
+SIZE (quantumlib-Cirq-v1.6.1_GH0.tar.gz) = 7898333
diff --git a/science/py-cirq-web/files/example.py b/science/py-cirq-web/files/example.py
new file mode 100644
index 000000000000..d93432d5d3bf
--- /dev/null
+++ b/science/py-cirq-web/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-web/pkg-descr b/science/py-cirq-web/pkg-descr
new file mode 100644
index 000000000000..22e7e20a4ae9
--- /dev/null
+++ b/science/py-cirq-web/pkg-descr
@@ -0,0 +1,4 @@
+Cirq-web is a Python library that provides browser-based 3D visualization
+tools for quantum circuits created with the Cirq framework. It allows users
+to inspect and understand the structure of their quantum circuits in a visual
+way.