qdk_chemistry.migrate._wavefunction module

Migrate the Wavefunction serialization schema to the current version.

The legacy single-determinant (sd), complete-active-space (cas) and selected-CI (sci) containers were flattened into state_vector; the legacy mp2/coupled_cluster containers were flattened into amplitude.

The envelope ({version, container_type, container}) and the coefficient / determinant / amplitude / spin-traced-RDM payloads are schema-stable. What changed: the embedded orbitals (dense -> SymmetryBlockedTensor) and the spin-dependent active RDMs (dense one_rdm_aa/bb and two_rdm_aaaa/aabb/bbbb -> active_one_rdm / active_two_rdm symmetry-blocked tensors).

Spin-dependent RDM components are carried across by their serialized name; the (aaaa, aabb, bbbb) ordering fix (#499) is a separate data-correctness concern and is intentionally not reinterpreted here.

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

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

Return type:

dict

Parameters:

doc (dict)

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

Read a legacy Wavefunction HDF5 file into an old-doc.

Return type:

dict

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

Read a legacy Wavefunction HDF5 group (the wavefunction group) into an old-doc.

Return type:

dict

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

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

Return type:

dict

Parameters:

old (dict)