cagpjax.linalg.eigh
Hermitian eigenvalue decomposition.
Eigh
EighResult
Bases: NamedTuple
Result of Hermitian eigenvalue decomposition.
Attributes:
Name | Type | Description |
---|---|---|
eigenvalues |
Float[Array, N]
|
Eigenvalues of the operator. |
eigenvectors |
LinearOperator
|
Eigenvectors of the operator. |
Source code in src/cagpjax/linalg/eigh.py
Lanczos
Bases: Algorithm
Lanczos algorithm for approximate partial eigenvalue decomposition.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
max_iters
|
int | None
|
Maximum number of iterations (number of eigenvalues/vectors to compute).
If |
None
|
v0
|
Float[Array, N] | None
|
Initial vector. If |
None
|
key
|
PRNGKeyArray | None
|
Random key for generating a random initial vector if |
None
|
Source code in src/cagpjax/linalg/eigh.py
eigh(A, alg=Eigh(), grad_rtol=None)
Compute the Hermitian eigenvalue decomposition of a linear operator.
For some algorithms, the decomposition may be approximate or partial.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
A
|
LinearOperator
|
Hermitian linear operator. |
required |
alg
|
Algorithm
|
Algorithm for eigenvalue decomposition. |
Eigh()
|
grad_rtol
|
float | None
|
Specifies the cutoff for similar eigenvalues, used to improve gradient computation for (almost-)degenerate matrices. If not provided, the default is 0.0. If None or negative, all eigenvalues are treated as distinct. |
None
|
Returns:
Type | Description |
---|---|
EighResult
|
A named tuple of |
Note
Degenerate matrices have repeated eigenvalues.
The set of eigenvectors that correspond to the same eigenvalue is not unique
but instead forms a subspace.
grad_rtol
only improves stability of gradient-computation if the function
being differentiated depends only depends on these subspaces and not the
specific eigenvectors themselves.