nlft_qsp.solvers.completion.janashia_lagvilava
¶
Module for matrix polynomial completion based on the Janashia-Lagvilava method (EXPERIMENTAL).
Functions:
| Name | Description |
|---|---|
block_conjugate_transpose |
Given a column vector (or tensor) of N+1 d1 x d2 blocks, returns blockwise conjugate-transpose. |
block_conjugate_transpose_blocks |
Blockwise conjugate-transpose for tensors of shape (N+1, d1, d2). |
block_hankel |
Returns the block Hankel tensor associated to Zeta. |
block_transpose |
Given a column vector of N+1 d1 x d2 blocks, returns a column vector of N+1 d2 x d1 blocks. |
flatten_block_hankel |
Flattens a block Hankel tensor (deg+1, deg+1, d1, d2) to 2D matrix form. |
id_block_tensor |
Returns a tensor of N+1 d x d blocks, with first block I and others 0. |
id_block_vector |
Returns a column vector of N+1 d x d blocks, where all the blocks are zeros except the first one which is the identity. |
inverse_polynomial |
Given f (assumed to be outer), returns the Taylor approximation for 1/f up to order N//2. |
janashia_lagvilava_unitary |
Returns an (approximate) unitary matrix function U such that Mx @ U is outer. |
matrix_inverse_polynomial |
Given a matrix polynomial F (assumed to be outer), returns a Taylor approximation or F^{-1} up to order N//2. |
pointwise_cholesky |
Returns a polynomial approximation to the function M with the following properties: |
scalar_spectral_factor |
Returns a polynomial approximation to the outer function q(z) satisfying |q|^2 = f, with degree N//2. |
scalar_spectral_factor_from_evals |
Returns a polynomial approximation to the outer function q(z) satisfying |q|^2 = f, given its vector of evaluations. Its degree will be len(f_evals)//2 |
scalar_spectral_phase |
Evaluations of the phases that make f outer, given its evaluations. |
solve_jl_system |
Returns the (approximate) unitary solution to the Janashia-Lagvilava system of equations associated to Zeta, i.e., the |
block_conjugate_transpose(bvec, N: int)
¶
Given a column vector (or tensor) of N+1 d1 x d2 blocks, returns blockwise conjugate-transpose.
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
block_conjugate_transpose_blocks(bten: np.ndarray) -> np.ndarray
¶
Blockwise conjugate-transpose for tensors of shape (N+1, d1, d2).
block_hankel(Zeta: Polynomial) -> np.ndarray
¶
Returns the block Hankel tensor associated to Zeta.
If Zeta.shape = (d1, d2), returns an array of shape (deg+1, deg+1, d1, d2), where deg = -Zeta.support_start and block (i, j) is Zeta[-(i+j)] when i+j <= deg, zero otherwise.
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
block_transpose(bvec, N: int)
¶
Given a column vector of N+1 d1 x d2 blocks, returns a column vector of N+1 d2 x d1 blocks.
Each block is transposed. The resulting vector has shape (d2*(N+1), d1).
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
flatten_block_hankel(Gamma_blocks: np.ndarray) -> np.ndarray
¶
Flattens a block Hankel tensor (deg+1, deg+1, d1, d2) to 2D matrix form.
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
id_block_tensor(d: int, N: int) -> np.ndarray
¶
Returns a tensor of N+1 d x d blocks, with first block I and others 0.
id_block_vector(d: int, N: int)
¶
Returns a column vector of N+1 d x d blocks, where all the blocks are zeros except the first one which is the identity.
inverse_polynomial(f: Polynomial, N: int) -> Polynomial
¶
Given f (assumed to be outer), returns the Taylor approximation for 1/f up to order N//2.
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
janashia_lagvilava_unitary(M: Polynomial, N: int, d_min: int = 0, d_max: int = -1) -> Polynomial
¶
Returns an (approximate) unitary matrix function U such that Mx @ U is outer. Mx here is the submatrix M[d_min : d_max, d_min : d_max] (d_min included, d_max excluded).
Note: it is assumed that M is lower triangular and already contains (approximate) outer functions on the diagonal.
Both the outer spectral factor and the outerizing unitary are returned.
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
matrix_inverse_polynomial(F: Polynomial, N: int) -> Polynomial
¶
Given a matrix polynomial F (assumed to be outer), returns a Taylor approximation or F^{-1} up to order N//2.
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
pointwise_cholesky(P: Polynomial, N: int) -> Polynomial
¶
Returns a polynomial approximation to the function M with the following properties: (1) M @ M.H = P (2) M is lower triangular with positive-mean outer diagonal entries.
Note
N is assumed to be a power of two.
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
scalar_spectral_factor(f: Polynomial, N: int) -> Polynomial
¶
Returns a polynomial approximation to the outer function q(z) satisfying |q|^2 = f, with degree N//2.
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
scalar_spectral_factor_from_evals(f_evals: list[complex]) -> Polynomial
¶
Returns a polynomial approximation to the outer function q(z) satisfying |q|^2 = f, given its vector of evaluations. Its degree will be len(f_evals)//2
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
scalar_spectral_phase(f_evals: list[complex]) -> list[complex]
¶
Evaluations of the phases that make f outer, given its evaluations.
Source code in nlft_qsp/solvers/completion/janashia_lagvilava.py
solve_jl_system(Zeta)
¶
Returns the (approximate) unitary solution to the Janashia-Lagvilava system of equations associated to Zeta, i.e., the unitary matrix U such that [[I, 0], [Zeta, I]] @ U is outer.
Note: if Zeta has shape (d1, d2) then U has shape (d1 + d2, d1 + d2).