Cirq Google (`cirq-google`) is the module for the Cirq quantum computing framework that provides tools and access to the Google Quantum Computing Service. It enables users to run quantum circuits on Google's quantum processors and high-performance simulators. The current version is 1.6.1, and it typically releases new versions in sync with the main `cirq` library, which has a release cadence of monthly/bi-monthly patches and quarterly minor versions.
pip install cirq cirq-googleVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `QuantumEngine` client and run a simple Cirq circuit. For actual remote execution, ensure your Google Cloud environment is authenticated and `GOOGLE_CLOUD_PROJECT` (or a hardcoded project ID) is correctly configured. The example includes a fallback to a local Cirq simulator for immediate runnability without a full GCP setup.
For new projects, avoid `cirq-rigetti`. For legacy code, pin `cirq-rigetti==1.5.0` and `cirq<1.6.0` or update your code to use the standalone `pyquil` library if applicable. `cirq-rigetti` was deprecated in v1.5.0 and removed in v1.6.0.
Upgrade your Python environment to 3.11.0 or higher. For example, using `pyenv install 3.11.8` and `pyenv local 3.11.8` or `conda install python=3.11`.
For fault-tolerant quantum algorithm resource estimation, use the `Qualtran` library directly from `https://github.com/quantumlib/Qualtran.git`. `cirq-ft` was deprecated in v1.3.0 and removed in v1.4.0.
Run `gcloud auth application-default login` in your terminal, or set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable pointing to a service account key JSON file. Ensure your GCP project has the Quantum Engine API enabled.