qdk_chemistry.migrate._sparse module

Migrate the sparse Hamiltonian container serialization to the current version.

Only the two-body payload changed: the legacy flat two_body_integrals_sparse list of [p, q, r, s, value] entries became a SymmetryBlockedSparseMap. The (restricted) one-body sparse triplet list and the scalar metadata are schema-stable. Sparse model Hamiltonians carry no orbitals.

qdk_chemistry.migrate._sparse.from_json_doc(container)[source]

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

Return type:

dict

Parameters:

container (dict)

qdk_chemistry.migrate._sparse.from_hdf5_group(container)[source]

Normalize a legacy sparse container HDF5 group into an old-doc.

Return type:

dict

Parameters:

container (h5py.Group)

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

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

Return type:

dict

Parameters:

old (dict)