def ignore_global_phase(statevec):
    """Multiple e^-iθ to `statevec` where θ is a phase of first non-zero element.

    Args:
        statevec np.array: Statevector.

    Returns:
        np.array: `statevec` is returned.
    """
    for q in statevec:
        if abs(q) > 1e-07:
            ang = abs(q) / q
            statevec *= ang
            break
    return statevec
