qten.linalg.orthogonalize
Module reference for qten.linalg.orthogonalize.
orthogonalize
Tensor-aware matrix orthogonalization routines for QTen.
This module provides orthogonalization algorithms that operate on
Tensor objects while preserving symbolic
dimension metadata.
Public orthogonalizations
lowdin_orthonormalizeSymmetric orthonormalization of matrix columns using the positive-definite inverse square root of their Gram matrix.
Conventions
All orthogonalizations act on the last two tensor dimensions as matrix axes. The penultimate axis labels the ambient row space, the final axis labels the columns to orthonormalize, and any leading dimensions are treated as batch axes. The input dimensions and their ordering are preserved in the result.
The routines require every matrix in the batch to have full column rank at the requested numerical tolerance. Consequently, the number of columns cannot exceed the dimension of the row space. A rank-deficient input raises an error rather than silently dropping columns or changing symbolic spaces.
Unlike the routines in qten.linalg.decompose, these
functions return a transformed tensor rather than decomposition factors.
lowdin_orthonormalize
lowdin_orthonormalize(
tensor: Tensor, rank_tolerance: float = 1e-10
) -> Tensor
Symmetrically orthonormalize the columns of a tensor.
Applies the Lowdin transformation \(A \mapsto A(A^\dagger A)^{-1/2}\) independently to every matrix in the leading batch dimensions. The input dimensions are preserved.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tensor
|
Tensor
|
Input whose last two dimensions are the row and column matrix axes. |
required |
rank_tolerance
|
float
|
Minimum allowed eigenvalue of the column Gram matrix. A non-positive value or one at or below this threshold indicates linearly dependent columns. |
1e-10
|
Returns:
| Type | Description |
|---|---|
Tensor
|
A tensor with the same dimensions and orthonormal columns. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the input has fewer than two dimensions or |
RuntimeError
|
If any matrix in the batch has linearly dependent columns at the requested tolerance. |
Source code in src/qten/linalg/orthogonalize.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |