Configs2026年7月26日·1 分钟阅读

Cirq — Quantum Circuit Framework by Google

A Python framework by Google for creating, editing, and running quantum circuits on NISQ processors, with fine-grained control over gate placement and qubit topology.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Cirq Overview
直接安装命令
npx -y tokrepo@latest install a8dcf264-888b-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Cirq is a Python framework for writing, manipulating, and optimizing quantum circuits, then running them on simulators or real quantum hardware. Developed by Google Quantum AI, it gives researchers fine-grained control over gate placement and qubit topology for NISQ-era processors.

What Cirq Does

  • Defines quantum circuits with explicit qubit placement and gate scheduling
  • Simulates circuits locally with state-vector and density-matrix simulators
  • Compiles and runs circuits on Google's quantum processors via the Cloud API
  • Provides noise models for realistic simulation of hardware behavior
  • Supports circuit optimization through built-in and custom compiler passes

Architecture Overview

Cirq models circuits as moment-based sequences of operations on typed qubits (LineQubit, GridQubit, or NamedQubit). Gates map to device-specific operations through a compilation pipeline. The framework includes simulators, device specifications, and serialization layers. Integration with Google's Quantum Computing Service allows execution on Sycamore and other processors.

Self-Hosting & Configuration

  • Install via pip: pip install cirq (or cirq-core for minimal dependencies)
  • Optional extras: cirq-google, cirq-aqt, cirq-ionq for hardware backends
  • Configure Google Cloud credentials for access to quantum hardware
  • Use virtual environments to manage dependency versions
  • Jupyter notebook support built in for interactive circuit exploration

Key Features

  • Moment-based circuit model with explicit operation scheduling
  • Multiple qubit types reflecting real hardware topologies (grid, line, named)
  • Built-in simulators including state-vector, density-matrix, and Clifford
  • Hardware noise models for realistic NISQ device simulation
  • Extensible compiler pipeline for device-specific circuit optimization

Comparison with Similar Tools

  • Qiskit — Broader ecosystem with more backends; Cirq offers finer control over gate placement and timing
  • PennyLane — Focused on quantum ML with autodiff; Cirq is a lower-level circuit framework
  • PyQuil — Targets Rigetti hardware; Cirq targets Google processors and is more actively maintained
  • Amazon Braket SDK — Multi-hardware access via AWS; Cirq is open-source and hardware-agnostic in design

FAQ

Q: Can Cirq run on non-Google quantum hardware? A: Yes. Cirq supports AQT, IonQ, and Pasqal through optional integration packages, plus local simulation.

Q: Is Cirq suitable for quantum machine learning? A: Cirq provides circuit primitives used by TensorFlow Quantum for QML, but PennyLane may be more ergonomic for pure ML workflows.

Q: How does Cirq handle noise simulation? A: Cirq includes noise models that can be applied per-gate or per-device, simulating depolarization, dephasing, and readout errors.

Q: What is the relationship between Cirq and TensorFlow Quantum? A: TensorFlow Quantum builds on Cirq, using Cirq circuits as the quantum computation layer within TensorFlow's ML pipeline.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产