Ejemplo n.º 1
0
 def __init__(self, base, exponent):
     r'''
     Raise base to exponent power.
     '''
     self.base = base
     self.exponent = exponent
     Function.__init__(self, Exp._operator_, (base, exponent))
Ejemplo n.º 2
0
 def __init__(self, n, *, styles=None):
     '''
     Create some SU(n), the special unitary of degree n.
     '''
     Function.__init__(self, SU._operator_, n, styles=styles)
     # self.operand = n
     self.degree = n
Ejemplo n.º 3
0
 def __init__(self, from_vspace, to_vspace, *, styles=None):
     '''
     Denote the set of linear maps that map from and to the given
     vectors spaces.
     '''
     Function.__init__(self,
                       LinMap._operator_, (from_vspace, to_vspace),
                       styles=styles)
     self.from_vspace = from_vspace
     self.to_vspace = to_vspace
Ejemplo n.º 4
0
 def __init__(self, add_operator, mult_operator, *, styles=None):
     Function.__init__(self, Fields._operator_, 
                       (add_operator, mult_operator), 
                       styles=styles)
Ejemplo n.º 5
0
 def __init__(self, *elements):
     Function.__init__(self, Distinct._operator_, elements)
Ejemplo n.º 6
0
 def __init__(self, label):
     Function.__init__(self, Bra._operator_, label)
     self.label = self.operands[0]  # might need to change
Ejemplo n.º 7
0
 def __init__(self, A, *, styles=None):
     Function.__init__(self, Floor._operator_, A, styles=styles)
Ejemplo n.º 8
0
 def __init__(self, label, size):
     Function.__init__(self, RegisterBra._operator_, (label, size))
     self.label = self.operands[0]   # value
     self.size = self.operands[1]   # size of the register
Ejemplo n.º 9
0
 def __init__(self, A):
     Function.__init__(self, Ceil._operator_, A)
     self.operand = A
Ejemplo n.º 10
0
 def __init__(self, a, b):
     Function.__init__(self, GCD._operator_, [a, b])
Ejemplo n.º 11
0
 def __init__(self, vec_space, *, styles=None):
     Function.__init__(self, VecZero._operator_, vec_space, styles=styles)
Ejemplo n.º 12
0
 def __init__(self, angle, *, styles=None):
     Function.__init__(self, Sin._operator_, angle, styles=styles)
     self.angle = angle
Ejemplo n.º 13
0
 def __init__(self, operand, *, styles=None):
     '''
     Power set of a set.
     '''
     Function.__init__(self, PowerSet._operator_, operand, styles=styles)
Ejemplo n.º 14
0
 def __init__(self, A):
     Function.__init__(self, Round._operator_, A)
Ejemplo n.º 15
0
 def __init__(self, *sets, styles=None):
     Function.__init__(self, Disjoint._operator_, sets, styles=styles)
     self.sets = self.operands
Ejemplo n.º 16
0
 def __init__(self, a, b, *, styles=None):
     Function.__init__(self, GCD._operator_, [a, b], styles=styles)
Ejemplo n.º 17
0
 def __init__(self, domain, codomain, *, styles=None):
     Function.__init__(self,
                       Bijections._operator_, (domain, codomain),
                       styles=styles)
     self.domain = domain
     self.codomain = codomain
Ejemplo n.º 18
0
 def __init__(self, *sets):
     Function.__init__(self, Disjoint._operator_, sets)
Ejemplo n.º 19
0
 def __init__(self, ket):
     Function.__init__(self, Meas._operator_, ket)
     self.ket = ket
Ejemplo n.º 20
0
 def __init__(self, label):
     Function.__init__(self, Ket._operator_, label)
     self.label = self.operands[0]
Ejemplo n.º 21
0
 def __init__(self, ket, *, styles=None):
     Function.__init__(self, Meas._operator_, ket, styles=styles)
     self.ket = ket
Ejemplo n.º 22
0
 def __init__(self, event, *, styles=None):
     Function.__init__(self, Prob._operator_, event, styles=styles)
     self.event = self.operand
Ejemplo n.º 23
0
 def __init__(self, domain):
     Function.__init__(self, Card._operator_, domain)
     self.domain = self.operands[0]
Ejemplo n.º 24
0
 def __init__(self, field, *, styles=None, _operator=None):
     if _operator is None:
         _operator = VecSpaces._operator_
     Function.__init__(self, _operator, field, styles=styles)
     self.field = field
Ejemplo n.º 25
0
 def __init__(self, group_operator, *, styles=None):
     Function.__init__(self,
                       Groups._operator_,
                       group_operator,
                       styles=styles)
Ejemplo n.º 26
0
 def __init__(self, A):
     Function.__init__(self, Floor._operator_, A)
     self.operand = A
Ejemplo n.º 27
0
 def __init__(self, *operands):
     Function.__init__(self, Min._operator_, operands)
Ejemplo n.º 28
0
 def __init__(self, base, antilog, *, styles=None):
     Function.__init__(self, Log._operator_, (base, antilog), styles=styles)
     self.base = base
     self.antilog = antilog
Ejemplo n.º 29
0
 def __init__(self, *operands, styles=None):
     '''
     Denote the set of linear maps that map from and to the given
     vectors spaces.
     '''
     Function.__init__(self, LinMapAdd._operator_, operands, styles=styles)
Ejemplo n.º 30
0
 def __init__(self, operand):
     '''
     Power set of a set.
     '''
     Function.__init__(self, PowerSet._operator_, operand)