QCSchema v2 uses a custom Array type annotation to handle Numpy arrays during serialization via model_dump():
mode="python": Returns a dictionary where Numpy arrays are preserved as actual Numpy arrays.mode="json": Returns a dictionary where Numpy arrays are converted to lists of floats (compatible with standard JSON).
Unlike v1, v2 serialization includes all fields by default. However, Molecule, AtomicProperties, WavefunctionProperties, OptimizationProperties, and ManyBodyProperties will still exclude None values.
# Returns dict with numpy arrays
data_py = model.model_dump(mode="python")
# Returns dict with lists (JSON compatible)
data_json = model.model_dump(mode="json")