Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new end-to-end Jupyter notebook example demonstrating how to (1) derive a benzene π-system Hückel model from ab initio calculations in qdk-chemistry and (2) estimate its ground-state energy using iterative Quantum Phase Estimation (iQPE).
Changes:
- Introduces a new notebook workflow: SCF → valence reduction → SCI entropies → autoCAS-EOS → orbital localization → Hückel parameter extraction → model Hamiltonian construction.
- Runs classical CASCI as a reference and demonstrates sparse trial-state preparation plus iQPE execution (single- and multi-trial) on the full-state simulator.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Coverage Summary
Detailed Coverage ReportsC++ Coverage DetailsPython Coverage DetailsPybind11 Coverage Details |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** | ||
| * @brief Compute the Ohno intersite potential matrix. | ||
| * | ||
| * V_ij = U_ij / sqrt(1 + (U_ij * epsilon_r * R_ij / constant)^2) | ||
| * V_ij = U_ij / sqrt(1 + (U_ij * epsilon_r * R_ij)^2) | ||
| * | ||
| * where U_ij = sqrt(U_i * U_j) is the geometric mean of on-site parameters. | ||
| * The constant is e^2 / (4 pi epsilon_0). | ||
| * | ||
| * All parameters should be in atomic units (Hartree for U, Bohr for R). |
There was a problem hiding this comment.
The Ohno/Mataga-Nishimoto formulas were changed to atomic-unit form (no division by an e^2/(4πϵ0) constant), but the Python binding docstrings still describe the old / C formula. Please update the pybind docstrings so Python users get correct units/formula guidance (see python/src/pybind11/utils/model_hamiltonians.cpp Ohno/Mataga docstrings).
| energies = orbitals.get_energies_alpha() | ||
|
|
||
| cube_data_raw = generate_cubefiles_from_orbitals( | ||
| orbitals=orbitals, | ||
| grid_size=grid_size, | ||
| margin=margin, | ||
| indices=indices, | ||
| ) | ||
|
|
||
| cube_data_with_info: dict[str, dict] = {} | ||
| for raw_label, cube_str in cube_data_raw.items(): | ||
| idx = int(raw_label.split("_")[1]) - 1 | ||
| cube_data_with_info[orbital_label(idx, n_occupied)] = { | ||
| "data": cube_str, | ||
| "info": { | ||
| "Energy (Ha)": f"{energies[idx]:.4f}", | ||
| "Occupation": "occupied" if idx < n_occupied else "virtual", | ||
| }, |
There was a problem hiding this comment.
generate_cube_data_with_info assumes cube labels are unique per orbital index, but generate_cubefiles_from_orbitals emits separate labels for unrestricted orbitals (e.g., orbital_0001_a and _b). The current parsing collapses both spins to the same idx and then overwrites the dict entry, dropping one spin channel and also always uses alpha energies. Consider either rejecting unrestricted inputs with a clear error, or including the spin suffix in the output key / metadata and handling beta energies appropriately.
|
See PR #411 for future changes |
Merged into PR #411