Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromquantumlib/Cirq

A python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.

License

NotificationsYou must be signed in to change notification settings

radumarg/Cirq

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Cirq logo

Python package for writing, manipulating, and runningquantumcircuits on quantum computersand simulators.

Licensed under the Apache 2.0 licenseCompatible with Python versions 3.11 and higherOpenSSF Best PracticesCirq project on PyPIArchived in Zenodo

FeaturesInstallationQuick StartDocumentationIntegrationsCommunityCiting CirqContact

Features

Cirq provides useful abstractions for dealing with today’snoisyintermediate-scale quantum (NISQ) computers,where the details of quantum hardware are vital to achieving state-of-the-artresults. 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 withqsim forhigh-performance simulation
  • Interoperability withNumPy andSciPy
  • Cross-platform compatibility

Installation

Cirq supports Python version 3.11 and later, and can be used on Linux, MacOS,and Windows, as well asGoogle Colab. For completeinstallation instructions, please refer to theInstall section of the onlineCirq documentation.

Quick Start – “Hello Qubit” Example

Here is a simple example to get you up and running with Cirq after you haveinstalled it. Start a Python interpreter, and then type the following:

importcirq# 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:

Circuit:(0, 0): ───X^0.5───M('m')───Results:m=11000111111011001000

Congratulations! You have run your first quantum simulation in Cirq. You cancontinue to learn more by exploring themany Cirq tutorialsdescribed below.

Cirq Documentation

The primary documentation site for Cirq is theCirq home page on the QuantumAI website. There and elsewhere, a variety ofdocumentation for Cirq is available.

Tutorials

Reference Documentation

  • Docs for thecurrent stable release correspond to what you get withpip install cirq.
  • Docs for thepre-release correspond to what you get withpip install --upgrade cirq~=1.0.dev.

Examples

  • Theexamples subdirectory of the Cirq GitHub repo has manyprograms illustrating the application of Cirq to everything from commontextbook algorithms to more advanced methods.
  • TheExperiments page on theCirq documentation site has yet more examples, from simple to advanced.

Change log

  • TheCirq releases page onGitHub lists the changes in each release.

Integrations

Google Quantum AI has a suite of open-source software that lets you do morewith Cirq. From high-performance simulators, to novel tools for expressing andanalyzing fault-tolerant quantum algorithms, our software stack lets youdevelop quantum programs for a variety of applications.

Your interestsSoftware to explore
Quantum algorithms?
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

Total number of contributors to Cirq

Cirq has benefited fromcontributions by over 200 people andcounting. We are dedicated to cultivating an open and inclusive community tobuild software for quantum computers, and have a communitycode of conduct.

Announcements

Stay on top of Cirq developments using the approach that best suits your needs:

Cirq releases take place approximately every quarter.

Questions and Discussions

  • Have questions about Cirq? Post them to theQuantum ComputingStack Exchange and tag them withcirq. You can also search pastquestions using that tag – it's a great way to learn!
  • Want meet other Cirq developers and participate in discussions? JoinCirq Cynq, our biweekly virtual meeting of contributors. Sign uptocirq-dev to get an automatic meeting invitation!

Contributions

Citing Cirq

When publishing articles or otherwise writing about Cirq, please cite the Cirqversion you use – it will help others reproduce your results. We use Zenodo topreserve releases. The following links let you download the bibliographicrecord for the latest stable release of Cirq in some popular formats:

Download BibTeX bibliography record for latest Cirq release  Download CSL JSON bibliography record for latest Cirq release

For formatted citations and records in other formats, as well as records forall releases of Cirq past and present, please visit theCirq page onZenodo.

Contact

For any questions or concerns not addressed here, please emailquantum-oss-maintainers@google.com.

Disclaimer

This is not an officially supported Google product. This project is noteligible for theGoogle Open Source Software Vulnerability RewardsProgram.

Copyright 2019 The Cirq Developers.

Google Quantum AI

About

A python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python92.4%
  • Jupyter Notebook6.1%
  • Other1.5%

[8]ページ先頭

©2009-2025 Movatter.jp