Repository navigation
Fix FCI RDM tensor contraction in test_accessing_rdm - #72
anishbhujbal7 wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@anishbhujbal7 Thank you for this work. I have a question about the files. The GitHub diff shows that every line of the file plotter.py has changed. What is going on there? |
|
Hi @mhucka, thanks for pointing that out! That full-file diff was just an accidental line-ending conversion (CRLF vs. LF) when I opened the file in my local Windows/WSL setup. I've restored examples/plotter.py back to its original state and force-pushed an update. The PR diff should now cleanly show only the test fix in _pyscf_molecular_data_test.py. |
Description
Fixes #52.
This PR resolves an energy mismatch assertion error in
test_accessing_rdm()when verifying Full Configuration Interaction (FCI) Reduced Density Matrices (RDMs).Root Cause
molecule.fci_one_rdmandmolecule.fci_two_rdminPyscfMolecularDatareturn spatial-orbital RDMs matching the spatial convention used bycisdandccsdRDMs. Previous test variations incorrectly treated these as spin-orbital tensors or applied incorrect cross-spin slicing, leading to tensor dimension mismatches or undercounted two-electron energy contributions.Changes Made
test_accessing_rdm()inopenfermionpyscf/tests/_pyscf_molecular_data_test.pyto contract spatial 1- and 2-body integrals (molecule.fci_one_rdmandmolecule.fci_two_rdm.Verification
Ran full test suite using PyTest in WSL environment: