# Now we actually compute the multiplication and inner-product
# tables/matrices using the possibly-orthonormalized basis.
- self._inner_product_matrix = matrix.zero(field, n)
+ self._inner_product_matrix = matrix.identity(field, n)
self._multiplication_table = [ [0 for j in range(i+1)]
for i in range(n) ]
q_i = basis[i]
q_j = basis[j]
- elt = jordan_product(q_i, q_j)
- ip = inner_product(q_i, q_j)
-
# The jordan product returns a matrixy answer, so we
# have to convert it to the algebra coordinates.
+ elt = jordan_product(q_i, q_j)
elt = W.coordinate_vector(V(elt.list()))
self._multiplication_table[i][j] = self.from_vector(elt)
- self._inner_product_matrix[i,j] = ip
- self._inner_product_matrix[j,i] = ip
+
+ if not orthonormalize:
+ # If we're orthonormalizing the basis with respect
+ # to an inner-product, then the inner-product
+ # matrix with respect to the resulting basis is
+ # just going to be the identity.
+ ip = inner_product(q_i, q_j)
+ self._inner_product_matrix[i,j] = ip
+ self._inner_product_matrix[j,i] = ip
self._inner_product_matrix._cache = {'hermitian': True}
self._inner_product_matrix.set_immutable()