Skip to content
Quantumlib Cirq

Quantumlib Cirq

github.com • November 25, 2026

Python package for writing, manipulating, and running quantum circuits on quantum computers and simulators.

Features – Installation – Quick Start – Documentation – Integrations – Community – Citing Cirq –

Cirq provides useful abstractions for dealing with today’s noisy intermediate-scale quantum (NISQ) computers, where the details of quantum hardware are vital to achieving state-of-the-art results. Some of its features include:

Flexible gate definitions and custom gates

Parameterized circuits with symbolic variables

Circuit transformation, compilation, and optimization

Hardware device modeling

Multiple built-in quantum circuit simulators

Integration with qsim for high-performance simulation

Interoperability with NumPy and SciPy

Cross-platform compatibility

Cirq supports Python version 3.12 and later, and can be used on Linux, macOS, and Windows, as well as Google Colab . For complete installation instructions, please refer to the Install section of the online Cirq documentation.

Quick Start – “Hello Qubit” Example

Here is a simple example to get you up and running with Cirq after you have installed it. Start a Python interpreter, and then type the following:

Python should then print output similar to this:

The primary documentation site for Cirq is the Cirq page on the Quantum AI website . There and elsewhere, a variety of documentation for Cirq is available.

Video tutorials on YouTube are an engaging way to learn Cirq.

Jupyter notebook-based tutorials let you learn Cirq from your browser – no installation needed.

Text-based tutorials on the Cirq page are great when combined with a local installation of Cirq on your computer. After starting with the basics , you'll be ready to dive into tutorials on circuit building and circuit simulation under the Build and Simulate tabs, respectively. Check out the other tabs for more!

Reference Documentation

Docs for the current stable release correspond to what you get with pip install cirq .

Docs for the pre-release correspond to what you get with pip install --upgrade cirq~=1.0.dev .

The examples subdirectory of the Cirq GitHub repo has many programs illustrating the application of Cirq to everything from common textbook algorithms to more advanced methods.

The Experiments page on the Cirq documentation site has yet more examples, from simple to advanced.

The Cirq releases page on GitHub lists the changes in each release.

Google Quantum AI has a suite of open-source software that lets you do more with Cirq. From high-performance simulators, to novel tools for expressing and analyzing fault-tolerant quantum algorithms, our software stack lets you develop quantum programs for a variety of applications.

Cirq has benefited from contributions by over 250 people and counting. We are dedicated to cultivating an open and inclusive community to build software for quantum computers, and have a community code of conduct .

Stay on top of Cirq developments using the approach that best suits your needs:

Via GitHub notifications: configure repository notifications for Cirq.

Cirq releases take place approximately every quarter.

Questions and Discussions

Have questions Cirq? Post them to the Quantum Computing Stack Exchange and tag them with cirq . You can also past questions using that tag – it's a great way to learn!

Have a feature request or bug report? Open an issue on GitHub !

Want to develop Cirq code? Look at the list of good first issues to tackle, read our contribution guidelines , and then start opening pull requests !

When publishing articles or otherwise writing Cirq, please cite the Cirq version you use – it will help others reproduce your results. We use Zenodo to preserve releases. The following links let you download the bibliographic record for the latest stable release of Cirq in some popular formats:

For formatted citations and records in other formats, as well as records for all releases of Cirq past and present, please visit the Cirq page on Zenodo .

For any questions or concerns not addressed here, please email quantum-oss-maintainers@google.com .

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program .

The Cirq Developers.

Extracted Entities