from typing import Dict
from typing import Any
from typing import Union
from typing import List


def getPulseWave(ham: Dict[str, Any], names: Union[str, List[str]]) -> Dict[str, Any]:
    """
    Return the waveform configuration of a specified control Hamiltonian.

    :param ham: the Hamiltonian dictionary
    :param names: the names of the control terms
    :return: a dictionary containing the details of a waveform configuration
    """
    if isinstance(names, str):
        return ham["control"][names]["waveforms"]
    else:
        waves = {}
        for name in names:
            wave = ham["control"][names]["waveforms"]
            waves[name] = wave
        return waves