मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग51k · #3438

cirq

यह क्या करती है

Cirq क्वांटम कंप्यूटर प्रोग्राम बनाने और टेस्ट करने का टूल है। इससे आप क्वांटम सर्किट बना सकते हैं, दिखा सकते हैं कि वे कैसे काम करेंगे, और असली क्वांटम कंप्यूटरों पर चला सकते हैं, खासकर Google के कंप्यूटरों पर।

कब इस्तेमाल करें

  • ✓आप Python में क्वांटम सर्किट बनाना और टेस्ट करना चाहते हैं।
  • ✓आपको Google के क्वांटम हार्डवेयर पर प्रयोग चलाने हैं।
  • ✓आप सिमुलेट करना चाहते हैं कि क्वांटम सर्किट संभावित गड़बड़ियों (errors) के साथ कैसा व्यवहार करेगा।

Skill का लिंक

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/cirq/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/cirq/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“दो क्यूबिट वाला एक सरल क्वांटम सर्किट बनाओ, एक क्यूबिट पर Hadamard गेट लगाओ, दोनों के बीच CNOT गेट लगाओ, और मापन का परिणाम बताओ।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

Cirq आपको क्वांटम कंप्यूटर के बुनियादी हिस्से, जैसे क्यूबिट और लॉजिक गेट, परिभाषित करने देता है। फिर आप इन हिस्सों को जोड़कर सर्किट बनाते हैं और सिमुलेटर या असली हार्डवेयर पर देखते हैं कि क्या होता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

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 This Skill

Use this skill when:

  • Building, simulating, or optimizing NISQ circuits in Python
  • Running jobs on Google Quantum AI processors (via cirq-google) or partner backends (IonQ, Azure Quantum, AQT, Pasqal)
  • Modeling noise, compiling to hardware gatesets, or designing characterization experiments
  • Using parameter sweeps, transformers, or the ReCirq experiment patterns

For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

Installation

Examples target Cirq 1.7.0 on Python 3.11+. Keep Cirq vendor packages on the matching release; independently versioned integrations such as Azure Quantum need their own compatibility check.

uv pip install "cirq-core==1.7.0"
# Optional OpenQASM import dependency
uv pip install ply

For hardware integration (pin matching versions for reproducibility):

# Google Quantum Engine (requires approved GCP project access)
uv pip install "cirq-google==1.7.0"

# IonQ
uv pip install "cirq-ionq==1.7.0"

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

# Pasqal
uv pip install "cirq-pasqal==1.7.0"

# Azure: use a SEPARATE environment; its current extras require Cirq <1.7.
uv pip install "qdk[azure,cirq]==1.32.3" "azure-quantum==3.13.0"

Pin all cirq-* packages in an environment to the same release. The Azure example targets its supported Cirq 1.6.1 stack separately; do not force Cirq 1.7.0 into it. Cirq 1.7.0 updates the IonQ adapter to API v0.4.

Local examples were checked with synthetic circuits. Hardware examples are illustrative and were checked against released source and provider documentation, without submitting cloud jobs. See review evidence.

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(seed=42)
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:

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:

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:

Common topics:

  • Transformer framework
  • Gate decomposition

…

अक्सर पूछे जाने वाले सवाल

क्वांटम सर्किट क्या होते हैं?

क्वांटम सर्किट क्वांटम कंप्यूटर के लिए प्रोग्राम जैसे होते हैं। ये क्यूबिट (क्वांटम जानकारी की बुनियादी इकाई) और क्वांटम गेट (ऑपरेशन जो क्यूबिट की स्थिति बदलते हैं) से बने होते हैं।

क्या मैं Cirq को किसी भी क्वांटम कंप्यूटर पर इस्तेमाल कर सकता हूं?

Cirq Google के हार्डवेयर के लिए ऑप्टिमाइज़्ड है, लेकिन IonQ और Azure Quantum जैसे दूसरे प्रदाताओं के साथ भी चल सकता है। IBM हार्डवेयर के लिए बेहतर है कि Qiskit इस्तेमाल करें।

नॉइज़ सिमुलेशन क्या है?

क्वांटम कंप्यूटर गड़बड़ियों (नॉइज़) के प्रति संवेदनशील होते हैं। Cirq में नॉइज़ सिमुलेशन यह अनुमान लगाने में मदद करता है कि ये गड़बड़ियां आपके सर्किट के परिणाम पर कैसे असर डाल सकती हैं।

जानकारी

लेखक का मूल विवरण

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

repo: K-Dense-AI/scientific-agent-skills

लोकप्रियता

GitHub स्टार
51k
रैंकिंग में स्थान
#3438
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

13c-metabolic-flux

51k

कार्बन-13 आइसोटोप ट्रेसिंग डेटा से मेटाबोलिक फ़्लक्स का अनुमान लगाता है। कोशिका के मेटाबॉलिज़्म और बायोकेमिकल मार्गों का विश्लेषण करने के लिए यह उपयोगी है।

AI और एजेंटएजेंट

adaptyv

51k

Adaptyv API का उपयोग करके प्रोटीन कैरेक्टराइज़ेशन प्रयोग डिज़ाइन करता है। लागत का अनुमान लगाने, सीक्वेंस सबमिट करने और लैब के नतीजों पर नज़र रखने में मदद करता है।

AI और एजेंटएजेंट

aeon

51k

टाइम सीरीज़ डेटा पर मशीन लर्निंग के काम करता है। क्रमबद्ध डेटा में वर्गीकरण, पूर्वानुमान, एनोमली डिटेक्शन और पैटर्न खोजने के लिए यह उपयोगी है।

AI और एजेंटएजेंट

alphagenome

51k

जेनेटिक वेरिएंट्स के पहले से गणना किए गए जीनोमिक प्रभाव देखता है। वेरिएंट का जीनोम पर असर समझने के लिए स्कोर और स्पष्टीकरण देता है।

डेटामशीन लर्निंग

मिलती-जुलती skills