Algorithm classes

QDK/Chemistry provides a comprehensive set of algorithm classes which express core methodological primitives for quantum and classical chemistry calculations. All algorithms follow a factory pattern design, allowing you to create instances by name and configured through a unified settings interface.

Quick reference

The following table summarizes the available algorithm classes in QDK/Chemistry and their purposes. For detailed documentation, refer to the linked pages.

Algorithm Class

Purpose

Input → Output

ScfSolver

Mean-field (HF/DFT) calculations

Structure → Orbitals

OrbitalLocalizer

Orbital transformations

Orbitals → Orbitals

ActiveSpaceSelector

Active space identification

Wavefunction → Wavefunction

HamiltonianConstructor

Molecular Hamiltonian construction

Orbitals → Hamiltonian

MultiConfigurationCalculator

Many-body wavefunction calculations

Hamiltonian → Wavefunction

MultiConfigurationScf

Coupled Orbital-Wavefunction calculations.

Orbitals → Wavefunction

QubitMapper

Fermion-to-qubit mapping

Hamiltonian → QubitHamiltonian

StatePreparation

Quantum state preparation

Wavefunction → Circuit

EnergyEstimator

Quantum energy expectation values

Circuit + QubitHamiltonian → Energy

StabilityChecker

SCF stability analysis

Orbitals → Stability

Discovering implementations

Each algorithm class exposes multiple implementations that can be discovered at runtime. Use available() to list registered implementations:

#include <qdk/chemistry/algorithms/scf.hpp>

// List all registered SCF solver implementations
auto names = qdk::chemistry::algorithms::ScfSolver::available();
for (const auto& name : names) {
  std::cout << name << std::endl;
}

// Create a specific implementation
auto solver = qdk::chemistry::algorithms::ScfSolver::create("pyscf");
from qdk_chemistry.algorithms import available, create  # noqa: E402

# List all registered SCF solver implementations
print(available("scf_solver"))  # ['qdk', 'pyscf']

# Create a specific implementation
solver = create("scf_solver", "qdk")

# Inspect available settings
print(solver.settings())

For details on creating, loading, and using custom algorithm implementations, see the plugin system and factory pattern documentation.