(no title)
evanb | 3 months ago
On the other hand, it is common to need a metric, which is actually the set of weights in the dot product. If `g` is the metric,
dot(a, g, b) = np.einsum('x,xy,y->', np.conj(a), g, b)
g doesn't have to be diagonal, but if you want the dot product to be symmetric in a and b it ought to be self-adjoint. Then you can find a basis where g is diagonal with real diagonal elements, which you can interpret as the weights.
No comments yet.