qiskit
Helps your agent build and run quantum circuits. It's essential for quantum computing and simulations.
What it does
Qiskit is a tool for creating and running programs on quantum computers. It allows you to build quantum circuits, simulate how they would work, and send them to be executed on real machines.
When to use it
- ✓When you want to test quantum computing ideas locally.
- ✓To prepare and submit experiments to IBM quantum computers.
- ✓When developing quantum algorithms that require simulation or execution on hardware.
Example of what to ask your AI
“Create a simple quantum circuit with two qubits, apply an H gate to the first qubit and a CX gate between the two, and simulate the result.”
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
Ready-to-paste message
How it works
Qiskit works by translating your instructions into quantum operations that a quantum computer can understand. It can simulate these operations on a regular computer or send them to a real quantum processor.
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 K-Dense-AI/scientific-agent-skills --skill qiskitOr download just the file:
curl -L https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/main/skills/qiskit/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Qiskit
Use current Qiskit 2.x APIs to build circuits, prepare hardware-compatible instruction set architecture (ISA) circuits, and execute them through V2 primitives.
Reviewed 2026-10-01 with local tests on qiskit==2.5.2, qiskit-ibm-runtime==0.50.0, and qiskit-aer==0.17.2. IBM account, QPU, session, and batch examples are illustrative and documentation/source-checked; no remote workloads were submitted. See references/sources.md for the verification boundary.
Runtime 0.50 deprecates the top-level SamplerV2/EstimatorV2 implementations. New code imports Sampler from qiskit_ibm_runtime.executor_sampler and Estimator from qiskit_ibm_runtime.executor_estimator. These still implement the V2 PUB interface, using client-side processing and Executor. Use option models from qiskit_ibm_runtime.options_models.
Choose the Right Path
| Goal | Recommended interface |
|---|---|
| Ideal evolution with finite-shot sampling | qiskit.primitives.StatevectorSampler |
| Exact local expectation values | qiskit.primitives.StatevectorEstimator |
| High-performance or noisy simulation | Qiskit Aer |
| IBM QPU sampling | qiskit_ibm_runtime.executor_sampler.Sampler |
| IBM QPU expectation values and mitigation | qiskit_ibm_runtime.executor_estimator.Estimator |
| Backend without native primitives | BackendSamplerV2 or BackendEstimatorV2 |
| Open-system or master-equation dynamics | Prefer QuTiP |
| Differentiable quantum machine learning | Prefer PennyLane unless Qiskit integration is required |
Installation
Create an isolated environment and install only the components needed:
uv venv --python 3.13
source .venv/bin/activate
# Core SDK plus plotting support
uv pip install "qiskit[visualization]==2.5.2"
# Add only when needed
uv pip install "qiskit-ibm-runtime==0.50.0"
uv pip install "qiskit-aer==0.17.2"
Do not install qiskit-terra; it was superseded by the qiskit distribution. Qiskit Runtime, Aer, Nature, Machine Learning, Optimization, and Algorithms are separate distributions.
For IBM account setup, CI-safe credential handling, optional packages, and environment repair, read references/setup.md.
Core Workflow
Follow this sequence for every hardware-oriented workload:
- Map the problem to a circuit and, for Estimator, one or more observables.
- Optimize the parameterized circuit once for the selected backend.
- Apply the layout to every observable.
- Execute ISA circuits through a V2 primitive using Primitive Unified Blocs (PUBs).
- Analyze register-aware results, metadata, uncertainty, and resource usage.
Do not bind and retranspile a parameterized circuit inside every optimizer iteration. Transpile the parameterized circuit once, then pass parameter arrays in PUBs.
Quick Local Sampling
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
circuit = QuantumCircuit(2)
circuit.h(0)
circuit.cx(0, 1)
circuit.measure_all() # creates the classical register named "meas"
sampler = StatevectorSampler(seed=7)
pub_result = sampler.run([circuit], shots=1024).result()[0]
counts = pub_result.data.meas.get_counts()
print(counts)
Sampler V2 preserves shots and classical-register structure. Access the register by its actual name; measure_all() uses meas.
For circuits with multiple classical registers, each register’s counts are a marginal distribution. Preserve shot alignment when computing cross-register correlations; multiplying marginal frequencies destroys those correlations. Use SamplerPubResult.join_data with an explicit register order for joint bitstrings and record that order in the result labels. Qiskit 2.5.2 puts the first joined BitArray register in the least-significant bits, contrary to the current docstring; verify with an asymmetric state. See references/primitives.md.
Quick Local Estimation
import numpy as np
from qiskit import QuantumCircuit
from qiskit.circuit import Parameter
from qiskit.primitives import StatevectorEstimator
from qiskit.quantum_info import SparsePauliOp
theta = Parameter("theta")
circuit = QuantumCircuit(2)
circuit.ry(theta, 0)
circuit.cx(0, 1)
observable = SparsePauliOp.from_list([("ZZ", 1.0), ("XX", 0.5)])
parameter_values = [[0.0], [np.pi / 4], [np.pi / 2]]
estimator = StatevectorEstimator(seed=7)
pub = (circuit, observable, parameter_values)
…
FAQ
What are 'primitives' in Qiskit?
Primitives are basic building blocks that simplify how you interact with quantum simulators and hardware, like getting sampling results or expectation values.
What is 'transpilation'?
Transpilation is the process of optimizing your quantum circuit so it can run efficiently on the specific quantum hardware you are using.
Can I use Qiskit on my own computer?
Yes, you can use Qiskit to simulate quantum circuits on your computer locally, without needing an actual quantum computer.
Details
Original description by the author
Builds, simulates, transpiles, and executes quantum circuits with Qiskit and IBM Quantum Runtime. Use for Qiskit 2.x circuits and operators, V2 Sampler or Estimator primitives, target-aware transpilation, local or noisy simulation, IBM QPU execution, Runtime sessions or batches, error mitigation, and Qiskit ecosystem packages.
Popularity
- GitHub stars
- 51k
- Ranking position
- #1959
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
13c-metabolic-flux
Estimates metabolic fluxes using carbon-13 isotope tracing data. It is useful for analyzing cellular metabolism and biochemical pathways.
K-Dense-AI/scientific-agent-skills
adaptyv
Designs protein characterization experiments using the Adaptyv API. It helps estimate costs, submit sequences, and monitor lab results.
K-Dense-AI/scientific-agent-skills
aeon
Performs machine learning tasks on time series data. It is useful for classifying, forecasting, detecting anomalies, and finding patterns in sequential data.
K-Dense-AI/scientific-agent-skills
alphagenome
Looks up precomputed genomic effects for genetic variants. It provides scores and explanations to understand the impact of variants on the genome.
K-Dense-AI/scientific-agent-skills
Similar skills
agent-architecture-audit
Makes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
affaan-m/ECC
agent-eval
Helps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
affaan-m/ECC
agent-harness-construction
Makes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
affaan-m/ECC