<?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=IsEntanglingGate</id>
	<title>IsEntanglingGate - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qetlab.com/wiki/index.php?action=history&amp;feed=atom&amp;title=IsEntanglingGate"/>
	<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=IsEntanglingGate&amp;action=history"/>
	<updated>2026-06-29T10:06:01Z</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=IsEntanglingGate&amp;diff=368&amp;oldid=prev</id>
		<title>Nathaniel at 15:04, 22 September 2014</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=IsEntanglingGate&amp;diff=368&amp;oldid=prev"/>
		<updated>2014-09-22T15:04:30Z</updated>

		<summary type="html">&lt;p&gt;&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 15:04, 22 September 2014&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-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&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;|desc=Determines if a [[unitary]] is an [[entangling gate]]&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;|desc=Determines if a [[unitary]] is an [[entangling gate]]&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;|rel=[[IsProductOperator]]&amp;lt;br /&amp;gt;[[OperatorSchmidtDecomposition]]&amp;lt;br /&amp;gt;[[OperatorSchmidtRank]]&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;|rel=[[IsProductOperator]]&amp;lt;br /&amp;gt;[[OperatorSchmidtDecomposition]]&amp;lt;br /&amp;gt;[[OperatorSchmidtRank]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;|cat=[[List of functions#Entanglement_and_separability|Entanglement&amp;amp;nbsp;and&amp;amp;nbsp;separability]]&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;|upd=November 28, 2012&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=November 28, 2012&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;|v=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;00&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;|v=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;50&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;IsEntanglingGate&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; is a [[List of functions|function]] that determines if a [[bipartite]] or [[multipartite]] unitary is an [[entangling gate]] or not (i.e., whether or not there is a [[product vector]] that is no longer a product vector after the unitary is applied). If it is an entangling gate, a [[product vector]] that is entangled by the gate can be provided, and if it is not an entangling gate then a decomposition that proves that it is not entangling can be provided.&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;IsEntanglingGate&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; is a [[List of functions|function]] that determines if a [[bipartite]] or [[multipartite]] unitary is an [[entangling gate]] or not (i.e., whether or not there is a [[product vector]] that is no longer a product vector after the unitary is applied). If it is an entangling gate, a [[product vector]] that is entangled by the gate can be provided, and if it is not an entangling gate then a decomposition that proves that it is not entangling can be provided.&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;br&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;br&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=IsEntanglingGate&amp;diff=343&amp;oldid=prev</id>
		<title>Nathaniel: Updated documentation using GeSHi</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=IsEntanglingGate&amp;diff=343&amp;oldid=prev"/>
		<updated>2014-09-21T19:57:12Z</updated>

		<summary type="html">&lt;p&gt;Updated documentation using GeSHi&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 19:57, 21 September 2014&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=&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;|name=IsEntanglingGate&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;|name=IsEntanglingGate&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;|desc=Determines if a [[unitary]] is an [[entangling gate]]&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;|desc=Determines if a [[unitary]] is an [[entangling gate]]&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;req&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[opt_args]]&amp;lt;br /&amp;gt;&lt;/del&gt;[[IsProductOperator]]&amp;lt;br /&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[IsProductVector]]&amp;lt;br /&amp;gt;[[perm_inv]]&amp;lt;br /&amp;gt;[[PermuteSystems]]&amp;lt;br /&amp;gt;[[SchmidtDecomposition]]&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;rel&lt;/ins&gt;=[[IsProductOperator]]&amp;lt;br /&amp;gt;[[OperatorSchmidtDecomposition]]&amp;lt;br /&amp;gt;[[OperatorSchmidtRank]]&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;|rel=&lt;/del&gt;[[OperatorSchmidtDecomposition]]&amp;lt;br /&amp;gt;[[OperatorSchmidtRank]]&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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=November 28, 2012&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=November 28, 2012&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;|v=1.00}}&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;|v=1.00}}&lt;/div&gt;&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-l28&quot;&gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&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;===A bipartite example: the CNOT gate===&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;===A bipartite example: the CNOT gate===&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;The following code verifies that the [[CNOT]] gate is an entangling gate. The following code also requests a product pure state &amp;lt;tt&amp;gt;wit&amp;lt;/tt&amp;gt; that is entangled by the CNOT gate. The product pure state returned in this case is $(|0\rangle + |1\rangle) \otimes |0\rangle/\sqrt{2}$, which maps to the [[Bell state]] $(|00\rangle + |11\rangle)/\sqrt{2}$:&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;The following code verifies that the [[CNOT]] gate is an entangling gate. The following code also requests a product pure state &amp;lt;tt&amp;gt;wit&amp;lt;/tt&amp;gt; that is entangled by the CNOT gate. The product pure state returned in this case is $(|0\rangle + |1\rangle) \otimes |0\rangle/\sqrt{2}$, which maps to the [[Bell state]] $(|00\rangle + |11\rangle)/\sqrt{2}$:&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;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&amp;lt;noinclude&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;/del&gt;&amp;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;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;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;gt;&amp;gt; U = [1 0 0 0;0 1 0 0;0 0 0 1;0 0 1 0];&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;gt;&amp;gt; U = [1 0 0 0;0 1 0 0;0 0 0 1;0 0 1 0];&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;gt;&amp;gt; [eg,wit] = IsEntanglingGate(U)&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;gt;&amp;gt; [eg,wit] = IsEntanglingGate(U)&lt;/div&gt;&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-l50&quot;&gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&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;          0&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;          0&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;     0.7071&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;     0.7071&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;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&amp;lt;noinclude&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;/del&gt;&amp;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;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;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;br&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;br&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;==Notes==&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;==Notes==&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;Despite the name and description of the function, it can be used on non-unitary (and even non-square) operators just fine. If &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; is not unitary, the function has the exact same interpretation: it determines whether or not there is a product vector that is mapped to a non-product vector.&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;Despite the name and description of the function, it can be used on non-unitary (and even non-square) operators just fine. If &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; is not unitary, the function has the exact same interpretation: it determines whether or not there is a product vector that is mapped to a non-product vector.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;{{SourceCode|name=IsEntanglingGate}}&lt;/ins&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=IsEntanglingGate&amp;diff=117&amp;oldid=prev</id>
		<title>Nathaniel: /* A bipartite example: the CNOT gate */ typo</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=IsEntanglingGate&amp;diff=117&amp;oldid=prev"/>
		<updated>2012-11-28T16:33:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;A bipartite example: the CNOT gate: &lt;/span&gt; typo&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 16:33, 28 November 2012&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-l27&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&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;==Examples==&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;==Examples==&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;===A bipartite example: the CNOT gate===&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;===A bipartite example: the CNOT gate===&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;The following code &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;verified &lt;/del&gt;that the [[CNOT]] gate is an entangling gate. The following code also requests a product pure state &amp;lt;tt&amp;gt;wit&amp;lt;/tt&amp;gt; that is entangled by the CNOT gate. The product pure state returned in this case is $(|0\rangle + |1\rangle) \otimes |0\rangle/\sqrt{2}$, which maps to the [[Bell state]] $(|00\rangle + |11\rangle)/\sqrt{2}$:&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;The following code &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;verifies &lt;/ins&gt;that the [[CNOT]] gate is an entangling gate. The following code also requests a product pure state &amp;lt;tt&amp;gt;wit&amp;lt;/tt&amp;gt; that is entangled by the CNOT gate. The product pure state returned in this case is $(|0\rangle + |1\rangle) \otimes |0\rangle/\sqrt{2}$, which maps to the [[Bell state]] $(|00\rangle + |11\rangle)/\sqrt{2}$:&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;pre&amp;lt;noinclude&amp;gt;&amp;lt;/noinclude&amp;gt;&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;pre&amp;lt;noinclude&amp;gt;&amp;lt;/noinclude&amp;gt;&amp;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;gt;&amp;gt; U = [1 0 0 0;0 1 0 0;0 0 0 1;0 0 1 0];&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;gt;&amp;gt; U = [1 0 0 0;0 1 0 0;0 0 0 1;0 0 1 0];&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=IsEntanglingGate&amp;diff=114&amp;oldid=prev</id>
		<title>Nathaniel: Created page with &quot;{{Function |name=IsEntanglingGate |desc=Determines if a unitary is an entangling gate |req=opt_args&lt;br /&gt;IsProductOperator&lt;br /&gt;IsProductVector&lt;br /&gt;[[perm...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=IsEntanglingGate&amp;diff=114&amp;oldid=prev"/>
		<updated>2012-11-28T16:18:18Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Function |name=IsEntanglingGate |desc=Determines if a &lt;a href=&quot;/wiki/index.php?title=Unitary&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Unitary (page does not exist)&quot;&gt;unitary&lt;/a&gt; is an &lt;a href=&quot;/wiki/index.php?title=Entangling_gate&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Entangling gate (page does not exist)&quot;&gt;entangling gate&lt;/a&gt; |req=&lt;a href=&quot;/Opt_args&quot; title=&quot;Opt args&quot;&gt;opt_args&lt;/a&gt;&amp;lt;br /&amp;gt;&lt;a href=&quot;/IsProductOperator&quot; title=&quot;IsProductOperator&quot;&gt;IsProductOperator&lt;/a&gt;&amp;lt;br /&amp;gt;&lt;a href=&quot;/IsProductVector&quot; title=&quot;IsProductVector&quot;&gt;IsProductVector&lt;/a&gt;&amp;lt;br /&amp;gt;[[perm...&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=IsEntanglingGate&lt;br /&gt;
|desc=Determines if a [[unitary]] is an [[entangling gate]]&lt;br /&gt;
|req=[[opt_args]]&amp;lt;br /&amp;gt;[[IsProductOperator]]&amp;lt;br /&amp;gt;[[IsProductVector]]&amp;lt;br /&amp;gt;[[perm_inv]]&amp;lt;br /&amp;gt;[[PermuteSystems]]&amp;lt;br /&amp;gt;[[SchmidtDecomposition]]&lt;br /&gt;
|rel=[[OperatorSchmidtDecomposition]]&amp;lt;br /&amp;gt;[[OperatorSchmidtRank]]&lt;br /&gt;
|upd=November 28, 2012&lt;br /&gt;
|v=1.00}}&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;IsEntanglingGate&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; is a [[List of functions|function]] that determines if a [[bipartite]] or [[multipartite]] unitary is an [[entangling gate]] or not (i.e., whether or not there is a [[product vector]] that is no longer a product vector after the unitary is applied). If it is an entangling gate, a [[product vector]] that is entangled by the gate can be provided, and if it is not an entangling gate then a decomposition that proves that it is not entangling can be provided.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
* &amp;lt;tt&amp;gt;EG = IsEntanglingGate(U)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;EG = IsEntanglingGate(U,DIM)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;[EG,WIT] = IsEntanglingGate(U,DIM)&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;U&amp;lt;/tt&amp;gt;: An operator (typically a unitary operator) that acts on a [[bipartite]] or [[multipartite]] Hilbert space.&lt;br /&gt;
* &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; (optional, by default has two subsystems of equal dimension): A specification of the dimensions of the subsystems that &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; lives on. &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; can be provided in one of three ways:&lt;br /&gt;
** If &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; is a scalar, it is assumed that &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; lives on the tensor product of two spaces, the first of which has dimension &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; and the second of which has dimension &amp;lt;tt&amp;gt;length(U)/DIM&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** If $U \in M_{n_1} \otimes \cdots \otimes M_{n_p}$ 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_p]&amp;lt;/tt&amp;gt;).&lt;br /&gt;
** If the subsystems aren&amp;#039;t square (i.e., $U \in M_{m_1, n_1} \otimes \cdots \otimes M_{m_p, n_p}$) then &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; should be a matrix with two rows. The first row of &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt; should contain the row dimensions of the subsystems (i.e., the m&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&amp;#039;s) and its second row should contain the column dimensions (i.e., the n&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&amp;#039;s). In other words, you should set &amp;lt;tt&amp;gt;DIM = [m_1, ..., m_p; n_1, ..., n_p]&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Output arguments===&lt;br /&gt;
* &amp;lt;tt&amp;gt;EG&amp;lt;/tt&amp;gt;: Either 1 or 0, indicating that &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; is or is not an entangling gate.&lt;br /&gt;
* &amp;lt;tt&amp;gt;WIT&amp;lt;/tt&amp;gt; (optional): If &amp;lt;tt&amp;gt;EG = 0&amp;lt;/tt&amp;gt; (i.e., &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; is not an entangling gate), then &amp;lt;tt&amp;gt;WIT&amp;lt;/tt&amp;gt; is a struct with fields &amp;lt;tt&amp;gt;WIT.perm&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;WIT.dec&amp;lt;/tt&amp;gt; such that &amp;lt;tt&amp;gt;[[PermutationOperator|PermutationOperator(DIM,WIT.perm)]]*[[Tensor|Tensor(WIT.dec)]]&amp;lt;/tt&amp;gt; equals &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; and thus verifies that &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; is indeed not an entangling gate. If &amp;lt;tt&amp;gt;EG = 1&amp;lt;/tt&amp;gt; (i.e., &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; is an entangling gate) then &amp;lt;tt&amp;gt;WIT&amp;lt;/tt&amp;gt; is a (sparse) product pure state that is entangled by &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt;. Furthermore, &amp;lt;tt&amp;gt;WIT&amp;lt;/tt&amp;gt; will always have 2 or fewer non-zero entries in this case.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===A bipartite example: the CNOT gate===&lt;br /&gt;
The following code verified that the [[CNOT]] gate is an entangling gate. The following code also requests a product pure state &amp;lt;tt&amp;gt;wit&amp;lt;/tt&amp;gt; that is entangled by the CNOT gate. The product pure state returned in this case is $(|0\rangle + |1\rangle) \otimes |0\rangle/\sqrt{2}$, which maps to the [[Bell state]] $(|00\rangle + |11\rangle)/\sqrt{2}$:&lt;br /&gt;
&amp;lt;pre&amp;lt;noinclude&amp;gt;&amp;lt;/noinclude&amp;gt;&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; U = [1 0 0 0;0 1 0 0;0 0 0 1;0 0 1 0];&lt;br /&gt;
&amp;gt;&amp;gt; [eg,wit] = IsEntanglingGate(U)&lt;br /&gt;
&lt;br /&gt;
eg =&lt;br /&gt;
&lt;br /&gt;
     1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
wit =&lt;br /&gt;
&lt;br /&gt;
   (1,1)       0.7071&lt;br /&gt;
   (3,1)       0.7071&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; U*wit&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
    0.7071&lt;br /&gt;
         0&lt;br /&gt;
         0&lt;br /&gt;
    0.7071&lt;br /&gt;
&amp;lt;/pre&amp;lt;noinclude&amp;gt;&amp;lt;/noinclude&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
Despite the name and description of the function, it can be used on non-unitary (and even non-square) operators just fine. If &amp;lt;tt&amp;gt;U&amp;lt;/tt&amp;gt; is not unitary, the function has the exact same interpretation: it determines whether or not there is a product vector that is mapped to a non-product vector.&lt;/div&gt;</summary>
		<author><name>Nathaniel</name></author>
	</entry>
</feed>