import torch


def _get_complex_dtype(dtype: torch.dtype) -> torch.dtype:
    """
    Returns the complex data type that corresponds to the input data type.

    Arguments
    ---------
    dtype: torch.dtype
        Real number data type

    Returns
    -------
    torch.dtype
        The complex data type
    """
    if dtype == torch.float32:
        return torch.complex64
    elif dtype == torch.float64:
        return torch.complex128
    else:
        raise RuntimeError("Datatype %s has no complex datatype" % dtype)