{"id":27204,"library":"openfermionpyscf","title":"OpenFermion-PySCF","description":"A plugin that interfaces OpenFermion with PySCF, enabling the construction of fermionic Hamiltonians from molecular orbital integrals computed by PySCF. Current version 0.5. Low release cadence; no updates since 2021.","status":"active","version":"0.5","language":"python","source_language":"en","source_url":"https://github.com/quantumlib/OpenFermion-PySCF","tags":["quantum computing","chemistry","openfermion","pyscf","plugin"],"install":[{"cmd":"pip install openfermionpyscf","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Core library for fermionic Hamiltonians","package":"openfermion","optional":false},{"reason":"Required for molecular integral computation","package":"pyscf","optional":false}],"imports":[{"note":"run_pyscf is a top-level function; submodule import is incorrect.","wrong":"from openfermionpyscf.plugin import run_pyscf","symbol":"run_pyscf","correct":"from openfermionpyscf import run_pyscf"}],"quickstart":{"code":"from openfermion import MolecularData\nfrom openfermionpyscf import run_pyscf\n\n# Set up molecule\nmol = MolecularData(\n    geometry=[('H', (0., 0., 0.)), ('H', (0., 0., 0.7414))],\n    basis='sto-3g',\n    multiplicity=1,\n    charge=0\n)\nmol = run_pyscf(mol)\nprint(mol.get_hamiltonian())","lang":"python","description":"Compute H2 Hamiltonian using OpenFermion and PySCF."},"warnings":[{"fix":"Use the returned object or simply use the original variable; they are identical.","message":"run_pyscf modifies the MolecularData object in-place and returns it. Do not use the returned value as a separate instance; it is the same object.","severity":"gotcha","affected_versions":"<=0.5"},{"fix":"Pin PySCF to a compatible version (e.g., <2.1) or contribute an update to the plugin.","message":"The function run_pyscf uses a deprecated interface for PySCF 2.x. Future versions of PySCF may break compatibility.","severity":"deprecated","affected_versions":"0.5"},{"fix":"Install pyscf explicitly: pip install pyscf","message":"If pyscf is not installed separately, importing openfermionpyscf will fail with no clear error. The package does not list pyscf as a dependency.","severity":"gotcha","affected_versions":"<=0.5"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install pyscf","cause":"openfermionpyscf does not install pyscf automatically.","error":"ModuleNotFoundError: No module named 'pyscf'"},{"fix":"Ensure openfermionpyscf is version 0.5 or later. Import as 'from openfermionpyscf import run_pyscf'.","cause":"Using an outdated version of the package or incorrect import path.","error":"AttributeError: module 'openfermionpyscf' has no attribute 'run_pyscf'"},{"fix":"Downgrade PySCF to a version compatible with openfermionpyscf 0.5 (e.g., pyscf==1.7.6).","cause":"PySCF version mismatch; the plugin expects a specific format from PySCF's output.","error":"KeyError: 'mo_occ'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}