<?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=TraceDistanceCoherence</id>
	<title>TraceDistanceCoherence - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qetlab.com/wiki/index.php?action=history&amp;feed=atom&amp;title=TraceDistanceCoherence"/>
	<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=TraceDistanceCoherence&amp;action=history"/>
	<updated>2026-04-15T20:21: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=TraceDistanceCoherence&amp;diff=864&amp;oldid=prev</id>
		<title>Nathaniel: requires CVX</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=TraceDistanceCoherence&amp;diff=864&amp;oldid=prev"/>
		<updated>2016-01-12T19:05:46Z</updated>

		<summary type="html">&lt;p&gt;requires CVX&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 19:05, 12 January 2016&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=TraceDistanceCoherence&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=TraceDistanceCoherence&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=Computes the trace distance of coherence of a quantum state&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=Computes the trace distance of coherence of a quantum state&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|req=[http://cvxr.com/cvx/ 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=[[L1NormCoherence]]&amp;lt;br /&amp;gt;[[RelEntCoherence]]&amp;lt;br /&amp;gt;[[RobustnessCoherence]]&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=[[L1NormCoherence]]&amp;lt;br /&amp;gt;[[RelEntCoherence]]&amp;lt;br /&amp;gt;[[RobustnessCoherence]]&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#Coherence_and_incoherence|Coherence and incoherence]]&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#Coherence_and_incoherence|Coherence and incoherence]]&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=TraceDistanceCoherence&amp;diff=856&amp;oldid=prev</id>
		<title>Nathaniel: Created page with &quot;{{Function |name=TraceDistanceCoherence |desc=Computes the trace distance of coherence of a quantum state |rel=L1NormCoherence&lt;br /&gt;RelEntCoherence&lt;br /&gt;RobustnessCo...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=TraceDistanceCoherence&amp;diff=856&amp;oldid=prev"/>
		<updated>2016-01-12T18:50:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Function |name=TraceDistanceCoherence |desc=Computes the trace distance of coherence of a quantum state |rel=&lt;a href=&quot;/L1NormCoherence&quot; title=&quot;L1NormCoherence&quot;&gt;L1NormCoherence&lt;/a&gt;&amp;lt;br /&amp;gt;&lt;a href=&quot;/RelEntCoherence&quot; title=&quot;RelEntCoherence&quot;&gt;RelEntCoherence&lt;/a&gt;&amp;lt;br /&amp;gt;RobustnessCo...&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=TraceDistanceCoherence&lt;br /&gt;
|desc=Computes the trace distance of coherence of a quantum state&lt;br /&gt;
|rel=[[L1NormCoherence]]&amp;lt;br /&amp;gt;[[RelEntCoherence]]&amp;lt;br /&amp;gt;[[RobustnessCoherence]]&lt;br /&gt;
|cat=[[List of functions#Coherence_and_incoherence|Coherence and incoherence]]&lt;br /&gt;
|upd=January 12, 2016&lt;br /&gt;
|cvx=no}}&lt;br /&gt;
&amp;lt;tt&amp;gt;'''TraceDistanceCoherence'''&amp;lt;/tt&amp;gt; is a [[List of functions|function]] that computes the trace distance of coherence of a quantum state $\rho$, defined as follows:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;C_{\text{tr}}(\rho) := \min_{D \in \mathcal{I}}\big\{ \|\rho - D\|_{\text{tr}}\big\},&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where $\mathcal{I}$ is the set of incoherent quantum states (i.e., the set of density matrices that are diagonal in the standard basis).&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
* &amp;lt;tt&amp;gt;TDC = TraceDistanceCoherence(RHO)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;[TDC,D] = TraceDistanceCoherence(RHO)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Argument descriptions==&lt;br /&gt;
===Input arguments===&lt;br /&gt;
* &amp;lt;tt&amp;gt;RHO&amp;lt;/tt&amp;gt;: A state (either pure or mixed) to have its trace distance of coherence computed.&lt;br /&gt;
&lt;br /&gt;
===Output arguments===&lt;br /&gt;
* &amp;lt;tt&amp;gt;TDC&amp;lt;/tt&amp;gt;: The trace distance of coherence of &amp;lt;tt&amp;gt;RHO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt;: A vector such that &amp;lt;tt&amp;gt;diag(D)&amp;lt;/tt&amp;gt; is the closest incoherent state to &amp;lt;tt&amp;gt;RHO&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Maximally coherent states===&lt;br /&gt;
The largest possible value of the trace distance of coherence on $d$-dimensional states is $2 - 2/d$, and is attained exactly by the &amp;quot;maximally coherent states&amp;quot;: pure states whose entries all have the same absolute value.&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; d = 5;&lt;br /&gt;
&amp;gt;&amp;gt; v = ones(d,1)/sqrt(d); % this is a maximally coherent state&lt;br /&gt;
&amp;gt;&amp;gt; TraceDistanceCoherence(v)&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
    1.6000&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; 2 - 2/d&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
    1.6000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SourceCode|name=TraceDistanceCoherence}}&lt;/div&gt;</summary>
		<author><name>Nathaniel</name></author>
	</entry>
</feed>