matrix_props.is_k_incoherent¶
Checks if the matrix is $k$-incoherent.
Functions¶
|
Determine whether a quantum state is k-incoherent [1]. |
Module Contents¶
- matrix_props.is_k_incoherent.is_k_incoherent(mat, k, tol=1e-15)¶
Determine whether a quantum state is k-incoherent [1].
For a positive integers, \(k\) and \(n\), the matrix \(X \in \text{Pos}(\mathbb{C}^n)\) is called \(k\)-incoherent if there exists a positive integer \(m\), a set \(S = \{|\psi_0\rangle, |\psi_1\rangle,\ldots, |\psi_{m-1}\rangle\} \subset \mathbb{C}^n\) with the property that each \(|\psi_i\rangle\) has at most \(k\) non-zero entries, and real scalars \(c_0, c_1, \ldots, c_{m-1} \geq 0\) for which
\[X = \sum_{j=0}^{m-1} c_j |psi_j\rangle \langle \psi_j|.\]This function checks if the provided density matrix
mat
is k-incoherent. It returns True ifmat
is k-incoherent and False ifmat
is not.The function first handles trivial cases. Then it computes the comparison matrix (via
matrices.comparison.comparison()
) and performs further tests based on the trace of \(mat^2\) and a dephasing channel. If no decision is reached, the function recurses by checking incoherence for k-1. Finally, if still indeterminate, an SDP is formulated to decide incoherence.Examples
If \(n = 3\) and \(k = 2\), then the following matrix is \(2\)-incoherent:
import numpy as np from toqito.matrix_props import is_k_incoherent mat = np.array([[2, 1, 2], [1, 2, -1], [2, -1, 5]]) is_k_incoherent(mat, 2)
True
References
- Parameters:
mat (numpy.ndarray) – Density matrix to test.
k (int) – The positive integer coherence level.
tol (float) – Tolerance for numerical comparisons (default is 1e-15).
- Raises:
ValueError – If k ≤ 0 or if
mat
is not square.- Returns:
True if
mat
is k-incoherent, False otherwise.- Return type:
bool