# InSeparableBall

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 Other toolboxes required InSeparableBall Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state none IsAbsPPTIsSeparable Ball of separability

InSeparableBall is a function that determines whether or not a density matrix is contained within the ball of states that are separable centered at the maximally-mixed state (more generally, it determines whether or not a positive semidefinite operator is within the ball of separability centered at an appropriately-scaled identity matrix). The size of this ball of separability was computed in .

## Syntax

• ISB = InSeparableBall(X)

## Argument descriptions

• X: A bipartite density matrix (or any bipartite positive semidefinite operator).

## Examples

The only states acting on $\mathbb{C}^m \otimes \mathbb{C}^n$ in the separable ball that do not have full rank are those with exactly 1 zero eigenvalue, and the $mn-1$ non-zero eigenvalues equal to each other. The following code highlights this fact when $m = n = 2$:

>> U = RandomUnitary(4);
>> lam = [1,1,1,0]/3;
>> rho = U*diag(lam)*U'; % random density matrix with eigenvalues [1,1,1,0]/3
>> InSeparableBall(rho)

ans =

1

>> lam2 = [1.01,1,0.99,0]/3;
>> rho2 = U*diag(lam2)*U'; % random density matrix with eigenvalues [1.01,1,0.99,0]/3
>> InSeparableBall(rho2)

ans =

0

## Source code

Click on "expand" to the right to view the MATLAB source code for this function.

1. %%  INSEPARABLEBALL    Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state
2. %   This function has one required input argument:
3. %     X: a positive semidefinite matrix, or a vector of the eigenvalues of
4. %        a positive semidefinite matrix
5. %
6. %   ISB = InSeparableBall(X) is either 1 or 0, indicating that X is or is
7. %   not contained within the ball of separable operators centered at the
8. %   identity matrix/maximally-mixed state. The size of this ball was
9. %   derived in .
10. %
11. %   URL: http://www.qetlab.com/InSeparableBall
12. %
13. %   References:
14. %    L. Gurvits and H. Barnum. Largest separable balls around the
15. %       maximally mixed bipartite quantum state. Phys. Rev. A, 66:062311,
16. %       2002. E-print: arXiv:quant-ph/0204159
17. 
18. %   requires: nothing
19. %   author: Nathaniel Johnston (nathaniel@njohnston.ca)
20. %   package: QETLAB
21. %   last updated: November 14, 2014
22. 
23. function isb = InSeparableBall(X)
24. 
25. sz = size(X);
26. len = max(sz);
27. 
28. % If X is a vector, turn it into a matrix (we could instead turn every
29. % matrix into a vector of eigenvalues, but that would make the computation
30. % take O(n^3) time, instead of the current method, which is O(n^2)).
31. if(min(sz) == 1) % X is a vector of eigenvalues
32.     X = sparse(diag(X));
33. end
34. 
35. % If X has trace 0 or less it can't possibly be in the separable ball.
36. if(trace(X) < len*eps)
37.     isb = 0;
38.     return;
39. end
40. X = X/trace(X);
41. 
42. % The following check relies on the fact that we scaled X so that
43. % trace(X) = 1. The following condition is then exactly the Gurvits-Barnum
44. % condition.
45. isb = (norm(X/norm(X,'fro')^2 - speye(len),'fro') <= 1);
{"ft_lang_label":"__label__en","ft_lang_prob":0.7467379,"math_prob":0.98105174,"size":3207,"snap":"2020-34-2020-40","text_gpt3_token_len":932,"char_repetition_ratio":0.12300968,"word_repetition_ratio":0.11881188,"special_character_ratio":0.2806361,"punctuation_ratio":0.14285715,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99624294,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-08-13T19:18:43Z\",\"WARC-Record-ID\":\"<urn:uuid:c801f6d0-1b9b-4fe5-9112-6fbfd0432b03>\",\"Content-Length\":\"31376\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e2bac0ef-acbd-46e0-b7da-c66c48d0472f>\",\"WARC-Concurrent-To\":\"<urn:uuid:60c6b87d-57c5-4b93-8533-e5f2eb400549>\",\"WARC-IP-Address\":\"207.38.86.157\",\"WARC-Target-URI\":\"http://www.qetlab.com/wiki/index.php?title=InSeparableBall&oldid=592\",\"WARC-Payload-Digest\":\"sha1:OCSTWDK32AJT6ECHMK6JU6SJMTMPRM4V\",\"WARC-Block-Digest\":\"sha1:J34Q4YBMBN2K43KFJUBJAAD4VZWALNEF\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-34/CC-MAIN-2020-34_segments_1596439739073.12_warc_CC-MAIN-20200813191256-20200813221256-00280.warc.gz\"}"}