qdk_chemistry.data.time_evolution.controlled_time_evolution module
QDK/Chemistry controlled time evolution module.
- class qdk_chemistry.data.time_evolution.controlled_time_evolution.ControlledTimeEvolutionUnitary(time_evolution_unitary, control_indices)[source]
Bases:
DataClassData class for a controlled time evolution unitary.
- Parameters:
time_evolution_unitary (TimeEvolutionUnitary)
- __init__(time_evolution_unitary, control_indices)[source]
Initialize a ControlledTimeEvolutionUnitary.
- Parameters:
time_evolution_unitary (TimeEvolutionUnitary) – The time evolution unitary to be controlled.
- get_unitary_container_type()[source]
Get the type of the time evolution unitary container.
- Return type:
- Returns:
The type of the time evolution unitary container.
- get_num_total_qubits()[source]
Get the total number of qubits including control qubits.
- Return type:
- Returns:
The total number of qubits (time evolution qubits + control qubits).
- to_json()[source]
Convert the ControlledTimeEvolutionUnitary to a dictionary for JSON serialization.
- to_hdf5(group)[source]
Save the ControlledTimeEvolutionUnitary to an HDF5 group.
- Return type:
- Parameters:
group (h5py.Group) – HDF5 group or file to write the controlled time evolution unitary to
- classmethod from_json(json_data)[source]
Create ControlledTimeEvolutionUnitary from a JSON dictionary.