Abstract: We present QDK/Chemistry, a software toolkit for quantum chemistry workflows targeting quantum computers. The toolkit addresses a key challenge in the field: while quantum algorithms for chemistry have matured considerably, the infrastructure connecting classical electronic structure calculations to quantum circuit execution remains fragmented. QDK/Chemistry provides this infrastructure through a modular architecture that separates data representations from computational methods, enabling researchers to compose workflows from interchangeable components. In addition to providing native implementations of targeted algorithms in the quantum-classical pipeline, the toolkit builds upon and integrates with widely used open-source quantum chemistry packages and quantum computing frameworks through a plugin system, allowing users to combine methods from different sources without modifying workflow logic. This paper describes the design philosophy, current capabilities, and role of QDK/Chemistry as a foundation for reproducible quantum chemistry experiments.
Introduction
While quantum algorithms like the Variational Quantum Eigensolver (VQE) and Quantum Phase Estimation (QPE) have matured, the "plumbing" required to use them remains a major hurdle. To simulate a molecule on a quantum computer, a researcher must first perform significant classical preprocessing: defining molecular geometries, computing integrals, performing mean-field calculations (SCF), selecting an "active space" of relevant electrons, and mapping fermionic operators to qubits.
Currently, this pipeline is often held together by ad hoc scripts. Data formats vary between packages, methodological choices are hard to track—hindering reproducibility—and switching a single component, such as an orbital localizer, often requires rewriting the entire pipeline logic. QDK/Chemistry aims to turn this fragmented process into a streamlined, interchangeable workflow by bridging the infrastructure gap between classical chemistry calculations and quantum circuit execution.
System Architecture
The toolkit is built on a modular architecture designed to decouple data from algorithms, ensuring that workflows are both flexible and reproducible. This design is centered around several core layers that interact through well-defined interfaces.
Core Design Principles
- Separation of Data and Algorithms: Data classes (such as
OrbitalsorQubitHamiltonian) are immutable, self-contained objects. Algorithm classes are stateless transformations. This ensures that a calculation’s output depends strictly on its inputs, not on hidden internal states, which is critical for scientific reproducibility. - The Factory Pattern: Instead of hard-coding specific tools, the toolkit uses a "factory" layer. A user requests a specific functionality (e.g., an "scf_solver"), and the factory provides the requested implementation—whether a native C++ solver or a plugin for an external package—through a uniform interface.
- Plugin Architecture: The toolkit acts as a coordination layer. It integrates with widely used packages like PySCF for classical chemistry and Qiskit or Cirq for quantum circuit construction, allowing researchers to swap components without modifying the core workflow logic.
- Hybrid Language Support: The core is written in C++ for performance, with Python bindings provided via
pybind11to support rapid prototyping and ease of use for the broader research community.
Key Features and Capabilities
QDK/Chemistry includes several native implementations of advanced classical techniques designed to reduce the resource requirements of near-term quantum hardware:
- Automated Active Space Selection: Includes tools like autoCAS and ASCI (adaptive sampling configuration interaction) to identify the most relevant electrons for quantum simulation.
- Robust SCF Solvers: Features a native solver using geometric direct minimization, which offers better stability for complex molecules, such as transition metal complexes, compared to standard iterative methods.
- Sparse State Preparation: Provides specialized methods for state preparation that leverage the sparsity of chemical wavefunctions to avoid the exponential scaling of generic methods.
- Multi-Backend Targeting: The toolkit can generate circuits for Q#, Qiskit, Cirq, and OpenQASM, preventing vendor lock-in and allowing researchers to target various quantum hardware and simulators.
Conclusion and Future Work
QDK/Chemistry provides a foundation for reproducible quantum chemistry experiments by enforcing immutability and providing a unified interface for disparate tools. While currently robust for end-to-end workflows—demonstrated by tasks such as estimating the energy of a stretched $H_2$ molecule via Iterative Quantum Phase Estimation (IQPE)—future work will focus on integrating geometry optimization and advanced "block encoding" techniques for fault-tolerant quantum computing. As quantum hardware continues to evolve, QDK/Chemistry serves as a scalable infrastructure to bridge the gap between theoretical chemistry and practical quantum execution.
Summary updated