Skip to content
Skillpedia
Misc48k · #2520

cirq

Has your agent understand and use Cirq. It's a tool for creating and simulating quantum circuits on quantum computers.

What it does

Cirq is a tool for creating, simulating, and running programs on quantum computers. It allows you to build sequences of quantum operations, called circuits, and see how they behave.

When to use it

  • ✓When you want to experiment with quantum computing.
  • ✓While learning about quantum circuits.
  • ✓To test quantum algorithm ideas.

Example of what to ask your AI

“Create a simple quantum circuit with two operations and simulate it.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cirq/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cirq/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

You write Python code to define qubits (the basic units of quantum information) and the operations you want to apply to them. Then, you can run this circuit on a simulator or a real quantum computer.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill cirq

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/cirq/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Bundled upstream support

Supporting files are included at skill-relative paths. See UPSTREAM-NOTICE.md for their pinned sources, licenses, hashes, and import changes.

Cirq - Quantum Computing with Python

Cirq is Google Quantum AI's open-source framework for designing, simulating, and running quantum circuits on quantum computers and simulators.

When to Use

  • You are designing, simulating, or executing quantum circuits with the Cirq ecosystem.
  • You need Google Quantum AI-style primitives, parameterized circuits, or integrations like cirq-google and cirq-ionq.
  • You are prototyping or teaching quantum workflows in Python and want concrete circuit examples.

Installation

uv pip install cirq

For hardware integration:

# Google Quantum Engine
uv pip install cirq-google

# IonQ
uv pip install cirq-ionq

# AQT (Alpine Quantum Technologies)
uv pip install cirq-aqt

# Pasqal
uv pip install cirq-pasqal

# Azure Quantum
uv pip install azure-quantum cirq

Quick Start

Basic Circuit

import cirq
import numpy as np

# Create qubits
q0, q1 = cirq.LineQubit.range(2)

# Build circuit
circuit = cirq.Circuit(
    cirq.H(q0),              # Hadamard on q0
    cirq.CNOT(q0, q1),       # CNOT with q0 control, q1 target
    cirq.measure(q0, q1, key='result')
)

print(circuit)

# Simulate
simulator = cirq.Simulator()
result = simulator.run(circuit, repetitions=1000)

# Display results
print(result.histogram(key='result'))

Parameterized Circuit

import sympy

# Define symbolic parameter
theta = sympy.Symbol('theta')

# Create parameterized circuit
circuit = cirq.Circuit(
    cirq.ry(theta)(q0),
    cirq.measure(q0, key='m')
)

# Sweep over parameter values
sweep = cirq.Linspace('theta', start=0, stop=2*np.pi, length=20)
results = simulator.run_sweep(circuit, params=sweep, repetitions=1000)

# Process results
for params, result in zip(sweep, results):
    theta_val = params['theta']
    counts = result.histogram(key='m')
    print(f"θ={theta_val:.2f}: {counts}")

Core Capabilities

Circuit Building

For comprehensive information about building quantum circuits, including qubits, gates, operations, custom gates, and circuit patterns, see:

  • references/building.md - Complete guide to circuit construction

Common topics:

  • Qubit types (GridQubit, LineQubit, NamedQubit)
  • Single and two-qubit gates
  • Parameterized gates and operations
  • Custom gate decomposition
  • Circuit organization with moments
  • Standard circuit patterns (Bell states, GHZ, QFT)
  • Import/export (OpenQASM, JSON)
  • Working with qudits and observables

Simulation

For detailed information about simulating quantum circuits, including exact simulation, noisy simulation, parameter sweeps, and the Quantum Virtual Machine, see:

  • references/simulation.md - Complete guide to quantum simulation

Common topics:

  • Exact simulation (state vector, density matrix)
  • Sampling and measurements
  • Parameter sweeps (single and multiple parameters)
  • Noisy simulation
  • State histograms and visualization
  • Quantum Virtual Machine (QVM)
  • Expectation values and observables
  • Performance optimization

Circuit Transformation

For information about optimizing, compiling, and manipulating quantum circuits, see:

  • references/transformation.md - Complete guide to circuit transformations

Common topics:

  • Transformer framework
  • Gate decomposition
  • Circuit optimization (merge gates, eject Z gates, drop negligible operations)
  • Circuit compilation for hardware
  • Qubit routing and SWAP insertion
  • Custom transformers
  • Transformation pipelines

Hardware Integration

For information about running circuits on real quantum hardware from various providers, see:

  • references/hardware.md - Complete guide to hardware integration

Supported providers:

  • Google Quantum AI (cirq-google) - Sycamore, Weber processors
  • IonQ (cirq-ionq) - Trapped ion quantum computers
  • Azure Quantum (azure-quantum) - IonQ and Honeywell backends
  • AQT (cirq-aqt) - Alpine Quantum Technologies
  • Pasqal (cirq-pasqal) - Neutral atom quantum computers

Topics include device representation, qubit selection, authentication, job management, and circuit optimization for hardware.

Noise Modeling

For information about modeling noise, noisy simulation, characterization, and error mitigation, see:

  • references/noise.md - Complete guide to noise modeling

Common topics:

…

FAQ

What are qubits?

Qubits are like the 'bits' in normal computers, but they can be 0, 1, or a combination of both at the same time, allowing for more information processing.

What is a quantum circuit?

It's a sequence of instructions that tell the quantum computer which operations to apply to the qubits to perform a calculation.

Can I run this on my computer?

You can simulate quantum circuits on your computer using Cirq, but to run on a real quantum computer, you need access to one.

Details

Original description by the author

Cirq is Google Quantum AI's open-source framework for designing, simulating, and running quantum circuits on quantum computers and simulators.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#2520
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills