{"id":13392369,"url":"https://github.com/quantumlib/cirq","last_synced_at":"2025-05-13T15:06:55.838Z","repository":{"id":37319119,"uuid":"114306758","full_name":"quantumlib/Cirq","owner":"quantumlib","description":"An open-source Python framework for creating, editing, and invoking Noisy Intermediate-Scale Quantum (NISQ) circuits.","archived":false,"fork":false,"pushed_at":"2025-05-05T21:59:39.000Z","size":39006,"stargazers_count":4541,"open_issues_count":218,"forks_count":1084,"subscribers_count":186,"default_branch":"main","last_synced_at":"2025-05-05T22:42:01.416Z","etag":null,"topics":["algorithms","api","cirq","google","google-quantum","nisq","python","quantum","quantum-algorithms","quantum-circuit","quantum-circuit-simulator","quantum-computer-simulator","quantum-computing","quantum-development-kit","quantum-information","quantum-programming","quantum-programming-language","quantum-simulation","sdk","simulation"],"latest_commit_sha":null,"homepage":"https://quantumai.google/cirq","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quantumlib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-12-14T23:41:49.000Z","updated_at":"2025-05-05T21:59:42.000Z","dependencies_parsed_at":"2023-10-14T18:30:16.096Z","dependency_job_id":"dba70779-cd9d-4fdb-b505-143da68fcbd1","html_url":"https://github.com/quantumlib/Cirq","commit_stats":{"total_commits":3633,"total_committers":228,"mean_commits":15.93421052631579,"dds":0.9077897054775668,"last_synced_commit":"455f50be4b1d22237de7ffa82c1efabd201fb184"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumlib%2FCirq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumlib%2FCirq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumlib%2FCirq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumlib%2FCirq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quantumlib","download_url":"https://codeload.github.com/quantumlib/Cirq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969226,"owners_count":21992262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","api","cirq","google","google-quantum","nisq","python","quantum","quantum-algorithms","quantum-circuit","quantum-circuit-simulator","quantum-computer-simulator","quantum-computing","quantum-development-kit","quantum-information","quantum-programming","quantum-programming-language","quantum-simulation","sdk","simulation"],"created_at":"2024-07-30T16:00:49.678Z","updated_at":"2025-05-13T15:06:50.829Z","avatar_url":"https://github.com/quantumlib.png","language":"Python","readme":"\u003c!-- H1 title omitted because our logo acts as the title. --\u003e\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg width=\"300px\" alt=\"Cirq logo\" src=\"https://raw.githubusercontent.com/quantumlib/Cirq/refs/heads/main/docs/images/Cirq_logo_color.svg\"\u003e\n\nPython package for writing, manipulating, and running [quantum\ncircuits](https://en.wikipedia.org/wiki/Quantum_circuit) on quantum computers\nand simulators.\n\n[![Licensed under the Apache 2.0\nlicense](https://img.shields.io/badge/License-Apache%202.0-3c60b1.svg?logo=opensourceinitiative\u0026logoColor=white\u0026style=flat-square)](https://github.com/quantumlib/Cirq/blob/main/LICENSE)\n[![Compatible with Python versions 3.10 and\nhigher](https://img.shields.io/badge/Python-3.10+-fcbc2c.svg?style=flat-square\u0026logo=python\u0026logoColor=white)](https://www.python.org/downloads/)\n[![OpenSSF Best Practices](https://img.shields.io/badge/dynamic/json?label=OpenSSF\u0026logo=springsecurity\u0026logoColor=white\u0026style=flat-square\u0026colorA=gray\u0026colorB=d56420\u0026suffix=%25\u0026query=$.badge_percentage_0\u0026uri=https://bestpractices.coreinfrastructure.org/projects/10063.json)](https://www.bestpractices.dev/projects/10063)\n[![Cirq project on\nPyPI](https://img.shields.io/pypi/v/cirq.svg?logo=python\u0026logoColor=white\u0026label=PyPI\u0026style=flat-square\u0026color=fcbc2c)](https://pypi.org/project/cirq)\n[![Archived in\nZenodo](https://img.shields.io/badge/10.5281%2Fzenodo.4062499-gray.svg?label=DOI\u0026logo=doi\u0026logoColor=white\u0026style=flat-square\u0026colorA=gray\u0026colorB=3c60b1)](https://doi.org/10.5281/zenodo.4062499)\n\n[Features](#features) \u0026ndash;\n[Installation](#installation) \u0026ndash;\n[Quick Start](#quick-start--hello-qubit-example) \u0026ndash;\n[Documentation](#cirq-documentation) \u0026ndash;\n[Integrations](#integrations) \u0026ndash;\n[Community](#community) \u0026ndash;\n[Citing Cirq](#citing-cirq) \u0026ndash;\n[Contact](#contact)\n\n\u003c/div\u003e\n\n## Features\n\nCirq provides useful abstractions for dealing with today’s [noisy\nintermediate-scale quantum](https://arxiv.org/abs/1801.00862) (NISQ) computers,\nwhere the details of quantum hardware are vital to achieving state-of-the-art\nresults. Some of its features include:\n\n*   Flexible gate definitions and custom gates\n*   Parameterized circuits with symbolic variables\n*   Circuit transformation, compilation and optimization\n*   Hardware device modeling\n*   Noise modeling\n*   Multiple built-in quantum circuit simulators\n*   Integration with [qsim](https://github.com/quantumlib/qsim) for\n    high-performance simulation\n*   Interoperability with [NumPy](https://numpy.org) and\n    [SciPy](https://scipy.org)\n*   Cross-platform compatibility\n\n## Installation\n\nCirq supports Python version 3.10 and later, and can be used on Linux, MacOS,\nand Windows, as well as [Google Colab](https://colab.google). For complete\ninstallation instructions, please refer to the\n[Install](https://quantumai.google/cirq/start/install) section of the online\nCirq documentation.\n\n## Quick Start – “Hello Qubit” Example\n\nHere is a simple example to get you up and running with Cirq after you have\ninstalled it. Start a Python interpreter, and then type the following:\n\n```python\nimport cirq\n\n# Pick a qubit.\nqubit = cirq.GridQubit(0, 0)\n\n# Create a circuit.\ncircuit = cirq.Circuit(\n    cirq.X(qubit)**0.5,  # Square root of NOT.\n    cirq.measure(qubit, key='m')  # Measurement.\n)\nprint(\"Circuit:\")\nprint(circuit)\n\n# Simulate the circuit several times.\nsimulator = cirq.Simulator()\nresult = simulator.run(circuit, repetitions=20)\nprint(\"Results:\")\nprint(result)\n```\n\nPython should then print output similar to this:\n\n```text\nCircuit:\n(0, 0): ───X^0.5───M('m')───\nResults:\nm=11000111111011001000\n```\n\nCongratulations! You have run your first quantum simulation in Cirq. You can\ncontinue to learn more by exploring the [many Cirq tutorials](#tutorials)\ndescribed below.\n\n## Cirq Documentation\n\nThe primary documentation site for Cirq is the [Cirq home page on the Quantum\nAI website](https://quantumai.google/cirq). There and elsewhere, a variety of\ndocumentation for Cirq is available.\n\n### Tutorials\n\n*   [Video tutorials] on YouTube are an engaging way to learn Cirq.\n*   [Jupyter notebook-based tutorials] let you learn Cirq from your browser – no\n    installation needed.\n*   [Text-based tutorials] on the Cirq home page are great when combined with a\n    local [installation] of Cirq on your computer. After starting with the\n    [basics], you'll be ready to dive into tutorials on circuit building and\n    circuit simulation under the [Build] and [Simulate] tabs, respectively. Check\n    out the other tabs for more!\n\n[Video tutorials]: https://www.youtube.com/playlist?list=PLpO2pyKisOjLVt_tDJ2K6ZTapZtHXPLB4\n[Jupyter notebook-based tutorials]: https://colab.research.google.com/github/quantumlib/Cirq\n[Text-based tutorials]: https://quantumai.google/cirq\n[installation]: https://quantumai.google/cirq/start/install\n[basics]: https://quantumai.google/cirq/start/basics\n[Build]: https://quantumai.google/cirq/build\n[Simulate]: https://quantumai.google/cirq/simula\n\n### Reference Documentation\n\n*   Docs for the [current stable release] correspond to what you get with\n    `pip install cirq`.\n*   Docs for the [pre-release] correspond to what you get with\n    `pip install --upgrade cirq~=1.0.dev`.\n\n[current stable release]: https://quantumai.google/reference/python/cirq/all_symbols\n[pre-release]: https://quantumai.google/reference/python/cirq/all_symbols?version=nightly\n\n### Examples\n\n*   The [examples subdirectory](./examples/) of the Cirq GitHub repo has many\n    programs illustrating the application of Cirq to everything from common\n    textbook algorithms to more advanced methods.\n*   The [Experiments page](https://quantumai.google/cirq/experiments/) on the\n    Cirq documentation site has yet more examples, from simple to advanced.\n\n### Change log\n\n*   The [Cirq releases](https://github.com/quantumlib/cirq/releases) page on\n    GitHub lists the changes in each release.\n\n## Integrations\n\nGoogle Quantum AI has a suite of open-source software that lets you do more\nwith Cirq. From high-performance simulators, to novel tools for expressing and\nanalyzing fault-tolerant quantum algorithms, our software stack lets you\ndevelop quantum programs for a variety of applications.\n\n\u003cdiv align=\"center\"\u003e\n\n| Your interests                                  | Software to explore  |\n|-------------------------------------------------|----------------------|\n| Quantum algorithms?\u003cbr\u003eFault-tolerant quantum computing (FTQC)? | [Qualtran] |\n| Large circuits and/or a lot of simulations?     | [qsim] |\n| Circuits with thousands of qubits and millions of Clifford operations? | [Stim] |\n| Quantum error correction (QEC)?                 | [Stim] |\n| Chemistry and/or material science?              | [OpenFermion]\u003cbr\u003e[OpenFermion-FQE]\u003cbr\u003e[OpenFermion-PySCF]\u003cbr\u003e[OpenFermion-Psi4] |\n| Quantum machine learning (QML)?                 | [TensorFlow Quantum] |\n| Real experiments using Cirq?                    | [ReCirq] |\n\n\u003c/div\u003e\n\n[Qualtran]: https://github.com/quantumlib/qualtran\n[qsim]: https://github.com/quantumlib/qsim\n[Stim]: https://github.com/quantumlib/stim\n[OpenFermion]: https://github.com/quantumlib/openfermion\n[OpenFermion-FQE]: https://github.com/quantumlib/OpenFermion-FQE\n[OpenFermion-PySCF]: https://github.com/quantumlib/OpenFermion-PySCF\n[OpenFermion-Psi4]: https://github.com/quantumlib/OpenFermion-Psi4\n[TensorFlow Quantum]: https://github.com/tensorflow/quantum\n[ReCirq]: https://github.com/quantumlib/ReCirq\n\n## Community\n\n\u003ca href=\"https://github.com/quantumlib/Cirq/graphs/contributors\"\u003e\u003cimg\nwidth=\"150em\" alt=\"Total number of contributors to Cirq\"\nsrc=\"https://img.shields.io/github/contributors/quantumlib/cirq?label=Contributors\u0026logo=github\u0026color=ccc\u0026style=flat-square\"/\u003e\u003c/a\u003e\n\nCirq has benefited from [contributions] by over 200 people and\ncounting. We are dedicated to cultivating an open and inclusive community to\nbuild software for quantum computers, and have a community [code of conduct].\n\n[contributions]: https://github.com/quantumlib/Cirq/graphs/contributors\n[code of conduct]: https://github.com/quantumlib/cirq/blob/main/CODE_OF_CONDUCT.md\n\n### Announcements\n\nStay on top of Cirq developments using the approach that best suits your needs:\n\n*   For releases and major announcements: sign up to the low-volume mailing list\n    [`cirq-announce`].\n*   For releases only:\n    *   Via GitHub notifications: configure [repository notifications] for Cirq.\n    *   Via Atom/RSS from GitHub: subscribe to the GitHub [Cirq releases Atom feed].\n    *   Via RSS from PyPI: subscribe to the [PyPI releases RSS feed] for Cirq.\n\nCirq releases take place approximately every quarter.\n\n[`cirq-announce`]: https://groups.google.com/forum/#!forum/cirq-announce\n[repository notifications]: https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/configuring-notifications\n[Cirq releases Atom feed]: https://github.com/quantumlib/Cirq/releases.atom\n[PyPI releases RSS feed]: https://pypi.org/rss/project/cirq/releases.xml\n\n### Questions and Discussions\n\n*   Have questions about Cirq? Post them to the [Quantum Computing\n    Stack Exchange] and tag them with [`cirq`]. You can also search past\n    questions using that tag – it's a great way to learn!\n*   Want meet other Cirq developers and participate in discussions? Join\n    _Cirq Cynq_, our biweekly virtual meeting of contributors. Sign up\n    to [_cirq-dev_] to get an automatic meeting invitation!\n\n[Quantum Computing Stack Exchange]: https://quantumcomputing.stackexchange.com\n[`cirq`]: https://quantumcomputing.stackexchange.com/questions/tagged/cirq\n[_cirq-dev_]: https://groups.google.com/forum/#!forum/cirq-dev\n\n### Contributions\n\n*   Have a feature request or bug report? [Open an issue on GitHub]!\n*   Want to develop Cirq code? Look at the [list of good first issues] to\n    tackle, read our [contribution guidelines], and then start opening\n    [pull requests]!\n\n[Open an issue on GitHub]: https://github.com/quantumlib/Cirq/issues/new/choose\n[list of good first issues]: https://github.com/quantumlib/Cirq/contribute\n[contribution guidelines]: https://github.com/quantumlib/cirq/blob/main/CONTRIBUTING.md\n[pull requests]: https://help.github.com/articles/about-pull-requests\n\n## Citing Cirq\u003ca name=\"how-to-cite-cirq\"\u003e\u003c/a\u003e\u003ca name=\"how-to-cite\"\u003e\u003c/a\u003e\n\nWhen publishing articles or otherwise writing about Cirq, please cite the Cirq\nversion you use – it will help others reproduce your results. We use Zenodo to\npreserve releases. The following links let you download the bibliographic\nrecord for the latest stable release of Cirq in some popular formats:\n\n\u003cdiv align=\"center\"\u003e\n\n[![Download BibTeX bibliography record for latest Cirq\nrelease](https://img.shields.io/badge/Download%20record-e0e0e0.svg?style=flat-square\u0026logo=LaTeX\u0026label=BibTeX\u0026labelColor=106f6e)](https://citation.doi.org/format?doi=10.5281/zenodo.4062499\u0026style=bibtex)\u0026nbsp;\u0026nbsp;\n[![Download CSL JSON bibliography record for latest Cirq\nrelease](https://img.shields.io/badge/Download%20record-e0e0e0.svg?style=flat-square\u0026label=CSL\u0026labelColor=2d98e0\u0026logo=json)](https://citation.doi.org/metadata?doi=10.5281/zenodo.4062499)\n\n\u003c/div\u003e\n\nFor formatted citations and records in other formats, as well as records for\nall releases of Cirq past and present, please visit the [Cirq page on\nZenodo](https://doi.org/10.5281/zenodo.4062499).\n\n## Contact\n\nFor any questions or concerns not addressed here, please email\nquantum-oss-maintainers@google.com.\n\n## Disclaimer\n\nThis is not an officially supported Google product. This project is not\neligible for the [Google Open Source Software Vulnerability Rewards\nProgram](https://bughunters.google.com/open-source-security).\n\nCopyright 2019 The Cirq Developers.\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://quantumai.google\"\u003e\n    \u003cimg width=\"15%\" alt=\"Google Quantum AI\"\n         src=\"https://raw.githubusercontent.com/quantumlib/Cirq/refs/heads/main/docs/images/quantum-ai-vertical.svg\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n","funding_links":[],"categories":["Projects"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantumlib%2Fcirq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantumlib%2Fcirq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantumlib%2Fcirq/lists"}