Exemple #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))
Exemple #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
Exemple #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
Exemple #4
0
 def __init__(self, add_operator, mult_operator, *, styles=None):
     Function.__init__(self, Fields._operator_, 
                       (add_operator, mult_operator), 
                       styles=styles)
Exemple #5
0
 def __init__(self, *elements):
     Function.__init__(self, Distinct._operator_, elements)
Exemple #6
0
 def __init__(self, label):
     Function.__init__(self, Bra._operator_, label)
     self.label = self.operands[0]  # might need to change
Exemple #7
0
 def __init__(self, A, *, styles=None):
     Function.__init__(self, Floor._operator_, A, styles=styles)
Exemple #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
Exemple #9
0
 def __init__(self, A):
     Function.__init__(self, Ceil._operator_, A)
     self.operand = A
 def __init__(self, a, b):
     Function.__init__(self, GCD._operator_, [a, b])
Exemple #11
0
 def __init__(self, vec_space, *, styles=None):
     Function.__init__(self, VecZero._operator_, vec_space, styles=styles)
Exemple #12
0
 def __init__(self, angle, *, styles=None):
     Function.__init__(self, Sin._operator_, angle, styles=styles)
     self.angle = angle
Exemple #13
0
 def __init__(self, operand, *, styles=None):
     '''
     Power set of a set.
     '''
     Function.__init__(self, PowerSet._operator_, operand, styles=styles)
Exemple #14
0
 def __init__(self, A):
     Function.__init__(self, Round._operator_, A)
Exemple #15
0
 def __init__(self, *sets, styles=None):
     Function.__init__(self, Disjoint._operator_, sets, styles=styles)
     self.sets = self.operands
 def __init__(self, a, b, *, styles=None):
     Function.__init__(self, GCD._operator_, [a, b], styles=styles)
Exemple #17
0
 def __init__(self, domain, codomain, *, styles=None):
     Function.__init__(self,
                       Bijections._operator_, (domain, codomain),
                       styles=styles)
     self.domain = domain
     self.codomain = codomain
Exemple #18
0
 def __init__(self, *sets):
     Function.__init__(self, Disjoint._operator_, sets)
Exemple #19
0
 def __init__(self, ket):
     Function.__init__(self, Meas._operator_, ket)
     self.ket = ket
Exemple #20
0
 def __init__(self, label):
     Function.__init__(self, Ket._operator_, label)
     self.label = self.operands[0]
Exemple #21
0
 def __init__(self, ket, *, styles=None):
     Function.__init__(self, Meas._operator_, ket, styles=styles)
     self.ket = ket
Exemple #22
0
 def __init__(self, event, *, styles=None):
     Function.__init__(self, Prob._operator_, event, styles=styles)
     self.event = self.operand
Exemple #23
0
 def __init__(self, domain):
     Function.__init__(self, Card._operator_, domain)
     self.domain = self.operands[0]
Exemple #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
Exemple #25
0
 def __init__(self, group_operator, *, styles=None):
     Function.__init__(self,
                       Groups._operator_,
                       group_operator,
                       styles=styles)
Exemple #26
0
 def __init__(self, A):
     Function.__init__(self, Floor._operator_, A)
     self.operand = A
Exemple #27
0
 def __init__(self, *operands):
     Function.__init__(self, Min._operator_, operands)
Exemple #28
0
 def __init__(self, base, antilog, *, styles=None):
     Function.__init__(self, Log._operator_, (base, antilog), styles=styles)
     self.base = base
     self.antilog = antilog
Exemple #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)
Exemple #30
0
 def __init__(self, operand):
     '''
     Power set of a set.
     '''
     Function.__init__(self, PowerSet._operator_, operand)