qdk_chemistry.plugins package
QDK/Chemistry plugins for external quantum chemistry software integration.
Plugins are bridge modules that connect QDK/Chemistry with external quantum chemistry
software packages. They implement QDK/Chemistry’s algorithm interfaces (such as
ScfSolver, etc.) while internally using the external library
to perform the actual calculations. This allows users to leverage specialized capabilities
from established quantum chemistry packages while maintaining a consistent QDK/Chemistry API.
Purpose and Benefits
Plugins serve several key purposes:
Extended Functionality: Leverage specialized capabilities from established quantum chemistry packages (e.g., PySCF’s diverse DFT functionals, orbital localization methods).
Automatic Format Conversion: Handle conversion between QDK/Chemistry data structures (e.g.,
Structure,Orbitals,Hamiltonian) and external library formats automatically.Registry Integration: Plugin implementations are automatically registered with QDK/Chemistry’s algorithm registry system, making them available through the
create()factory function.Consistent Interface: Provide a uniform API for different backend implementations, allowing users to easily switch between different computational engines without changing their workflow code.
Available Plugins
Currently available plugin packages:
qdk_chemistry.plugins.pyscf: PySCF integration providing SCF solvers, coupled cluster calculators, orbital localization, active space selection (AVAS), and stability analysis.
Using Plugins
Plugins are used by importing the plugin module (which auto-registers implementations) and then creating instances through the registry or directly:
Examples
>>> # Import the plugin to register its implementations
>>> import qdk_chemistry.plugins.pyscf
>>> # Create a PySCF SCF solver through the registry
>>> from qdk_chemistry.algorithms import create
>>> scf_solver = create("scf_solver", "pyscf")
>>> # Configure and use like any other algorithm
>>> scf_solver.settings()["max_iterations"] = 50
>>> energy, orbitals = scf_solver.run(structure, charge=0, spin_multiplicity=1, basis_or_guess="sto-3g")
Notes
Plugin modules may have additional dependencies beyond core QDK/Chemistry. For example, the PySCF plugin requires the pyscf package to be installed separately.
See also
qdk_chemistry.algorithms: Algorithm base classes and registry system
qdk_chemistry.plugins.pyscf: PySCF integration plugin
Subpackages
- qdk_chemistry.plugins.pyscf package
load()- Submodules
- qdk_chemistry.plugins.pyscf.active_space_avas module
- qdk_chemistry.plugins.pyscf.conversion module
- qdk_chemistry.plugins.pyscf.coupled_cluster module
- qdk_chemistry.plugins.pyscf.localization module
- qdk_chemistry.plugins.pyscf.mcscf module
- qdk_chemistry.plugins.pyscf.scf_solver module
- qdk_chemistry.plugins.pyscf.stability module
- qdk_chemistry.plugins.qiskit package