Skip to content

Commit c24c546

Browse files
committed
update innerproductstyle docstring
1 parent ba82926 commit c24c546

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/spaces/vectorspaces.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,20 @@ abstract type HasInnerProduct <: InnerProductStyle end # inner product defined
250250
struct EuclideanInnerProduct <: HasInnerProduct end # euclidean inner product
251251

252252
"""
253+
abstract type InnerProductStyle end
253254
InnerProductStyle(V::VectorSpace) -> ::InnerProductStyle
254255
InnerProductStyle(S::Type{<:VectorSpace}) -> ::InnerProductStyle
255256
256-
Return the type of inner product for vector spaces, which can be either
257-
* `NoInnerProduct()`: no mapping from `dual(V)` to `conj(V)`, i.e. no metric
258-
* subtype of `HasInnerProduct`: a metric exists, but no further support is implemented.
259-
* `EuclideanInnerProduct()`: the metric is the identity, such that dual and conjugate spaces are isomorphic.
257+
Trait to describe wether vector spaces exhibit an inner product structure, a.k.a. a unitary structure,
258+
which can take the following values:
259+
* `EuclideanInnerProduct()`: the metric is the identity, making dual and conjugate spaces equivalent
260+
* `NoInnerProduct()`: no metric and thus no relation between `dual(V)` or `conj(V)`
261+
262+
Furthermore, `EuclideanInnerProduct` is a subtype of `HasInnerProduct`, indicating that an inner
263+
product exists, and an isomorphism between the dual space and the conjugate space can be constructed.
264+
New inner product styles can be defined that subtype `HasInnerProduct`, for example to work with
265+
vector spaces with non-trivial metrics. However, at the moment TensorKit does not provide built-in
266+
support for such non-standard inner products.
260267
"""
261268
InnerProductStyle(V::VectorSpace) = InnerProductStyle(typeof(V))
262269
InnerProductStyle(::Type{<:VectorSpace}) = NoInnerProduct()

0 commit comments

Comments
 (0)