Skill Tracer
Skills › Scientific Agent Skills › qiskit

qiskit

skill · 283 lines · Apache-2.0 · skills/qiskit/SKILL.md

The facts

Its description

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.

The description the agent reads to decide when to use it.

From its settingsline 3

Runs scripts

bin/activate, python scripts/check_environment.py, python scripts/run_local_primitives.py, python scripts/inspect_runtime.py

Scripts the text names. Found by matching words, so treat them as pointers.

Found by matching wordsline 39 line 244 line 247 line 250

Files it mentions

references/sources.md, references/setup.md, references/primitives.md, references/migration.md (first 5 of 16 lines)

Files the text names, such as ones to read or write. Found by matching words, so treat them as pointers.

Found by matching wordsline 16 line 51 line 84 line 113 line 197

Licence

Apache-2.0, from the skill file

The terms its author shares it under, which let it be shown here.

From its settingsline 4 licence text

Other settings

compatibility: Python 3.10+ on a supported 64-bit platform. Local SDK workflows need qiskit; noisy simulation needs qiskit-aer; IBM QPU access needs qiskit-ibm-runtime, network access, an IBM Quantum Platform account, and an API key. metadata: version: "2.3" last-reviewed: "2026-10-01" skill-author: K-Dense Inc.

More settings at the top of the file, shown as written.

From its settingsline 5 line 6
Other files in this skill (14) Close

