Difference between revisions of "IsPPT"
m |
(Updated documentation using GeSHi) |
||
| Line 2: | Line 2: | ||
|name=IsPPT | |name=IsPPT | ||
|desc=Determines whether or not a matrix has [[positive partial transpose]] | |desc=Determines whether or not a matrix has [[positive partial transpose]] | ||
| − | | | + | |rel=[[IsPSD]]<br />[[PartialTranspose]] |
|upd=November 20, 2012 | |upd=November 20, 2012 | ||
|v=1.00}} | |v=1.00}} | ||
| Line 26: | Line 26: | ||
==Examples== | ==Examples== | ||
| − | + | The following code verifies that the 9-by-9 identity operator (thought of as an operator in $M_3 \otimes M_3$) has positive partial transpose: | |
| + | |||
| + | <syntaxhighlight> | ||
| + | >> IsPPT(eye(9)) | ||
| + | |||
| + | ans = | ||
| + | |||
| + | 1 | ||
| + | </syntaxhighlight> | ||
==Notes== | ==Notes== | ||
Do not request the <tt>WIT</tt> output argument unless you need it. If <tt>WIT</tt> is not requested, positive semidefiniteness is determined by attempting a [http://en.wikipedia.org/wiki/Cholesky_decomposition Cholesky decomposition] of <tt>X</tt>, which is both faster and more accurate than computing its minimum eigenvalue/eigenvector pair. | Do not request the <tt>WIT</tt> output argument unless you need it. If <tt>WIT</tt> is not requested, positive semidefiniteness is determined by attempting a [http://en.wikipedia.org/wiki/Cholesky_decomposition Cholesky decomposition] of <tt>X</tt>, which is both faster and more accurate than computing its minimum eigenvalue/eigenvector pair. | ||
| + | |||
| + | {{SourceCode|name=IsPPT}} | ||
Revision as of 20:00, 21 September 2014
| IsPPT | |
| Determines whether or not a matrix has positive partial transpose | |
| Other toolboxes required | none |
|---|---|
| Related functions | IsPSD PartialTranspose |
IsPPT is a function that determines whether or not a given matrix has positive partial transpose (PPT), which is a quick and easy separability criterion. This function works on both full and sparse matrices, and if desired a witness can be provided that verifies that the input matrix is not PPT.
Syntax
- PPT = IsPPT(X)
- PPT = IsPPT(X,SYS)
- PPT = IsPPT(X,SYS,DIM)
- PPT = IsPPT(X,SYS,DIM,TOL)
- [PPT,WIT] = IsPPT(X,SYS,DIM,TOL)
Argument descriptions
Input arguments
- X: A square matrix.
- SYS (optional, default 2): A scalar or vector indicating which subsystem(s) the transpose should be applied on.
- DIM (optional, default has X living on two subsystems of equal size): A vector containing the dimensions of the (possibly more than 2) subsystems on which X lives.
- TOL (optional, default sqrt(eps)): The numerical tolerance used when determining positive semidefiniteness. The matrix will be determined to have positive partial transpose if its partial transpose's minimal eigenvalue is computed to be at least -TOL.
Output arguments
- PPT: A flag (either 1 or 0) indicating that X does or does not have positive partial transpose.
- WIT (optional): An eigenvector corresponding to the minimal eigenvalue of PartialTranspose(X). When PPT = 0, this serves as a witness that verifies that X does not have positive partial transpose, since WIT'*PartialTranspose(X)*WIT < 0.
Examples
The following code verifies that the 9-by-9 identity operator (thought of as an operator in $M_3 \otimes M_3$) has positive partial transpose:
>> IsPPT(eye(9))
ans =
1Notes
Do not request the WIT output argument unless you need it. If WIT is not requested, positive semidefiniteness is determined by attempting a Cholesky decomposition of X, which is both faster and more accurate than computing its minimum eigenvalue/eigenvector pair.
Source code
Click here to view this function's source code on github.