def __new__(cls, n): if n not in [0, 1]: raise ValueError("n must be 0 or 1") return Ket.__new__(cls, n)
def __new__(cls, alpha): return Ket.__new__(cls, alpha)
def __new__(cls): return Ket.__new__(cls)
def __new__(cls, n, mode): return Ket.__new__(cls, n, mode)