toqito.state_props.is_ppt
- toqito.state_props.is_ppt(mat, sys=2, dim=None, tol=None)[source]
Determine whether or not a matrix has positive partial transpose [WikPPT].
Yields either
TrueorFalse, indicating thatmatdoes or does not have positive partial transpose (within numerical error). The variablematis assumed to act on bipartite space.For shared systems of \(2 \otimes 2\) or \(2 \otimes 3\), the PPT criterion serves as a method to determine whether a given state is entangled or separable. Therefore, for systems of this size, the return value
Truewould indicate that the state is separable and a value ofFalsewould indicate the state is entangled.Examples
Consider the following matrix
\[\begin{split}X = \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ \end{pmatrix}.\end{split}\]This matrix trivially satisfies the PPT criterion as can be seen using the
toqitopackage.>>> from toqito.state_props import is_ppt >>> import numpy as np >>> mat = np.identity(9) >>> is_ppt(mat) True
Consider the following Bell state:
\[u = \frac{1}{\sqrt{2}}\left( |01 \rangle + |10 \rangle \right).\]For the density matrix \(\rho = u u^*\), as this is an entangled state of dimension \(2\), it will violate the PPT criterion, which can be seen using the
toqitopackage.>>> from toqito.states import bell >>> from toqito.state_props import is_ppt >>> rho = bell(2) * bell(2).conj().T >>> is_ppt(rho) False
References
[WikPPT]Quantiki: Positive partial transpose https://www.quantiki.org/wiki/positive-partial-transpose
- Parameters:
mat – A square matrix.
sys – Scalar or vector indicating which subsystems the transpose should be applied on.
dim – The dimension is a vector containing the dimensions of the subsystems on which
matacts.tol – Tolerance with which to check whether mat is PPT.
- Returns:
Returns
Trueifmatis PPT andFalseif not.