<?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=Negativity</id>
	<title>Negativity - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qetlab.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Negativity"/>
	<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=Negativity&amp;action=history"/>
	<updated>2026-10-23T12:27:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://qetlab.com/wiki/index.php?title=Negativity&amp;diff=815&amp;oldid=prev</id>
		<title>Nathaniel: CVX info in side box</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=Negativity&amp;diff=815&amp;oldid=prev"/>
		<updated>2015-06-24T13:18:17Z</updated>

		<summary type="html">&lt;p&gt;CVX info in side box&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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:18, 24 June 2015&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-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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_measures|Entanglement measures]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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_measures|Entanglement measures]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;|upd=October 22, 2014&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;|upd=October 22, 2014&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&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;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;v&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0.50&lt;/del&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cvx&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;yes (convex)&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;Negativity&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; is a [[List of functions|function]] that computes the negativity of a bipartite density matrix, which is defined as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;Negativity&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; is a [[List of functions|function]] that computes the negativity of a bipartite density matrix, which is defined as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;lt;math&amp;gt;\mathcal{N}(\rho) := \frac{1}{2}\big( \|\rho^\Gamma\|_1 - 1 \big),&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;lt;math&amp;gt;\mathcal{N}(\rho) := \frac{1}{2}\big( \|\rho^\Gamma\|_1 - 1 \big),&amp;lt;/math&amp;gt;&lt;/div&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=Negativity&amp;diff=524&amp;oldid=prev</id>
		<title>Nathaniel: Created page with &quot;{{Function |name=Negativity |desc=Computes the negativity of a bipartite density matrix |rel=PartialTranspose&lt;br /&gt;TraceNorm |cat=List of functions#Entanglement_meas...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=Negativity&amp;diff=524&amp;oldid=prev"/>
		<updated>2014-10-23T15:58:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Function |name=Negativity |desc=Computes the negativity of a bipartite density matrix |rel=&lt;a href=&quot;/PartialTranspose&quot; title=&quot;PartialTranspose&quot;&gt;PartialTranspose&lt;/a&gt;&amp;lt;br /&amp;gt;&lt;a href=&quot;/TraceNorm&quot; title=&quot;TraceNorm&quot;&gt;TraceNorm&lt;/a&gt; |cat=List of functions#Entanglement_meas...&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=Negativity&lt;br /&gt;
|desc=Computes the negativity of a bipartite density matrix&lt;br /&gt;
|rel=[[PartialTranspose]]&amp;lt;br /&amp;gt;[[TraceNorm]]&lt;br /&gt;
|cat=[[List of functions#Entanglement_measures|Entanglement measures]]&lt;br /&gt;
|upd=October 22, 2014&lt;br /&gt;
|v=0.50}}&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;Negativity&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; is a [[List of functions|function]] that computes the negativity of a bipartite density matrix, which is defined as follows:&lt;br /&gt;
: &amp;lt;math&amp;gt;\mathcal{N}(\rho) := \frac{1}{2}\big( \|\rho^\Gamma\|_1 - 1 \big),&amp;lt;/math&amp;gt;&lt;br /&gt;
where $\rho^\Gamma$ is the [[PartialTranspose|partial transpose]] of $\rho$ and $\|\cdot\|_1$ is the [[TraceNorm|trace norm]]. Equivalently, the negativity of $\rho$ is the absolute value of the sum of the negative eigenvalues of $\rho^\Gamma$.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
* &amp;lt;tt&amp;gt;NEG = Negativity(RHO)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;NEG = Negativity(RHO,DIM)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Argument descriptions==&lt;br /&gt;
* &amp;lt;tt&amp;gt;RHO&amp;lt;/tt&amp;gt;: A bipartite density matrix.&lt;br /&gt;
* &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; (optional, by default has both subsystems of equal dimension): A specification of the dimensions of the subsystems that &amp;lt;tt&amp;gt;RHO&amp;lt;/tt&amp;gt; acts on. &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; can be provided in one of two ways:&lt;br /&gt;
** If &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; is a scalar, it is assumed that the first subsystem has dimension &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; and the second subsystem has dimension &amp;lt;tt&amp;gt;length(RHO)/DIM&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** If $X \in M_{n_1} \otimes M_{n_2}$ then &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; should be a row vector containing the dimensions (i.e., &amp;lt;tt&amp;gt;DIM = [n_1, n_2]&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===PPT states have zero negativity===&lt;br /&gt;
States with positive partial transpose have zero negativity. The following code verifies this fact for one particular [[ChessboardState|Chessboard state]]:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rho = ChessboardState(1,2,3,4,5,6);&lt;br /&gt;
&amp;gt;&amp;gt; Negativity(rho)&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
   1.1102e-16&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Can be used with CVX===&lt;br /&gt;
This function is convex and can be used in the objective function or constraints of a CVX optimization problem. For example, the following code finds the maximum overlap of a density matrix $\rho$ with the [[MaxEntangled|maximally-entangled pure state]], subject to the constraint that its negativity is no larger than 1/2:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; d = 3;&lt;br /&gt;
&amp;gt;&amp;gt; phi = MaxEntangled(d);&lt;br /&gt;
&amp;gt;&amp;gt; phi = phi*phi&amp;#039;; % the maximally-entangled pure state, represented as a rank-1 density matrix&lt;br /&gt;
&amp;gt;&amp;gt; cvx_begin sdp quiet&lt;br /&gt;
   variable rho(d^2,d^2) hermitian;&lt;br /&gt;
   maximize trace(phi*rho);&lt;br /&gt;
   subject to&lt;br /&gt;
       trace(rho) == 1;&lt;br /&gt;
       rho &amp;gt;= 0;&lt;br /&gt;
       Negativity(rho) &amp;lt;= 1/2;&lt;br /&gt;
   cvx_end&lt;br /&gt;
   cvx_optval&lt;br /&gt;
&lt;br /&gt;
cvx_optval =&lt;br /&gt;
&lt;br /&gt;
    0.6667&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SourceCode|name=Negativity}}&lt;/div&gt;</summary>
		<author><name>Nathaniel</name></author>
	</entry>
</feed>