<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://qetlab.com/wiki/index.php?action=history&amp;feed=atom&amp;title=IsBlockPositive</id>
	<title>IsBlockPositive - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qetlab.com/wiki/index.php?action=history&amp;feed=atom&amp;title=IsBlockPositive"/>
	<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=IsBlockPositive&amp;action=history"/>
	<updated>2026-05-13T10:02:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://qetlab.com/wiki/index.php?title=IsBlockPositive&amp;diff=918&amp;oldid=prev</id>
		<title>Nathaniel: /* A complicated operator on 4 local dimensions */</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=IsBlockPositive&amp;diff=918&amp;oldid=prev"/>
		<updated>2018-06-26T13:43:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;A complicated operator on 4 local dimensions&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:43, 26 June 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l70&quot; &gt;Line 70:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 70:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;gt;&amp;gt; v0 = kron(b0,b0);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;gt;&amp;gt; v0 = kron(b0,b0);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;gt;&amp;gt; Y = (kron(eye(4),b0*b0')/2 + kron(b3*b3',PartialTranspose(b3*b3',1)))/3 - v0*v0'/4;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;gt;&amp;gt; Y = (kron(eye(4),b0*b0')/2 + kron(b3*b3',PartialTranspose(b3*b3',1)))/3 - v0*v0'/4;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;gt;&amp;gt; Y = Swap(Y,[2,2,2,2&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/del&gt;,&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/del&gt;2&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;,3&lt;/del&gt;]); % this is the Choi matrix of the linear map given in Lemma 3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;gt;&amp;gt; Y = Swap(Y,[2,&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;3],[&lt;/ins&gt;2,2,2,2]); % this is the Choi matrix of the linear map given in Lemma 3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;gt;&amp;gt; IsBlockPositive(Y)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;gt;&amp;gt; IsBlockPositive(Y)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nathaniel</name></author>
	</entry>
	<entry>
		<id>https://qetlab.com/wiki/index.php?title=IsBlockPositive&amp;diff=906&amp;oldid=prev</id>
		<title>Rmmateri at 16:35, 13 June 2018</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=IsBlockPositive&amp;diff=906&amp;oldid=prev"/>
		<updated>2018-06-13T16:35:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:35, 13 June 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|name=IsBlockPositive&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|name=IsBlockPositive&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|desc=Determines whether or not an operator is block positive&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|desc=Determines whether or not an operator is block positive&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|req=[http://cvxr.com/cvx/ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;cvx&lt;/del&gt;]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|req=[http://cvxr.com/cvx/ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;CVX&lt;/ins&gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|rel=[[IsPPT]]&amp;lt;br /&amp;gt;[[IsPSD]]&amp;lt;br /&amp;gt;[[IsSeparable]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|rel=[[IsPPT]]&amp;lt;br /&amp;gt;[[IsPSD]]&amp;lt;br /&amp;gt;[[IsSeparable]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|cat=[[List of functions#Entanglement_and_separability|Entanglement&amp;amp;nbsp;and&amp;amp;nbsp;separability]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|cat=[[List of functions#Entanglement_and_separability|Entanglement&amp;amp;nbsp;and&amp;amp;nbsp;separability]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rmmateri</name></author>
	</entry>
	<entry>
		<id>https://qetlab.com/wiki/index.php?title=IsBlockPositive&amp;diff=406&amp;oldid=prev</id>
		<title>Nathaniel: Created page with &quot;{{Function |name=IsBlockPositive |desc=Determines whether or not an operator is block positive |req=[http://cvxr.com/cvx/ cvx] |rel=IsPPT&lt;br /&gt;IsPSD&lt;br /&gt;IsSeparable...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=IsBlockPositive&amp;diff=406&amp;oldid=prev"/>
		<updated>2014-09-23T18:51:51Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Function |name=IsBlockPositive |desc=Determines whether or not an operator is block positive |req=[http://cvxr.com/cvx/ cvx] |rel=&lt;a href=&quot;/IsPPT&quot; title=&quot;IsPPT&quot;&gt;IsPPT&lt;/a&gt;&amp;lt;br /&amp;gt;&lt;a href=&quot;/IsPSD&quot; title=&quot;IsPSD&quot;&gt;IsPSD&lt;/a&gt;&amp;lt;br /&amp;gt;IsSeparable...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Function&lt;br /&gt;
|name=IsBlockPositive&lt;br /&gt;
|desc=Determines whether or not an operator is block positive&lt;br /&gt;
|req=[http://cvxr.com/cvx/ cvx]&lt;br /&gt;
|rel=[[IsPPT]]&amp;lt;br /&amp;gt;[[IsPSD]]&amp;lt;br /&amp;gt;[[IsSeparable]]&lt;br /&gt;
|cat=[[List of functions#Entanglement_and_separability|Entanglement&amp;amp;nbsp;and&amp;amp;nbsp;separability]]&lt;br /&gt;
|upd=September 23, 2014&lt;br /&gt;
|v=0.50}}&lt;br /&gt;
&amp;lt;tt&amp;gt;'''IsBlockPositive'''&amp;lt;/tt&amp;gt; is a [[List of functions|function]] that determines whether or not a bipartite operator is block positive (roughly speaking, it determines whether the operator is an entanglement witness or not). A value of 0 indicates that the operator is not block positive (and hence is not an entanglement witness), a value of 1 indicates that the operator is block positive (and hence is either an entanglement witness or is positive semidefinite), and a value of -1 indicates that the script was unable to determine whether or not the operator is block positive.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
* &amp;lt;tt&amp;gt;IBP = IsBlockPositive(X)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;IBP = IsBlockPositive(X,K)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;IBP = IsBlockPositive(X,K,DIM)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;IBP = IsBlockPositive(X,K,DIM,STR)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;IBP = IsBlockPositive(X,K,DIM,STR,TOL)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;[IBP,WIT] = IsBlockPositive(X,K,DIM,STR,TOL)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Argument descriptions==&lt;br /&gt;
* &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt;: A bipartite Hermitian operator.&lt;br /&gt;
* &amp;lt;tt&amp;gt;K&amp;lt;/tt&amp;gt; (optional, default 1): A positive integer indicating that the script should determine whether or not &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;K&amp;lt;/tt&amp;gt;-block positive (i.e., whether or not it remains nonnegative under left and right multiplication by vectors with [[SchmidtRank|Schmidt rank]] &amp;lt;tt&amp;gt;&amp;lt;= K&amp;lt;/tt&amp;gt;).&lt;br /&gt;
* &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; (optional, by default has both subsystems of equal dimension): A 1-by-2 vector containing the dimensions of the two subsystems that &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; acts on.&lt;br /&gt;
* &amp;lt;tt&amp;gt;STR&amp;lt;/tt&amp;gt; (optional, default 2): An integer that determines how hard the script should work to determine block positivity before giving up (&amp;lt;tt&amp;gt;STR = -1&amp;lt;/tt&amp;gt; means that the script won't stop working until it finds an answer). Other valid values are &amp;lt;tt&amp;gt;0, 1, 2, 3, ...&amp;lt;/tt&amp;gt;. In practice, if &amp;lt;tt&amp;gt;STR &amp;gt;= 4&amp;lt;/tt&amp;gt; then most computers will run out of memory and/or the sun will explode before computation completes.&lt;br /&gt;
* &amp;lt;tt&amp;gt;TOL&amp;lt;/tt&amp;gt; (optional, default &amp;lt;tt&amp;gt;eps^(3/8)&amp;lt;/tt&amp;gt;): The numerical tolerance used throughout the script.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===The [[SwapOperator|swap operator]] is block positive===&lt;br /&gt;
The [[SwapOperator|swap operator]] always block positive, since it is the Choi matrix of the transpose map (and it is easy to see that the transpose map is positive). We can verify this in small dimensions as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; for d = 2:10&lt;br /&gt;
       res(d) = IsBlockPositive(SwapOperator(d));&lt;br /&gt;
   end&lt;br /&gt;
&amp;gt;&amp;gt; res(2:10)&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
     1     1     1     1     1     1     1     1     1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, the swap operator is ''not'' 2-block positive, which we can verify as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; IsBlockPositive(SwapOperator(5),2)&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
     0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The [[ChoiMap|Choi map]] is positive===&lt;br /&gt;
The [[ChoiMap|Choi map]] is a well-known example of a positive linear map that acts on 3-by-3 matrices. The following code verifies that this map is indeed positive, but not 2-positive:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; IsBlockPositive(ChoiMap())&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
     1&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; IsBlockPositive(ChoiMap(),2)&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
     0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A complicated operator on 4 local dimensions===&lt;br /&gt;
A somewhat messy positive linear map was introduced in Lemma 3 of &amp;lt;ref name=&amp;quot;BCJRWY14&amp;quot;&amp;gt;S.&amp;amp;nbsp;Bandyopadhyay, A.&amp;amp;nbsp;Cosentino, N.&amp;amp;nbsp;Johnston, V.&amp;amp;nbsp;Russo, J.&amp;amp;nbsp;Watrous, and N.&amp;amp;nbsp;Yu. ''Limitations on separable measurements by convex optimization''. E-print: [http://arxiv.org/abs/1408.6981 arXiv:1408.6981] [quant-ph], 2014.&amp;lt;/ref&amp;gt;. The following code verifies that this map is indeed positive in the $t = 1$ case.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; b0 = Bell(0);&lt;br /&gt;
&amp;gt;&amp;gt; b3 = Bell(3);&lt;br /&gt;
&amp;gt;&amp;gt; v0 = kron(b0,b0);&lt;br /&gt;
&amp;gt;&amp;gt; Y = (kron(eye(4),b0*b0')/2 + kron(b3*b3',PartialTranspose(b3*b3',1)))/3 - v0*v0'/4;&lt;br /&gt;
&amp;gt;&amp;gt; Y = Swap(Y,[2,2,2,2],[2,3]); % this is the Choi matrix of the linear map given in Lemma 3&lt;br /&gt;
&amp;gt;&amp;gt; IsBlockPositive(Y)&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
     1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SourceCode|name=IsBlockPositive}}&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nathaniel</name></author>
	</entry>
</feed>