본문으로 건너뛰기
Skillpedia
일반 코딩48k · #4134

cirq

하는 일

Cirq는 양자 컴퓨터에서 프로그램을 만들고, 시뮬레이션하고, 실행하는 도구입니다. 회로라고 부르는 양자 연산의 순서를 만들고, 그 동작을 볼 수 있게 합니다.

사용하는 경우

  • ✓양자 컴퓨팅을 실험하고 싶을 때.
  • ✓양자 회로를 배우는 중일 때.
  • ✓양자 알고리즘 아이디어를 시험해 볼 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

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.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“두 개의 연산으로 이루어진 간단한 양자 회로를 만들고 시뮬레이션해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Python 코드로 큐비트(양자 정보의 기본 단위)와 그 위에 적용할 연산을 정의합니다. 그다음 이 회로를 시뮬레이터나 실제 양자 컴퓨터에서 실행할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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:

…

자주 묻는 질문

큐비트란 무엇인가요?

일반 컴퓨터의 ‘비트’와 비슷하지만, 0이나 1, 또는 둘을 동시에 조합한 상태를 가질 수 있어 더 많은 정보를 처리할 수 있습니다.

양자 회로란 무엇인가요?

계산을 수행하려고 양자 컴퓨터에 어떤 연산을 큐비트에 적용할지 알려 주는 명령의 순서입니다.

내 컴퓨터에서 실행할 수 있나요?

Cirq로 컴퓨터에서 양자 회로를 시뮬레이션할 수 있습니다. 다만 실제 양자 컴퓨터에서 실행하려면 그 장비에 접근할 수 있어야 합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
48k
순위
#4134
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