qiskit

K-Dense-AI/scientific-agent-skills · updated Jun 4, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill qiskit
0 commentsdiscussion
summary

### Qiskit

  • name: "qiskit"
  • description: "IBM quantum computing framework. Use when targeting IBM Quantum hardware, working with Qiskit Runtime for production workloads, or needing IBM optimization tools. Best for IBM hardware execution, quan..."
skill.md
name
qiskit
description
IBM quantum computing framework. Use when targeting IBM Quantum hardware, working with Qiskit Runtime for production workloads, or needing IBM optimization tools. Best for IBM hardware execution, quantum error mitigation, and enterprise quantum computing. For Google hardware use cirq; for gradient-based quantum ML use pennylane; for open quantum system simulations use qutip.
license
Apache-2.0 license
metadata
version: "1.0" skill-author: K-Dense Inc.

Qiskit

Overview

Qiskit is the world's most popular open-source quantum computing framework with 13M+ downloads. Build quantum circuits, optimize for hardware, execute on simulators or real quantum computers, and analyze results. Supports IBM Quantum (100+ qubit systems), IonQ, Amazon Braket, and other providers.

Key Features:

  • 83x faster transpilation than competitors
  • 29% fewer two-qubit gates in optimized circuits
  • Backend-agnostic execution (local simulators or cloud hardware)
  • Comprehensive algorithm libraries for optimization, chemistry, and ML

Quick Start

Installation

uv pip install qiskit
uv pip install "qiskit[visualization]" matplotlib

First Circuit

from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler

# Create Bell state (entangled qubits)
qc = QuantumCircuit(2)
qc.h(0)           # Hadamard on qubit 0
qc.cx(0, 1)       # CNOT from qubit 0 to 1
qc.measure_all()  # Measure both qubits

# Run locally
sampler = StatevectorSampler()
result = sampler.run([qc], shots=1024).result()
counts = result[0].data.meas.get_counts()
print(counts)  # {'00': ~512, '11': ~512}

Visualization

from qiskit.visualization import plot_histogram

qc.draw('mpl')           # Circuit diagram
plot_histogram(counts)   # Results histogram

Core Capabilities

1. Setup and Installation

For detailed installation, authentication, and IBM Quantum account setup:

  • See references/setup.md

Topics covered:

  • Installation with uv
  • Python environment setup
  • IBM Quantum account and API token configuration
  • Local vs. cloud execution

2. Building Quantum Circuits

For constructing quantum circuits with gates, measurements, and composition:

  • See references/circuits.md

Topics covered:

  • Creating circuits with QuantumCircuit
  • Single-qubit gates (H, X, Y, Z, rotations, phase gates)
  • Multi-qubit gates (CNOT, SWAP, Toffoli)
  • Measurements and barriers
  • Circuit composition and properties
  • Parameterized circuits for variational algorithms

3. Primitives (Sampler and Estimator)

For executing quantum circuits and computing results:

  • See references/primitives.md

Topics covered:

  • Sampler: Get bitstring measurements and probability distributions
  • Estimator: Compute expectation values of observables
  • V2 interface (StatevectorSampler, StatevectorEstimator)
  • IBM Quantum Runtime primitives for hardware
  • Sessions and Batch modes
  • Parameter binding

4. Transpilation and Optimization

For optimizing circuits and preparing for hardware execution:

  • See references/transpilation.md

Topics covered:

  • Why transpilation is necessary
  • Optimization levels (0-3)
  • Six transpilation stages (init, layout, routing, translation, optimization, scheduling)
  • Advanced features (virtual permutation elision, gate cancellation)
  • Common parameters (initial_layout, approximation_degree, seed)
  • Best practices for efficient circuits

5. Visualization

For displaying circuits, results, and quantum states:

  • See references/visualization.md

Topics covered:

  • Circuit drawings (text, matplotlib, LaTeX)
  • Result histograms
  • Quantum state visualization (Bloch sphere, state city, QSphere)
  • Backend topology and error maps
  • Customization and styling
  • Saving publication-quality figures

6. Hardware Backends

For running on simulators and real quantum computers:

  • See references/backends.md

Topics covered:

  • IBM Quantum backends and authentication
  • Backend properties and status
  • Running on real hardware with Runtime primitives
  • Job management and queuing
  • Session mode (iterative algorithms)
  • Batch mode (parallel jobs)
  • Local simulators (StatevectorSampler, Aer)
  • Third-party providers (IonQ, Amazon Braket)
  • Error mitigation strategies

7. Qiskit Patterns Workflow

For implementing the four-step quantum computing workflow:

  • See references/patterns.md

