fastdla.get_eigenspace
- fastdla.get_eigenspace(op, basis=None, dim=None, npmod=np)
Extract eigenvectors of an operator within a space spanned by a set of vectors.
Let \(B\) be a matrix consisting of \(S\) linearly independent vectors of length \(N\) (implying \(S \leq N\)). A vector in the space spanned by columns of \(B\) is given by \(Bx\), where \(x\) is a column of S coefficients. When \(Bx\) is an eigenvector of operator \(O\) with eigenvalue \(\lambda\),
(1)\[\begin{split} O Bx = \lambda Bx \\ \therefore (O - \lambda I)Bx = 0.\end{split}\]Let the singular value decomposition of \((O - \lambda I)B\) be
\[(O - \lambda I)B = U \Sigma V^{\dagger} = U \sum_{j=0}^{S-1} \sigma_j v_j^{\dagger},\]where \(\{v_j\}_j\) are orthonormal column vectors of length \(S\). For Equation (1) to hold, we need
\[x \in \mathrm{span}(\{v_j | \sigma_j = 0\}).\]The eigen-subspace of the original space corresponding to the eigenvalue \(\lambda\) of operator \(O\) is then \(\mathrm{span}(\{B v_j | \sigma_j = 0\})\).
Note that in the above we do not require an explicit form of \(O\) but only need the result of applying it on the columns of \(B\).
- Parameters:
op (
numpy.ndarray|Callable[[numpy.ndarray],numpy.ndarray] |tuple[numpy.ndarray,Number] |tuple[Callable[[numpy.ndarray],numpy.ndarray],Number]) – Either an operator corresponding to \(O - \lambda I\) or a tuple \((O, \lambda)\). The operator can be a matrix or a callable that applies an \(N \times N\) linear operator to an \(N \times S\) matrix.eigenvalue – Eigenvalue of the operator to find the eigenspace for.
basis (
Optional[numpy.ndarray]) – An array of \(S\) linearly independent column vectors of length \(N\). If not given, the identity matrix is assumed.dim (
Optional[int]) – The dimension \(N\) of the linear space (necessary only when op is a callable and basis is not given).
- Return type:
numpy.ndarray- Returns:
An array of shape \((N, S')\), where \(S'\) is the dimension of the eigen-subspace.