Пример #1
0
 def __new__(cls, n):
     if n not in [0, 1]:
         raise ValueError("n must be 0 or 1")
     return Ket.__new__(cls, n)
Пример #2
0
 def __new__(cls, alpha):
     return Ket.__new__(cls, alpha)
Пример #3
0
 def __new__(cls):
     return Ket.__new__(cls)
Пример #4
0
 def __new__(cls, n, mode):
     return Ket.__new__(cls, n, mode)
Пример #5
0
 def __new__(cls, n):
     if n not in [0, 1]:
         raise ValueError("n must be 0 or 1")
     return Ket.__new__(cls, n)
Пример #6
0
 def __new__(cls):
     return Ket.__new__(cls)
Пример #7
0
 def __new__(cls, alpha):
     return Ket.__new__(cls, alpha)
Пример #8
0
 def __new__(cls, n, mode):
     return Ket.__new__(cls, n, mode)