Topics covered:

  • Map: Translate problems to quantum circuits
  • Optimize: Transpile for hardware
  • Execute: Run with primitives
  • Post-process: Extract and analyze results
  • Complete VQE example
  • Session vs. Batch execution
  • Common workflow patterns

8. Quantum Algorithms and Applications

For implementing specific quantum algorithms:

  • See references/algorithms.md

Topics covered:

  • Optimization: VQE, QAOA, Grover's algorithm
  • Chemistry: Molecular ground states, excited states, Hamiltonians
  • Machine Learning: Quantum kernels, VQC, QNN
  • Algorithm libraries: Qiskit Nature, Qiskit ML, Qiskit Optimization
  • Physics simulations and benchmarking

Workflow Decision Guide

If you need to:

  • Install Qiskit or set up IBM Quantum account → references/setup.md
  • Build a new quantum circuit → references/circuits.md
  • Understand gates and circuit operations → references/circuits.md
  • Run circuits and get measurements → references/primitives.md
  • Compute expectation values → references/primitives.md
  • Optimize circuits for hardware → references/transpilation.md
  • Visualize circuits or results → references/visualization.md
  • Execute on IBM Quantum hardware → references/backends.md
  • Connect to third-party providers → references/backends.md
  • Implement end-to-end quantum workflow → references/patterns.md
  • Build specific algorithm (VQE, QAOA, etc.) → references/algorithms.md
  • Solve chemistry or optimization problems → references/algorithms.md

Best Practices

Development Workflow

  1. Start with simulators: Test locally before using hardware

    from qiskit.primitives import StatevectorSampler
    sampler = StatevectorSampler()
    
  2. Always transpile: Optimize circuits before execution

    from qiskit import transpile
    qc_optimized = transpile(qc, backend=backend, optimization_level=3)
    
  3. Use appropriate primitives:

    • Sampler for bitstrings (optimization algorithms)
    • Estimator for expectation values (chemistry, physics)
  4. Choose execution mode:

    • Session: Iterative algorithms (VQE, QAOA)
    • Batch: Independent parallel jobs
    • Single job: One-off experiments

Performance Optimization

  • Use optimization_level=3 for production
  • Minimize two-qubit gates (major error source)
  • Test with noisy simulators before hardware
  • Save and reuse transpiled circuits
  • Monitor convergence in variational algorithms

Hardware Execution

  • Check backend status before submitting
  • Use least_busy() for testing
  • Save job IDs for later retrieval
  • Apply error mitigation (resilience_level)
  • Start with fewer shots, increase for final runs

Common Patterns

Pattern 1: Simple Circuit Execution

from qiskit import QuantumCircuit, transpile
from qiskit.primitives import StatevectorSampler

qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.measure_all()

sampler = StatevectorSampler()
result = sampler.run([qc], shots=1024).result()
counts = result[0].data.meas.get_counts()

Pattern 2: Hardware Execution with Transpilation

from qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2 as Sampler
from qiskit import transpile

service = QiskitRuntimeService()
backend = service.backend("ibm_brisbane")

qc_optimized = transpile(qc, backend=backend, optimization_level=3)

sampler = Sampler(backend)
job = sampler.run([qc_optimized], shots=1024)
result = job.result()

Pattern 3: Variational Algorithm (VQE)

from qiskit_ibm_runtime import Session, EstimatorV2 as Estimator
from scipy.optimize import minimize

with Session(backend=backend) as session:
    estimator = Estimator(session=session)

    def cost_function(params):
        bound_qc = ansatz.assign_parameters(params)
        qc_isa = transpile(bound_qc, backend=backend)
        result = estimator.run([(qc_isa, hamiltonian)]).result()
        return result[0].data.evs

    result = minimize(cost_function, initial_params, method='COBYLA')

Additional Resources

how to use qiskit

How to use qiskit on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add qiskit
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill qiskit

The skills CLI fetches qiskit from GitHub repository K-Dense-AI/scientific-agent-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/qiskit

Reload or restart Cursor to activate qiskit. Access the skill through slash commands (e.g., /qiskit) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.870 reviews
  • Sakura Abebe· Dec 24, 2024

    We added qiskit from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Chaitanya Patil· Dec 20, 2024

    Useful defaults in qiskit — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Sakura Sethi· Dec 20, 2024

    qiskit fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Dev Khanna· Dec 16, 2024

    Keeps context tight: qiskit is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Sakura Mensah· Dec 8, 2024

    We added qiskit from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Sofia Tandon· Nov 27, 2024

    qiskit reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ren Li· Nov 15, 2024

    qiskit reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Piyush G· Nov 11, 2024

    qiskit is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Meera Menon· Nov 11, 2024

    Registry listing for qiskit matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Dev Wang· Nov 7, 2024

    I recommend qiskit for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 70

1 / 7