Skip to content

Commit

Permalink
propose the fix for #522.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Aug 12, 2022
1 parent 8274392 commit 6ac1e83
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/manifolds/GeneralUnitaryMatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ Return the dimension of the manifold orthogonal matrices and of the manifold of
manifold_dimension(::GeneralUnitaryMatrices{n,ℝ}) where {n} = div(n * (n - 1), 2)
@doc raw"""
manifold_dimension(M::GeneralUnitaryMatrices{n,ℂ,DeterminantOneMatrices})
Return the dimension of the manifold of special unitary matrices.
```math
\dim_{\mathrm{SU}(n)} = n^2-1.
Expand Down Expand Up @@ -666,16 +666,17 @@ end
Orthogonally project the tangent vector ``X ∈ 𝔽^{n × n}``, ``\mathbb F ∈ \{\mathbb R, \mathbb C\}``
to the tangent space of `M` at `p`,
and change the representer to use the corresponding Lie algebra, i.e. we compute
where `X` is already assumed to be in a Lie algebra represemtation, that is,
the projection is perfomed onto the Lie algebra. We compute
```math
\operatorname{proj}_p(X) = \frac{pX-(pX)^{\mathrm{T}}}{2},
\operatorname{proj}_p(X) = \frac{X-X^{\mathrm{T}}}{2},
```
"""
project(::GeneralUnitaryMatrices, p, X)

function project!(::GeneralUnitaryMatrices{n,𝔽}, Y, p, X) where {n,𝔽}
project!(SkewHermitianMatrices(n, 𝔽), Y, p \ X)
project!(SkewHermitianMatrices(n, 𝔽), Y, X)
return Y
end

Expand Down

0 comments on commit 6ac1e83

Please sign in to comment.