Package API¶
Top-Level Package¶
Quantum-QM/MM POC Framework
A hybrid quantum-classical framework for QM/MM calculations using QPE algorithms.
Primary Exports¶
q2m3.QuantumQMMMq2m3.QPEEngineq2m3.QMMMSystemq2m3.PySCFPennyLaneConverterq2m3.UnifiedDensityMatrixq2m3.MoleculeConfigq2m3.load_xyz()q2m3.save_json_results()
Constants¶
Centralized physical constants for quantum chemistry and QM/MM simulations.
All values are Python floats (NOT JAX scalars) for compatibility with both pure Python and @qjit compiled code.
Molecule Configuration¶
Molecular system configuration.
Provides a generic MoleculeConfig dataclass for configuring QM region parameters in hybrid quantum-classical simulations.
- class q2m3.molecule.MoleculeConfig(name, symbols, coords, charge, active_electrons, active_orbitals, basis='sto-3g')[source]¶
Bases:
objectGeneric molecular system configuration.
This class supports any molecular system by specifying atomic symbols, coordinates, charge, and active space parameters.
- Parameters:
name (str)
symbols (list[str])
coords (list[list[float]])
charge (int)
active_electrons (int)
active_orbitals (int)
basis (str)
- name¶
Human-readable identifier for the molecule
- Type:
str
- symbols¶
List of atomic symbols (e.g., [“O”, “H”, “H”])
- Type:
list[str]
- coords¶
Atomic coordinates in Angstrom, shape (n_atoms, 3)
- Type:
list[list[float]]
- charge¶
Total molecular charge (0 for neutral, +1 for cation, etc.)
- Type:
int
- active_electrons¶
Number of active electrons for QPE active space
- Type:
int
- active_orbitals¶
Number of active orbitals for QPE active space
- Type:
int
- basis¶
Basis set name (default: “sto-3g”)
- Type:
str
Example:
# Water molecule water = MoleculeConfig( name="H2O", symbols=["O", "H", "H"], coords=[[0.0, 0.0, 0.117], [-0.756, 0.0, -0.469], [0.756, 0.0, -0.469]], charge=0, active_electrons=4, active_orbitals=4, )
- property n_atoms: int¶
Number of atoms in the molecule.
- property coords_array: ndarray¶
Coordinates as numpy array.
- property center: ndarray¶
Geometric center of the molecule.