SymmetricInnerExtension

SymmetricInnerExtension is a function that determines whether or not a given positive semidefinite operator is in the cone defined in reference that approximates the set of separable operators from the inside, based on operators with symmetric extensions. Importantly, if this script returns a value of 1 then we know that the given operator is separable (if the script returns a value of 0, we know nothing about whether the operator is separable or entangled).

Syntax

 * EX = SymmetricInnerExtension(X)
 * EX = SymmetricInnerExtension(X,K)
 * EX = SymmetricInnerExtension(X,K,DIM)
 * EX = SymmetricInnerExtension(X,K,DIM,PPT)
 * EX = SymmetricInnerExtension(X,K,DIM,PPT,TOL)
 * [EX,WIT] = SymmetricInnerExtension(X,K,DIM,PPT,TOL)</tt>

Input arguments

 * X</tt>: A positive semidefinite operator.
 * K</tt> (optional, default 2): The number of copies of the second subsystem in the desired symmetric extension.
 * DIM</tt> (optional, by default has both subsystems of equal dimension): A 1-by-2 vector containing the dimensions of the two subsystems that X</tt> acts on.
 * PPT</tt> (optional, default 0): A flag (either 1 or 0) that indicates whether or not the desired symmetric extension must have positive partial transpose.
 * TOL</tt> (optional, default eps^(1/4)</tt>): The numerical tolerance used throughout this script. It is recommended that this is left at the default value unless numerical problems arise and the script has difficulty determining whether or not X</tt> has a symmetric inner extension.

Output arguments

 * EX</tt>: A flag (either 1 or 0) indicating that X</tt> does or does not have a symmetric inner extension of the desired type. A value of 1 means that X</tt> is separable.
 * WIT</tt> (optional): A witness that verifies that the answer provided by EX</tt> is correct. If EX = 1</tt> (i.e., X</tt> is in the "inner" symmetric extension cone) then <tt>WIT</tt> is a symmetric extension of the operator $$\sigma_{AB}$$ from, and thus acts as a witness that verifies that <tt>EX = 1</tt> is correct. If <tt>X</tt> is not in this cone (i.e., <tt>EX = 0</tt>) then <tt>WIT</tt> is an operator with <tt>trace(WIT*X) = -1</tt> but <tt>trace(WIT*Y) >= 0</tt> for all operators in the described cone. Note that <tt>WIT</tt> may not be an entanglement witness!

Examples
The following code takes an unnormalized quantum state and shows that it is separable, since it has a symmetric inner extension.

If we subtract the identity from <tt>rho</tt>, then intuitively it becomes "less separable". We can verify this as follows, where we see that setting <tt>K = 2</tt> is no longer sufficient to prove that the state is separable, and instead we must set <tt>K = 3</tt>. In general, the higher <tt>K</tt> is, the stronger the test for separability is, but the longer and more memory-intensive the computation is.