|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| .github/ | H | 26-Oct-2021 | - | 571 | 499 |
| benchmarks/ | H | 26-Oct-2021 | - | 145 | 73 |
| check/ | H | 26-Oct-2021 | - | 1,116 | 465 |
| cirq-aqt/ | H | 03-May-2022 | - | 1,230 | 856 |
| cirq-core/ | H | 03-May-2022 | - | 156,525 | 118,544 |
| cirq-google/ | H | 03-May-2022 | - | 61,154 | 51,241 |
| cirq-ionq/ | H | 03-May-2022 | - | 4,411 | 3,301 |
| cirq-pasqal/ | H | 03-May-2022 | - | 2,021 | 1,405 |
| cirq-rigetti/ | H | 03-May-2022 | - | 6,884 | 6,022 |
| cirq-web/ | H | 03-May-2022 | - | 15,497 | 13,874 |
| dev_tools/ | H | 26-Oct-2021 | - | 8,417 | 5,847 |
| docs/ | H | 26-Oct-2021 | - | 42,785 | 41,530 |
| examples/ | H | 03-May-2022 | - | 6,131 | 4,693 |
| rtd_docs/ | H | 03-May-2022 | - | 227 | 109 |
| .dockerignore | H A D | 26-Oct-2021 | 484 | 46 | 33 |
| .git-blame-ignore-revs | H A D | 26-Oct-2021 | 155 | 5 | 4 |
| .gitattributes | H A D | 26-Oct-2021 | 207 | 6 | 4 |
| .gitignore | H A D | 26-Oct-2021 | 538 | 52 | 37 |
| .readthedocs.yml | H A D | 26-Oct-2021 | 157 | 9 | 9 |
| .zenodo.json | H A D | 26-Oct-2021 | 466 | 13 | 13 |
| AUTHORS | H A D | 26-Oct-2021 | 292 | 7 | 6 |
| CODE_OF_CONDUCT.md | H A D | 26-Oct-2021 | 4.4 KiB | 92 | 72 |
| CONTRIBUTING.md | H A D | 26-Oct-2021 | 5.4 KiB | 124 | 106 |
| Dockerfile | H A D | 26-Oct-2021 | 810 | 27 | 21 |
| LICENSE | H A D | 26-Oct-2021 | 11.1 KiB | 202 | 169 |
| MANIFEST.in | H A D | 26-Oct-2021 | 16 | 2 | 1 |
| README.rst | H A D | 26-Oct-2021 | 5.2 KiB | 135 | 87 |
| asv.conf.json | H A D | 26-Oct-2021 | 540 | 18 | 17 |
| conftest.py | H A D | 26-Oct-2021 | 775 | 23 | 7 |
| pyproject.toml | H A D | 26-Oct-2021 | 106 | 5 | 4 |
| release.md | H A D | 26-Oct-2021 | 7.8 KiB | 235 | 167 |
| setup.cfg | H A D | 26-Oct-2021 | 34 | 3 | 2 |
| setup.py | H A D | 26-Oct-2021 | 2.5 KiB | 76 | 39 |
README.rst
1.. image:: https://raw.githubusercontent.com/quantumlib/Cirq/master/docs/images/Cirq_logo_color.png
2 :target: https://github.com/quantumlib/cirq
3 :alt: Cirq
4 :width: 500px
5
6Cirq is a Python library for writing, manipulating, and optimizing quantum
7circuits and running them against quantum computers and simulators.
8
9.. image:: https://github.com/quantumlib/cirq/workflows/Continuous%20Integration/badge.svg
10 :target: https://github.com/quantumlib/Cirq
11 :alt: Build Status
12
13.. image:: https://badge.fury.io/py/cirq.svg
14 :target: https://badge.fury.io/py/cirq
15
16.. image:: https://readthedocs.org/projects/cirq/badge/?version=latest
17 :target: https://readthedocs.org/projects/cirq/versions/
18 :alt: Documentation Status
19
20
21Installation and Documentation
22------------------------------
23
24Cirq documentation is available at `quantumai.google/cirq <https://quantumai.google/cirq>`_.
25
26Documentation for the latest **pre-release** version of cirq (tracks the repository's master branch; what you get if you ``pip install --pre cirq``), is available at `here <https://quantumai.google/reference/python/cirq/all_symbols?version=nightly>`__.
27
28Documentation for the latest **stable** version of cirq (what you get if you ``pip install cirq``) is available at `here <https://quantumai.google/reference/python/cirq/all_symbols>`__.
29
30
31- `Installation <https://quantumai.google/cirq/install>`_
32- `Documentation <https://quantumai.google/cirq>`_
33- `Tutorials <https://quantumai.google/cirq/tutorials>`_
34
35For a comprehensive list all of the interactive Jupyter Notebooks in our repo (including the ones not yet published to the site) open our repo in `Colab <https://colab.research.google.com/github/quantumlib/Cirq>`_.
36
37For the latest news regarding Cirq, sign up to the `Cirq-announce email list <https://groups.google.com/forum/#!forum/cirq-announce>`__!
38
39
40Hello Qubit
41-----------
42
43A simple example to get you up and running:
44
45.. code-block:: python
46
47 import cirq
48
49 # Pick a qubit.
50 qubit = cirq.GridQubit(0, 0)
51
52 # Create a circuit
53 circuit = cirq.Circuit(
54 cirq.X(qubit)**0.5, # Square root of NOT.
55 cirq.measure(qubit, key='m') # Measurement.
56 )
57 print("Circuit:")
58 print(circuit)
59
60 # Simulate the circuit several times.
61 simulator = cirq.Simulator()
62 result = simulator.run(circuit, repetitions=20)
63 print("Results:")
64 print(result)
65
66Example output:
67
68.. code-block::
69
70 Circuit:
71 (0, 0): ───X^0.5───M('m')───
72 Results:
73 m=11000111111011001000
74
75
76Feature requests / Bugs / Questions
77-----------------------------------
78
79If you have feature requests or you found a bug, please `file them on Github <https://github.com/quantumlib/Cirq/issues/new/choose>`__.
80
81For questions about how to use Cirq post to
82`Quantum Computing Stack Exchange <https://quantumcomputing.stackexchange.com/>`__ with the
83`cirq <https://quantumcomputing.stackexchange.com/questions/tagged/cirq>`__ tag.
84
85How to cite Cirq
86----------------
87
88Cirq is uploaded to Zenodo automatically. Click on the badge below to see all the citation formats for all versions.
89
90.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4062499.svg
91 :target: https://doi.org/10.5281/zenodo.4062499
92 :alt: DOI
93
94Cirq Contributors Community
95---------------------------
96
97We welcome contributions! Before opening your first PR, a good place to start is to read our
98`guidelines <https://github.com/quantumlib/cirq/blob/master/CONTRIBUTING.md>`__.
99
100We are dedicated to cultivating an open and inclusive community to build software for near term quantum computers.
101Please read our `code of conduct <https://github.com/quantumlib/cirq/blob/master/CODE_OF_CONDUCT.md>`__ for the rules of engagement within our community.
102
103For real time informal discussions about Cirq, join our `cirqdev <https://gitter.im/cirqdev>`__ Gitter channel, come hangout with us!
104
105**Cirq Cynque** is our weekly meeting for contributors to discuss upcoming features, designs, issues, community and status of different efforts.
106To get an invitation please join the `cirq-dev email list <https://groups.google.com/forum/#!forum/cirq-dev>`__ which also serves as yet another platform to discuss contributions and design ideas.
107
108
109See Also
110--------
111
112For those interested in using quantum computers to solve problems in
113chemistry and materials science, we encourage exploring
114`OpenFermion <https://github.com/quantumlib/openfermion>`__ and
115its sister library for compiling quantum simulation algorithms in Cirq,
116`OpenFermion-Cirq <https://github.com/quantumlib/openfermion-cirq>`__.
117
118For machine learning enthusiasts, `Tensorflow Quantum <https://github.com/tensorflow/quantum>`__ is a great project to check out!
119
120For a powerful quantum circuit simulator that integrates well with Cirq, we recommend looking at `qsim <https://github.com/quantumlib/qsim>`__.
121
122Finally, `ReCirq <https://github.com/quantumlib/ReCirq>`__ contains real world experiments using Cirq.
123
124
125Alpha Disclaimer
126----------------
127
128**Cirq is currently in alpha.**
129We may change or remove parts of Cirq's API when making new releases.
130To be informed of deprecations and breaking changes, subscribe to the
131`cirq-announce google group mailing list <https://groups.google.com/forum/#!forum/cirq-announce>`__.
132
133
134Cirq is not an official Google product. Copyright 2019 The Cirq Developers
135