Skip to content

Algorithms

Three solvers, one driver underneath

Ground state, excited states, periodic systems — every algorithm here inherits from the same VariationalDriver and reaches the user through the same Mandacaru. The basis and the integrals that feed them are on the Basis Sets page.

Algorithms

Ground state — VQE and ADAPT-VQE

VQE optimizes a fixed UCCSD ansatz; ADAPT-VQE grows the ansatz operator by operator, screening the gradient of a pool — fermionic, qubit, qubit-excitation-based (QEB) or compact-excitation (CEO) — and adding only the one that lowers the energy most.

In the program

Mandacaru(method="adapt-vqe", pool="fermionic") · method="vqe" for the fixed UCCSD ansatz

Excited states — deflation and subspace search

DeflationMixin runs variational deflation (VQD): each new state is optimized orthogonal to the ones already found. SubspaceMixin runs SSVQE instead, optimizing a weighted set of orthogonal states together. Both plug into any driver without duplicating its setup.

In the program

atoms.calc.energy_levels(num_states=3) · Mandacaru(method="subspace-adapt-vqe", num_states=3)

Exact eigenvalues — quantum phase estimation

A converged variational state can be handed to QPE instead of being re-optimized: QuantumPhaseEstimation reads a wavefunction checkpoint, evolves it under exp(2πi(H−Elo)/W) and inverse-QFTs the evaluation register, returning the eigenvalue, the peak probabilities and the collapsed eigenstate. The 2ⁿ⁺ᵗ state vector is costed against the machine's free memory before a byte is allocated.

In the program

QuantumPhaseEstimation(n_evaluation_qubits=10).run("state.json") · memory_policy="abort" | "prompt" | "ignore"

Periodic systems — BlochCalculator

The same drivers run on a periodic basis through BlochCalculator, producing Bloch band structure and Born–von Kármán total energies for a crystal, not just an isolated molecule.

In the program

BlochCalculator(atoms, method="adapt-vqe").band_structure(path) · .total_energy(kmesh=(4, 1, 1))

Around the solvers

Cutting the qubit count, tracking how much of Hilbert space an ansatz actually reaches, and getting a result that survives a restart.

Frozen-core approximation

Drop the chemically inert core orbitals from the qubit count before mapping, without touching the basis or the integral engine.

Open shells: radicals, doublets, high-spin states

An even electron count starts from the closed-shell RHF orbitals; an odd count — any radical or ion — is built in the natural-orbital basis of the unrestricted (UHF) solution, one spatial basis shared by both spins, so the same solvers, pools and mappings run unchanged. The spin state is read from the geometry's magnetic moments: a doublet by default, a triplet O₂ or a quartet with magmoms set. Works for every basis family, plane waves included.

Automatic sparse pools

From ten qubits up, ADAPT-VQE keeps the pool as sparse matrices rather than materializing every 2ⁿ×2ⁿ generator, screening with the exact analytic gradient and densifying only the operators it selects. From sixteen, the Hamiltonian and the pool are restricted to the (n_α, n_β) particle-number sector as well — LiH in PAW-DZP is 20 qubits but only 100 states.

Expressibility analysis

KL-divergence against the Haar-random distribution measures how much of Hilbert space an ansatz can actually reach, tracked as ADAPT-VQE grows it.

Quenching

Dynamic parametrization: by default every parameter is re-optimized each ADAPT iteration; quenching=False freezes the earlier ones and optimizes only the newest, a cheaper one-dimensional line search per growth step.

Forces from the run's own density matrices

atoms.get_forces() differentiates the energy the solver actually computed, contracting the one- and two-body RDMs against displaced integrals on the same frozen grid — Hellmann–Feynman where the operators move, Pulay where the basis functions do. It is the default on every basis, all-electron or pseudopotential; the neglected orbital-response term is measured rather than assumed, and reported when it matters.

Wavefunction checkpoints, and resuming

