import torch


def compT_vector(x):
    """A function that returns the complex conjugate of a complex vector, x.
    
    :param x: A complex vector.
    :type x: torch.doubleTensor

    :raises ValueError: If x does not have 2 dimensions and its first dimension isn't 2, the function cannot execute.
    
    :returns: The complex transpose of x.
    :rtype: torch.doubleTensor
    """
    if len(list(x.size())) != 2 or list(x.size())[0] != 2:
        raise ValueError('An input is not of the right dimension.')

    z = torch.zeros(2, x.size()[1], dtype=torch.double)
    z[0] = x[0]
    z[1] = -x[1]

    return z