cirq
Python framework for creating, editing, and invoking Noisy Intermediate-Scale Quantum (NISQ) circuits.
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
11 of 245 committers (4.5%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.9%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Python framework for creating, editing, and invoking Noisy Intermediate-Scale Quantum (NISQ) circuits.
Basic Info
- Host: GitHub
- Owner: quantumlib
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://quantumai.google/cirq
- Size: 40.6 MB
Statistics
- Stars: 4,694
- Watchers: 189
- Forks: 1,137
- Open Issues: 181
- Releases: 30
Topics
Metadata Files
README.md
Features
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
- Noise modeling
- Multiple built-in quantum circuit simulators
- Integration with qsim for high-performance simulation
- Interoperability with NumPy and SciPy
- Cross-platform compatibility
Installation
Cirq supports Python version 3.11 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 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) ```
Python should then print output similar to this:
text
Circuit:
(0, 0): ───X^0.5───M('m')───
Results:
m=11000111111011001000
Congratulations! You have run your first quantum simulation in Cirq. You can continue to learn more by exploring the many Cirq tutorials described below.
Cirq Documentation
The primary documentation site for Cirq is the Cirq home page on the Quantum AI website. There and elsewhere, a variety of documentation for Cirq is available.
Tutorials
- 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 home 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.
Examples
- 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.
Change log
- The Cirq releases page on GitHub lists the changes in each release.
Integrations
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.
Fault-tolerant quantum computing (FTQC)? | [Qualtran] | | Large circuits and/or a lot of simulations? | [qsim] | | Circuits with thousands of qubits and millions of Clifford operations? | [Stim] | | Quantum error correction (QEC)? | [Stim] | | Chemistry and/or material science? | [OpenFermion]
[OpenFermion-FQE]
[OpenFermion-PySCF]
[OpenFermion-Psi4] | | Quantum machine learning (QML)? | [TensorFlow Quantum] | | Real experiments using Cirq? | [ReCirq] |
Community
Cirq has benefited from contributions by over 200 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.
Announcements
Stay on top of Cirq developments using the approach that best suits your needs:
- For releases and major announcements: sign up to the low-volume mailing list
cirq-announce. - For releases only:
- Via GitHub notifications: configure repository notifications for Cirq.
- Via Atom/RSS from GitHub: subscribe to the GitHub Cirq releases Atom feed.
- Via RSS from PyPI: subscribe to the PyPI releases RSS feed for Cirq.
Cirq releases take place approximately every quarter.
Questions and Discussions
- Have questions about Cirq? Post them to the Quantum Computing
Stack Exchange and tag them with
cirq. You can also search past questions using that tag – it's a great way to learn! - Want meet other Cirq developers and participate in discussions? Join Cirq Cynq, our biweekly virtual meeting of contributors. Sign up to cirq-dev to get an automatic meeting invitation!
Contributions
- 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!
Citing Cirq
When publishing articles or otherwise writing about 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.
Contact
For any questions or concerns not addressed here, please email quantum-oss-maintainers@google.com.
Disclaimer
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.
Copyright 2019 The Cirq Developers.
Owner
- Name: quantumlib
- Login: quantumlib
- Kind: organization
- Website: quantumai.google
- Repositories: 15
- Profile: https://github.com/quantumlib
Google's open source code library for the quantum world
Citation (CITATION.cff)
# Citation information for this repository. -*- yaml -*-
#
# CITATION.cff files provide human- & machine-readable citation information for
# software and datasets. GitHub, Zenodo, and the Zotero browser plugin all use
# CFF files automatically if provided. https://citation-file-format.github.io/.
#
# Tools exist to generate CITATION.cff files from other formats such as BibTeX.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cff-version: 1.2.0
message: If you use this software, please cite it using this metadata.
title: Cirq
authors:
- name: Cirq Developers
website: https://github.com/quantumlib/Cirq/graphs/contributors
abstract: >-
Python package for writing, manipulating, and running quantum circuits
on quantum computers and simulators.
version: 1.6.1
date-released: 2025-08-13
url: https://quantumai.google/cirq
repository-code: https://github.com/quantumlib/Cirq
license: Apache-2.0
identifiers:
- description: Archival DOI for Cirq software releases
value: 10.5281/zenodo.4062499
type: doi
- description: The home page for Cirq
value: https://quantumai.google/Cirq
type: url
- description: PyPI project for Cirq
value: https://pypi.org/project/Cirq
type: url
type: software
keywords:
- algorithms
- API
- application programming interface
- NISQ
- noisy intermediate-scale quantum
- open-source software
- Python
- quantum
- quantum algorithms
- quantum circuit simulation
- quantum circuits
- quantum computer simulation
- quantum computing
- quantum information
- quantum programming
- quantum programming languages
- quantum simulation
- qubit
- research
- science
- SDK
- simulation
- simulator
- software
- software development toolkit
- visualization
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Craig Gidney | C****y@g****m | 534 |
| Doug Strain | d****n@g****m | 349 |
| Dave Bacon | d****n@g****m | 346 |
| Pavol Juhas | j****s@g****m | 281 |
| Tanuj Khattar | t****r@g****m | 232 |
| Matthew Neeley | m****o@g****m | 212 |
| Balint Pato | b****t | 196 |
| Dax Fohl | d****l@g****m | 164 |
| Adam Zalcman | 4****r | 112 |
| MichaelBroughton | M****n | 112 |
| Orion Martin | 4****n | 107 |
| Kevin J. Sung | k****g | 103 |
| Matthew Harrigan | m****n@g****m | 100 |
| Michael Hucka | m****a@c****u | 88 |
| Casey Duckering | c****k | 83 |
| dependabot[bot] | 4****] | 82 |
| Cheng Xing | c****g@g****m | 72 |
| Victory Omole | v****e@i****u | 68 |
| Noureldin | n****i@g****m | 67 |
| Bryan A. O'Gorman | b****n@g****m | 59 |
| smitsanghavi | s****i | 59 |
| Wojciech Mruczkiewicz | m****k@g****m | 57 |
| Victory Omole | v****2@g****m | 51 |
| Ryan LaRose | r****e@u****u | 40 |
| Antoine (Tony) Bruguier | t****r@g****m | 37 |
| Seneca Meeks | s****s@g****m | 30 |
| augustehirth | a****h@g****m | 27 |
| Bicheng Ying | b****g@g****m | 25 |
| Andreas Bengtsson | a****n@g****m | 23 |
| eliottrosenberg | 6****g | 21 |
| and 215 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 643
- Total pull requests: 1,995
- Average time to close issues: almost 2 years
- Average time to close pull requests: about 1 month
- Total issue authors: 136
- Total pull request authors: 141
- Average comments per issue: 3.49
- Average comments per pull request: 1.71
- Merged pull requests: 1,316
- Bot issues: 1
- Bot pull requests: 235
Past Year
- Issues: 162
- Pull requests: 1,235
- Average time to close issues: 22 days
- Average time to close pull requests: 5 days
- Issue authors: 37
- Pull request authors: 53
- Average comments per issue: 1.25
- Average comments per pull request: 1.57
- Merged pull requests: 806
- Bot issues: 1
- Bot pull requests: 215
Top Authors
Issue Authors
- pavoljuhas (56)
- mhucka (48)
- tanujkhattar (44)
- balopat (40)
- Strilanc (34)
- NoureldinYosri (32)
- daxfohl (29)
- dabacon (28)
- mpharrigan (21)
- kevinsung (19)
- richrines1 (17)
- viathor (16)
- vtomole (13)
- p51lee (9)
- babacry (9)
Pull Request Authors
- pavoljuhas (451)
- dependabot[bot] (235)
- mhucka (211)
- dstrain115 (162)
- NoureldinYosri (143)
- daxfohl (86)
- senecameeks (65)
- babacry (47)
- tanujkhattar (45)
- maffoo (39)
- eliottrosenberg (36)
- verult (27)
- codrut3 (24)
- BichengYing (24)
- RevanthGundala (16)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 23
-
Total downloads:
- pypi 601,713 last-month
- Total docker downloads: 3,060
-
Total dependent packages: 112
(may contain duplicates) -
Total dependent repositories: 592
(may contain duplicates) - Total versions: 17,788
- Total maintainers: 11
pypi.org: cirq
A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq.readthedocs.io/
- License: Apache 2
-
Latest release: 1.4.1
published over 1 year ago
Rankings
Maintainers (10)
pypi.org: cirq-core
A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-core.readthedocs.io/
- License: Apache 2
-
Latest release: 1.4.1
published over 1 year ago
Rankings
Maintainers (3)
pypi.org: cirq-google
The Cirq module that provides tools and access to the Google Quantum Computing Service
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-google.readthedocs.io/
- License: Apache 2
-
Latest release: 1.4.1
published over 1 year ago
Rankings
Maintainers (3)
pypi.org: cirq-ionq
A Cirq package to simulate and connect to IonQ quantum computers
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-ionq.readthedocs.io/
- License: Apache 2
-
Latest release: 1.4.1
published over 1 year ago
Rankings
Maintainers (2)
pypi.org: cirq-pasqal
A Cirq package to simulate and connect to Pasqal quantum computers
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-pasqal.readthedocs.io/
- License: Apache 2
-
Latest release: 1.4.1
published over 1 year ago
Rankings
Maintainers (2)
pypi.org: cirq-rigetti
A Cirq package to simulate and connect to Rigetti quantum computers and Quil QVM
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-rigetti.readthedocs.io/
- License: Apache 2
-
Latest release: 1.4.1
published over 1 year ago
Rankings
Maintainers (2)
pypi.org: cirq-web
Web-based 3D visualization tools for Cirq.
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-web.readthedocs.io/
- License: Apache 2
-
Latest release: 1.4.1
published over 1 year ago
Rankings
Maintainers (2)
pypi.org: cirq-aqt
A Cirq package to simulate and connect to Alpine Quantum Technologies quantum computers
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-aqt.readthedocs.io/
- License: Apache 2
-
Latest release: 1.4.1
published over 1 year ago
Rankings
Maintainers (2)
pypi.org: cirq-ft
A Cirq package for fault-tolerant algorithms
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-ft.readthedocs.io/
- License: Apache 2
-
Latest release: 1.3.0
published about 2 years ago
Rankings
Maintainers (2)
pypi.org: cirq-unstable
A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-unstable.readthedocs.io/
- License: Apache 2
-
Latest release: 0.10.0.dev20201203005757
published about 5 years ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/quantumlib/Cirq
- Documentation: https://pkg.go.dev/github.com/quantumlib/Cirq#section-documentation
- License: apache-2.0
-
Latest release: v1.6.1
published 5 months ago
Rankings
proxy.golang.org: github.com/quantumlib/cirq
- Documentation: https://pkg.go.dev/github.com/quantumlib/cirq#section-documentation
- License: apache-2.0
-
Latest release: v1.6.1
published 4 months ago
Rankings
conda-forge.org: cirq-core
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.
- Homepage: https://quantumai.google/cirq
- License: Apache-2.0
-
Latest release: 1.0.0
published over 3 years ago
Rankings
pypi.org: alphaclops
A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://alphaclops.readthedocs.io/
- License: Apache 2
-
Latest release: 1.2.0.dev0
published over 2 years ago
Rankings
Maintainers (1)
pypi.org: alphaclops1
A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://alphaclops1.readthedocs.io/
- License: Apache 2
-
Latest release: 1.2.1
published over 2 years ago
Rankings
Maintainers (1)
conda-forge.org: cirq-google
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.
- Homepage: https://quantumai.google/cirq
- License: Apache-2.0
-
Latest release: 1.0.0
published over 3 years ago
Rankings
conda-forge.org: cirq-pasqal
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.
- Homepage: https://quantumai.google/cirq
- License: Apache-2.0
-
Latest release: 1.0.0
published over 3 years ago
Rankings
conda-forge.org: cirq-ionq
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.
- Homepage: https://quantumai.google/cirq
- License: Apache-2.0
-
Latest release: 1.0.0
published over 3 years ago
Rankings
conda-forge.org: cirq-rigetti
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.
- Homepage: https://quantumai.google/cirq
- License: Apache-2.0
-
Latest release: 1.0.0
published over 3 years ago
Rankings
conda-forge.org: cirq-aqt
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.
- Homepage: https://quantumai.google/cirq
- License: Apache-2.0
-
Latest release: 1.0.0
published over 3 years ago
Rankings
conda-forge.org: cirq-web
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.
- Homepage: https://quantumai.google/cirq
- License: Apache-2.0
-
Latest release: 1.0.0
published over 3 years ago
Rankings
pypi.org: cirq-dev
A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
- Homepage: http://github.com/quantumlib/cirq
- Documentation: https://cirq-dev.readthedocs.io/
- License: Apache 2
-
Latest release: 0.6.0.dev20191029234524
published about 6 years ago
Rankings
Maintainers (1)
conda-forge.org: cirq
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.
- Homepage: https://quantumai.google/cirq
- License: Apache-2.0
-
Latest release: 1.0.0
published over 3 years ago
Rankings
Dependencies
- 1219 dependencies
- @types/chai ^4.2.18 development
- @types/jsdom ^16.2.11 development
- @types/mocha ^8.2.2 development
- @types/node ^14.11.2 development
- @types/pixelmatch ^5.2.3 development
- @types/pngjs ^6.0.0 development
- @types/puppeteer ^5.4.3 development
- @types/temp ^0.9.0 development
- @types/three ^0.128.0 development
- canvas ^2.8.0 development
- chai ^4.3.4 development
- concurrently ^6.1.0 development
- gts ^3.1.0 development
- install ^0.13.0 development
- jsdom ^16.6.0 development
- mocha ^9.0.0 development
- npm ^7.16.0 development
- nyc ^15.1.0 development
- pixelmatch ^5.2.1 development
- pngjs ^6.0.0 development
- puppeteer ^10.0.0 development
- temp ^0.9.4 development
- three ^0.137.0 development
- ts-loader ^9.1.2 development
- ts-mocha ^8.0.0 development
- ts-mock-imports ^1.3.7 development
- ts-node ^10.0.0 development
- typescript ^4.0.3 development
- webpack ^5.40.0 development
- webpack-cli ^4.7.0 development
- webpack-dev-server ^4.0.0-beta.0 development
- @types/looks-same ^4.1.0
- gts ^3.1.0
- live-server ^1.2.1
- tsc-watch ^4.2.9
- typescript ^4.2.4
- latexmk *
- python3-tk *
- texlive-latex-base *
- requests *
- autoray *
- numba >=0.53.0
- opt_einsum *
- ply >=3.4
- pylatex *
- quimb *
- backports.cached_property *
- duet *
- matplotlib *
- networkx *
- numpy *
- pandas *
- scipy *
- sortedcontainers *
- sympy *
- tqdm *
- typing_extensions *
- google-api-core >=1.14.0,<2.0.0dev
- proto-plus >=1.20.0
- protobuf >=3.13.0,<4
- requests *
- requests *
- pyquil >=3.0.0
- req1 *
- req2 *
- google-cloud-secret-manager ==1.0.0
- requests ==2.24.0
- requests *
- Jinja2 <=3.0.3
- Sphinx *
- myst-parser *
- sphinx-notfound-page *
- sphinx_rtd_theme *
- actions/cache v2 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v2 composite
- actions/cache v2 composite
- actions/checkout v3 composite
- actions/setup-node v2 composite
- actions/setup-python v4 composite
- actions/upload-artifact v2 composite
- codecov/codecov-action v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/stale v3 composite
- cirq_base latest build
- python 3.9-slim build
- python 3.9-slim build
- attrs *
- cachetools >=5.3
- ipywidgets *
- nbconvert *
- nbformat *