qdk_chemistry.data.time_evolution.containers.base module

QDK/Chemistry time evolution container base module.

class qdk_chemistry.data.time_evolution.containers.base.TimeEvolutionUnitaryContainer[source]

Bases: DataClass

Abstract class for a time evolution unitary container.

abstract property type: str[source]

Get the type of the time evolution unitary container.

Returns:

The type of the time evolution unitary container.

abstract property num_qubits: int[source]

Get the number of qubits the time evolution unitary acts on.

Returns:

The number of qubits.

abstractmethod to_json()[source]

Convert the TimeEvolutionUnitaryContainer to a dictionary for JSON serialization.

Return type:

dict[str, Any]

Returns:

Dictionary representation of the TimeEvolutionUnitaryContainer

Return type:

dict

abstractmethod to_hdf5(group)[source]

Save the TimeEvolutionUnitaryContainer to an HDF5 group.

Return type:

None

Parameters:

group (h5py.Group) – HDF5 group or file to write data to

abstractmethod classmethod from_json(json_data)[source]

Create TimeEvolutionUnitaryContainer from a JSON dictionary.

Return type:

TimeEvolutionUnitaryContainer

Parameters:

json_data (dict[str, Any]) – Dictionary containing the serialized data

Returns:

TimeEvolutionUnitaryContainer

abstractmethod classmethod from_hdf5(group)[source]

Load an instance from an HDF5 group.

Return type:

TimeEvolutionUnitaryContainer

Parameters:

group (h5py.Group) – HDF5 group or file to read data from

Returns:

TimeEvolutionUnitaryContainer

abstractmethod get_summary()[source]

Get summary of time evolution unitary.

Return type:

str

Returns:

Summary string describing the TimeEvolutionUnitaryContainer’s contents and properties

Return type:

str