Registry / ai-ml / cirq-web

cirq-web

JSON →
library1.6.1pypypi✓ verified 86d ago

Cirq-web provides web-based 3D visualization tools for quantum circuits and related objects using Three.js, integrated with Google's Cirq quantum computing framework. Current version is 1.6.1. Release cadence follows Cirq releases; the package is part of the Cirq suite but published separately on PyPI.

pip install cirq-web
INSTALL
IMPORT
SIG · CIRQ-WEB
C
cirq-web
ai-mlpythonv1.6.1
Install
23.3s avg
Import
6662ms
Disk
513MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 6.820s · 489.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 23.3s · import 6.504s · 473MB
513MB installed
● package 513MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Circuit3D
from cirq_web import Circuit3D
from cirq.web import Circuit3D
cirq-web uses underscores in its Python module name (cirq_web), not a dot-separated subpackage.
BlochSphere
from cirq_web import BlochSphere

Create a 3D visualization of a quantum circuit.

import cirq from cirq_web import Circuit3D # Create a simple circuit q0, q1 = cirq.LineQubit.range(2) circuit = cirq.Circuit( cirq.H(q0), cirq.CNOT(q0, q1), cirq.measure(q0, q1, key='result') ) # Visualize as 3D circuit Circuit3D(circuit)
Debug
Known issues
gotchacirq-web is not included automatically when installing the main 'cirq' package. You must install it separately with 'pip install cirq-web'.
fix
Run 'pip install cirq-web' explicitly.
affects: all
gotchaThe Python module name uses an underscore, not a dot: import from 'cirq_web' not 'cirq.web'.
fix
Use 'from cirq_web import ...'
affects: all
deprecatedSome visualization classes may be deprecated or renamed in future Cirq versions; check the cirq-web release notes for breaking changes.
fix
Refer to the official cirq-web documentation and GitHub releases.
affects: >=1.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cirq_web'
cirq-web is not installed; it is a separate package from cirq-core.
fix
Run 'pip install cirq-web'
ImportError: cannot import name 'Circuit3D' from 'cirq.web'
Incorrect import path: users often try 'from cirq.web import ...' instead of 'from cirq_web import ...'.
fix
Use 'from cirq_web import Circuit3D'
Upgrade
Version history
1.6.1latest on PyPI · released Aug 14, 2025
Audit
Dependencies
cirq-corerequiredRequired for quantum circuit definitions and core Cirq objects; cirq-web builds on cirq-core.
ipythonoptionalRequired for notebook integration; used to display 3D visualizations in Jupyter.
Agent activity
24 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources
cirq-web — pip install cirq-web · libregistry