logarithms
qoptcraft.math.logarithms
Logarithms of matrices.
References
Algorithms can be found in T.A. Loring, Numer. Linear Algebra Appl. 21 (6) (2014) 744-760. https://arxiv.org/abs/1203.6151
log_matrix(matrix, method='diagonalization')
Logarithm of matrix via symmetrized diagonalization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix |
NDArray
|
square matrix. |
required |
Returns:
Name | Type | Description |
---|---|---|
NDArray |
NDArray
|
matrix logarithm. |
Source code in qoptcraft/math/logarithms.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
log_matrix_diag(matrix)
Logarithm of matrix via symmetrized diagonalization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix |
NDArray
|
square matrix. |
required |
Returns:
Name | Type | Description |
---|---|---|
NDArray |
NDArray
|
matrix logarithm. |
Source code in qoptcraft/math/logarithms.py
45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
log_matrix_newton_schur(matrix)
Logarithm of matrix using Schur's decomposition. Used to diagonalize nearly unitary matrices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix |
NDArray
|
square matrix. |
required |
Returns:
Name | Type | Description |
---|---|---|
NDArray |
NDArray
|
matrix logarithm. |
Source code in qoptcraft/math/logarithms.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
log_matrix_polar_schur(matrix)
Logarithm of matrix using Polar and Schur's decomposition. Used to diagonalize nearly unitary matrices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix |
NDArray
|
square matrix. |
required |
Returns:
Name | Type | Description |
---|---|---|
NDArray |
NDArray
|
matrix logarithm. |
Source code in qoptcraft/math/logarithms.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
log_matrix_schur(matrix)
Logarithm of matrix using Schur's decomposition. Used to diagonalize nearly unitary matrices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix |
NDArray
|
square matrix. |
required |
Returns:
Name | Type | Description |
---|---|---|
NDArray |
NDArray
|
matrix logarithm. |
Source code in qoptcraft/math/logarithms.py
73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
log_matrix_sym(matrix)
Symmetrized logarithm of matrix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix |
NDArray
|
square matrix. |
required |
Returns:
Name | Type | Description |
---|---|---|
NDArray |
NDArray
|
matrix logarithm. |
Source code in qoptcraft/math/logarithms.py
60 61 62 63 64 65 66 67 68 69 70 |
|