The text

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1---
2name: qiskit
3description: 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.
4license: Apache-2.0
5compatibility: Python 3.10+ on a supported 64-bit platform. Local SDK workflows need qiskit; noisy simulation needs qiskit-aer; IBM QPU access needs qiskit-ibm-runtime, network access, an IBM Quantum Platform account, and an API key.
6metadata:
7 version: "2.3"
8 last-reviewed: "2026-10-01"
9 skill-author: K-Dense Inc.
10---
12# Qiskit
14Use current Qiskit 2.x APIs to build circuits, prepare hardware-compatible instruction set architecture (ISA) circuits, and execute them through V2 primitives.
16Reviewed **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](references/sources.md) for the verification boundary.
18Runtime 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`.

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.

Raw lines 1 to 19
Reads a file references/sources.md :16
20## Choose the Right Path
22| Goal | Recommended interface |
23|---|---|
24| Ideal evolution with finite-shot sampling | `qiskit.primitives.StatevectorSampler` |
25| Exact local expectation values | `qiskit.primitives.StatevectorEstimator` |
26| High-performance or noisy simulation | Qiskit Aer |
27| IBM QPU sampling | `qiskit_ibm_runtime.executor_sampler.Sampler` |
28| IBM QPU expectation values and mitigation | `qiskit_ibm_runtime.executor_estimator.Estimator` |
29| Backend without native primitives | `BackendSamplerV2` or `BackendEstimatorV2` |
30| Open-system or master-equation dynamics | Prefer QuTiP |
31| Differentiable quantum machine learning | Prefer PennyLane unless Qiskit integration is required |

Choose the Right Path

GoalRecommended interface
Ideal evolution with finite-shot samplingqiskit.primitives.StatevectorSampler
Exact local expectation valuesqiskit.primitives.StatevectorEstimator
High-performance or noisy simulationQiskit Aer
IBM QPU samplingqiskit_ibm_runtime.executor_sampler.Sampler
IBM QPU expectation values and mitigationqiskit_ibm_runtime.executor_estimator.Estimator
Backend without native primitivesBackendSamplerV2 or BackendEstimatorV2
Open-system or master-equation dynamicsPrefer QuTiP
Differentiable quantum machine learningPrefer PennyLane unless Qiskit integration is required
Raw lines 20 to 32
33## Installation
35Create an isolated environment and install only the components needed:
37```bash
38uv venv --python 3.13
39source .venv/bin/activate
41# Core SDK plus plotting support
42uv pip install "qiskit[visualization]==2.5.2"
44# Add only when needed
45uv pip install "qiskit-ibm-runtime==0.50.0"
46uv pip install "qiskit-aer==0.17.2"
47```
49Do not install `qiskit-terra`; it was superseded by the `qiskit` distribution. Qiskit Runtime, Aer, Nature, Machine Learning, Optimization, and Algorithms are separate distributions.
51For IBM account setup, CI-safe credential handling, optional packages, and environment repair, read [references/setup.md](references/setup.md).

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.

Raw lines 33 to 52
Runs code bin/activate :39
Reads a file references/setup.md :51
53## Core Workflow
55Follow this sequence for every hardware-oriented workload:
571. **Map** the problem to a circuit and, for Estimator, one or more observables.
582. **Optimize** the parameterized circuit once for the selected backend.
593. **Apply the layout** to every observable.
604. **Execute** ISA circuits through a V2 primitive using Primitive Unified Blocs (PUBs).
615. **Analyze** register-aware results, metadata, uncertainty, and resource usage.
63Do not bind and retranspile a parameterized circuit inside every optimizer iteration. Transpile the parameterized circuit once, then pass parameter arrays in PUBs.

Core Workflow

Follow this sequence for every hardware-oriented workload:

  1. Map the problem to a circuit and, for Estimator, one or more observables.
  2. Optimize the parameterized circuit once for the selected backend.
  3. Apply the layout to every observable.
  4. Execute ISA circuits through a V2 primitive using Primitive Unified Blocs (PUBs).
  5. 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.

Raw lines 53 to 64
65## Quick Local Sampling
67```python
68from qiskit import QuantumCircuit
69from qiskit.primitives import StatevectorSampler
71circuit = QuantumCircuit(2)
72circuit.h(0)
73circuit.cx(0, 1)
74circuit.measure_all() # creates the classical register named "meas"
76sampler = StatevectorSampler(seed=7)
77pub_result = sampler.run([circuit], shots=1024).result()[0]
78counts = pub_result.data.meas.get_counts()
79print(counts)
80```
82Sampler V2 preserves shots and classical-register structure. Access the register by its actual name; `measure_all()` uses `meas`.
84For 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](references/primitives.md).

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.

Raw lines 65 to 85
Reads a file references/primitives.md :84
86## Quick Local Estimation
88```python
89import numpy as np
90from qiskit import QuantumCircuit
91from qiskit.circuit import Parameter
92from qiskit.primitives import StatevectorEstimator
93from qiskit.quantum_info import SparsePauliOp
95theta = Parameter("theta")
96circuit = QuantumCircuit(2)
97circuit.ry(theta, 0)
98circuit.cx(0, 1)
100observable = SparsePauliOp.from_list([("ZZ", 1.0), ("XX", 0.5)])
101parameter_values = [[0.0], [np.pi / 4], [np.pi / 2]]
103estimator = StatevectorEstimator(seed=7)
104pub = (circuit, observable, parameter_values)
105pub_result = estimator.run([pub]).result()[0]
106print(pub_result.data.evs)
107```
109Estimator circuits should not contain final measurements. PUB arrays broadcast; verify circuit parameter order before constructing large sweeps.

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)
pub_result = estimator.run([pub]).result()[0]
print(pub_result.data.evs)

Estimator circuits should not contain final measurements. PUB arrays broadcast; verify circuit parameter order before constructing large sweeps.

Raw lines 86 to 110
111## IBM QPU Sampling
113This example assumes credentials were saved securely as described in [references/setup.md](references/setup.md). It never embeds or prints an API key.
115```python
116from qiskit import QuantumCircuit
117from qiskit.transpiler import generate_preset_pass_manager
118from qiskit_ibm_runtime import QiskitRuntimeService
119from qiskit_ibm_runtime.executor_sampler import Sampler
121service = QiskitRuntimeService()
122backend = service.least_busy(
123 operational=True,
124 simulator=False,
125 min_num_qubits=2,
128circuit = QuantumCircuit(2)
129circuit.h(0)
130circuit.cx(0, 1)
131circuit.measure_all()
133pass_manager = generate_preset_pass_manager(
134 backend=backend,
135 optimization_level=1,
136 seed_transpiler=7,
138isa_circuit = pass_manager.run(circuit)
140sampler = Sampler(mode=backend)
141job = sampler.run([isa_circuit], shots=1024)
142print("job_id:", job.job_id())
143counts = job.result()[0].data.meas.get_counts()
144```
146Save the job ID before waiting for results so the job can be retrieved later.

IBM QPU Sampling

This example assumes credentials were saved securely as described in references/setup.md. It never embeds or prints an API key.

from qiskit import QuantumCircuit
from qiskit.transpiler import generate_preset_pass_manager
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_ibm_runtime.executor_sampler import Sampler

service = QiskitRuntimeService()
backend = service.least_busy(
    operational=True,
    simulator=False,
    min_num_qubits=2,
)

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

pass_manager = generate_preset_pass_manager(
    backend=backend,
    optimization_level=1,
    seed_transpiler=7,
)
isa_circuit = pass_manager.run(circuit)

sampler = Sampler(mode=backend)
job = sampler.run([isa_circuit], shots=1024)
print("job_id:", job.job_id())
counts = job.result()[0].data.meas.get_counts()

Save the job ID before waiting for results so the job can be retrieved later.

Raw lines 111 to 147
Reads a file references/setup.md :113
148## IBM QPU Estimation
150Runtime Estimator requires both an ISA circuit and observables mapped through the transpiler layout:
152```python
153from qiskit import QuantumCircuit
154from qiskit.quantum_info import SparsePauliOp
155from qiskit.transpiler import generate_preset_pass_manager
156from qiskit_ibm_runtime.executor_estimator import Estimator
158circuit = QuantumCircuit(2)
159circuit.h(0)
160circuit.cx(0, 1)
161observable = SparsePauliOp.from_list([("ZZ", 1.0)])
163pass_manager = generate_preset_pass_manager(
164 backend=backend,
165 optimization_level=1,
166 seed_transpiler=7,
168isa_circuit = pass_manager.run(circuit)
169isa_observable = observable.apply_layout(isa_circuit.layout)
171estimator = Estimator(
172 mode=backend,
173 options={"resilience_level": 1},
175pub_result = estimator.run(
176 [(isa_circuit, isa_observable)],
177 precision=0.02,
178).result()[0]
179print(pub_result.data.evs, pub_result.data.stds)
180```
182Error mitigation is not guaranteed to improve every workload and increases cost. Record finalized options (`estimator.finalize_options().model_dump()`), result metadata, and usage. A Runtime `dry_run=True` call is a server submission returning randomized mock data, not a local simulator or scientific validation.

IBM QPU Estimation

Runtime Estimator requires both an ISA circuit and observables mapped through the transpiler layout:

from qiskit import QuantumCircuit
from qiskit.quantum_info import SparsePauliOp
from qiskit.transpiler import generate_preset_pass_manager
from qiskit_ibm_runtime.executor_estimator import Estimator

circuit = QuantumCircuit(2)
circuit.h(0)
circuit.cx(0, 1)
observable = SparsePauliOp.from_list([("ZZ", 1.0)])

pass_manager = generate_preset_pass_manager(
    backend=backend,
    optimization_level=1,
    seed_transpiler=7,
)
isa_circuit = pass_manager.run(circuit)
isa_observable = observable.apply_layout(isa_circuit.layout)

estimator = Estimator(
    mode=backend,
    options={"resilience_level": 1},
)
pub_result = estimator.run(
    [(isa_circuit, isa_observable)],
    precision=0.02,
).result()[0]
print(pub_result.data.evs, pub_result.data.stds)

Error mitigation is not guaranteed to improve every workload and increases cost. Record finalized options (estimator.finalize_options().model_dump()), result metadata, and usage. A Runtime dry_run=True call is a server submission returning randomized mock data, not a local simulator or scientific validation.

Raw lines 148 to 183
184## Non-Negotiable Qiskit 2.x Rules
186- Use V2 primitive interfaces and PUB inputs. Do not write new V1 `Sampler`, `Estimator`, or `QuantumInstance` code.
187- Runtime primitives accept ISA circuits; they do not perform layout, routing, and basis translation for you.
188- Apply the transpiler layout to Estimator observables with `observable.apply_layout(isa_circuit.layout)`.
189- Use `mode=backend`, `mode=session`, or `mode=batch` for Runtime primitives.
190- Use the Runtime client-side `Estimator` for resilience levels and expectation-value mitigation. Sampler has different noise-management options and no Estimator-style resilience levels.
191- Treat `BackendV2.target`, `backend.operation_names`, `backend.coupling_map`, and direct backend attributes as the source of hardware constraints. Do not use `backend.configuration()` or `BackendProperties`.
192- Read Sampler output by classical register name. Bitstrings are displayed most-significant bit first; Qiskit qubit 0 is conventionally the least-significant bit.
193- Use a fixed `seed_transpiler` when comparing compilation settings. A simulator seed does not make QPU results deterministic.
194- `qiskit.pulse` was removed in Qiskit 2.0. Use supported fractional gates for IBM hardware. Qiskit Dynamics is archived; isolate legacy pulse-model research and verify its dependency stack separately.
195- QPY is the Qiskit-native circuit serialization format. Do not use Python pickle for untrusted circuit artifacts.
197See [references/migration.md](references/migration.md) for a detailed old-to-current API map.

Non-Negotiable Qiskit 2.x Rules

  • Use V2 primitive interfaces and PUB inputs. Do not write new V1 Sampler, Estimator, or QuantumInstance code.
  • Runtime primitives accept ISA circuits; they do not perform layout, routing, and basis translation for you.
  • Apply the transpiler layout to Estimator observables with observable.apply_layout(isa_circuit.layout).
  • Use mode=backend, mode=session, or mode=batch for Runtime primitives.
  • Use the Runtime client-side Estimator for resilience levels and expectation-value mitigation. Sampler has different noise-management options and no Estimator-style resilience levels.
  • Treat BackendV2.target, backend.operation_names, backend.coupling_map, and direct backend attributes as the source of hardware constraints. Do not use backend.configuration() or BackendProperties.
  • Read Sampler output by classical register name. Bitstrings are displayed most-significant bit first; Qiskit qubit 0 is conventionally the least-significant bit.
  • Use a fixed seed_transpiler when comparing compilation settings. A simulator seed does not make QPU results deterministic.
  • qiskit.pulse was removed in Qiskit 2.0. Use supported fractional gates for IBM hardware. Qiskit Dynamics is archived; isolate legacy pulse-model research and verify its dependency stack separately.
  • QPY is the Qiskit-native circuit serialization format. Do not use Python pickle for untrusted circuit artifacts.

See references/migration.md for a detailed old-to-current API map.

Raw lines 184 to 198
Reads a file references/migration.md :197
199## Execution Modes
201Choose based on workload shape and account plan:
203- **Job mode**: one-off work; instantiate a primitive with `mode=backend`.
204- **Batch mode**: independent jobs submitted together; available on the Open Plan.
205- **Session mode**: iterative jobs that benefit from prioritized follow-on execution; unavailable on the Open Plan.
207```python
208from qiskit_ibm_runtime import Batch
209from qiskit_ibm_runtime.executor_sampler import Sampler
211with Batch(backend=backend, max_time="10m") as batch:
212 sampler = Sampler(mode=batch)
213 jobs = [sampler.run([circuit], shots=1024) for circuit in isa_circuits]
215results = [job.result() for job in jobs]
216```
218Close sessions and batches after submission. Exiting their context stops new submissions but allows accepted jobs to finish, subject to service limits.

Execution Modes

Choose based on workload shape and account plan:

  • Job mode: one-off work; instantiate a primitive with mode=backend.
  • Batch mode: independent jobs submitted together; available on the Open Plan.
  • Session mode: iterative jobs that benefit from prioritized follow-on execution; unavailable on the Open Plan.
from qiskit_ibm_runtime import Batch
from qiskit_ibm_runtime.executor_sampler import Sampler

with Batch(backend=backend, max_time="10m") as batch:
    sampler = Sampler(mode=batch)
    jobs = [sampler.run([circuit], shots=1024) for circuit in isa_circuits]

results = [job.result() for job in jobs]

Close sessions and batches after submission. Exiting their context stops new submissions but allows accepted jobs to finish, subject to service limits.

Raw lines 199 to 219
220## Reference Map
222Read only the files needed for the current task:
224| Topic | Reference |
225|---|---|
226| Versions, installation, authentication, CI | [references/setup.md](references/setup.md) |
227| Circuits, parameters, control flow, QPY | [references/circuits.md](references/circuits.md) |
228| V2 PUBs, broadcasting, local and Runtime results | [references/primitives.md](references/primitives.md) |
229| Targets, ISA circuits, layouts, pass managers | [references/transpilation.md](references/transpilation.md) |
230| IBM backends, modes, jobs, Aer, mitigation | [references/backends.md](references/backends.md) |
231| End-to-end map/optimize/execute/analyze patterns | [references/patterns.md](references/patterns.md) |
232| Algorithms, addons, Nature, ML, Optimization | [references/algorithms.md](references/algorithms.md) |
233| Circuit, result, state, and backend plots | [references/visualization.md](references/visualization.md) |
234| Qiskit 0.x/1.x and Runtime migration | [references/migration.md](references/migration.md) |
235| Testing, reproducibility, and troubleshooting | [references/testing.md](references/testing.md) |
236| Upstream docs, release notes, and version baseline | [references/sources.md](references/sources.md) |

Reference Map

Read only the files needed for the current task:

TopicReference
Versions, installation, authentication, CIreferences/setup.md
Circuits, parameters, control flow, QPYreferences/circuits.md
V2 PUBs, broadcasting, local and Runtime resultsreferences/primitives.md
Targets, ISA circuits, layouts, pass managersreferences/transpilation.md
IBM backends, modes, jobs, Aer, mitigationreferences/backends.md
End-to-end map/optimize/execute/analyze patternsreferences/patterns.md
Algorithms, addons, Nature, ML, Optimizationreferences/algorithms.md
Circuit, result, state, and backend plotsreferences/visualization.md
Qiskit 0.x/1.x and Runtime migrationreferences/migration.md
Testing, reproducibility, and troubleshootingreferences/testing.md
Upstream docs, release notes, and version baselinereferences/sources.md
Raw lines 220 to 237
Reads a file references/setup.md :226
Reads a file references/circuits.md :227
Reads a file references/primitives.md :228
Reads a file references/transpilation.md :229
Reads a file references/backends.md :230
Reads a file references/patterns.md :231
Reads a file references/algorithms.md :232
Reads a file references/visualization.md :233
Reads a file references/migration.md :234
Reads a file references/testing.md :235
Reads a file references/sources.md :236
238## Bundled Scripts
240Run from the skill directory:
242```bash
243# Installed-package and legacy-environment checks; no network or credential reads
244python scripts/check_environment.py
246# Runnable V2 local Sampler and Estimator example
247python scripts/run_local_primitives.py --shots 1024 --seed 7
249# Read-only IBM backend capability inspection; uses saved credentials
250python scripts/inspect_runtime.py --min-qubits 5
251```
253The Runtime inspection script selects or inspects a backend but never submits a quantum job.

Bundled Scripts

Run from the skill directory:

# Installed-package and legacy-environment checks; no network or credential reads
python scripts/check_environment.py

# Runnable V2 local Sampler and Estimator example
python scripts/run_local_primitives.py --shots 1024 --seed 7

# Read-only IBM backend capability inspection; uses saved credentials
python scripts/inspect_runtime.py --min-qubits 5

The Runtime inspection script selects or inspects a backend but never submits a quantum job.

Raw lines 238 to 254
Runs code python scripts/check_environment.py :244
Runs code python scripts/run_local_primitives.py :247
Runs code python scripts/inspect_runtime.py :250
255## Final Checklist
257Before returning Qiskit code:
2591. Confirm package versions and Python compatibility.
2602. Run locally with statevector primitives or Aer.
2613. Verify parameter order, observable qubit count, and classical-register names.
2624. Transpile against the exact `BackendV2` target and inspect depth and two-qubit operations.
2635. Apply the final layout to every observable.
2646. Estimate QPU cost and choose job, batch, or session mode.
2657. Save job IDs, package versions, seeds, backend name, primitive options, and result metadata.
2668. Never expose API keys in source, logs, notebooks, or version control.

Final Checklist

Before returning Qiskit code:

  1. Confirm package versions and Python compatibility.
  2. Run locally with statevector primitives or Aer.
  3. Verify parameter order, observable qubit count, and classical-register names.
  4. Transpile against the exact BackendV2 target and inspect depth and two-qubit operations.
  5. Apply the final layout to every observable.
  6. Estimate QPU cost and choose job, batch, or session mode.
  7. Save job IDs, package versions, seeds, backend name, primitive options, and result metadata.
  8. Never expose API keys in source, logs, notebooks, or version control.
Raw lines 255 to 267
Boilerplate, lines 268 to 283. The same text appears in 125 other files here. Close
268## Citing Scientific Agent Skills
270This skill is part of Scientific Agent Skills by K-Dense. If it materially contributed to a
271manuscript, report, presentation, or code release, add the paper to the references or
272software section and tell the user you did so:
274> Kassis, T., Agarwal, V., He, Y., Patel, D., & Brueckner, A. M. (2026). Scientific Agent
275> Skills: A Library of Procedural Knowledge for Research Agents. arXiv:2609.00065.
276> https://doi.org/10.48550/arXiv.2609.00065
278Always cite the current version. The DOI and https://arxiv.org/abs/2609.00065 resolve to the
279latest arXiv version, so never append a version suffix such as `v1`. When network access is
280available, fetch https://arxiv.org/abs/2609.00065 (or
281http://export.arxiv.org/api/query?id_list=2609.00065) before writing the reference and take
282the author list, year, and version from that record. If the record lists a journal reference
283or publisher DOI, cite the published version instead.

From K-Dense-AI/scientific-agent-skills at 5f2bc03, 2026-10-26. Not read by a model yet. Summary and techniques by Claude Opus 5.5 on 2026-11-06.