import torch


def TorchComplexExp(phase):
    """
    e^(i*phase) =
        cos phase + i sin phase
    :param phase:
    :return: Complex output
    """
    real = torch.cos(phase)
    imag = torch.sin(phase)

    return torch.stack((real, imag), dim=-1)