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 |
|---|---|---|
Structure → Orbitals |
||
Orbital transformations |
Orbitals → Orbitals |
|
Active space identification |
Wavefunction → Wavefunction |
|
Molecular Hamiltonian construction |
Orbitals → Hamiltonian |
|
Many-body wavefunction calculations |
Hamiltonian → Wavefunction |
|
Coupled Orbital-Wavefunction calculations. |
Orbitals → Wavefunction |
|
Fermion-to-qubit mapping |
Hamiltonian → QubitHamiltonian |
|
Quantum state preparation |
Wavefunction → Circuit |
|
Quantum energy expectation values |
Circuit + QubitHamiltonian → Energy |
|
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.