qdk stability checker wrong for stretched H2
bug
**Describe the bug**
The `qdk` stability checker algorithm returns stable for one of the simplest case of instabilities: the stretched H2 molecule.
**To Reproduce**
```python
# Create a stretched H2 geometry
symbols = ["H", "H"]
coords = np.array([[0.0, 0.0, 0.0], [4.0, 0.0, 0.0]])
h2 = Structure(symbols, coords)
scf_solver = create("scf_solver", scf_type="restricted")
E_hf, wfn_hf = scf_solver.run(h2, charge=0, spin_multiplicity=1, basis_or_guess="sto-3g")
qdk_stability = create("stability_checker", "qdk", external=True)
print(qdk_stability.run(wfn_hf))
#> (True, StabilityResult(stable, internal: 1 eigenvalues, external: 1 eigenvalues), smallest internal eigenvalue: 0.345837, smallest external eigenvalue: 0.345837)
```
Meanwhile `pyscf` works fine:
```python
pyscf_stability = create('stability_checker', "pyscf", external=True)
print(pyscf_stability.run(wfn_hf))
#> (False, StabilityResult(unstable, internal: 1 eigenvalues, external: 1 eigenvalues), smallest internal eigenvalue: 0.629135, smallest external eigenvalue: -0.431378)
```
**Expected behavior**
`qdk` stability checker should return "unstable" as well.
**System (please complete the following information):**
- OS: WSL2 on Win64
- System: x64
- Code Version: current main (eb572e8)
关闭于 2026-05-27 2 条评论