{"id":21045,"library":"cirq-web","title":"Cirq-Web","description":"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.","status":"active","version":"1.6.1","language":"python","source_language":"en","source_url":"https://github.com/quantumlib/Cirq/tree/main/cirq-web","tags":["quantum computing","visualization","3D","cirq"],"install":[{"cmd":"pip install cirq-web","lang":"bash","label":"Install cirq-web"}],"dependencies":[{"reason":"Required for quantum circuit definitions and core Cirq objects; cirq-web builds on cirq-core.","package":"cirq-core","optional":false},{"reason":"Required for notebook integration; used to display 3D visualizations in Jupyter.","package":"ipython","optional":true}],"imports":[{"note":"cirq-web uses underscores in its Python module name (cirq_web), not a dot-separated subpackage.","wrong":"from cirq.web import Circuit3D","symbol":"Circuit3D","correct":"from cirq_web import Circuit3D"},{"note":"","wrong":"","symbol":"BlochSphere","correct":"from cirq_web import BlochSphere"}],"quickstart":{"code":"import cirq\nfrom cirq_web import Circuit3D\n\n# Create a simple circuit\nq0, q1 = cirq.LineQubit.range(2)\ncircuit = cirq.Circuit(\n    cirq.H(q0),\n    cirq.CNOT(q0, q1),\n    cirq.measure(q0, q1, key='result')\n)\n\n# Visualize as 3D circuit\nCircuit3D(circuit)","lang":"python","description":"Create a 3D visualization of a quantum circuit."},"warnings":[{"fix":"Run 'pip install cirq-web' explicitly.","message":"cirq-web is not included automatically when installing the main 'cirq' package. You must install it separately with 'pip install cirq-web'.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from cirq_web import ...'","message":"The Python module name uses an underscore, not a dot: import from 'cirq_web' not 'cirq.web'.","severity":"gotcha","affected_versions":"all"},{"fix":"Refer to the official cirq-web documentation and GitHub releases.","message":"Some visualization classes may be deprecated or renamed in future Cirq versions; check the cirq-web release notes for breaking changes.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install cirq-web'","cause":"cirq-web is not installed; it is a separate package from cirq-core.","error":"ModuleNotFoundError: No module named 'cirq_web'"},{"fix":"Use 'from cirq_web import Circuit3D'","cause":"Incorrect import path: users often try 'from cirq.web import ...' instead of 'from cirq_web import ...'.","error":"ImportError: cannot import name 'Circuit3D' from 'cirq.web'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}