Qiskit SQD estimates the ground-state energy of a molecule's active space by sample-based quantum diagonalization (SQD). A quantum circuit is sampled for electronic configurations; configurations with the wrong number of electrons are repaired, and the Hamiltonian is diagonalized in the subspace the remaining configurations span. The circuit runs on the Qiskit Aer simulator, a classical simulation: no quantum hardware is involved.
How a run works
- PySCF builds the Hartree–Fock reference: restricted for singlets, restricted open-shell for higher multiplicities.
- An active space is chosen from those orbitals and its one- and two-electron integrals are built. Everything below the window stays doubly occupied.
- The exact CASCI energy of that active space is computed as a reference.
- Bitstrings are sampled, either from a LUCJ circuit or uniformly at random.
- Configuration recovery and subspace diagonalization run for the requested batches and iterations; the lowest batch energy is the SQD energy.
Choosing an active space
- Electrons and orbitals: a window of Hartree–Fock orbitals around the frontier, given as active electrons and active orbitals. The electron count has to fit the multiplicity, and the electrons left outside the window must pair up in core orbitals.
- AVAS: projects the orbitals onto atomic-orbital labels such as
C 2p,N 2porFe 3dand keeps those above a threshold. The selection depends on the molecule, so a label set that picks too many orbitals fails with the count it found; raise the threshold or drop a label.
The active space is capped at a small number of orbitals (the field limits are listed below). At that size the exact answer is cheap, which is why every run reports it.
Samplers
- LUCJ: a local unitary cluster Jastrow circuit initialized from active-space CCSD amplitudes, with nearest-neighbor same-spin and on-site opposite-spin interactions. Open-shell molecules use the spin-unbalanced form.
- Uniform: random bitstrings with no circuit, a baseline that leans entirely on configuration recovery.
Reading the energies
All energies are in Hartree and include the core and nuclear repulsion energy.
e_hf_hartree: the Hartree–Fock reference.e_casci_hartree: the exact energy of the same active space, the value SQD is approximating.e_sqd_hartreeande_sqd_minus_casci_hartree: the SQD estimate and its error against CASCI.e_ccsd_hartree: active-space CCSD, when requested.subspace_dimandsector_yield: how many determinants the final subspace held, and the fraction of shots that already had the right electron counts.
A small subspace is the usual reason e_sqd_hartree sits above e_casci_hartree: an unoptimized LUCJ circuit can concentrate its samples on a few configurations. More LUCJ layers, more samples per batch, or the uniform sampler widen the subspace.
Inputs
One 3D structure with explicit hydrogens, as SDF, MOL, or a mol block. Radicals need an M RAD line so no hydrogens are implied. Charge and multiplicity must agree with the molecule's electron count; mismatches fail before any calculation starts.
Outputs
energies.csv: one row with the energies, active-space size and sampling settings.summary.json: the same values plus the energy after each recovery iteration and the package versions used.active_space.fcidump: the active-space Hamiltonian in FCIDUMP format.samples/counts.json: every sampled bitstring and its count.
Not covered
Quantum hardware backends, solvation models, geometry optimization, and multiconfigurational methods such as CASSCF are not part of this tool. The energies are the lowest state with the requested spin projection.
Related tools
Use PySCF Electronic Structure for DFT energies and geometry optimization before choosing an active space. In a workflow, the energies table can feed later steps; a multi-molecule upstream runs one SQD job per molecule.