checkpoint="state.json" writes the reference, the generators, the angles and the Hamiltonian after every accepted operator; resume="state.json" continues an interrupted or unconverged run where it stopped, matching stored generators back to the pool by content. The same file is what QPE reads, and what warm-starts the next geometry of a relaxation.

Dry run and the command line

mandacaru geometry.xyz --dry-run reports the qubit register a calculation needs — after the frozen core or plane-wave cutoff — and whether it fits the target device, without computing an integral or executing a circuit.

Reusable Hamiltonians

A built qubit Hamiltonian serializes to Parquet or JSON with automatic format detection — replay a solver against it without recomputing integrals or geometry.

The same solvers, every SDK and basis

One Mandacaru surface — the choice of backend, basis and mapping composes freely with the choice of algorithm above.

IBM
  • Qiskit
  • Qiskit Nature
  • Qiskit IBM Runtime
Amazon Braket
  • Local simulator
  • SV1
  • DM1
  • TN1
  • IonQ
  • IQM
  • Rigetti
Google
  • Cirq
Localized bases
  • FAO
  • NAO
  • NAO-AE
  • STO-nG
  • Pople 3-21G … 6-311+G(2df,2p)
  • cc-pVXZ / aug-cc-pVXZ / cc-pCVXZ
  • def2-SV(P) … def2-QZVPPD
Pseudopotentials
  • NCPP (Troullier–Martins)
  • ONCVPSP (Hamann)
  • PAW (Blöchl)
Fermion → qubit mappings
  • Jordan–Wigner
  • Parity
  • Parity-reduced
  • Bravyi–Kitaev
ADAPT-VQE operator pools
  • Fermionic
  • Qubit
  • QEB
  • CEO

How it is put together

algorithms/
VariationalDriver, the single base class every solver — VQE, ADAPT-VQE, subspace search — inherits from, plus the composable DeflationMixin and SubspaceMixin, the RDM force gradient, quantum phase estimation, the dry-run qubit estimator and the Mandacaru entry point.
core/
Second-quantized Fermion operators, the PauliSum output type, the Jordan–Wigner, parity, parity-reduced and Bravyi–Kitaev fermion-to-qubit mappings, the (n_α, n_β) particle-number sector, and the on-disk wavefunction checkpoint.
basis/
FAO, NAO, all-electron NAO-AE and STO-nG basis functions, the recipe engine that parses a Pople / Dunning / Karlsruhe name into its structure and generates it, plus the from-scratch atomic LDA solver behind the NAO-AE minimal basis and the pseudopotentials.
pseudopotentials/
The NCPP (Troullier–Martins), ONCVPSP and PAW families — generation, the family registry that turns a name into a basis, the bundled NCPP library and the links to the ONCVPSP / PAW repositories, and the pseudo-atomic orbitals and projectors the grid samples.
integrals/
The real-space grid, the FFT Poisson solver, and the C/OpenMP backend behind libmandacaru_integrals, with an automatic NumPy fallback.
circuits/
The Ansatz protocol, UCCSD and AdaptAnsatz, gate primitives, operator pools, and circuit profiling.
backends/
Qiskit, Braket and Cirq execution, the IBM Quantum and Amazon Braket device registries, and QWC-grouped shot-based measurement. Error mitigation is not part of this layer — it is a roadmap target, not yet written.

Every solver reaches the user through one entry point — Mandacaru(method=...) — an ASE calculator, so a run looks the same whether it optimizes a UCCSD ansatz on a state vector or screens ADAPT-VQE gradients against a real QPU.

Keep reading

Seven families of localized orbitals generated from scratch — FAO to def2-QZVPPD — the frozen core, and the C-accelerated integral engine underneath.

The same algorithm compiled and executed on Qiskit, Amazon Braket and Cirq — one keyword, one unitary, machine-precision agreement.

Cross-backend validation to 3.5×10⁻⁶ eV, real QPU execution through Amazon Braket, and what still doesn't work.

Try it on your own structure

Install it, or read the manual first.