AGENT SKILL

qiskit

Routes agents across Qiskit's circuit, transpiler, primitives, serialization, quantum-info, visualization, provider, and C-API workflows.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
qiskit
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Routes agents across Qiskit's circuit, transpiler, primitives, serialization, quantum-info, visualization, provider, and C-API workflows.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Qiskit

Use this repo skill when a task involves the Python package qiskit: building quantum circuits, transpiling to backend targets, running reference primitives or basic simulators, importing/exporting OpenQASM or QPY, using quantum-information objects, drawing circuits or results, working with provider interfaces, or consuming Qiskit's public C API.

Start here

  • Read references/module-map.md for the package modules, public entry points, and route boundaries.
  • Read references/installation.md before choosing extras such as qasm3-import, visualization, crosstalk-pass, csp-layout-pass, or qpy-compat.
  • Read references/troubleshooting.md for mixed-package imports, missing Rust-backed _accelerate, optional-dependency failures, QPY compatibility, and visualization system-tool issues.
  • Read references/repo-provenance.md before deciding whether this skill is stale for a newer Qiskit checkout or release.
  • Run python scripts/check_qiskit_environment.py --help to see source-free smoke checks for the active Python environment.

Minimal install and smoke check

For normal package use:

python -m pip install qiskit
python -c 'import qiskit; print(qiskit.__version__)'

Add targeted extras only for the workflows you need:

python -m pip install 'qiskit[qasm3-import]'
python -m pip install 'qiskit[visualization]'

Then run the bundled smoke helper from this skill directory:

python scripts/check_qiskit_environment.py --sections core transpiler primitives serialization quantum-info

Route by task

User task Read
Build, edit, compose, parameterize, or inspect QuantumCircuit objects, registers, bits, gates, control-flow operations, or circuit-library gates sub-skills/circuit/SKILL.md
Compile circuits to a backend, Target, basis gate set, or coupling map; use preset pass managers; debug layout, routing, translation, scheduling, seeds, or pass plugins sub-skills/transpiler/SKILL.md
Use StatevectorSampler, StatevectorEstimator, PUBs, PrimitiveResult, DataBin, BitArray, expectation values, shots, precision, or primitive result access patterns sub-skills/primitives/SKILL.md
Import/export OpenQASM 2, OpenQASM 3, or QPY; choose between text interchange and full-fidelity binary serialization; handle parser/exporter/version errors sub-skills/serialization/SKILL.md
Work with Statevector, DensityMatrix, Operator, SparsePauliOp, Pauli, Clifford, random operators/states/channels, fidelities, entropy, or matrix predicates sub-skills/quantum-info/SKILL.md
Draw circuits, histograms, distributions, states, backend maps, timelines, pass managers, or diagnose matplotlib, Graphviz, Pillow, pylatexenc, seaborn, or LaTeX output sub-skills/visualization/SKILL.md
Use or implement backend/provider abstractions, BackendV2, Options, Job, BasicProvider, BasicSimulator, or GenericBackendV2 fake backends sub-skills/providers/SKILL.md
Locate Qiskit C headers/library, use qiskit.capi ctypes bindings, build or consume the public C API, or diagnose Rust/C-extension build failures sub-skills/c-api/SKILL.md

Common routing decisions

  • Start with circuit before transpiler when the user has not yet built a valid abstract circuit.
  • Start with transpiler when the problem involves basis gates, coupling maps, Target, Layout, PassManager, or hardware constraints, even if a fake provider appears in the example.
  • Start with primitives for sampler/estimator jobs and result containers; start with providers for backend classes, BasicSimulator.run, GenericBackendV2, or provider implementation surfaces.
  • Start with serialization for QASM/QPY even when the circuit construction is also involved; route back to circuit only if the circuit itself is invalid before serialization.
  • Start with quantum-info when the task is mathematical analysis of states, operators, observables, channels, or fidelities rather than execution on a backend.
  • Start with visualization whenever output format, style, image generation, or optional drawing dependencies are the main concern.
  • Start with c-api for qiskit.capi.get_include(), get_lib(), native headers, ctypes functions, or standalone C-library build questions.

Bundled helper

scripts/check_qiskit_environment.py performs quick, source-free checks for imports, a small circuit, transpilation with GenericBackendV2, StatevectorSampler/StatevectorEstimator, QASM/QPY round-trips, quantum-info objects, visualization, providers, and C-API paths. Use --sections to narrow the checks and --json for machine-readable output.

What this skill does not cover

  • It does not replace domain packages such as Qiskit Aer, Qiskit IBM Runtime, Qiskit Nature, or hardware-vendor provider packages when their package-specific APIs are the main subject.
  • It does not teach quantum-computing theory beyond the Qiskit object and workflow contracts needed to complete software tasks.
  • It does not require the original Qiskit source checkout for runtime use; all necessary operating guidance is distilled into this skill tree.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351