Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

This is a development version of cirq-web and may be unstable.

For the latest stable release of cirq-web see here.

Cirq

Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.

This module is cirq-web, which allows users to take advantage of browser based 3D visualization tools and features in Cirq. cirq-web also provides a development environment for contributors to create and add their own visualizations to the module.

Documentation

Documentation for cirq-web can be found in the README files located in this module’s subdirectories.

Below is a quick example of how to generate a portable 3D rendering of the Bloch sphere using cirq-web:

import cirq
from cirq_web import BlochSphere

# Prepare a state
zero_state = [1+0j, 0+0j]
state_vector = cirq.to_valid_state_vector(zero_state)

# Create and display the Bloch sphere
sphere = BlochSphere(state_vector=state_vector)
sphere.generate_html_file()

This will create the file in the current working directory. There are additional options to specify the output directory or to open the visualization in a browser for example.

You can also view and interact with a Bloch sphere in a Colab or Jupyter notebook setting with the following:

import cirq
from cirq_web import BlochSphere

# Prepare a state
zero_state = [1+0j, 0+0j]
state_vector = cirq.to_valid_state_vector(zero_state)

# Create and display the Bloch sphere
sphere = BlochSphere(state_vector=state_vector)
display(sphere)

See the example Jupyter notebook in this directory for more examples on how to use cirq-web.

Installation

Cirq-web is currently in development, and therefore is only available via pre-release.

To install the pre-release version of only cirq-web, use pip install cirq-web –pre.

Note, that this will install both cirq-web and cirq-core.

To get all the optional modules installed as well, you’ll have to use pip install cirq or pip install cirq –pre for the pre-release version.

Metadata

Release files for cirq-web 1.2.0.dev20230322165801

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cirq-web 1.2.0.dev20230322165801
File Interpreter ABI Platform Actions
cirq_web-1.2.0.dev20230322165801-py3-none-any.whl Python 3 none any Details for cirq_web-1.2.0.dev20230322165801-py3-none-any.whl

Release files / cirq_web-1.2.0.dev20230322165801-py3-none-any.whl

Download URL cirq_web-1.2.0.dev20230322165801-py3-none-any.whl
Size 594.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0808790af7efbdca6d41d815fc7221c4b5d9e84576f03c01c64151e1aad8abf
BLAKE2b-256 checksum
How to use checksums
f9887191c74310463e360908c97978e88af9a0cace544031c6e566d190b5ffff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Security for cirq-web 1.2.0.dev20230322165801

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page