/qiskit-ai-skills:select-sqd-eigensolverfrom qiskit-ai-skills
Helps researchers choose and integrate an eigensolver (PySCF, Dice, SBD, or Fulqrum) for the diagonalization step of a sample-based quantum diagonalization (SQD) workflow. Guides on tradeoffs for system size, RDMs, excited states, spin control, GPUs, MPI, and installation.
Ships in qiskit-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Helping a researcher understand their eigensolver options for the diagonalization step of an SQD workflow, and what each option would cost them.
The goal is an informed choice, not a verdict. Often there is no solver that does everything asked, and the useful answer is still a clear account of the tradeoffs rather than "nothing fits."
At a high level, the conversation goes like this:
Steps 3 and 5 are where the registry earns its keep. Step 2 is nearly free and saves a lot of wasted discussion.
They are writing Python and using the SQD addon
(qiskit-addon-sqd), calling diagonalize_fermionic_hamiltonian with an
sci_solver. That is how nearly everyone arrives here, and assuming it avoids
asking about an implementation detail they may not have decided.
Revisit the assumption if they mention C++, a CLI workflow, or embedding a solver in existing simulation code. Those are real cases and this skill covers them, but they are the minority.
Readers span quantum chemists who have never run an MPI job and HPC people who have never done electronic structure. Watch for cues and calibrate rather than pitching everything at one level.
Roughly:
sci_solver, ci_strings, FCIDUMP, carryover, SCIResult.Briefly defining a term costs almost nothing. Using an unexplained one can lose the reader for the rest of the conversation.
The compressed phrasing here exists to help you rank options. It is written for you, not for the researcher, and handing it over verbatim reads as jargon they have no context for. Say the substance in their terms instead:
| Internal | What to actually say |
|---|---|
keyword-only | "the addon will not forward that option, so bind it with functools.partial first" |
loop-contract | "the recovery loop keeps one result per subspace, so extra roots have nowhere to go" |
type-mismatch | "the interface takes alpha and beta lists, so it cannot express a flat determinant list at all" |
maturity partial | "this works on some code paths and not others — here is which" |
| "scales by execution mode" | "you can move this from a laptop to the cluster by changing one argument, not by switching solvers" |
The same goes for "layer 3", "the addon layer", and the registry's field names. Cite provenance — file, line, version, tracking link — because that is checkable. Do not cite the registry's schema; the researcher does not know what a cell is.
Check $ARGUMENTS first and extract whatever is already there. Do not ask for
something they have told you.
Ask about the science first. Keep hardware out of this message. The two interact — a laptop constrains the science, and the science can rule out a laptop — but asking together invites the researcher to quietly scale down their problem to fit hardware they assume they are stuck with. Let them state the problem they actually have.
What matters:
If they lead with hardware, follow their lead. Someone who opens with "I have four A100s, what can I run" has told you something useful. Work from there and fill in the science as you go.
Then hardware, as its own question: laptop, single workstation, a cluster with MPI, GPUs and which vendor.
If hardware is unstated, do not block on it. Give a preliminary answer across the plausible ranges — what you would suggest on a laptop, on one node, on a cluster — and then ask. This is more useful than an empty question, and it often prompts them to volunteer the constraint that actually matters.
Read registry.yaml — the source of truth — and capabilities.md for
reasoning that does not fit in a cell.
Do not read capabilities-table.md — it is a generated export that can lag the
registry, and everything in it is in the two files above.
Ground claims in the registry rather than general knowledge about these packages. The obvious answers are often wrong: a capability can be present in a solver's C++ core and unreachable from Python, or present in Python and unreachable through the addon's interface.
Three layers. Each cell may carry engine, python, and addon values,
and an omitted layer inherits from the one above. Read at the layer the
researcher will actually use — by default addon. Quoting an engine-layer
capability to someone working through the addon is the main way this skill
misleads.
blocked_by says whether a gap is fixable, which matters more than the
gap itself:
blocked_by | Meaning | What to tell them |
|---|---|---|
keyword-only | option exists, the interface does not forward it | one line of functools.partial |
not-returned | computed, then discarded | not reachable through the API |
not-wrapped | in the engine, not the bindings | needs the engine directly |
type-mismatch | the interface cannot express it | needs an upstream change |
loop-contract | cannot survive the recovery loop | call the solver directly |
maturity is how far a capability can be trusted, separate from
confidence, which is how well this registry knows the fact. verified and
supported are safe to state plainly. partial means it works on some code
paths and not others — say so, and quote the known_issues, because a first
successful run proves little. plumbing means no reachable path; treat it as
absent.
A bare yes means the latest release. Prefer quoting a since: version,
which answers "will my install do this?" A cell marked unreleased: true is not
installable, so it cannot be the recommendation — but mention it when it is
precisely what they need, under its own heading, with the tracking link.
Point at hosted documentation, and at the paper where there is one. Each
solver carries a docs list of hosted pages, each with a what saying which
question that page answers — so link the page that addresses what they asked
rather than a landing page. Some entries carry a stale warning where the
upstream docs disagree with this registry; when you cite such a page, say what
it gets wrong, because the researcher will believe the official docs over you.
Where a solver has a paper, it is the citation the project itself asks for,
and describes says which design claims it is the source for. Mention it when
the researcher is choosing between approaches, writing something up, or asking
why a package is built the way it is.
role and not_an_eigensolver say what the pieces actually are. Several
of these are not single programs: Dice is a mature SHCI binary plus a
Python/addon bridge that drives it, and Fulqrum supplies the sparse
matrix-vector product while the caller brings the eigensolver. Read those
fields before describing a package, and when a capability is missing, say which
piece is missing it.
limits is a size ceiling, and some are hard. Check the researcher's
orbital count from Phase 1 against it before recommending anything. Quote the
block rather than a remembered figure, and keep its units — qubits and spatial
orbitals differ by a factor of two. A hard limit rejects the input; a
performance cliff only costs speed, where a fast packed path gives way to a
slower general one. So a workflow can run on CPU and fail outright on GPU at
unchanged size. Several ceilings are compile-time constants, so for a
borderline system say what controls the limit and suggest checking the
installed build.
This is the substance: an account of what each plausible option gives them and what it takes away.
Most people have already outgrown PySCF. It is where the addon starts everyone, so someone invoking this skill has usually hit its limits already and recommending it back is mostly a non-answer. Put that in terms of their system — what their orbital count costs in PySCF — rather than as a general claim about the solver. Two exceptions worth watching for:
pyscf>=2.15.0 with qiskit-addon-sqd>=0.14.1. Older pins are
why Windows SQD fails: before those releases there was no Windows wheel and
the addon declared pyscf non-Windows, so the install came up without a
solver. Recommend upgrading rather than switching solvers. SBD and Fulqrum do
not run on Windows at all, so Windows plus a requirement only they satisfy
means WSL, a Linux box, or a cluster.Dice has the highest barrier to entry. The heaviest build in the set — Boost from source, a Rust toolchain, x86_64 Ubuntu only — and RDMs that the binary computes and the wrapper discards. So it is rarely where someone should start.
If someone does use Dice, point them at main, not a tag. Installation is a
git checkout plus build.sh whichever commit they pick, so a tag buys none of
what tags usually buy — no tested wheel, no resolver guarantee — while the
latest tag predates the solve_sci entry point and n_roots that make Dice
usable with the addon at all. Check which they have before explaining
integration.
That is a statement about cost, not about speed. Dice is a mature SHCI code and there are reports of it performing best on certain problems; this registry has no benchmark data either way, so do not claim it is slower. If a researcher is already set up for it, or their problem is one where it is known to do well, that is a reason to use it — just be clear about what standing it up involves.
Prefer solvers that scale by execution mode, not by replacement. A workflow that grows from a laptop to a cluster without changing solver is worth a lot — no second integration, no second round of validation.
SBD is the clearest case: one install, with device= selecting 'cpu',
'gpu' (Thrust/CUDA, NVIDIA) or 'gpu-omp' (OpenMP offload, NVIDIA or AMD)
per call, so it is really several execution routes behind one API rather than
one option among five. Fulqrum likewise has CPU and GPU paths over the same
operator construction, though the GPU path is unreleased today and narrower
than the CPU one.
Say this explicitly when recommending either — no cell in the feature matrix expresses it, and it is often the strongest argument for a solver.
Fulqrum is not an eigensolver, so recommending it means recommending two
things. It builds the subspace Hamiltonian and implements the sparse
matrix-vector product; the caller supplies the eigensolver and iterates. Say
that when introducing it, both because calling it an eigensolver is wrong and
because it explains the rest of its column — multiple roots and general
subspace manipulation are free precisely because the eigensolver is not its
business. Integration is not the cost it once was: from fulqrum>=0.5.0 the
package ships the addon adapter, so check is_sci_solver_detail before telling
anyone they have glue to write. That adapter returns the lowest root only.
Two eigensolvers pair with it, and the choice is worth a sentence:
scipy.sparse.linalg.eigsh) is already a hard dependency, so
there is nothing to install. Every page of the hosted docs and both tutorials
use it. The default suggestion.Both consume the same object, so switching is one line — worth saying, since they can start on scipy and move to PRIMME if the diagonalization becomes the bottleneck.
If MPI is in play, say how the program gets launched. Two incompatible
models, and getting this wrong wastes a cluster allocation: a solver that spawns
its own ranks runs under plain python my_program.py (Dice), while the
collective model needs mpirun -n N python my_program.py with
diagonalize_fermionic_hamiltonian called from every rank (SBD). Read
execution_models and the MPI section of capabilities.md for how each works.
The collective model is where the ecosystem is heading and what the upstream HPC guide recommends, so say so when someone is choosing for a cluster and point them at that guide. But do not oversell it: the default PySCF solver is not distributed, so launching under MPI without a distributed solver gains nothing.
If they need a Jupyter notebook, the collective model is out. Treat this as
a selection criterion. The kernel is one process started by the notebook server,
not by mpirun, so there is nothing to run collectively. Ask about notebooks
when someone mentions MPI and the answer is not already obvious, because it
eliminates an option that otherwise looks like the best one. Developing in a
notebook and running production under a batch script is a reasonable split.
Some ranking considerations are judgment, not registry fact. Read the
"Field reports" section of capabilities.md, which holds what researchers using
these solvers have said, kept apart from everything read out of source. It is
the only copy — deliberately, so the claims cannot drift — and each report
carries its own date and scope.
Let those steer which option you lead with. Do not restate them as capability claims, and do not attach them to a solver's feature cells: a claim about what a solver does needs a registry citation or it does not get made.
Easier to install is better for most people. Fewer moving parts, works on a colleague's machine, survives an environment rebuild. Treat compiling as a real cost and writing C++ as a larger one. Default to assuming they would rather do neither, and relax that only on evidence — they mention a module system, a toolchain, a cluster they administer, or having built this kind of thing before.
Install cost is per-API, not per-solver. Check the solver's apis block
before summarizing it, because quoting one route as "the" install cost misleads
anyone using another. SBD is the clear case: from Python it is an sdist, so pip
compiles the extension modules; from C++ it is header-only — an INTERFACE
CMake target, nothing to build or link — so integrating it into existing C++ is
far lighter than the Python figure implies. If you present a
comparison table, say which route each cell describes.
Where two routes are otherwise comparable, prefer the reproducible one. A researcher who can hand a colleague a lockfile and get the same environment back is better off than one who cannot, and that outlasts a marginal convenience at install time.
Two moves, in order.
First, ask whether a requirement is softer than stated. Researchers often
set options defensively. A spin_sq passed as insurance is not the same as one
passed because spin contamination was observed in results — and if it is
insurance, SBD becomes available and S² can be checked after the fact. Probe
once, specifically, without being tiresome about it.
Then, whether or not it softens, give the closest options with their costs. Name what each one gives up and how much that actually hurts: recoverable by parsing a file, or fatal to the science. "Nothing meets all three" is never the whole answer, and on its own it is close to useless.
Several capabilities here fail silently rather than raising. Check the recommendation against these before presenting it:
spin_sq. It is accepted for signature compatibility and
discarded; the docstring says "unused by SBD." A workflow that passes it and
swaps PySCF for SBD loses spin penalization with no error and exit code zero.
Never let this pass unremarked.SCIResult.rdm1/rdm2 unset,
then deletes the temp directory by default.sci_solver is called with five
positional arguments, so every solver option — spin_sq, n_roots,
mpirun_options, sbd_config, device_config — is silently absent unless
bound with functools.partial first.SCIResult.gpu-omp size check aborts with exit status zero. Over its
compile-time cap the run prints a diagnostic and stops, but a batch script or
subprocess.check_call sees success. Tell anyone sizing a gpu-omp run to
check the output rather than the exit code. On NVIDIA, device='gpu'
(Thrust) has no such cap.Report these even when they do not change the recommendation. The researcher cannot discover them from a successful run.
Treat this as part of the recommendation, not an afterthought — it can decide the choice.
Two separate questions:
pip install compile? Being on PyPI does not settle it. Only PySCF
ships wheels across its supported platforms, Windows included since 2.15.0.
sbd-eigensolver and fulqrum are sdist-only, so pip invokes a compiler.
Read pypi_install, not pypi.sbd-eigensolver and fulqrum both have recipes under review, as
does PRIMME, so check before assuming a source build is still required.Capability can depend on the channel, not just the code. This is easy to
get wrong and worth checking whenever GPU support is part of why they are
choosing a solver. The known case: SBD's NVIDIA Thrust backend needs nvc++
from the NVIDIA HPC SDK, which conda-forge does not package — it has
cuda-nvcc but no nvhpc. So an SBD installed from conda-forge cannot have
that backend, while the same version built from source on a machine with NVHPC
can. Tell them what their route delivers, not what the code supports.
For a source build, say what varies by machine where the registry records it —
sbd-eigensolver's available backends depend on the toolchain the build finds,
so the same command gives different GPU support on different hosts.
If recommending a conda-forge install, and only then, pixi is worth a sentence: it gives a per-project environment with a lockfile, so the install is reproducible rather than a snapshot of whatever solved that day. Do not raise pixi otherwise — not for someone happily using pip, and not merely because they mentioned conda.
If a verified cell is load-bearing, confirm it holds in the version the
researcher actually has, which may differ from the registry's baseline. Where a
cell has since:, compare it against their installed version — a capability
added in 1.7.1 is absent from their 1.6.0 install, and that is likelier than the
registry being wrong.
If a load-bearing cell is unverified, say what you would check rather than
asserting it.
Shape this to the conversation rather than filling in a form. A researcher who asked one narrow question deserves a short answer, not six headings.
Cover what is relevant:
maturity of anything not supported or verified.sci_solver argument and any
functools.partial needed to bind options.If hardware is still unknown, give the answer across ranges and say which question would narrow it.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub qiskit/skills --plugin qiskit-ai-skills5 skills in this plugin
/managed-workflows-quickstartHelp a researcher whose local quantum-classical workflow (AQC-Tensor, QAOA, SQD, VQE, Trotter/MPS, error mitigation, or any Python code) has outgrown their machine run it on IBM Quantum Managed Workflows — size it roughly, wrap it as a function, deploy it, run it, and scale it up. For their own use; not for contributing a template to qiskit-function-templates. Use when the kernel dies, the process is killed, or it runs out of memory; they shrink the active space, qubits, bond dimension, depth or samples to make it fit; optimizer loops, sweeps or many instances take hours; a laptop stays open overnight or while QPU jobs queue; they ask whether a GPU or a bigger machine would help; they want to run their own code as a Qiskit Function, or choose sizes_map or function_size./migrate-qiskit-ibm-runtimeMigrate a qiskit-ibm-runtime workload from any older version up to the latest release — and, when the installed runtime supports it, onward to the client-side (Executor-backed) SamplerV2/EstimatorV2. Primitives are the bulk (V1 primitives -> V2 interface, and server-side V2 -> client-side V2), but it also routes non-primitive breaking changes (auth/channel, backend.run(), result streaming, custom programs). Use when the user runs /migrate-qiskit-ibm-runtime, or asks to migrate/upgrade/port qiskit-ibm-runtime code, to move off the V1 primitives (quasi_dists/.values/pre-pub .run(...)), or to the client-side / Executor-backed / directed-execution-model / executor_sampler/executor_estimator primitives./select-error-mitigationSelect and configure an error mitigation/suppression strategy for a Qiskit quantum workload, grounded in the capability registry in this skill directory. Use when the user runs /select-error-mitigation, or asks which error mitigation technique(s) to use for an Estimator, Sampler, or Executor workload./simulate-fermionic-systemsGuide for simulating fermionic systems (molecules, Hubbard/Anderson/impurity models, lattice fermions, any second-quantized Hamiltonian) on quantum computers with the qiskit-fermions package — building fermionic operators and circuits, choosing, comparing and implementing fermion-to-qubit encodings (Jordan-Wigner, ternary-tree, custom), transpiling fermionic circuits with fermionic-level optimizations (term grouping, Trotterization, orbital rotations), and verifying with ffsim. Use this skill whenever the user wants to put electrons or other fermions onto qubits, time-evolve or Trotterize a fermionic Hamiltonian, reduce Trotter depth, transpile an LUCJ/UCJ/UCC ansatz, compare or implement encodings, or compute ground-state energies with a quantum workflow (typically sample-based diagonalization) — even if they never mention qiskit-fermions and only say "mapping a Hamiltonian to qubits", "Jordan-Wigner", "second quantization in Qiskit", or "simulate this molecule on a quantum computer".Other plugins' skills for the same job