From 475ada534729a0f356193208d96519c5192b1183 Mon Sep 17 00:00:00 2001 From: anishbhujbal7 Date: Thu, 3 Sep 2026 11:08:47 +0000 Subject: [PATCH] Fix FCI RDM tensor contraction in test_accessing_rdm --- openfermionpyscf/tests/_pyscf_molecular_data_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openfermionpyscf/tests/_pyscf_molecular_data_test.py b/openfermionpyscf/tests/_pyscf_molecular_data_test.py index b95d4ba..ad73863 100644 --- a/openfermionpyscf/tests/_pyscf_molecular_data_test.py +++ b/openfermionpyscf/tests/_pyscf_molecular_data_test.py @@ -63,10 +63,10 @@ def test_accessing_rdm(): rdm1 = molecule.fci_one_rdm rdm2 = molecule.fci_two_rdm - #e_ref = molecule._pyscf_data['fci'].e_tot + e_ref = molecule._pyscf_data['fci'].e_tot e_tot = (numpy.einsum('pq,pq', h1, rdm1) + numpy.einsum('pqrs,pqrs', h2, rdm2) * .5 + e_core) - numpy.testing.assert_almost_equal(e_tot, -1.1516827321, 9) + numpy.testing.assert_almost_equal(e_tot, e_ref, 7) def test_ccsd_amps(): mo = molecule.canonical_orbitals