qdk_chemistry.migrate._hamiltonian module

Migrate the Hamiltonian serialization schema to the current version.

The Hamiltonian envelope ({version, container}) is schema-stable; only the container payload changed (dense integral arrays -> SymmetryBlockedTensor).

Two distinct cholesky container layouts both serialize at container version 0.1.0 and are told apart by which integrals they carry:

  • The released (1.1.0) container derived from the four-center container and stored the full dense four-center two-body tensor (keys aaaa/aabb/bbbb), never the MO three-center vectors. It is migrated to a canonical_four_center container, dropping the now-unused AO Cholesky vectors.

  • The later container stored the MO three-center vectors directly (key aa/ bb, or the three_center_integrals_aa HDF5 dataset). Those vectors are the current Cholesky data model, so the container is preserved as cholesky with the vectors re-expressed as a SymmetryBlockedTensor.

qdk_chemistry.migrate._hamiltonian.from_json_doc(doc)[source]

Normalize a parsed legacy Hamiltonian JSON object into a container old-doc.

Return type:

dict

Parameters:

doc (dict)

qdk_chemistry.migrate._hamiltonian.from_hdf5_file(path)[source]

Normalize a legacy Hamiltonian HDF5 file into a container old-doc.

Return type:

dict

qdk_chemistry.migrate._hamiltonian.from_hdf5_group(group)[source]

Normalize a legacy Hamiltonian HDF5 group (with a container subgroup).

Return type:

dict

qdk_chemistry.migrate._hamiltonian.to_new_json(old)[source]

Build the migrated Hamiltonian JSON object from a normalized container old-doc.

Return type:

dict

Parameters:

old (dict)