Package: cirq-unstable
This is a development version of Cirq and may be unstable.For the latest stable release of Cirq seehere.Cirq is a Python library for writing, manipulating, and optimizing quantum
circuits and running them against quantum computers and simulators.Installation and DocumentationCirq documentation is available atcirq.readthedocs.io.Documentation for the latestunstableversion of cirq (tracks the repository’s master branch; what you get if youpip installcirq-unstable), is available atcirq.readthedocs.io/latest.Documentation for the lateststableversion of cirq (what you get if youpip install cirq) is available atcirq.readthedocs.io/stable.InstallationDocumentationTutorialFor the latest news regarding Cirq, sign up to theCirq-announce email list!Hello QubitA simple example to get you up and running:importcirq# Pick a qubit.qubit=cirq.GridQubit(0,0)# Create a circuitcircuit=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:Circuit:
(0, 0): ───X^0.5───M('m')───
Results:
m=11000111111011001000Feature requests / Bugs / QuestionsIf you have feature requests or you found a bug, pleasefile them on Github.For questions about how to use Cirq post toQuantum Computing Stack Exchangewith thecirqtag.How to cite CirqCirq is uploaded to Zenodo automatically. Click on the badge below to see all the citation formats for all versions.An equivalent BibTex format reference is below for all the versions:@software{quantum_ai_team_and_collaborators_2020_4062499,
  author       = {Quantum AI team and collaborators},
  title        = {Cirq},
  month        = Oct,
  year         = 2020,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.4062499},
  url          = {https://doi.org/10.5281/zenodo.4062499}
}Cirq Contributors CommunityWe welcome contributions! Before opening your first PR, a good place to start is to read ourguidelines.We are dedicated to cultivating an open and inclusive community to build software for near term quantum computers.
Please read ourcode of conductfor the rules of engagement within our community.For real time informal discussions about Cirq, join ourcirqdevGitter channel, come hangout with us!Cirq Cynqueis our weekly meeting for contributors to discuss upcoming features, designs, issues, community and status of different efforts.
To get an invitation please join thecirq-dev email listwhich also serves as yet another platform to discuss contributions and design ideas.See AlsoFor those interested in using quantum computers to solve problems in
chemistry and materials science, we encourage exploringOpenFermionand
its sister library for compiling quantum simulation algorithms in Cirq,OpenFermion-Cirq.For machine learning enthusiasts,Tensorflow Quantumis a great project to check out!For a powerful quantum circuit simulator that integrates well with Cirq, we recommend looking atqsim.Finally,ReCirqcontains real world experiments using Cirq.Alpha DisclaimerCirq 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 thecirq-announce google group mailing list.Cirq is not an official Google product. Copyright 2019 The Cirq Developers