# Cirq **Repository Path**: shzhou_admin/Cirq ## Basic Information - **Project Name**: Cirq - **Description**: Cirq  是 Google 专为 NISQ 算法打造的框架,允许开发者为特定的量子处理器编写量子算法 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://www.oschina.net/p/cirq - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2020-01-20 - **Last Updated**: 2020-12-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README .. image:: https://raw.githubusercontent.com/quantumlib/Cirq/master/docs/_static/Cirq_logo_color.png :target: https://github.com/quantumlib/cirq :alt: Cirq :width: 500px Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators. .. image:: https://travis-ci.com/quantumlib/Cirq.svg?token=7FwHBHqoxBzvgH51kThw&branch=master :target: https://travis-ci.com/quantumlib/Cirq :alt: Build Status .. image:: https://badge.fury.io/py/cirq.svg :target: https://badge.fury.io/py/cirq .. image:: https://readthedocs.org/projects/cirq/badge/?version=latest :target: https://readthedocs.org/projects/cirq/versions/ :alt: Documentation Status Installation and Documentation ------------------------------ Cirq documentation is available at `cirq.readthedocs.io `_. Documentation for the latest **unstable** version of cirq (tracks the repository's master branch; what you get if you ``pip install cirq-unstable``), is available at `cirq.readthedocs.io/latest `_. Documentation for the latest **stable** version of cirq (what you get if you ``pip install cirq``) is available at `cirq.readthedocs.io/stable `_. - `Installation `_ - `Documentation `_ - `Tutorial `_ - `Cirq-announce email list `_ Hello Qubit ----------- A simple example to get you up and running: .. code-block:: 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) Example output: .. code-block:: bash Circuit: (0, 0): ───X^0.5───M('m')─── Results: m=11000111111011001000 Contributing ------------ We welcome contributions. Please follow these `guidelines `__. We use `Github issues `__ for tracking requests and bugs. Please post questions to the `Quantum Computing Stack Exchange `__ with the `cirq `__ tag. For informal discussions about Cirq, join our `cirqdev `__ Gitter channel. See Also -------- For those interested in using quantum computers to solve problems in chemistry and materials science, we encourage exploring `OpenFermion `__ and its sister library for compiling quantum simulation algorithms in Cirq, `OpenFermion-Cirq `__. Alpha Disclaimer ---------------- **Cirq is currently in alpha.** We may change or remove parts of Cirq's API when making new releases. To be informed of deprecations and breaking changes, subscribe to the `cirq-announce google group mailing list `__. Cirq is not an official Google product. Copyright 2019 The Cirq Developers