def unnormalize_coefficients(n, D):
    """
    Functional inverse of normalize_coefficients(n, D)
    :param n: integer dimension of the original space
    :param D: output from normalize_coefficients(n, D)
    :return: equivalent input D to normalize_coefficients(n, D)
    >>> D = forward_no_normalization([1,2,3,4])
    >>> n = len(list(D.keys()))
    >>> Dnorm = normalize_coefficients(n, D)
    >>> D == Dnorm
    False
    >>> Dunnorm = unnormalize_coefficients(n, Dnorm)
    >>> D == Dunnorm
    True
    >>> Dnorm == Dunnorm
    False
    """
    wold = n
    Dc = D.copy()
    while True:
        w = wold // 2
        sq_norm = (n / (4 * w)) ** (1 / 2) if w > 0 else n ** (1 / 2)
        if w == 0:
            Dc[0, 0] = Dc[0, 0] / sq_norm
            break
        Dc.update({(w, i): Dc[(w, i)] / sq_norm for i in range(w)})
        wold = w
    return Dc