nlft_qsp.solvers.half_cholesky
¶
Module for inverse NLFT based on the Half-Cholesky method.
Functions:
| Name | Description |
|---|---|
half_cholesky_ldl |
Computes the lower triangular matrix \(L\) for \(U U^* + V V^* = LDL^*\) using the Half-Cholesky method (see arXiv:2410.06409). |
half_cholesky_matrix_ldl |
Computes the lower triangular block-matrix \(L\) and the diagonal positive definite block-matrix \(D\) for \(I + B B^* = LDL^*\). |
inlft |
Compute the inverse nonlinear Fourier transform using the Half Cholesky algorithm. See arXiv:2410.06409 for an explanation of the method. |
solve_ldl_system |
Solves the matrix system \(LDL^* X = C\). |
solve_system_displacement_structure |
Solves the linear system \((I + BB^*) X = C\), where \(p\) is the first column of \(B\). |
half_cholesky_ldl(u, v) -> np.ndarray
¶
Computes the lower triangular matrix \(L\) for \(U U^* + V V^* = LDL^*\) using the Half-Cholesky method (see arXiv:2410.06409). Here \(D\) is some positive diagonal matrix, while \(U, V\) are the Toeplitz matrices containing \(u, v\) as first columns, respectively.
Note
The \(k\)-th column will be of length \((n+1)-k\), meaning that the zeros above the diagonal will not be added.
Returns:
| Type | Description |
|---|---|
ndarray
|
The matrix \(L\). |
Source code in nlft_qsp/solvers/half_cholesky.py
half_cholesky_matrix_ldl(p: np.ndarray) -> np.ndarray
¶
Computes the lower triangular block-matrix \(L\) and the diagonal positive definite block-matrix \(D\) for \(I + B B^* = LDL^*\). Here \(B\) is assumed to be a lower triangular block-Toeplitz matrix whose first block-column is \(p\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p
|
ndarray
|
The first block column of B. It should be of shape |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The matrix \(L\) as a numpy array of shape |
Note
The \(k\)-th column of \(L\) returned will be of length \((n+1) - k\), meaning that the zeros above the diagonal will not be added. \(D\) is returned as a list of blocks.
Source code in nlft_qsp/solvers/half_cholesky.py
inlft(b: Polynomial, c: Polynomial) -> NonLinearFourierSequence
¶
Compute the inverse nonlinear Fourier transform using the Half Cholesky algorithm. See arXiv:2410.06409 for an explanation of the method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
b
|
Polynomial
|
The starting polynomial, such that \((a, b)\) is the NLFT we want to compute the sequence for. |
required |
c
|
Polynomial
|
A polynomial approximating the ratio \(b/a\). The end of its support must coincide with the one of \(b\). |
required |
Returns:
| Type | Description |
|---|---|
NonLinearFourierSequence
|
A sequence whose NLFT is equal to \((a, b)\) (up to working precision). |
Source code in nlft_qsp/solvers/half_cholesky.py
solve_ldl_system(L: np.ndarray, D: np.ndarray, C: np.ndarray, mode: str = 'toeplitz') -> np.ndarray
¶
Solves the matrix system \(LDL^* X = C\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
if |
'toeplitz'
|
Note
The following shapes are assumed: L.shape = (n * d, n * d), D.shape = (n, d, d) (it should NOT be given as a full block-diagonal matrix), C.shape = (n, d, *) or (n * d, *)
The output \(X\) will always be of shape (n * d, *).
Source code in nlft_qsp/solvers/half_cholesky.py
solve_system_displacement_structure(p: np.ndarray, C: np.ndarray, mode: str = 'toeplitz') -> np.ndarray
¶
Solves the linear system \((I + BB^*) X = C\), where \(p\) is the first column of \(B\).
\(B\) will be assumed to be a lower-triangular block-Toeplitz matrix (when mode='toeplitz')
or a anti-upper triangular block-Hankel matrix (when mode='hankel').
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
whether \(B\) is constructed as a |
'toeplitz'
|
Note
\(p\) and \(C\) are assumed to be of shape (n, d1, d2) and (n, d1, *) respectively.