(Real) Symplectic Stiefel
The SymplecticStiefel
manifold, denoted $\operatorname{SpSt}(2n, 2k)$, represents canonical symplectic bases of $2k$ dimensonal symplectic subspaces of $โ^{2nร2n}$. This means that the columns of each element $p \in \operatorname{SpSt}(2n, 2k) \subset โ^{2nร2k}$ constitute a canonical symplectic basis of $\operatorname{span}(p)$. The canonical symplectic form is a non-degenerate, bilinear, and skew symmetric map $\omega_{2k}\colon ๐ฝ^{2k}ร๐ฝ^{2k} โ ๐ฝ$, given by $\omega_{2k}(x, y) = x^T Q_{2k} y$ for elements $x, y \in ๐ฝ^{2k}$, with
\[ Q_{2k} = \begin{bmatrix} 0_k & I_k \\ -I_k & 0_k \end{bmatrix}.\]
Specifically given an element $p \in \operatorname{SpSt}(2n, 2k)$ we require that
\[ \omega_{2n} (p x, p y) = x^T(p^TQ_{2n}p)y = x^TQ_{2k}y = \omega_{2k}(x, y) \;\forall\; x, y \in ๐ฝ^{2k},\]
leading to the requirement on $p$ that $p^TQ_{2n}p = Q_{2k}$. In the case that $k = n$, this manifold reduces to the SymplecticMatrices
manifold, which is also known as the symplectic group.
Manifolds.SymplecticStiefel
โ TypeSymplecticStiefel{T,๐ฝ} <: AbstractEmbeddedManifold{๐ฝ, DefaultIsometricEmbeddingType}
The symplectic Stiefel manifold consists of all $2nร2k, n โฅ k$ matrices satisfying the requirement
\[\mathrm{SpSt}(2n, 2k, โ) := \bigl\{ p โ โ^{2nร2k} \ \big| \ p^{\mathrm{T}}J_{2n}p = J_{2k} \bigr\},\]
where $J_{2n}$ denotes the SymplecticElement
\[J_{2n} = \begin{bmatrix} 0_n & I_n \\ -I_n & 0_n \end{bmatrix}.\]
The symplectic Stiefel tangent space at $p$ can be parametrized as [BZ21]
\[\begin{align*} T_p\mathrm{SpSt}(2n, 2k) &= \{X โ โ^{2nร2k} โฃ p^{T}J_{2n}X + X^{T}J_{2n}p = 0 \}, \\ &= \{X = pฮฉ + p^sB \mid ฮฉ โ โ^{2kร2k}, ฮฉ^+ = -ฮฉ, \\ &\quad\qquad p^s โ \mathrm{SpSt}(2n, 2(n- k)), B โ โ^{2(n-k)ร2k}, \}, \end{align*}\]
where $ฮฉ โ \mathfrak{sp}(2n,F)$ is Hamiltonian
and $p^s$ means the symplectic complement of $p$ s.t. $p^{+}p^{s} = 0$. Here $p^+$ denotes the symplectic_inverse
.
You can also use StiefelPoint
and StiefelTangentVector
with this manifold, they are equivalent to using arrays.
Constructor
SymplecticStiefel(2n::Int, 2k::Int, field::AbstractNumbers=โ; parameter::Symbol=:type)
Generate the (real-valued) symplectic Stiefel manifold of $2nร2k$ matrices which span a $2k$ dimensional symplectic subspace of $โ^{2nร2k}$. The constructor for the SymplecticStiefel
manifold accepts the even column dimension $2n$ and an even number of columns $2k$ for the real symplectic Stiefel manifold with elements $p โ โ^{2nร2k}$.
Base.exp
โ Methodexp(::SymplecticStiefel, p, X)
exp!(M::SymplecticStiefel, q, p, X)
Compute the exponential mapping
\[ \exp\colon T\mathrm{SpSt}(2n, 2k) โ \mathrm{SpSt}(2n, 2k)\]
at a point $p โ \mathrm{SpSt}(2n, 2k)$ in the direction of $X โ T_p\mathrm{SpSt}(2n, 2k)$.
The tangent vector $X$ can be written in the form $X = \bar{\Omega}p$ [BZ21], with
\[ \bar{\Omega} = X (p^{\mathrm{T}}p)^{-1}p^{\mathrm{T}} + J_{2n}p(p^{\mathrm{T}}p)^{-1}X^{\mathrm{T}}(I_{2n} - J_{2n}^{\mathrm{T}}p(p^{\mathrm{T}}p)^{-1}p^{\mathrm{T}}J_{2n})J_{2n} โ โ^{2nร2n},\]
where $J_{2n} = \begin{bmatrix} 0_n & I_n \\ -I_n & 0_n \end{bmatrix}$ denotes the SymplecticElement
.
Using this expression for $X$, the exponential mapping can be computed as
\[ \exp_p(X) = \operatorname{Exp}([\bar{\Omega} - \bar{\Omega}^{\mathrm{T}}]) \operatorname{Exp}(\bar{\Omega}^{\mathrm{T}})p,\]
where $\operatorname{Exp}(โ )$ denotes the matrix exponential.
Computing the above mapping directly however, requires taking matrix exponentials of two $2nร2n$ matrices, which is computationally expensive when $n$ increases. Therefore we instead follow [BZ21] who express the above exponential mapping in a way which only requires taking matrix exponentials of an $8kร8k$ matrix and a $4kร4k$ matrix.
To this end, first define
\[\bar{A} = J_{2k}p^{\mathrm{T}}X(p^{\mathrm{T}}p)^{-1}J_{2k} + (p^{\mathrm{T}}p)^{-1}X^{\mathrm{T}}(p - J_{2n}^{\mathrm{T}}p(p^{\mathrm{T}}p)^{-1}J_{2k}) โ โ^{2kร2k},\]
and
\[\bar{H} = (I_{2n} - pp^+)J_{2n}X(p^{\mathrm{T}}p)^{-1}J_{2k} โ โ^{2nร2k}.\]
We then let $\bar{\Delta} = p\bar{A} + \bar{H}$, and define the matrices
\[ ฮณ = \left[\left(I_{2n} - \frac{1}{2}pp^+\right)\bar{\Delta} \quad -p \right] โ โ^{2nร4k},\]
and
\[ ฮป = \left[J_{2n}^{\mathrm{T}}pJ_{2k} \quad \left(\bar{\Delta}^+\left(I_{2n} - \frac{1}{2}pp^+\right)\right)^{\mathrm{T}}\right] โ โ^{2nร4k}.\]
With the above defined matrices it holds that $\bar{\Omega} = ฮปฮณ^{\mathrm{T}}$. As a last preliminary step, concatenate $ฮณ$ and $ฮป$ to define the matrices $ฮ = [ฮป \quad -ฮณ] โ โ^{2nร8k}$ and $ฮ = [ฮณ \quad ฮป] โ โ^{2nร8k}$.
With these matrix constructions done, we can compute the exponential mapping as
\[ \exp_p(X) = ฮ \operatorname{Exp}(ฮฮ^{\mathrm{T}}) \begin{bmatrix} 0_{4k} \\ I_{4k} \end{bmatrix} \operatorname{Exp}(ฮปฮณ^{\mathrm{T}}) \begin{bmatrix} 0_{2k} \\ I_{2k} \end{bmatrix}.\]
which only requires computing the matrix exponentials of $ฮฮ^{\mathrm{T}} โ โ^{8kร8k}$ and $ฮปฮณ^{\mathrm{T}} โ โ^{4kร4k}$.
Base.inv
โ Methodinv(::SymplecticStiefel, A)
inv!(::SymplecticStiefel, q, p)
Compute the symplectic inverse $A^+$ of matrix $A โ โ^{2nร2k}$. Given a matrix
\[A โ โ^{2nร2k},\quad A = \begin{bmatrix} A_{1, 1} & A_{1, 2} \\ A_{2, 1} & A_{2, 2} \end{bmatrix}, \quad A_{i, j} โ โ^{2nร2k}\]
the symplectic inverse is defined as:
\[A^{+} := J_{2k}^{\mathrm{T}} A^{\mathrm{T}} J_{2n},\]
where $J_{2n} = \begin{bmatrix} 0_n & I_n \\ -I_n & 0_n \end{bmatrix}$ denotes the SymplecticElement
.
The symplectic inverse of a matrix A can be expressed explicitly as:
\[A^{+} = \begin{bmatrix} A_{2, 2}^{\mathrm{T}} & -A_{1, 2}^{\mathrm{T}} \\[1.2mm] -A_{2, 1}^{\mathrm{T}} & A_{1, 1}^{\mathrm{T}} \end{bmatrix}.\]
Base.rand
โ Methodrand(M::SymplecticStiefel; vector_at=nothing, ฯ = 1.0)
Generate a random point $p โ \mathrm{SpSt}(2n, 2k)$ or a random tangent vector $X โ T_p\mathrm{SpSt}(2n, 2k)$ if vector_at
is set to a point $p โ \mathrm{Sp}(2n)$.
A random point on $\mathrm{SpSt}(2n, 2k)$ is found by first generating a random point on the symplectic manifold $\mathrm{Sp}(2n)$, and then projecting onto the Symplectic Stiefel manifold using the canonical_project
$ฯ_{\mathrm{SpSt}(2n, 2k)}$. That is, $p = ฯ_{\mathrm{SpSt}(2n, 2k)}(p_{\mathrm{Sp}})$.
To generate a random tangent vector in $T_p\mathrm{SpSt}(2n, 2k)$ this code exploits the second tangent vector space parametrization of SymplecticStiefel
, that any $X โ T_p\mathrm{SpSt}(2n, 2k)$ can be written as $X = pฮฉ_X + p^sB_X$. To generate random tangent vectors at $p$ then, this function sets $B_X = 0$ and generates a random Hamiltonian matrix $ฮฉ_X โ \mathfrak{sp}(2n,F)$ with Frobenius norm of ฯ
before returning $X = pฮฉ_X$.
ManifoldDiff.riemannian_gradient
โ MethodX = riemannian_gradient(::SymplecticStiefel, f, p, Y; embedding_metric::EuclideanMetric=EuclideanMetric())
riemannian_gradient!(::SymplecticStiefel, f, X, p, Y; embedding_metric::EuclideanMetric=EuclideanMetric())
Compute the riemannian gradient X
of f
on SymplecticStiefel
at a point p
, provided that the gradient of the function $\tilde f$, which is f
continued into the embedding is given by Y
. The metric in the embedding is the Euclidean metric.
The manifold gradient X
is computed from Y
as
\[ X = Yp^{\mathrm{T}}p + J_{2n}pY^{\mathrm{T}}J_{2n}p,\]
where $J_{2n} = \begin{bmatrix} 0_n & I_n \\ -I_n & 0_n \end{bmatrix}$ denotes the SymplecticElement
.
Manifolds.canonical_project
โ Methodcanonical_project(::SymplecticStiefel, p_Sp)
canonical_project!(::SymplecticStiefel, p, p_Sp)
Define the canonical projection from $\mathrm{Sp}(2n, 2n)$ onto $\mathrm{SpSt}(2n, 2k)$, by projecting onto the first $k$ columns and the $n + 1$'th onto the $n + k$'th columns [BZ21].
It is assumed that the point $p$ is on $\mathrm{Sp}(2n, 2n)$.
Manifolds.get_total_space
โ Methodget_total_space(::SymplecticStiefel)
Return the total space of the SymplecticStiefel
manifold, which is the corresponding SymplecticMatrices
manifold.
Manifolds.symplectic_inverse_times
โ Methodsymplectic_inverse_times(::SymplecticStiefel, p, q)
symplectic_inverse_times!(::SymplecticStiefel, A, p, q)
Directly compute the symplectic inverse of $p โ \mathrm{SpSt}(2n, 2k)$, multiplied with $q โ \mathrm{SpSt}(2n, 2k)$. That is, this function efficiently computes $p^+q = (J_{2k}p^{\mathrm{T}}J_{2n})q โ โ^{2kร2k}$, where $J_{2n}, J_{2k}$ are the SymplecticElement
of sizes $2nร2n$ and $2kร2k$ respectively.
This function performs this common operation without allocating more than a $2kร2k$ matrix to store the result in, or in the case of the in-place function, without allocating memory at all.
ManifoldsBase.check_point
โ Methodcheck_point(M::SymplecticStiefel, p; kwargs...)
Check whether p
is a valid point on the SymplecticStiefel
, $\mathrm{SpSt}(2n, 2k)$ manifold, that is $p^{+}p$ is the identity, $(โ
)^+$ denotes the symplectic_inverse
.
ManifoldsBase.check_vector
โ Methodcheck_vector(M::SymplecticMatrices, p, X; kwargs...)
Checks whether X
is a valid tangent vector at p
on the SymplecticStiefel
, $\mathrm{SpSt}(2n, 2k)$ manifold.
The check consists of verifying that $H = p^{+}X โ ๐ค_{2k}$, where $๐ค$ is the Lie Algebra of the symplectic group $\mathrm{Sp}(2k)$, that is the set of [HamiltonianMatrices
])(@ref), where $(โ
)^+$ denotes the symplectic_inverse
.
ManifoldsBase.inner
โ Methodinner(M::SymplecticStiefel, p, X. Y)
Compute the Riemannian inner product $g^{\mathrm{SpSt}}$ at $p โ \mathrm{SpSt}$ of tangent vectors $Y, X โ T_p\mathrm{SpSt}$. Given by Proposition 3.10 in [BZ21].
\[g^{\mathrm{SpSt}}_p(X, Y) = \operatorname{tr}\Bigl( X^{\mathrm{T}}\bigl( I_{2n} - \frac{1}{2}J_{2n}^{\mathrm{T}} p(p^{\mathrm{T}}p)^{-1}p^{\mathrm{T}}J_{2n} \bigr) Y (p^{\mathrm{T}}p)^{-1}\Bigr).\]
ManifoldsBase.inverse_retract
โ Methodinverse_retract(::SymplecticStiefel, p, q, ::CayleyInverseRetraction)
inverse_retract!(::SymplecticStiefel, X, p, q, ::CayleyInverseRetraction)
Compute the Cayley Inverse Retraction $X = \mathcal{L}_p^{\mathrm{SpSt}}(q)$ such that the Cayley Retraction from $p$ along $X$ lands at $q$, i.e. $\mathcal{R}_p(X) = q$ [BZ21].
For $p, q โ \mathrm{SpSt}(2n, 2k, โ)$ we can define the inverse cayley retraction as long as the following matrices exist.
\[ U = (I + p^+ q)^{-1} โ โ^{2kร2k}, \quad V = (I + q^+ p)^{-1} โ โ^{2kร2k},\]
where $(โ
)^+$ denotes the symplectic_inverse
.
THen the inverse retraction reads
\[\mathcal{L}_p^{\mathrm{Sp}}(q) = 2p\bigl(V - U\bigr) + 2\bigl((p + q)U - p\bigr) โ T_p\mathrm{Sp}(2n).\]
ManifoldsBase.is_flat
โ Methodis_flat(::SymplecticStiefel)
Return false. SymplecticStiefel
is not a flat manifold.
ManifoldsBase.manifold_dimension
โ Methodmanifold_dimension(::SymplecticStiefel)
Returns the dimension of the symplectic Stiefel manifold embedded in $โ^{2nร2k}$, i.e. [BZ21]
\[ \operatorname{dim}(\mathrm{SpSt}(2n, 2k)) = (4n - 2k + 1)k.\]
ManifoldsBase.project
โ Methodproject(::SymplecticStiefel, p, A)
project!(::SymplecticStiefel, Y, p, A)
Given a point $p โ \mathrm{SpSt}(2n, 2k)$, project an element $A โ โ^{2nร2k}$ onto the tangent space $T_p\mathrm{SpSt}(2n, 2k)$ relative to the euclidean metric of the embedding $โ^{2nร2k}$.
That is, we find the element $X โ T_p\mathrm{SpSt}(2n, 2k)$ which solves the constrained optimization problem
\[ \displaystyle\operatorname{min}_{X โ โ^{2nร2k}} \frac{1}{2}||X - A||^2, \quad \text{s.t.}\; h(X) := X^{\mathrm{T}} J p + p^{\mathrm{T}} J X = 0,\]
where $h : โ^{2nร2k} โ \operatorname{skew}(2k)$ defines the restriction of $X$ onto the tangent space $T_p\mathrm{SpSt}(2n, 2k)$.
ManifoldsBase.retract
โ Methodretract(::SymplecticStiefel, p, X, ::CayleyRetraction)
retract!(::SymplecticStiefel, q, p, X, ::CayleyRetraction)
Compute the Cayley retraction on the Symplectic Stiefel manifold, from p
along X
(computed inplace of q
).
Given a point $p โ \mathrm{SpSt}(2n, 2k)$, every tangent vector $X โ T_p\mathrm{SpSt}(2n, 2k)$ is of the form $X = \tilde{\Omega}p$, with
\[ \tilde{\Omega} = \left(I_{2n} - \frac{1}{2}pp^+\right)Xp^+ - pX^+\left(I_{2n} - \frac{1}{2}pp^+\right) โ โ^{2nร2n},\]
as shown in Proposition 3.5 of [BZ21]. Using this representation of $X$, the Cayley retraction on $\mathrm{SpSt}(2n, 2k)$ is defined pointwise as
\[ \mathcal{R}_p(X) = \operatorname{cay}\left(\frac{1}{2}\tilde{\Omega}\right)p.\]
The operator $\operatorname{cay}(A) = (I - A)^{-1}(I + A)$ is the Cayley transform.
However, the computation of an $2nร2n$ matrix inverse in the expression above can be reduced down to inverting a $2kร2k$ matrix due to Proposition 5.2 of [BZ21].
Let $A = p^+X$ and $H = X - pA$. Then an equivalent expression for the Cayley retraction defined pointwise above is
\[ \mathcal{R}_p(X) = -p + (H + 2p)(H^+H/4 - A/2 + I_{2k})^{-1}.\]
This expression is computed inplace of q
.
Literature
- [BZ21]
- T. Bendokat and R. Zimmermann. The real symplectic Stiefel and Grassmann manifolds: metrics, geodesics and applications, arXiv Preprint, 2108.12447 (2021), arXiv:2108.12447.